blob: ee3ff28ed37301c276ea38b0684e3a2b8ad81cda [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00002# From configure.in Revision: 78818 .
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
Martin v. Löwis11437992002-04-12 09:54:03 +00002305ac_ext=c
2306ac_cpp='$CPP $CPPFLAGS'
2307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2309ac_compiler_gnu=$ac_cv_c_compiler_gnu
2310if test -n "$ac_tool_prefix"; then
2311 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2312set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002313{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2314echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002315if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002317else
2318 if test -n "$CC"; then
2319 ac_cv_prog_CC="$CC" # Let the user override the test.
2320else
Martin v. Löwis11437992002-04-12 09:54:03 +00002321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2322for as_dir in $PATH
2323do
2324 IFS=$as_save_IFS
2325 test -z "$as_dir" && as_dir=.
2326 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002327 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 +00002328 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002329 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002330 break 2
2331 fi
2332done
2333done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002335
Jack Jansendd19cf82001-12-06 22:36:17 +00002336fi
2337fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002338CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002339if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002340 { echo "$as_me:$LINENO: result: $CC" >&5
2341echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002342else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002343 { echo "$as_me:$LINENO: result: no" >&5
2344echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002345fi
2346
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002347
Martin v. Löwis11437992002-04-12 09:54:03 +00002348fi
2349if test -z "$ac_cv_prog_CC"; then
2350 ac_ct_CC=$CC
2351 # Extract the first word of "gcc", so it can be a program name with args.
2352set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002353{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002355if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002356 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002357else
2358 if test -n "$ac_ct_CC"; then
2359 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2360else
2361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2362for as_dir in $PATH
2363do
2364 IFS=$as_save_IFS
2365 test -z "$as_dir" && as_dir=.
2366 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367 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 +00002368 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002369 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002370 break 2
2371 fi
2372done
2373done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002374IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002375
2376fi
2377fi
2378ac_ct_CC=$ac_cv_prog_ac_ct_CC
2379if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002380 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2381echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002383 { echo "$as_me:$LINENO: result: no" >&5
2384echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002385fi
2386
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002387 if test "x$ac_ct_CC" = x; then
2388 CC=""
2389 else
2390 case $cross_compiling:$ac_tool_warned in
2391yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002392{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2393whose name does not start with the host triplet. If you think this
2394configuration is useful to you, please write to autoconf@gnu.org." >&5
2395echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2396whose name does not start with the host triplet. If you think this
2397configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002398ac_tool_warned=yes ;;
2399esac
2400 CC=$ac_ct_CC
2401 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002402else
2403 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002404fi
2405
Jack Jansendd19cf82001-12-06 22:36:17 +00002406if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407 if test -n "$ac_tool_prefix"; then
2408 # 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 +00002409set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002410{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2411echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002413 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002414else
2415 if test -n "$CC"; then
2416 ac_cv_prog_CC="$CC" # Let the user override the test.
2417else
Martin v. Löwis11437992002-04-12 09:54:03 +00002418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2419for as_dir in $PATH
2420do
2421 IFS=$as_save_IFS
2422 test -z "$as_dir" && as_dir=.
2423 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 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 +00002425 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002426 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002427 break 2
2428 fi
2429done
2430done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002431IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433fi
2434fi
2435CC=$ac_cv_prog_CC
2436if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002437 { echo "$as_me:$LINENO: result: $CC" >&5
2438echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002439else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002440 { echo "$as_me:$LINENO: result: no" >&5
2441echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002442fi
2443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444
Martin v. Löwis11437992002-04-12 09:54:03 +00002445 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002446fi
2447if test -z "$CC"; then
2448 # Extract the first word of "cc", so it can be a program name with args.
2449set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002450{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2451echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002452if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002453 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002454else
2455 if test -n "$CC"; then
2456 ac_cv_prog_CC="$CC" # Let the user override the test.
2457else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2460for as_dir in $PATH
2461do
2462 IFS=$as_save_IFS
2463 test -z "$as_dir" && as_dir=.
2464 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 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 +00002466 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2467 ac_prog_rejected=yes
2468 continue
2469 fi
2470 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002471 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 break 2
2473 fi
2474done
2475done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002478if test $ac_prog_rejected = yes; then
2479 # We found a bogon in the path, so make sure we never use it.
2480 set dummy $ac_cv_prog_CC
2481 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002483 # We chose a different compiler from the bogus one.
2484 # However, it has the same basename, so the bogon will be chosen
2485 # first if we set CC to just the basename; use the full file name.
2486 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002488 fi
2489fi
2490fi
2491fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002492CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002493if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002494 { echo "$as_me:$LINENO: result: $CC" >&5
2495echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002496else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002497 { echo "$as_me:$LINENO: result: no" >&5
2498echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002499fi
2500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501
Martin v. Löwis11437992002-04-12 09:54:03 +00002502fi
2503if test -z "$CC"; then
2504 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 do
2507 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2508set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002509{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2510echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002511if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002512 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002513else
2514 if test -n "$CC"; then
2515 ac_cv_prog_CC="$CC" # Let the user override the test.
2516else
Martin v. Löwis11437992002-04-12 09:54:03 +00002517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2518for as_dir in $PATH
2519do
2520 IFS=$as_save_IFS
2521 test -z "$as_dir" && as_dir=.
2522 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 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 +00002524 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002525 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002527 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
2529done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002531
2532fi
2533fi
2534CC=$ac_cv_prog_CC
2535if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002536 { echo "$as_me:$LINENO: result: $CC" >&5
2537echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002539 { echo "$as_me:$LINENO: result: no" >&5
2540echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002541fi
2542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 test -n "$CC" && break
2545 done
2546fi
2547if test -z "$CC"; then
2548 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002550do
2551 # Extract the first word of "$ac_prog", so it can be a program name with args.
2552set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002553{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2554echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002555if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002556 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002557else
2558 if test -n "$ac_ct_CC"; then
2559 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2560else
2561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2562for as_dir in $PATH
2563do
2564 IFS=$as_save_IFS
2565 test -z "$as_dir" && as_dir=.
2566 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 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 +00002568 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002569 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 break 2
2571 fi
2572done
2573done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576fi
2577fi
2578ac_ct_CC=$ac_cv_prog_ac_ct_CC
2579if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002580 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2581echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002582else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002583 { echo "$as_me:$LINENO: result: no" >&5
2584echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002585fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 test -n "$ac_ct_CC" && break
2589done
Michael W. Hudson54241132001-12-07 15:38:26 +00002590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 if test "x$ac_ct_CC" = x; then
2592 CC=""
2593 else
2594 case $cross_compiling:$ac_tool_warned in
2595yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002596{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2597whose name does not start with the host triplet. If you think this
2598configuration is useful to you, please write to autoconf@gnu.org." >&5
2599echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2600whose name does not start with the host triplet. If you think this
2601configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602ac_tool_warned=yes ;;
2603esac
2604 CC=$ac_ct_CC
2605 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002606fi
2607
2608fi
2609
2610
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002611test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002612See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002613echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002614See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002615 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002616
2617# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002618echo "$as_me:$LINENO: checking for C compiler version" >&5
2619ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620{ (ac_try="$ac_compiler --version >&5"
2621case "(($ac_try" in
2622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2623 *) ac_try_echo=$ac_try;;
2624esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630{ (ac_try="$ac_compiler -v >&5"
2631case "(($ac_try" in
2632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2633 *) ac_try_echo=$ac_try;;
2634esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640{ (ac_try="$ac_compiler -V >&5"
2641case "(($ac_try" in
2642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2643 *) ac_try_echo=$ac_try;;
2644esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 (exit $ac_status); }
2650
2651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002652/* confdefs.h. */
2653_ACEOF
2654cat confdefs.h >>conftest.$ac_ext
2655cat >>conftest.$ac_ext <<_ACEOF
2656/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002657
Martin v. Löwis11437992002-04-12 09:54:03 +00002658int
2659main ()
2660{
2661
2662 ;
2663 return 0;
2664}
2665_ACEOF
2666ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002667ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002668# Try to create an executable without -o first, disregard a.out.
2669# It will help us diagnose broken compilers, and finding out an intuition
2670# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002671{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2672echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2673ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2674#
2675# List of possible output files, starting from the most likely.
2676# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2677# only as a last resort. b.out is created by i960 compilers.
2678ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2679#
2680# The IRIX 6 linker writes into existing files which may not be
2681# executable, retaining their permissions. Remove them first so a
2682# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683ac_rmfiles=
2684for ac_file in $ac_files
2685do
2686 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002687 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2689 esac
2690done
2691rm -f $ac_rmfiles
2692
2693if { (ac_try="$ac_link_default"
2694case "(($ac_try" in
2695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696 *) ac_try_echo=$ac_try;;
2697esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2704# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2705# in a Makefile. We should not override ac_cv_exeext if it was cached,
2706# so that the user can short-circuit this test for compilers unknown to
2707# Autoconf.
2708for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002709do
2710 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002712 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002713 ;;
2714 [ab].out )
2715 # We found the default executable, but exeext='' is most
2716 # certainly right.
2717 break;;
2718 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2720 then :; else
2721 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2722 fi
2723 # We set ac_cv_exeext here because the later test for it is not
2724 # safe: cross compilers may not add the suffix if given an `-o'
2725 # argument, so we may need to know it at that point already.
2726 # Even if this section looks crufty: it has the advantage of
2727 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002728 break;;
2729 * )
2730 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 esac
2732done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733test "$ac_cv_exeext" = no && ac_cv_exeext=
2734
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002735else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736 ac_file=''
2737fi
2738
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002739{ echo "$as_me:$LINENO: result: $ac_file" >&5
2740echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002741if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002743sed 's/^/| /' conftest.$ac_ext >&5
2744
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002745{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002746See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002747echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002748See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002749 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002750fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002751
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002752ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002755# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002756{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2757echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002758# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2759# If not cross compiling, check that we can run a simple program.
2760if test "$cross_compiling" != yes; then
2761 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762 { (case "(($ac_try" in
2763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2764 *) ac_try_echo=$ac_try;;
2765esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 (exit $ac_status); }; }; then
2771 cross_compiling=no
2772 else
2773 if test "$cross_compiling" = maybe; then
2774 cross_compiling=yes
2775 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002776 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002777If you meant to cross compile, use \`--host'.
2778See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002779echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002780If you meant to cross compile, use \`--host'.
2781See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002782 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002783 fi
2784 fi
2785fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002786{ echo "$as_me:$LINENO: result: yes" >&5
2787echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002788
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002789rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002790ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002791# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002792# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002793{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2794echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2795{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2796echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002797
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002798{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2799echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002800if { (ac_try="$ac_link"
2801case "(($ac_try" in
2802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2803 *) ac_try_echo=$ac_try;;
2804esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002806 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002807 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002809 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002810 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2811# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2812# work properly (i.e., refer to `conftest.exe'), while it won't with
2813# `rm'.
2814for ac_file in conftest.exe conftest conftest.*; do
2815 test -f "$ac_file" || continue
2816 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002817 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002818 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2819 break;;
2820 * ) break;;
2821 esac
2822done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002823else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002824 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002825See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002826echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002827See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002828 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002829fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002830
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002831rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002832{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2833echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002834
2835rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002836EXEEXT=$ac_cv_exeext
2837ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002838{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2839echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002840if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002841 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002842else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002843 cat >conftest.$ac_ext <<_ACEOF
2844/* confdefs.h. */
2845_ACEOF
2846cat confdefs.h >>conftest.$ac_ext
2847cat >>conftest.$ac_ext <<_ACEOF
2848/* end confdefs.h. */
2849
2850int
2851main ()
2852{
2853
2854 ;
2855 return 0;
2856}
2857_ACEOF
2858rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002859if { (ac_try="$ac_compile"
2860case "(($ac_try" in
2861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2862 *) ac_try_echo=$ac_try;;
2863esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002865 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002866 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002868 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002869 for ac_file in conftest.o conftest.obj conftest.*; do
2870 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002872 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2874 break;;
2875 esac
2876done
2877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002879sed 's/^/| /' conftest.$ac_ext >&5
2880
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002881{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002882See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002883echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002884See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002885 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002886fi
2887
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002888rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002889fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002890{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2891echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002892OBJEXT=$ac_cv_objext
2893ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002894{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2895echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002896if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002897 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002898else
2899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002900/* confdefs.h. */
2901_ACEOF
2902cat confdefs.h >>conftest.$ac_ext
2903cat >>conftest.$ac_ext <<_ACEOF
2904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002905
Martin v. Löwis11437992002-04-12 09:54:03 +00002906int
2907main ()
2908{
2909#ifndef __GNUC__
2910 choke me
2911#endif
2912
2913 ;
2914 return 0;
2915}
2916_ACEOF
2917rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002918if { (ac_try="$ac_compile"
2919case "(($ac_try" in
2920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2921 *) ac_try_echo=$ac_try;;
2922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002926 grep -v '^ *+' conftest.er1 >conftest.err
2927 rm -f conftest.er1
2928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002930 (exit $ac_status); } && {
2931 test -z "$ac_c_werror_flag" ||
2932 test ! -s conftest.err
2933 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 ac_compiler_gnu=yes
2935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002937sed 's/^/| /' conftest.$ac_ext >&5
2938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002939 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941
2942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002943ac_cv_c_compiler_gnu=$ac_compiler_gnu
2944
2945fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002946{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2947echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2948GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002949ac_test_CFLAGS=${CFLAGS+set}
2950ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002951{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2952echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002953if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002955else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002956 ac_save_c_werror_flag=$ac_c_werror_flag
2957 ac_c_werror_flag=yes
2958 ac_cv_prog_cc_g=no
2959 CFLAGS="-g"
2960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002961/* confdefs.h. */
2962_ACEOF
2963cat confdefs.h >>conftest.$ac_ext
2964cat >>conftest.$ac_ext <<_ACEOF
2965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967int
2968main ()
2969{
2970
2971 ;
2972 return 0;
2973}
2974_ACEOF
2975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002976if { (ac_try="$ac_compile"
2977case "(($ac_try" in
2978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2979 *) ac_try_echo=$ac_try;;
2980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002984 grep -v '^ *+' conftest.er1 >conftest.err
2985 rm -f conftest.er1
2986 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988 (exit $ac_status); } && {
2989 test -z "$ac_c_werror_flag" ||
2990 test ! -s conftest.err
2991 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002992 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002993else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002995sed 's/^/| /' conftest.$ac_ext >&5
2996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002997 CFLAGS=""
2998 cat >conftest.$ac_ext <<_ACEOF
2999/* confdefs.h. */
3000_ACEOF
3001cat confdefs.h >>conftest.$ac_ext
3002cat >>conftest.$ac_ext <<_ACEOF
3003/* end confdefs.h. */
3004
3005int
3006main ()
3007{
3008
3009 ;
3010 return 0;
3011}
3012_ACEOF
3013rm -f conftest.$ac_objext
3014if { (ac_try="$ac_compile"
3015case "(($ac_try" in
3016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3017 *) ac_try_echo=$ac_try;;
3018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020 (eval "$ac_compile") 2>conftest.er1
3021 ac_status=$?
3022 grep -v '^ *+' conftest.er1 >conftest.err
3023 rm -f conftest.er1
3024 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003026 (exit $ac_status); } && {
3027 test -z "$ac_c_werror_flag" ||
3028 test ! -s conftest.err
3029 } && test -s conftest.$ac_objext; then
3030 :
3031else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003032 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003033sed 's/^/| /' conftest.$ac_ext >&5
3034
3035 ac_c_werror_flag=$ac_save_c_werror_flag
3036 CFLAGS="-g"
3037 cat >conftest.$ac_ext <<_ACEOF
3038/* confdefs.h. */
3039_ACEOF
3040cat confdefs.h >>conftest.$ac_ext
3041cat >>conftest.$ac_ext <<_ACEOF
3042/* end confdefs.h. */
3043
3044int
3045main ()
3046{
3047
3048 ;
3049 return 0;
3050}
3051_ACEOF
3052rm -f conftest.$ac_objext
3053if { (ac_try="$ac_compile"
3054case "(($ac_try" in
3055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056 *) ac_try_echo=$ac_try;;
3057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003059 (eval "$ac_compile") 2>conftest.er1
3060 ac_status=$?
3061 grep -v '^ *+' conftest.er1 >conftest.err
3062 rm -f conftest.er1
3063 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065 (exit $ac_status); } && {
3066 test -z "$ac_c_werror_flag" ||
3067 test ! -s conftest.err
3068 } && test -s conftest.$ac_objext; then
3069 ac_cv_prog_cc_g=yes
3070else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003071 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003072sed 's/^/| /' conftest.$ac_ext >&5
3073
3074
Guido van Rossum627b2d71993-12-24 10:39:16 +00003075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076
3077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079
3080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3081fi
3082
3083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3084 ac_c_werror_flag=$ac_save_c_werror_flag
3085fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003086{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3087echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003088if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003089 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003090elif test $ac_cv_prog_cc_g = yes; then
3091 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003092 CFLAGS="-g -O2"
3093 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003094 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003095 fi
3096else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003097 if test "$GCC" = yes; then
3098 CFLAGS="-O2"
3099 else
3100 CFLAGS=
3101 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003102fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003103{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3104echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003106 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003107else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003109ac_save_CC=$CC
3110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003111/* confdefs.h. */
3112_ACEOF
3113cat confdefs.h >>conftest.$ac_ext
3114cat >>conftest.$ac_ext <<_ACEOF
3115/* end confdefs.h. */
3116#include <stdarg.h>
3117#include <stdio.h>
3118#include <sys/types.h>
3119#include <sys/stat.h>
3120/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3121struct buf { int x; };
3122FILE * (*rcsopen) (struct buf *, struct stat *, int);
3123static char *e (p, i)
3124 char **p;
3125 int i;
3126{
3127 return p[i];
3128}
3129static char *f (char * (*g) (char **, int), char **p, ...)
3130{
3131 char *s;
3132 va_list v;
3133 va_start (v,p);
3134 s = g (p, va_arg (v,int));
3135 va_end (v);
3136 return s;
3137}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003138
3139/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3140 function prototypes and stuff, but not '\xHH' hex character constants.
3141 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003143 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3144 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003145 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003146int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3147
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003148/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3149 inside strings and character constants. */
3150#define FOO(x) 'x'
3151int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3152
Skip Montanaro6dead952003-09-25 14:50:04 +00003153int test (int i, double x);
3154struct s1 {int (*f) (int a);};
3155struct s2 {int (*f) (double a);};
3156int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3157int argc;
3158char **argv;
3159int
3160main ()
3161{
3162return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3163 ;
3164 return 0;
3165}
3166_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003167for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3168 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003169do
3170 CC="$ac_save_CC $ac_arg"
3171 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172if { (ac_try="$ac_compile"
3173case "(($ac_try" in
3174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3175 *) ac_try_echo=$ac_try;;
3176esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003180 grep -v '^ *+' conftest.er1 >conftest.err
3181 rm -f conftest.er1
3182 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184 (exit $ac_status); } && {
3185 test -z "$ac_c_werror_flag" ||
3186 test ! -s conftest.err
3187 } && test -s conftest.$ac_objext; then
3188 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003189else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003191sed 's/^/| /' conftest.$ac_ext >&5
3192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193
Skip Montanaro6dead952003-09-25 14:50:04 +00003194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195
3196rm -f core conftest.err conftest.$ac_objext
3197 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003198done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003200CC=$ac_save_CC
3201
3202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203# AC_CACHE_VAL
3204case "x$ac_cv_prog_cc_c89" in
3205 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003206 { echo "$as_me:$LINENO: result: none needed" >&5
3207echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003208 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003209 { echo "$as_me:$LINENO: result: unsupported" >&5
3210echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003211 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003213 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3214echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003215esac
3216
Skip Montanaro6dead952003-09-25 14:50:04 +00003217
Martin v. Löwis11437992002-04-12 09:54:03 +00003218ac_ext=c
3219ac_cpp='$CPP $CPPFLAGS'
3220ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3221ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3222ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003223
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003224
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003225
3226
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003227{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3228echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003231if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003233
3234 case $withval in
3235 no) with_cxx_main=no
3236 MAINCC='$(CC)';;
3237 yes) with_cxx_main=yes
3238 MAINCC='$(CXX)';;
3239 *) with_cxx_main=yes
3240 MAINCC=$withval
3241 if test -z "$CXX"
3242 then
3243 CXX=$withval
3244 fi;;
3245 esac
3246else
3247
3248 with_cxx_main=no
3249 MAINCC='$(CC)'
3250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251fi
3252
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003253{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3254echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003255
3256preset_cxx="$CXX"
3257if test -z "$CXX"
3258then
3259 case "$CC" in
3260 gcc) # Extract the first word of "g++", so it can be a program name with args.
3261set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003262{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3263echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003264if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003265 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003266else
3267 case $CXX in
3268 [\\/]* | ?:[\\/]*)
3269 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3270 ;;
3271 *)
3272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3273for as_dir in notfound
3274do
3275 IFS=$as_save_IFS
3276 test -z "$as_dir" && as_dir=.
3277 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278 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 +00003279 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003280 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003281 break 2
3282 fi
3283done
3284done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003286
3287 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3288 ;;
3289esac
3290fi
3291CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003292if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003293 { echo "$as_me:$LINENO: result: $CXX" >&5
3294echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003295else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003296 { echo "$as_me:$LINENO: result: no" >&5
3297echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003299
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003300 ;;
3301 cc) # Extract the first word of "c++", so it can be a program name with args.
3302set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003303{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3304echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003305if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003306 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003307else
3308 case $CXX in
3309 [\\/]* | ?:[\\/]*)
3310 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3311 ;;
3312 *)
3313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3314for as_dir in notfound
3315do
3316 IFS=$as_save_IFS
3317 test -z "$as_dir" && as_dir=.
3318 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319 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 +00003320 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003321 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003322 break 2
3323 fi
3324done
3325done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003326IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327
3328 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3329 ;;
3330esac
3331fi
3332CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003333if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003334 { echo "$as_me:$LINENO: result: $CXX" >&5
3335echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003336else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003337 { echo "$as_me:$LINENO: result: no" >&5
3338echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003340
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003341 ;;
3342 esac
3343 if test "$CXX" = "notfound"
3344 then
3345 CXX=""
3346 fi
3347fi
3348if test -z "$CXX"
3349then
3350 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3351do
3352 # Extract the first word of "$ac_prog", so it can be a program name with args.
3353set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003354{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3355echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003356if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003357 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358else
3359 if test -n "$CXX"; then
3360 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3361else
3362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3363for as_dir in $PATH
3364do
3365 IFS=$as_save_IFS
3366 test -z "$as_dir" && as_dir=.
3367 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003368 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 +00003369 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003370 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003371 break 2
3372 fi
3373done
3374done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003375IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003376
3377fi
3378fi
3379CXX=$ac_cv_prog_CXX
3380if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003381 { echo "$as_me:$LINENO: result: $CXX" >&5
3382echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003383else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003384 { echo "$as_me:$LINENO: result: no" >&5
3385echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003386fi
3387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003388
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003389 test -n "$CXX" && break
3390done
3391test -n "$CXX" || CXX="notfound"
3392
3393 if test "$CXX" = "notfound"
3394 then
3395 CXX=""
3396 fi
3397fi
3398if test "$preset_cxx" != "$CXX"
3399then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003400 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003401
3402 By default, distutils will build C++ extension modules with \"$CXX\".
3403 If this is not intended, then set CXX on the configure command line.
3404 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003405echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003406
3407 By default, distutils will build C++ extension modules with \"$CXX\".
3408 If this is not intended, then set CXX on the configure command line.
3409 " >&2;}
3410fi
3411
3412
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003413# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003414
3415ac_ext=c
3416ac_cpp='$CPP $CPPFLAGS'
3417ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3418ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3419ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003420{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3421echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003422# On Suns, sometimes $CPP names a directory.
3423if test -n "$CPP" && test -d "$CPP"; then
3424 CPP=
3425fi
3426if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003428 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003429else
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 # Double quotes because CPP needs to be expanded
3431 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3432 do
3433 ac_preproc_ok=false
3434for ac_c_preproc_warn_flag in '' yes
3435do
3436 # Use a header file that comes with gcc, so configuring glibc
3437 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003438 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3439 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003440 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 # not just through cpp. "Syntax error" is here to catch this case.
3442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003443/* confdefs.h. */
3444_ACEOF
3445cat confdefs.h >>conftest.$ac_ext
3446cat >>conftest.$ac_ext <<_ACEOF
3447/* end confdefs.h. */
3448#ifdef __STDC__
3449# include <limits.h>
3450#else
3451# include <assert.h>
3452#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003453 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003454_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003455if { (ac_try="$ac_cpp conftest.$ac_ext"
3456case "(($ac_try" in
3457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3458 *) ac_try_echo=$ac_try;;
3459esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003463 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 rm -f conftest.er1
3465 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 (exit $ac_status); } >/dev/null && {
3468 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3469 test ! -s conftest.err
3470 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003471 :
3472else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003474sed 's/^/| /' conftest.$ac_ext >&5
3475
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 # Broken: fails on valid input.
3477continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479
Martin v. Löwis11437992002-04-12 09:54:03 +00003480rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 # can be detected and how.
3484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003485/* confdefs.h. */
3486_ACEOF
3487cat confdefs.h >>conftest.$ac_ext
3488cat >>conftest.$ac_ext <<_ACEOF
3489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003490#include <ac_nonexistent.h>
3491_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003492if { (ac_try="$ac_cpp conftest.$ac_ext"
3493case "(($ac_try" in
3494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3495 *) ac_try_echo=$ac_try;;
3496esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003498 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003499 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003500 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 rm -f conftest.er1
3502 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504 (exit $ac_status); } >/dev/null && {
3505 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3506 test ! -s conftest.err
3507 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 # Broken: success on invalid input.
3509continue
3510else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003512sed 's/^/| /' conftest.$ac_ext >&5
3513
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 # Passes both tests.
3515ac_preproc_ok=:
3516break
3517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003518
Martin v. Löwis11437992002-04-12 09:54:03 +00003519rm -f conftest.err conftest.$ac_ext
3520
3521done
3522# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3523rm -f conftest.err conftest.$ac_ext
3524if $ac_preproc_ok; then
3525 break
3526fi
3527
3528 done
3529 ac_cv_prog_CPP=$CPP
3530
3531fi
3532 CPP=$ac_cv_prog_CPP
3533else
3534 ac_cv_prog_CPP=$CPP
3535fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003536{ echo "$as_me:$LINENO: result: $CPP" >&5
3537echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003538ac_preproc_ok=false
3539for ac_c_preproc_warn_flag in '' yes
3540do
3541 # Use a header file that comes with gcc, so configuring glibc
3542 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003543 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3544 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 # On the NeXT, cc -E runs the code through the compiler's parser,
3546 # not just through cpp. "Syntax error" is here to catch this case.
3547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003548/* confdefs.h. */
3549_ACEOF
3550cat confdefs.h >>conftest.$ac_ext
3551cat >>conftest.$ac_ext <<_ACEOF
3552/* end confdefs.h. */
3553#ifdef __STDC__
3554# include <limits.h>
3555#else
3556# include <assert.h>
3557#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003558 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003559_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560if { (ac_try="$ac_cpp conftest.$ac_ext"
3561case "(($ac_try" in
3562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563 *) ac_try_echo=$ac_try;;
3564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003568 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 rm -f conftest.er1
3570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572 (exit $ac_status); } >/dev/null && {
3573 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3574 test ! -s conftest.err
3575 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 :
3577else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003579sed 's/^/| /' conftest.$ac_ext >&5
3580
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 # Broken: fails on valid input.
3582continue
3583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584
Martin v. Löwis11437992002-04-12 09:54:03 +00003585rm -f conftest.err conftest.$ac_ext
3586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 # can be detected and how.
3589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003590/* confdefs.h. */
3591_ACEOF
3592cat confdefs.h >>conftest.$ac_ext
3593cat >>conftest.$ac_ext <<_ACEOF
3594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003595#include <ac_nonexistent.h>
3596_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597if { (ac_try="$ac_cpp conftest.$ac_ext"
3598case "(($ac_try" in
3599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3600 *) ac_try_echo=$ac_try;;
3601esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003605 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 rm -f conftest.er1
3607 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609 (exit $ac_status); } >/dev/null && {
3610 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3611 test ! -s conftest.err
3612 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 # Broken: success on invalid input.
3614continue
3615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003617sed 's/^/| /' conftest.$ac_ext >&5
3618
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 # Passes both tests.
3620ac_preproc_ok=:
3621break
3622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623
Martin v. Löwis11437992002-04-12 09:54:03 +00003624rm -f conftest.err conftest.$ac_ext
3625
3626done
3627# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3628rm -f conftest.err conftest.$ac_ext
3629if $ac_preproc_ok; then
3630 :
3631else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003632 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003633See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003634echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003635See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003636 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003637fi
3638
3639ac_ext=c
3640ac_cpp='$CPP $CPPFLAGS'
3641ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3642ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3643ac_compiler_gnu=$ac_cv_c_compiler_gnu
3644
3645
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003646{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3647echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003649 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003650else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003651 # Extract the first word of "grep ggrep" to use in msg output
3652if test -z "$GREP"; then
3653set dummy grep ggrep; ac_prog_name=$2
3654if test "${ac_cv_path_GREP+set}" = set; then
3655 echo $ECHO_N "(cached) $ECHO_C" >&6
3656else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003658# Loop through the user's path and test for each of PROGNAME-LIST
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3661do
3662 IFS=$as_save_IFS
3663 test -z "$as_dir" && as_dir=.
3664 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003665 for ac_exec_ext in '' $ac_executable_extensions; do
3666 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3667 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3668 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 # Check for GNU $ac_path_GREP
3670case `"$ac_path_GREP" --version 2>&1` in
3671*GNU*)
3672 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3673*)
3674 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003675 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 while :
3677 do
3678 cat "conftest.in" "conftest.in" >"conftest.tmp"
3679 mv "conftest.tmp" "conftest.in"
3680 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003681 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3683 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3684 ac_count=`expr $ac_count + 1`
3685 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3686 # Best one so far, save it but keep looking for a better one
3687 ac_cv_path_GREP="$ac_path_GREP"
3688 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003689 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690 # 10*(2^10) chars as input seems more than enough
3691 test $ac_count -gt 10 && break
3692 done
3693 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3694esac
3695
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003696
3697 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698 done
3699done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003700
3701done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003703
3704
3705fi
3706
3707GREP="$ac_cv_path_GREP"
3708if test -z "$GREP"; then
3709 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3710echo "$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 +00003711 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003712fi
3713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714else
3715 ac_cv_path_GREP=$GREP
3716fi
3717
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003720{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3721echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722 GREP="$ac_cv_path_GREP"
3723
3724
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003725{ echo "$as_me:$LINENO: checking for egrep" >&5
3726echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003728 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729else
3730 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3731 then ac_cv_path_EGREP="$GREP -E"
3732 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003733 # Extract the first word of "egrep" to use in msg output
3734if test -z "$EGREP"; then
3735set dummy egrep; ac_prog_name=$2
3736if test "${ac_cv_path_EGREP+set}" = set; then
3737 echo $ECHO_N "(cached) $ECHO_C" >&6
3738else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003740# Loop through the user's path and test for each of PROGNAME-LIST
3741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3743do
3744 IFS=$as_save_IFS
3745 test -z "$as_dir" && as_dir=.
3746 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003747 for ac_exec_ext in '' $ac_executable_extensions; do
3748 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3749 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3750 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 # Check for GNU $ac_path_EGREP
3752case `"$ac_path_EGREP" --version 2>&1` in
3753*GNU*)
3754 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3755*)
3756 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003757 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758 while :
3759 do
3760 cat "conftest.in" "conftest.in" >"conftest.tmp"
3761 mv "conftest.tmp" "conftest.in"
3762 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003763 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3765 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3766 ac_count=`expr $ac_count + 1`
3767 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3768 # Best one so far, save it but keep looking for a better one
3769 ac_cv_path_EGREP="$ac_path_EGREP"
3770 ac_path_EGREP_max=$ac_count
3771 fi
3772 # 10*(2^10) chars as input seems more than enough
3773 test $ac_count -gt 10 && break
3774 done
3775 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3776esac
3777
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003778
3779 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780 done
3781done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003782
3783done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003785
3786
3787fi
3788
3789EGREP="$ac_cv_path_EGREP"
3790if test -z "$EGREP"; then
3791 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3792echo "$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 +00003793 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003794fi
3795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796else
3797 ac_cv_path_EGREP=$EGREP
3798fi
3799
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 fi
3802fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003803{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3804echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003806
3807
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003808
3809{ echo "$as_me:$LINENO: checking for AIX" >&5
3810echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3811cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003812/* confdefs.h. */
3813_ACEOF
3814cat confdefs.h >>conftest.$ac_ext
3815cat >>conftest.$ac_ext <<_ACEOF
3816/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003817#ifdef _AIX
3818 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003819#endif
3820
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003821_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3823 $EGREP "yes" >/dev/null 2>&1; then
3824 { echo "$as_me:$LINENO: result: yes" >&5
3825echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003826cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003827#define _ALL_SOURCE 1
3828_ACEOF
3829
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003830else
3831 { echo "$as_me:$LINENO: result: no" >&5
3832echo "${ECHO_T}no" >&6; }
3833fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00003834rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003835
3836
3837
3838# Check for unsupported systems
3839case $ac_sys_system/$ac_sys_release in
3840atheos*|Linux*/1*)
3841 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3842 echo See README for details.
3843 exit 1;;
3844esac
3845
3846
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003847{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3848echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003849
3850# Check whether --with-suffix was given.
3851if test "${with_suffix+set}" = set; then
3852 withval=$with_suffix;
3853 case $withval in
3854 no) EXEEXT=;;
3855 yes) EXEEXT=.exe;;
3856 *) EXEEXT=$withval;;
3857 esac
3858fi
3859
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003860{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3861echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003862
3863# Test whether we're running on a non-case-sensitive system, in which
3864# case we give a warning if no ext is given
3865
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003866{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3867echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003868if test ! -d CaseSensitiveTestDir; then
3869mkdir CaseSensitiveTestDir
3870fi
3871
3872if test -d casesensitivetestdir
3873then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003874 { echo "$as_me:$LINENO: result: yes" >&5
3875echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003876 BUILDEXEEXT=.exe
3877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003878 { echo "$as_me:$LINENO: result: no" >&5
3879echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003880 BUILDEXEEXT=$EXEEXT
3881fi
3882rmdir CaseSensitiveTestDir
3883
3884case $MACHDEP in
3885bsdos*)
3886 case $CC in
3887 gcc) CC="$CC -D_HAVE_BSDI";;
3888 esac;;
3889esac
3890
3891case $ac_sys_system in
3892hp*|HP*)
3893 case $CC in
3894 cc|*/cc) CC="$CC -Ae";;
3895 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003896SunOS*)
3897 # Some functions have a prototype only with that define, e.g. confstr
3898
3899cat >>confdefs.h <<\_ACEOF
3900#define __EXTENSIONS__ 1
3901_ACEOF
3902
3903 ;;
3904esac
3905
3906
3907
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003908{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3909echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003910if test -z "$LIBRARY"
3911then
3912 LIBRARY='libpython$(VERSION).a'
3913fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003914{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3915echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003916
3917# LDLIBRARY is the name of the library to link against (as opposed to the
3918# name of the library into which to insert object files). BLDLIBRARY is also
3919# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3920# is blank as the main program is not linked directly against LDLIBRARY.
3921# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3922# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3923# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3924# DLLLIBRARY is the shared (i.e., DLL) library.
3925#
3926# RUNSHARED is used to run shared python without installed libraries
3927#
3928# INSTSONAME is the name of the shared library that will be use to install
3929# on the system - some systems like version suffix, others don't
3930
3931
3932
3933
3934
3935
3936LDLIBRARY="$LIBRARY"
3937BLDLIBRARY='$(LDLIBRARY)'
3938INSTSONAME='$(LDLIBRARY)'
3939DLLLIBRARY=''
3940LDLIBRARYDIR=''
3941RUNSHARED=''
3942
3943# LINKCC is the command that links the python executable -- default is $(CC).
3944# If CXX is set, and if it is needed to link a main function that was
3945# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3946# python might then depend on the C++ runtime
3947# This is altered for AIX in order to build the export list before
3948# linking.
3949
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003950{ echo "$as_me:$LINENO: checking LINKCC" >&5
3951echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003952if test -z "$LINKCC"
3953then
3954 LINKCC='$(PURIFY) $(MAINCC)'
3955 case $ac_sys_system in
3956 AIX*)
3957 exp_extra="\"\""
3958 if test $ac_sys_release -ge 5 -o \
3959 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3960 exp_extra="."
3961 fi
3962 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003963 QNX*)
3964 # qcc must be used because the other compilers do not
3965 # support -N.
3966 LINKCC=qcc;;
3967 esac
3968fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003969{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3970echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003971
3972# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3973# make sure we default having it set to "no": this is used by
3974# distutils.unixccompiler to know if it should add --enable-new-dtags
3975# to linker command lines, and failing to detect GNU ld simply results
3976# in the same bahaviour as before.
3977
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003978{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3979echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003980ac_prog=ld
3981if test "$GCC" = yes; then
3982 ac_prog=`$CC -print-prog-name=ld`
3983fi
3984case `"$ac_prog" -V 2>&1 < /dev/null` in
3985 *GNU*)
3986 GNULD=yes;;
3987 *)
3988 GNULD=no;;
3989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003990{ echo "$as_me:$LINENO: result: $GNULD" >&5
3991echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003992
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003993{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3994echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003995# Check whether --enable-shared was given.
3996if test "${enable_shared+set}" = set; then
3997 enableval=$enable_shared;
3998fi
3999
4000
4001if test -z "$enable_shared"
4002then
4003 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004004 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004005 enable_shared="yes";;
4006 *)
4007 enable_shared="no";;
4008 esac
4009fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004010{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4011echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004012
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004013{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4014echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004015# Check whether --enable-profiling was given.
4016if test "${enable_profiling+set}" = set; then
4017 enableval=$enable_profiling; ac_save_cc="$CC"
4018 CC="$CC -pg"
4019 if test "$cross_compiling" = yes; then
4020 ac_enable_profiling="no"
4021else
4022 cat >conftest.$ac_ext <<_ACEOF
4023/* confdefs.h. */
4024_ACEOF
4025cat confdefs.h >>conftest.$ac_ext
4026cat >>conftest.$ac_ext <<_ACEOF
4027/* end confdefs.h. */
4028int main() { return 0; }
4029_ACEOF
4030rm -f conftest$ac_exeext
4031if { (ac_try="$ac_link"
4032case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004037 (eval "$ac_link") 2>&5
4038 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4041 { (case "(($ac_try" in
4042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4043 *) ac_try_echo=$ac_try;;
4044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004046 (eval "$ac_try") 2>&5
4047 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004049 (exit $ac_status); }; }; then
4050 ac_enable_profiling="yes"
4051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004052 echo "$as_me: program exited with status $ac_status" >&5
4053echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004054sed 's/^/| /' conftest.$ac_ext >&5
4055
4056( exit $ac_status )
4057ac_enable_profiling="no"
4058fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4060fi
4061
4062
4063 CC="$ac_save_cc"
4064fi
4065
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004066{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4067echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004068
4069case "$ac_enable_profiling" in
4070 "yes")
4071 BASECFLAGS="-pg $BASECFLAGS"
4072 LDFLAGS="-pg $LDFLAGS"
4073 ;;
4074esac
4075
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004076{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4077echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004078
4079# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4080# library that we build, but we do not want to link against it (we
4081# will find it with a -framework option). For this reason there is an
4082# extra variable BLDLIBRARY against which Python and the extension
4083# modules are linked, BLDLIBRARY. This is normally the same as
4084# LDLIBRARY, but empty for MacOSX framework builds.
4085if test "$enable_framework"
4086then
4087 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4088 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4089 BLDLIBRARY=''
4090else
4091 BLDLIBRARY='$(LDLIBRARY)'
4092fi
4093
4094# Other platforms follow
4095if test $enable_shared = "yes"; then
4096
4097cat >>confdefs.h <<\_ACEOF
4098#define Py_ENABLE_SHARED 1
4099_ACEOF
4100
4101 case $ac_sys_system in
4102 CYGWIN*)
4103 LDLIBRARY='libpython$(VERSION).dll.a'
4104 DLLLIBRARY='libpython$(VERSION).dll'
4105 ;;
4106 SunOS*)
4107 LDLIBRARY='libpython$(VERSION).so'
4108 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4109 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4110 INSTSONAME="$LDLIBRARY".$SOVERSION
4111 ;;
4112 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4113 LDLIBRARY='libpython$(VERSION).so'
4114 BLDLIBRARY='-L. -lpython$(VERSION)'
4115 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4116 case $ac_sys_system in
4117 FreeBSD*)
4118 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4119 ;;
4120 esac
4121 INSTSONAME="$LDLIBRARY".$SOVERSION
4122 ;;
4123 hp*|HP*)
4124 case `uname -m` in
4125 ia64)
4126 LDLIBRARY='libpython$(VERSION).so'
4127 ;;
4128 *)
4129 LDLIBRARY='libpython$(VERSION).sl'
4130 ;;
4131 esac
4132 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4133 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4134 ;;
4135 OSF*)
4136 LDLIBRARY='libpython$(VERSION).so'
4137 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4138 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4139 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004140 Darwin*)
4141 LDLIBRARY='libpython$(VERSION).dylib'
4142 BLDLIBRARY='-L. -lpython$(VERSION)'
4143 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4144 ;;
4145
4146 esac
4147else # shared is disabled
4148 case $ac_sys_system in
4149 CYGWIN*)
4150 BLDLIBRARY='$(LIBRARY)'
4151 LDLIBRARY='libpython$(VERSION).dll.a'
4152 ;;
4153 esac
4154fi
4155
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004156{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4157echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004158
4159if test -n "$ac_tool_prefix"; then
4160 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4161set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004162{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4163echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004164if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004165 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004166else
4167 if test -n "$RANLIB"; then
4168 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4169else
4170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4171for as_dir in $PATH
4172do
4173 IFS=$as_save_IFS
4174 test -z "$as_dir" && as_dir=.
4175 for ac_exec_ext in '' $ac_executable_extensions; do
4176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4177 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004178 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004179 break 2
4180 fi
4181done
4182done
4183IFS=$as_save_IFS
4184
4185fi
4186fi
4187RANLIB=$ac_cv_prog_RANLIB
4188if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004189 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4190echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004191else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004192 { echo "$as_me:$LINENO: result: no" >&5
4193echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004194fi
4195
4196
4197fi
4198if test -z "$ac_cv_prog_RANLIB"; then
4199 ac_ct_RANLIB=$RANLIB
4200 # Extract the first word of "ranlib", so it can be a program name with args.
4201set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004202{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4203echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004204if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004205 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004206else
4207 if test -n "$ac_ct_RANLIB"; then
4208 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4209else
4210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4211for as_dir in $PATH
4212do
4213 IFS=$as_save_IFS
4214 test -z "$as_dir" && as_dir=.
4215 for ac_exec_ext in '' $ac_executable_extensions; do
4216 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4217 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004218 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004219 break 2
4220 fi
4221done
4222done
4223IFS=$as_save_IFS
4224
4225fi
4226fi
4227ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4228if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004229 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4230echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004232 { echo "$as_me:$LINENO: result: no" >&5
4233echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004234fi
4235
4236 if test "x$ac_ct_RANLIB" = x; then
4237 RANLIB=":"
4238 else
4239 case $cross_compiling:$ac_tool_warned in
4240yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004241{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4242whose name does not start with the host triplet. If you think this
4243configuration is useful to you, please write to autoconf@gnu.org." >&5
4244echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4245whose name does not start with the host triplet. If you think this
4246configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004247ac_tool_warned=yes ;;
4248esac
4249 RANLIB=$ac_ct_RANLIB
4250 fi
4251else
4252 RANLIB="$ac_cv_prog_RANLIB"
4253fi
4254
4255
4256for ac_prog in ar aal
4257do
4258 # Extract the first word of "$ac_prog", so it can be a program name with args.
4259set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004260{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4261echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004262if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004263 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004264else
4265 if test -n "$AR"; then
4266 ac_cv_prog_AR="$AR" # Let the user override the test.
4267else
4268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4269for as_dir in $PATH
4270do
4271 IFS=$as_save_IFS
4272 test -z "$as_dir" && as_dir=.
4273 for ac_exec_ext in '' $ac_executable_extensions; do
4274 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4275 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004276 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004277 break 2
4278 fi
4279done
4280done
4281IFS=$as_save_IFS
4282
4283fi
4284fi
4285AR=$ac_cv_prog_AR
4286if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004287 { echo "$as_me:$LINENO: result: $AR" >&5
4288echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004289else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004290 { echo "$as_me:$LINENO: result: no" >&5
4291echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004292fi
4293
4294
4295 test -n "$AR" && break
4296done
4297test -n "$AR" || AR="ar"
4298
4299
4300# tweak ARFLAGS only if the user didn't set it on the command line
4301
4302if test -z "$ARFLAGS"
4303then
4304 ARFLAGS="rc"
4305fi
4306
4307
4308# Extract the first word of "svnversion", so it can be a program name with args.
4309set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004310{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4311echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004312if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004313 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004314else
4315 if test -n "$SVNVERSION"; then
4316 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4317else
4318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319for as_dir in $PATH
4320do
4321 IFS=$as_save_IFS
4322 test -z "$as_dir" && as_dir=.
4323 for ac_exec_ext in '' $ac_executable_extensions; do
4324 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4325 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004326 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004327 break 2
4328 fi
4329done
4330done
4331IFS=$as_save_IFS
4332
4333 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4334fi
4335fi
4336SVNVERSION=$ac_cv_prog_SVNVERSION
4337if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004338 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4339echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004340else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004341 { echo "$as_me:$LINENO: result: no" >&5
4342echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004343fi
4344
4345
4346if test $SVNVERSION = found
4347then
4348 SVNVERSION="svnversion \$(srcdir)"
4349else
4350 SVNVERSION="echo Unversioned directory"
4351fi
4352
4353case $MACHDEP in
4354bsdos*|hp*|HP*)
4355 # install -d does not work on BSDI or HP-UX
4356 if test -z "$INSTALL"
4357 then
4358 INSTALL="${srcdir}/install-sh -c"
4359 fi
4360esac
4361ac_aux_dir=
4362for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4363 if test -f "$ac_dir/install-sh"; then
4364 ac_aux_dir=$ac_dir
4365 ac_install_sh="$ac_aux_dir/install-sh -c"
4366 break
4367 elif test -f "$ac_dir/install.sh"; then
4368 ac_aux_dir=$ac_dir
4369 ac_install_sh="$ac_aux_dir/install.sh -c"
4370 break
4371 elif test -f "$ac_dir/shtool"; then
4372 ac_aux_dir=$ac_dir
4373 ac_install_sh="$ac_aux_dir/shtool install -c"
4374 break
4375 fi
4376done
4377if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004378 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4379echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004380 { (exit 1); exit 1; }; }
4381fi
4382
4383# These three variables are undocumented and unsupported,
4384# and are intended to be withdrawn in a future Autoconf release.
4385# They can cause serious problems if a builder's source tree is in a directory
4386# whose full name contains unusual characters.
4387ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4388ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4389ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4390
4391
4392# Find a good install program. We prefer a C program (faster),
4393# so one script is as good as another. But avoid the broken or
4394# incompatible versions:
4395# SysV /etc/install, /usr/sbin/install
4396# SunOS /usr/etc/install
4397# IRIX /sbin/install
4398# AIX /bin/install
4399# AmigaOS /C/install, which installs bootblocks on floppy discs
4400# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4401# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4402# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4403# OS/2's system install, which has a completely different semantic
4404# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004405{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4406echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004407if test -z "$INSTALL"; then
4408if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004409 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004410else
4411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4412for as_dir in $PATH
4413do
4414 IFS=$as_save_IFS
4415 test -z "$as_dir" && as_dir=.
4416 # Account for people who put trailing slashes in PATH elements.
4417case $as_dir/ in
4418 ./ | .// | /cC/* | \
4419 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4420 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4421 /usr/ucb/* ) ;;
4422 *)
4423 # OSF1 and SCO ODT 3.0 have their own names for install.
4424 # Don't use installbsd from OSF since it installs stuff as root
4425 # by default.
4426 for ac_prog in ginstall scoinst install; do
4427 for ac_exec_ext in '' $ac_executable_extensions; do
4428 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4429 if test $ac_prog = install &&
4430 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4431 # AIX install. It has an incompatible calling convention.
4432 :
4433 elif test $ac_prog = install &&
4434 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4435 # program-specific install script used by HP pwplus--don't use.
4436 :
4437 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004438 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4439 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004440 fi
4441 fi
4442 done
4443 done
4444 ;;
4445esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004446done
4447IFS=$as_save_IFS
4448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004449
4450fi
4451 if test "${ac_cv_path_install+set}" = set; then
4452 INSTALL=$ac_cv_path_install
4453 else
4454 # As a last resort, use the slow shell script. Don't cache a
4455 # value for INSTALL within a source directory, because that will
4456 # break other packages using the cache if that directory is
4457 # removed, or if the value is a relative name.
4458 INSTALL=$ac_install_sh
4459 fi
4460fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004461{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4462echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004463
4464# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4465# It thinks the first close brace ends the variable substitution.
4466test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4467
4468test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4469
4470test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4471
4472
4473# Not every filesystem supports hard links
4474
4475if test -z "$LN" ; then
4476 case $ac_sys_system in
4477 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004478 *) LN=ln;;
4479 esac
4480fi
4481
4482# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004483{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4484echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004485
4486# Check whether --with-pydebug was given.
4487if test "${with_pydebug+set}" = set; then
4488 withval=$with_pydebug;
4489if test "$withval" != no
4490then
4491
4492cat >>confdefs.h <<\_ACEOF
4493#define Py_DEBUG 1
4494_ACEOF
4495
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004496 { echo "$as_me:$LINENO: result: yes" >&5
4497echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004498 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004499else { echo "$as_me:$LINENO: result: no" >&5
4500echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004501fi
4502else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004503 { echo "$as_me:$LINENO: result: no" >&5
4504echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004505fi
4506
4507
4508# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4509# merged with this chunk of code?
4510
4511# Optimizer/debugger flags
4512# ------------------------
4513# (The following bit of code is complicated enough - please keep things
4514# indented properly. Just pretend you're editing Python code. ;-)
4515
4516# There are two parallel sets of case statements below, one that checks to
4517# see if OPT was set and one that does BASECFLAGS setting based upon
4518# compiler and platform. BASECFLAGS tweaks need to be made even if the
4519# user set OPT.
4520
4521# tweak OPT based on compiler and platform, only if the user didn't set
4522# it on the command line
4523
Benjamin Peterson1718bd12010-03-09 21:46:49 +00004524if test "${OPT-unset}" == "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004525then
4526 case $GCC in
4527 yes)
4528 if test "$CC" != 'g++' ; then
4529 STRICT_PROTO="-Wstrict-prototypes"
4530 fi
4531 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4532 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4533 WRAP="-fwrapv"
4534 fi
4535 case $ac_cv_prog_cc_g in
4536 yes)
4537 if test "$Py_DEBUG" = 'true' ; then
4538 # Optimization messes up debuggers, so turn it off for
4539 # debug builds.
4540 OPT="-g -Wall $STRICT_PROTO"
4541 else
4542 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4543 fi
4544 ;;
4545 *)
4546 OPT="-O3 -Wall $STRICT_PROTO"
4547 ;;
4548 esac
4549 case $ac_sys_system in
4550 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4551 ;;
4552 esac
4553 ;;
4554
4555 *)
4556 OPT="-O"
4557 ;;
4558 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004559fi
4560
4561
4562
4563# The -arch flags for universal builds on OSX
4564UNIVERSAL_ARCH_FLAGS=
4565
4566
4567# tweak BASECFLAGS based on compiler and platform
4568case $GCC in
4569yes)
4570 # Python violates C99 rules, by casting between incompatible
4571 # pointer types. GCC may generate bad code as a result of that,
4572 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004573 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4574echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004575 ac_save_cc="$CC"
4576 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004577 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004578 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004579else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004580 cat >conftest.$ac_ext <<_ACEOF
4581/* confdefs.h. */
4582_ACEOF
4583cat confdefs.h >>conftest.$ac_ext
4584cat >>conftest.$ac_ext <<_ACEOF
4585/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004586
4587int
4588main ()
4589{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004590int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004591 ;
4592 return 0;
4593}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004594_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004595rm -f conftest.$ac_objext
4596if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004597case "(($ac_try" in
4598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4599 *) ac_try_echo=$ac_try;;
4600esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004602 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004603 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004604 grep -v '^ *+' conftest.er1 >conftest.err
4605 rm -f conftest.er1
4606 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004608 (exit $ac_status); } && {
4609 test -z "$ac_c_werror_flag" ||
4610 test ! -s conftest.err
4611 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004612 ac_cv_no_strict_aliasing_ok=yes
4613else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004614 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004615sed 's/^/| /' conftest.$ac_ext >&5
4616
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004617 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004618fi
4619
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004621fi
4622
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004623 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004624 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4625echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004626 if test $ac_cv_no_strict_aliasing_ok = yes
4627 then
4628 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4629 fi
4630
4631 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4632 # support. Without this, treatment of subnormals doesn't follow
4633 # the standard.
4634 case $ac_sys_machine in
4635 alpha*)
4636 BASECFLAGS="$BASECFLAGS -mieee"
4637 ;;
4638 esac
4639
4640 case $ac_sys_system in
4641 SCO_SV*)
4642 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4643 ;;
4644 # is there any other compiler on Darwin besides gcc?
4645 Darwin*)
4646 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4647 # used to be here, but non-Apple gcc doesn't accept them.
4648
4649
4650 if test "${enable_universalsdk}"; then
4651 UNIVERSAL_ARCH_FLAGS=""
4652 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4653 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4654 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004655 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004656
Ronald Oussoren755740f2010-02-07 19:56:39 +00004657 # You have to use different flags on various versions of
4658 # OSX to extract PPC code from an universal binary, basically
4659 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4660 # newer.
4661 # Because '-arch pp7400' works on OSX 10.5 or higher this
4662 # test is only present in the '32-bit' branch, all other
4663 # branches require OSX 10.5 to compile.
4664
4665 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4666echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4667 FN="test.$$"
4668 cat >${FN}.c <<-EOF
4669 int main() { return 0; }
4670EOF
4671 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4672 if test $? != 0 ; then
4673 rm ${FN} ${FN}.c
4674 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4675echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4676 else
4677 lipo "${FN}" -extract ppc7400 -output "${FN}.out" 2>/dev/null
4678 if test $? != 0 ; then
4679 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4680 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4681echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4682 else
4683 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4684echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4685 fi
4686 rm -f ${FN} ${FN}.c ${FN}.out
4687 fi
4688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004689 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4690 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004691 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004692 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004693
4694 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4695 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004696 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004697 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004698
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004699 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4700 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004701 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004702 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004703
4704 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4705 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004706 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004707 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004709 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004710 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4711echo "$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 +00004712 { (exit 1); exit 1; }; }
4713
4714 fi
4715
4716
4717 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4718 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4719 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4720 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4721 fi
4722 fi
4723
4724 # Calculate the right deployment target for this build.
4725 #
4726 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4727 if test ${cur_target} '>' 10.2; then
4728 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004729 if test ${enable_universalsdk}; then
4730 if test "${UNIVERSAL_ARCHS}" = "all"; then
4731 # Ensure that the default platform for a
4732 # 4-way universal build is OSX 10.5,
4733 # that's the first OS release where
4734 # 4-way builds make sense.
4735 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004736
4737 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4738 cur_target='10.5'
4739
4740 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4741 cur_target='10.5'
4742
4743 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4744 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004745 fi
4746 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00004747 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004748 # On Intel macs default to a deployment
4749 # target of 10.4, that's the first OSX
4750 # release with Intel support.
4751 cur_target="10.4"
4752 fi
4753 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754 fi
4755 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4756
4757 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4758 # environment with a value that is the same as what we'll use
4759 # in the Makefile to ensure that we'll get the same compiler
4760 # environment during configure and build time.
4761 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4762 export MACOSX_DEPLOYMENT_TARGET
4763 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4764
4765 ;;
4766 OSF*)
4767 BASECFLAGS="$BASECFLAGS -mieee"
4768 ;;
4769 esac
4770 ;;
4771
4772*)
4773 case $ac_sys_system in
4774 OpenUNIX*|UnixWare*)
4775 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4776 ;;
4777 OSF*)
4778 BASECFLAGS="$BASECFLAGS -ieee -std"
4779 ;;
4780 SCO_SV*)
4781 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4782 ;;
4783 esac
4784 ;;
4785esac
4786
4787if test "$Py_DEBUG" = 'true'; then
4788 :
4789else
4790 OPT="-DNDEBUG $OPT"
4791fi
4792
4793if test "$ac_arch_flags"
4794then
4795 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4796fi
4797
4798# disable check for icc since it seems to pass, but generates a warning
4799if test "$CC" = icc
4800then
4801 ac_cv_opt_olimit_ok=no
4802fi
4803
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004804{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4805echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004807 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808else
4809 ac_save_cc="$CC"
4810CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004811cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812/* confdefs.h. */
4813_ACEOF
4814cat confdefs.h >>conftest.$ac_ext
4815cat >>conftest.$ac_ext <<_ACEOF
4816/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004817
4818int
4819main ()
4820{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004822 ;
4823 return 0;
4824}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004825_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004826rm -f conftest.$ac_objext
4827if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004828case "(($ac_try" in
4829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4830 *) ac_try_echo=$ac_try;;
4831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004833 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004835 grep -v '^ *+' conftest.er1 >conftest.err
4836 rm -f conftest.er1
4837 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004839 (exit $ac_status); } && {
4840 test -z "$ac_c_werror_flag" ||
4841 test ! -s conftest.err
4842 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843 ac_cv_opt_olimit_ok=yes
4844else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004845 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004846sed 's/^/| /' conftest.$ac_ext >&5
4847
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004848 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849fi
4850
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852CC="$ac_save_cc"
4853fi
4854
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004855{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4856echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857if test $ac_cv_opt_olimit_ok = yes; then
4858 case $ac_sys_system in
4859 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4860 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4861 # environment?
4862 Darwin*)
4863 ;;
4864 *)
4865 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4866 ;;
4867 esac
4868else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004869 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4870echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004872 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873else
4874 ac_save_cc="$CC"
4875 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004876 cat >conftest.$ac_ext <<_ACEOF
4877/* confdefs.h. */
4878_ACEOF
4879cat confdefs.h >>conftest.$ac_ext
4880cat >>conftest.$ac_ext <<_ACEOF
4881/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004882
4883int
4884main ()
4885{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004886int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004887 ;
4888 return 0;
4889}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004891rm -f conftest.$ac_objext
4892if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004893case "(($ac_try" in
4894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895 *) ac_try_echo=$ac_try;;
4896esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004898 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004900 grep -v '^ *+' conftest.er1 >conftest.err
4901 rm -f conftest.er1
4902 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004904 (exit $ac_status); } && {
4905 test -z "$ac_c_werror_flag" ||
4906 test ! -s conftest.err
4907 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908 ac_cv_olimit_ok=yes
4909else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004910 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004911sed 's/^/| /' conftest.$ac_ext >&5
4912
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004913 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914fi
4915
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917 CC="$ac_save_cc"
4918fi
4919
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004920 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4921echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004922 if test $ac_cv_olimit_ok = yes; then
4923 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4924 fi
4925fi
4926
4927# Check whether GCC supports PyArg_ParseTuple format
4928if test "$GCC" = "yes"
4929then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004930 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4931echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932 save_CFLAGS=$CFLAGS
4933 CFLAGS="$CFLAGS -Werror"
4934 cat >conftest.$ac_ext <<_ACEOF
4935/* confdefs.h. */
4936_ACEOF
4937cat confdefs.h >>conftest.$ac_ext
4938cat >>conftest.$ac_ext <<_ACEOF
4939/* end confdefs.h. */
4940
4941 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4942
4943int
4944main ()
4945{
4946
4947 ;
4948 return 0;
4949}
4950_ACEOF
4951rm -f conftest.$ac_objext
4952if { (ac_try="$ac_compile"
4953case "(($ac_try" in
4954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4955 *) ac_try_echo=$ac_try;;
4956esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958 (eval "$ac_compile") 2>conftest.er1
4959 ac_status=$?
4960 grep -v '^ *+' conftest.er1 >conftest.err
4961 rm -f conftest.er1
4962 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964 (exit $ac_status); } && {
4965 test -z "$ac_c_werror_flag" ||
4966 test ! -s conftest.err
4967 } && test -s conftest.$ac_objext; then
4968
4969cat >>confdefs.h <<\_ACEOF
4970#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4971_ACEOF
4972
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004973 { echo "$as_me:$LINENO: result: yes" >&5
4974echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004976 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977sed 's/^/| /' conftest.$ac_ext >&5
4978
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004979 { echo "$as_me:$LINENO: result: no" >&5
4980echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981
4982fi
4983
4984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4985 CFLAGS=$save_CFLAGS
4986fi
4987
4988# On some compilers, pthreads are available without further options
4989# (e.g. MacOS X). On some of these systems, the compiler will not
4990# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4991# So we have to see first whether pthreads are available without
4992# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004993{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4994echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004996 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997else
4998 if test "$cross_compiling" = yes; then
4999 ac_cv_pthread_is_default=no
5000else
5001 cat >conftest.$ac_ext <<_ACEOF
5002/* confdefs.h. */
5003_ACEOF
5004cat confdefs.h >>conftest.$ac_ext
5005cat >>conftest.$ac_ext <<_ACEOF
5006/* end confdefs.h. */
5007
5008#include <pthread.h>
5009
5010void* routine(void* p){return NULL;}
5011
5012int main(){
5013 pthread_t p;
5014 if(pthread_create(&p,NULL,routine,NULL)!=0)
5015 return 1;
5016 (void)pthread_detach(p);
5017 return 0;
5018}
5019
5020_ACEOF
5021rm -f conftest$ac_exeext
5022if { (ac_try="$ac_link"
5023case "(($ac_try" in
5024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5025 *) ac_try_echo=$ac_try;;
5026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028 (eval "$ac_link") 2>&5
5029 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5032 { (case "(($ac_try" in
5033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5034 *) ac_try_echo=$ac_try;;
5035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 (eval "$ac_try") 2>&5
5038 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040 (exit $ac_status); }; }; then
5041
5042 ac_cv_pthread_is_default=yes
5043 ac_cv_kthread=no
5044 ac_cv_pthread=no
5045
5046else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005047 echo "$as_me: program exited with status $ac_status" >&5
5048echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049sed 's/^/| /' conftest.$ac_ext >&5
5050
5051( exit $ac_status )
5052ac_cv_pthread_is_default=no
5053fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5055fi
5056
5057
5058
5059fi
5060
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005061{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5062echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005063
5064
5065if test $ac_cv_pthread_is_default = yes
5066then
5067 ac_cv_kpthread=no
5068else
5069# -Kpthread, if available, provides the right #defines
5070# and linker options to make pthread_create available
5071# Some compilers won't report that they do not support -Kpthread,
5072# so we need to run a program to see whether it really made the
5073# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005074{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5075echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005077 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078else
5079 ac_save_cc="$CC"
5080CC="$CC -Kpthread"
5081if test "$cross_compiling" = yes; then
5082 ac_cv_kpthread=no
5083else
5084 cat >conftest.$ac_ext <<_ACEOF
5085/* confdefs.h. */
5086_ACEOF
5087cat confdefs.h >>conftest.$ac_ext
5088cat >>conftest.$ac_ext <<_ACEOF
5089/* end confdefs.h. */
5090
5091#include <pthread.h>
5092
5093void* routine(void* p){return NULL;}
5094
5095int main(){
5096 pthread_t p;
5097 if(pthread_create(&p,NULL,routine,NULL)!=0)
5098 return 1;
5099 (void)pthread_detach(p);
5100 return 0;
5101}
5102
5103_ACEOF
5104rm -f conftest$ac_exeext
5105if { (ac_try="$ac_link"
5106case "(($ac_try" in
5107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5108 *) ac_try_echo=$ac_try;;
5109esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005111 (eval "$ac_link") 2>&5
5112 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005114 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5115 { (case "(($ac_try" in
5116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5117 *) ac_try_echo=$ac_try;;
5118esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120 (eval "$ac_try") 2>&5
5121 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 (exit $ac_status); }; }; then
5124 ac_cv_kpthread=yes
5125else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005126 echo "$as_me: program exited with status $ac_status" >&5
5127echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128sed 's/^/| /' conftest.$ac_ext >&5
5129
5130( exit $ac_status )
5131ac_cv_kpthread=no
5132fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5134fi
5135
5136
5137CC="$ac_save_cc"
5138fi
5139
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005140{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5141echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142fi
5143
5144if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5145then
5146# -Kthread, if available, provides the right #defines
5147# and linker options to make pthread_create available
5148# Some compilers won't report that they do not support -Kthread,
5149# so we need to run a program to see whether it really made the
5150# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005151{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5152echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005153if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005154 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155else
5156 ac_save_cc="$CC"
5157CC="$CC -Kthread"
5158if test "$cross_compiling" = yes; then
5159 ac_cv_kthread=no
5160else
5161 cat >conftest.$ac_ext <<_ACEOF
5162/* confdefs.h. */
5163_ACEOF
5164cat confdefs.h >>conftest.$ac_ext
5165cat >>conftest.$ac_ext <<_ACEOF
5166/* end confdefs.h. */
5167
5168#include <pthread.h>
5169
5170void* routine(void* p){return NULL;}
5171
5172int main(){
5173 pthread_t p;
5174 if(pthread_create(&p,NULL,routine,NULL)!=0)
5175 return 1;
5176 (void)pthread_detach(p);
5177 return 0;
5178}
5179
5180_ACEOF
5181rm -f conftest$ac_exeext
5182if { (ac_try="$ac_link"
5183case "(($ac_try" in
5184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5185 *) ac_try_echo=$ac_try;;
5186esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188 (eval "$ac_link") 2>&5
5189 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5192 { (case "(($ac_try" in
5193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5194 *) ac_try_echo=$ac_try;;
5195esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 (eval "$ac_try") 2>&5
5198 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200 (exit $ac_status); }; }; then
5201 ac_cv_kthread=yes
5202else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005203 echo "$as_me: program exited with status $ac_status" >&5
5204echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205sed 's/^/| /' conftest.$ac_ext >&5
5206
5207( exit $ac_status )
5208ac_cv_kthread=no
5209fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5211fi
5212
5213
5214CC="$ac_save_cc"
5215fi
5216
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005217{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5218echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219fi
5220
5221if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5222then
5223# -pthread, if available, provides the right #defines
5224# and linker options to make pthread_create available
5225# Some compilers won't report that they do not support -pthread,
5226# so we need to run a program to see whether it really made the
5227# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005228{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5229echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005230if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005231 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232else
5233 ac_save_cc="$CC"
5234CC="$CC -pthread"
5235if test "$cross_compiling" = yes; then
5236 ac_cv_pthread=no
5237else
5238 cat >conftest.$ac_ext <<_ACEOF
5239/* confdefs.h. */
5240_ACEOF
5241cat confdefs.h >>conftest.$ac_ext
5242cat >>conftest.$ac_ext <<_ACEOF
5243/* end confdefs.h. */
5244
5245#include <pthread.h>
5246
5247void* routine(void* p){return NULL;}
5248
5249int main(){
5250 pthread_t p;
5251 if(pthread_create(&p,NULL,routine,NULL)!=0)
5252 return 1;
5253 (void)pthread_detach(p);
5254 return 0;
5255}
5256
5257_ACEOF
5258rm -f conftest$ac_exeext
5259if { (ac_try="$ac_link"
5260case "(($ac_try" in
5261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5262 *) ac_try_echo=$ac_try;;
5263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005265 (eval "$ac_link") 2>&5
5266 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5269 { (case "(($ac_try" in
5270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5271 *) ac_try_echo=$ac_try;;
5272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274 (eval "$ac_try") 2>&5
5275 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005277 (exit $ac_status); }; }; then
5278 ac_cv_pthread=yes
5279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005280 echo "$as_me: program exited with status $ac_status" >&5
5281echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005282sed 's/^/| /' conftest.$ac_ext >&5
5283
5284( exit $ac_status )
5285ac_cv_pthread=no
5286fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5288fi
5289
5290
5291CC="$ac_save_cc"
5292fi
5293
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005294{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5295echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005296fi
5297
5298# If we have set a CC compiler flag for thread support then
5299# check if it works for CXX, too.
5300ac_cv_cxx_thread=no
5301if test ! -z "$CXX"
5302then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005303{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5304echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305ac_save_cxx="$CXX"
5306
5307if test "$ac_cv_kpthread" = "yes"
5308then
5309 CXX="$CXX -Kpthread"
5310 ac_cv_cxx_thread=yes
5311elif test "$ac_cv_kthread" = "yes"
5312then
5313 CXX="$CXX -Kthread"
5314 ac_cv_cxx_thread=yes
5315elif test "$ac_cv_pthread" = "yes"
5316then
5317 CXX="$CXX -pthread"
5318 ac_cv_cxx_thread=yes
5319fi
5320
5321if test $ac_cv_cxx_thread = yes
5322then
5323 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5324 $CXX -c conftest.$ac_ext 2>&5
5325 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5326 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5327 then
5328 ac_cv_cxx_thread=yes
5329 else
5330 ac_cv_cxx_thread=no
5331 fi
5332 rm -fr conftest*
5333fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005334{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5335echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005336fi
5337CXX="$ac_save_cxx"
5338
5339
5340# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005341{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5342echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005344 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345else
5346 cat >conftest.$ac_ext <<_ACEOF
5347/* confdefs.h. */
5348_ACEOF
5349cat confdefs.h >>conftest.$ac_ext
5350cat >>conftest.$ac_ext <<_ACEOF
5351/* end confdefs.h. */
5352#include <stdlib.h>
5353#include <stdarg.h>
5354#include <string.h>
5355#include <float.h>
5356
5357int
5358main ()
5359{
5360
5361 ;
5362 return 0;
5363}
5364_ACEOF
5365rm -f conftest.$ac_objext
5366if { (ac_try="$ac_compile"
5367case "(($ac_try" in
5368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5369 *) ac_try_echo=$ac_try;;
5370esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372 (eval "$ac_compile") 2>conftest.er1
5373 ac_status=$?
5374 grep -v '^ *+' conftest.er1 >conftest.err
5375 rm -f conftest.er1
5376 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378 (exit $ac_status); } && {
5379 test -z "$ac_c_werror_flag" ||
5380 test ! -s conftest.err
5381 } && test -s conftest.$ac_objext; then
5382 ac_cv_header_stdc=yes
5383else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005384 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385sed 's/^/| /' conftest.$ac_ext >&5
5386
5387 ac_cv_header_stdc=no
5388fi
5389
5390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5391
5392if test $ac_cv_header_stdc = yes; then
5393 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5394 cat >conftest.$ac_ext <<_ACEOF
5395/* confdefs.h. */
5396_ACEOF
5397cat confdefs.h >>conftest.$ac_ext
5398cat >>conftest.$ac_ext <<_ACEOF
5399/* end confdefs.h. */
5400#include <string.h>
5401
5402_ACEOF
5403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5404 $EGREP "memchr" >/dev/null 2>&1; then
5405 :
5406else
5407 ac_cv_header_stdc=no
5408fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00005409rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410
5411fi
5412
5413if test $ac_cv_header_stdc = yes; then
5414 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5415 cat >conftest.$ac_ext <<_ACEOF
5416/* confdefs.h. */
5417_ACEOF
5418cat confdefs.h >>conftest.$ac_ext
5419cat >>conftest.$ac_ext <<_ACEOF
5420/* end confdefs.h. */
5421#include <stdlib.h>
5422
5423_ACEOF
5424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5425 $EGREP "free" >/dev/null 2>&1; then
5426 :
5427else
5428 ac_cv_header_stdc=no
5429fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00005430rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431
5432fi
5433
5434if test $ac_cv_header_stdc = yes; then
5435 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5436 if test "$cross_compiling" = yes; then
5437 :
5438else
5439 cat >conftest.$ac_ext <<_ACEOF
5440/* confdefs.h. */
5441_ACEOF
5442cat confdefs.h >>conftest.$ac_ext
5443cat >>conftest.$ac_ext <<_ACEOF
5444/* end confdefs.h. */
5445#include <ctype.h>
5446#include <stdlib.h>
5447#if ((' ' & 0x0FF) == 0x020)
5448# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5449# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5450#else
5451# define ISLOWER(c) \
5452 (('a' <= (c) && (c) <= 'i') \
5453 || ('j' <= (c) && (c) <= 'r') \
5454 || ('s' <= (c) && (c) <= 'z'))
5455# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5456#endif
5457
5458#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5459int
5460main ()
5461{
5462 int i;
5463 for (i = 0; i < 256; i++)
5464 if (XOR (islower (i), ISLOWER (i))
5465 || toupper (i) != TOUPPER (i))
5466 return 2;
5467 return 0;
5468}
5469_ACEOF
5470rm -f conftest$ac_exeext
5471if { (ac_try="$ac_link"
5472case "(($ac_try" in
5473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5474 *) ac_try_echo=$ac_try;;
5475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477 (eval "$ac_link") 2>&5
5478 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5481 { (case "(($ac_try" in
5482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5483 *) ac_try_echo=$ac_try;;
5484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486 (eval "$ac_try") 2>&5
5487 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489 (exit $ac_status); }; }; then
5490 :
5491else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005492 echo "$as_me: program exited with status $ac_status" >&5
5493echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494sed 's/^/| /' conftest.$ac_ext >&5
5495
5496( exit $ac_status )
5497ac_cv_header_stdc=no
5498fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5500fi
5501
5502
5503fi
5504fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005505{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5506echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507if test $ac_cv_header_stdc = yes; then
5508
5509cat >>confdefs.h <<\_ACEOF
5510#define STDC_HEADERS 1
5511_ACEOF
5512
5513fi
5514
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005515# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5526 inttypes.h stdint.h unistd.h
5527do
5528as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5529{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5530echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5531if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5532 echo $ECHO_N "(cached) $ECHO_C" >&6
5533else
5534 cat >conftest.$ac_ext <<_ACEOF
5535/* confdefs.h. */
5536_ACEOF
5537cat confdefs.h >>conftest.$ac_ext
5538cat >>conftest.$ac_ext <<_ACEOF
5539/* end confdefs.h. */
5540$ac_includes_default
5541
5542#include <$ac_header>
5543_ACEOF
5544rm -f conftest.$ac_objext
5545if { (ac_try="$ac_compile"
5546case "(($ac_try" in
5547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5548 *) ac_try_echo=$ac_try;;
5549esac
5550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5551 (eval "$ac_compile") 2>conftest.er1
5552 ac_status=$?
5553 grep -v '^ *+' conftest.er1 >conftest.err
5554 rm -f conftest.er1
5555 cat conftest.err >&5
5556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5557 (exit $ac_status); } && {
5558 test -z "$ac_c_werror_flag" ||
5559 test ! -s conftest.err
5560 } && test -s conftest.$ac_objext; then
5561 eval "$as_ac_Header=yes"
5562else
5563 echo "$as_me: failed program was:" >&5
5564sed 's/^/| /' conftest.$ac_ext >&5
5565
5566 eval "$as_ac_Header=no"
5567fi
5568
5569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5570fi
5571ac_res=`eval echo '${'$as_ac_Header'}'`
5572 { echo "$as_me:$LINENO: result: $ac_res" >&5
5573echo "${ECHO_T}$ac_res" >&6; }
5574if test `eval echo '${'$as_ac_Header'}'` = yes; then
5575 cat >>confdefs.h <<_ACEOF
5576#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5577_ACEOF
5578
5579fi
5580
5581done
5582
5583
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005584
Martin v. Löwis11437992002-04-12 09:54:03 +00005585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
Anthony Baxter8a560de2004-10-13 15:30:56 +00005620
Martin v. Löwisc3001752005-01-23 09:27:24 +00005621
Martin v. Löwis11017b12006-01-14 18:12:57 +00005622
Thomas Wouters477c8d52006-05-27 19:21:47 +00005623
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005624
5625
5626
5627
5628
5629
5630
5631
Thomas Wouters89f507f2006-12-13 04:49:30 +00005632
Christian Heimes043d6f62008-01-07 17:19:16 +00005633
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005634
5635
Christian Heimesbbe741d2008-03-28 10:53:29 +00005636
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005637
Ronald Oussoren755740f2010-02-07 19:56:39 +00005638
5639
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005640for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5641fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005642ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005643shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005644unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005645sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5646sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005647sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005648sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005649sys/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 +00005650sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005651bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005652do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005653as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005654if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005655 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5656echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005657if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005658 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005659fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005660ac_res=`eval echo '${'$as_ac_Header'}'`
5661 { echo "$as_me:$LINENO: result: $ac_res" >&5
5662echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005663else
Martin v. Löwis11437992002-04-12 09:54:03 +00005664 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005665{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5666echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005668/* confdefs.h. */
5669_ACEOF
5670cat confdefs.h >>conftest.$ac_ext
5671cat >>conftest.$ac_ext <<_ACEOF
5672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005673$ac_includes_default
5674#include <$ac_header>
5675_ACEOF
5676rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005677if { (ac_try="$ac_compile"
5678case "(($ac_try" in
5679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5680 *) ac_try_echo=$ac_try;;
5681esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005685 grep -v '^ *+' conftest.er1 >conftest.err
5686 rm -f conftest.er1
5687 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005689 (exit $ac_status); } && {
5690 test -z "$ac_c_werror_flag" ||
5691 test ! -s conftest.err
5692 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005693 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005696sed 's/^/| /' conftest.$ac_ext >&5
5697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005698 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005700
5701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005702{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5703echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005704
5705# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005706{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5707echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005708cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005709/* confdefs.h. */
5710_ACEOF
5711cat confdefs.h >>conftest.$ac_ext
5712cat >>conftest.$ac_ext <<_ACEOF
5713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005714#include <$ac_header>
5715_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005716if { (ac_try="$ac_cpp conftest.$ac_ext"
5717case "(($ac_try" in
5718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5719 *) ac_try_echo=$ac_try;;
5720esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005722 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005723 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005724 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005725 rm -f conftest.er1
5726 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005728 (exit $ac_status); } >/dev/null && {
5729 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5730 test ! -s conftest.err
5731 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005732 ac_header_preproc=yes
5733else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005735sed 's/^/| /' conftest.$ac_ext >&5
5736
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005739
Martin v. Löwis11437992002-04-12 09:54:03 +00005740rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005741{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5742echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005743
5744# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005745case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5746 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005747 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5748echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5749 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5750echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005751 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005752 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005753 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005754 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5755echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5756 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5757echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5758 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5759echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5760 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5761echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5763echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5765echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005766 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005767## -------------------------------------- ##
5768## Report this to http://bugs.python.org/ ##
5769## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005770_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005771 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005772 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005774{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5775echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005776if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005777 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005778else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005779 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005780fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005781ac_res=`eval echo '${'$as_ac_Header'}'`
5782 { echo "$as_me:$LINENO: result: $ac_res" >&5
5783echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005784
5785fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005786if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005787 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005788#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005789_ACEOF
5790
5791fi
5792
Guido van Rossum627b2d71993-12-24 10:39:16 +00005793done
5794
Martin v. Löwis11437992002-04-12 09:54:03 +00005795
5796
5797
5798
5799
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005800ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005801for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005802 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5803{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5804echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005805if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005806 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005807else
Martin v. Löwis11437992002-04-12 09:54:03 +00005808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005809/* confdefs.h. */
5810_ACEOF
5811cat confdefs.h >>conftest.$ac_ext
5812cat >>conftest.$ac_ext <<_ACEOF
5813/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814#include <sys/types.h>
5815#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005816
Martin v. Löwis11437992002-04-12 09:54:03 +00005817int
5818main ()
5819{
5820if ((DIR *) 0)
5821return 0;
5822 ;
5823 return 0;
5824}
5825_ACEOF
5826rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005827if { (ac_try="$ac_compile"
5828case "(($ac_try" in
5829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5830 *) ac_try_echo=$ac_try;;
5831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005835 grep -v '^ *+' conftest.er1 >conftest.err
5836 rm -f conftest.er1
5837 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005839 (exit $ac_status); } && {
5840 test -z "$ac_c_werror_flag" ||
5841 test ! -s conftest.err
5842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005843 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005844else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005846sed 's/^/| /' conftest.$ac_ext >&5
5847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005848 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005850
5851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005852fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005853ac_res=`eval echo '${'$as_ac_Header'}'`
5854 { echo "$as_me:$LINENO: result: $ac_res" >&5
5855echo "${ECHO_T}$ac_res" >&6; }
5856if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005857 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005858#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005859_ACEOF
5860
5861ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005864done
5865# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5866if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005867 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5868echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005869if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871else
Martin v. Löwis11437992002-04-12 09:54:03 +00005872 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005874/* confdefs.h. */
5875_ACEOF
5876cat confdefs.h >>conftest.$ac_ext
5877cat >>conftest.$ac_ext <<_ACEOF
5878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005880/* Override any GCC internal prototype to avoid an error.
5881 Use char because int might match the return type of a GCC
5882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005883#ifdef __cplusplus
5884extern "C"
5885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005886char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005887int
5888main ()
5889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005890return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005891 ;
5892 return 0;
5893}
5894_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005895for ac_lib in '' dir; do
5896 if test -z "$ac_lib"; then
5897 ac_res="none required"
5898 else
5899 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005900 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005901 fi
5902 rm -f conftest.$ac_objext conftest$ac_exeext
5903if { (ac_try="$ac_link"
5904case "(($ac_try" in
5905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5906 *) ac_try_echo=$ac_try;;
5907esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005909 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005910 ac_status=$?
5911 grep -v '^ *+' conftest.er1 >conftest.err
5912 rm -f conftest.er1
5913 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005915 (exit $ac_status); } && {
5916 test -z "$ac_c_werror_flag" ||
5917 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005918 } && test -s conftest$ac_exeext &&
5919 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005920 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005922 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005923sed 's/^/| /' conftest.$ac_ext >&5
5924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005925
Thomas Wouters477c8d52006-05-27 19:21:47 +00005926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927
5928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5929 conftest$ac_exeext
5930 if test "${ac_cv_search_opendir+set}" = set; then
5931 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005933done
5934if test "${ac_cv_search_opendir+set}" = set; then
5935 :
5936else
5937 ac_cv_search_opendir=no
5938fi
5939rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005940LIBS=$ac_func_search_save_LIBS
5941fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005942{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5943echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005944ac_res=$ac_cv_search_opendir
5945if test "$ac_res" != no; then
5946 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
Michael W. Hudson54241132001-12-07 15:38:26 +00005950else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005951 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5952echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005953if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005955else
5956 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005958/* confdefs.h. */
5959_ACEOF
5960cat confdefs.h >>conftest.$ac_ext
5961cat >>conftest.$ac_ext <<_ACEOF
5962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005964/* Override any GCC internal prototype to avoid an error.
5965 Use char because int might match the return type of a GCC
5966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005967#ifdef __cplusplus
5968extern "C"
5969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005970char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005971int
5972main ()
5973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005974return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005975 ;
5976 return 0;
5977}
5978_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005979for ac_lib in '' x; do
5980 if test -z "$ac_lib"; then
5981 ac_res="none required"
5982 else
5983 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005984 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005985 fi
5986 rm -f conftest.$ac_objext conftest$ac_exeext
5987if { (ac_try="$ac_link"
5988case "(($ac_try" in
5989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5990 *) ac_try_echo=$ac_try;;
5991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005993 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005994 ac_status=$?
5995 grep -v '^ *+' conftest.er1 >conftest.err
5996 rm -f conftest.er1
5997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005999 (exit $ac_status); } && {
6000 test -z "$ac_c_werror_flag" ||
6001 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006002 } && test -s conftest$ac_exeext &&
6003 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006004 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006006 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006007sed 's/^/| /' conftest.$ac_ext >&5
6008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006009
Thomas Wouters477c8d52006-05-27 19:21:47 +00006010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011
6012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6013 conftest$ac_exeext
6014 if test "${ac_cv_search_opendir+set}" = set; then
6015 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006017done
6018if test "${ac_cv_search_opendir+set}" = set; then
6019 :
6020else
6021 ac_cv_search_opendir=no
6022fi
6023rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006024LIBS=$ac_func_search_save_LIBS
6025fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006026{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6027echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006028ac_res=$ac_cv_search_opendir
6029if test "$ac_res" != no; then
6030 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032fi
6033
6034fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006035
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006036{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6037echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006039 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040else
6041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006042/* confdefs.h. */
6043_ACEOF
6044cat confdefs.h >>conftest.$ac_ext
6045cat >>conftest.$ac_ext <<_ACEOF
6046/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048int
6049main ()
6050{
6051return makedev(0, 0);
6052 ;
6053 return 0;
6054}
6055_ACEOF
6056rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006057if { (ac_try="$ac_link"
6058case "(($ac_try" in
6059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6060 *) ac_try_echo=$ac_try;;
6061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006063 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006065 grep -v '^ *+' conftest.er1 >conftest.err
6066 rm -f conftest.er1
6067 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006069 (exit $ac_status); } && {
6070 test -z "$ac_c_werror_flag" ||
6071 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006072 } && test -s conftest$ac_exeext &&
6073 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074 ac_cv_header_sys_types_h_makedev=yes
6075else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006077sed 's/^/| /' conftest.$ac_ext >&5
6078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006079 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081
6082rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084
6085fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006086{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6087echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088
6089if test $ac_cv_header_sys_types_h_makedev = no; then
6090if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006091 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6092echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006094 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006096{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6097echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098else
6099 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006100{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6101echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006103/* confdefs.h. */
6104_ACEOF
6105cat confdefs.h >>conftest.$ac_ext
6106cat >>conftest.$ac_ext <<_ACEOF
6107/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108$ac_includes_default
6109#include <sys/mkdev.h>
6110_ACEOF
6111rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006112if { (ac_try="$ac_compile"
6113case "(($ac_try" in
6114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6115 *) ac_try_echo=$ac_try;;
6116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006120 grep -v '^ *+' conftest.er1 >conftest.err
6121 rm -f conftest.er1
6122 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006124 (exit $ac_status); } && {
6125 test -z "$ac_c_werror_flag" ||
6126 test ! -s conftest.err
6127 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006128 ac_header_compiler=yes
6129else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006131sed 's/^/| /' conftest.$ac_ext >&5
6132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006133 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135
6136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006137{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6138echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139
6140# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006141{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6142echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006144/* confdefs.h. */
6145_ACEOF
6146cat confdefs.h >>conftest.$ac_ext
6147cat >>conftest.$ac_ext <<_ACEOF
6148/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149#include <sys/mkdev.h>
6150_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006151if { (ac_try="$ac_cpp conftest.$ac_ext"
6152case "(($ac_try" in
6153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6154 *) ac_try_echo=$ac_try;;
6155esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006159 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160 rm -f conftest.er1
6161 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163 (exit $ac_status); } >/dev/null && {
6164 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6165 test ! -s conftest.err
6166 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167 ac_header_preproc=yes
6168else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006170sed 's/^/| /' conftest.$ac_ext >&5
6171
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_header_preproc=no
6173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006176{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6177echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178
6179# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006180case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6181 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006182 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6183echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6184 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6185echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006186 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006187 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006188 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6192echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6194echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006202## -------------------------------------- ##
6203## Report this to http://bugs.python.org/ ##
6204## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006205_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006207 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006209{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6210echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006212 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213else
6214 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6215fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006216{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6217echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218
6219fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006220if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221
6222cat >>confdefs.h <<\_ACEOF
6223#define MAJOR_IN_MKDEV 1
6224_ACEOF
6225
6226fi
6227
6228
6229
6230 if test $ac_cv_header_sys_mkdev_h = no; then
6231 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006232 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6233echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006234if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006235 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006237{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6238echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239else
6240 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006241{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6242echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006244/* confdefs.h. */
6245_ACEOF
6246cat confdefs.h >>conftest.$ac_ext
6247cat >>conftest.$ac_ext <<_ACEOF
6248/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249$ac_includes_default
6250#include <sys/sysmacros.h>
6251_ACEOF
6252rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253if { (ac_try="$ac_compile"
6254case "(($ac_try" in
6255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6256 *) ac_try_echo=$ac_try;;
6257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006261 grep -v '^ *+' conftest.er1 >conftest.err
6262 rm -f conftest.er1
6263 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006265 (exit $ac_status); } && {
6266 test -z "$ac_c_werror_flag" ||
6267 test ! -s conftest.err
6268 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269 ac_header_compiler=yes
6270else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006272sed 's/^/| /' conftest.$ac_ext >&5
6273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006274 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006276
6277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006278{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6279echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280
6281# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006282{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6283echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006285/* confdefs.h. */
6286_ACEOF
6287cat confdefs.h >>conftest.$ac_ext
6288cat >>conftest.$ac_ext <<_ACEOF
6289/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290#include <sys/sysmacros.h>
6291_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006292if { (ac_try="$ac_cpp conftest.$ac_ext"
6293case "(($ac_try" in
6294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6295 *) ac_try_echo=$ac_try;;
6296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006298 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006300 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301 rm -f conftest.er1
6302 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006304 (exit $ac_status); } >/dev/null && {
6305 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6306 test ! -s conftest.err
6307 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308 ac_header_preproc=yes
6309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006311sed 's/^/| /' conftest.$ac_ext >&5
6312
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313 ac_header_preproc=no
6314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006315
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006316rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006317{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6318echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006319
6320# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006321case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6322 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006323 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6324echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6325 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6326echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006327 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006328 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006329 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6333echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6335echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006342 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006343## -------------------------------------- ##
6344## Report this to http://bugs.python.org/ ##
6345## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006346_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006347 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006348 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006350{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6351echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006352if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006353 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354else
6355 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6356fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006357{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6358echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359
6360fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006361if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006362
6363cat >>confdefs.h <<\_ACEOF
6364#define MAJOR_IN_SYSMACROS 1
6365_ACEOF
6366
6367fi
6368
6369
6370 fi
6371fi
6372
Michael W. Hudson54241132001-12-07 15:38:26 +00006373
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006375
6376for ac_header in term.h
6377do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006378as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6379{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6380echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006381if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006383else
6384 cat >conftest.$ac_ext <<_ACEOF
6385/* confdefs.h. */
6386_ACEOF
6387cat confdefs.h >>conftest.$ac_ext
6388cat >>conftest.$ac_ext <<_ACEOF
6389/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006390
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006391#ifdef HAVE_CURSES_H
6392#include <curses.h>
6393#endif
6394
6395
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006396#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397_ACEOF
6398rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006399if { (ac_try="$ac_compile"
6400case "(($ac_try" in
6401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6402 *) ac_try_echo=$ac_try;;
6403esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006406 ac_status=$?
6407 grep -v '^ *+' conftest.er1 >conftest.err
6408 rm -f conftest.er1
6409 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006411 (exit $ac_status); } && {
6412 test -z "$ac_c_werror_flag" ||
6413 test ! -s conftest.err
6414 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006415 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006416else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006417 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006418sed 's/^/| /' conftest.$ac_ext >&5
6419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006422
6423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006424fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006425ac_res=`eval echo '${'$as_ac_Header'}'`
6426 { echo "$as_me:$LINENO: result: $ac_res" >&5
6427echo "${ECHO_T}$ac_res" >&6; }
6428if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006429 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006430#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006431_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006432
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006433fi
6434
6435done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006436
6437
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438# On Linux, netlink.h requires asm/types.h
6439
6440for ac_header in linux/netlink.h
6441do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006442as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6443{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6444echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006445if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006446 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006447else
6448 cat >conftest.$ac_ext <<_ACEOF
6449/* confdefs.h. */
6450_ACEOF
6451cat confdefs.h >>conftest.$ac_ext
6452cat >>conftest.$ac_ext <<_ACEOF
6453/* end confdefs.h. */
6454
6455#ifdef HAVE_ASM_TYPES_H
6456#include <asm/types.h>
6457#endif
6458#ifdef HAVE_SYS_SOCKET_H
6459#include <sys/socket.h>
6460#endif
6461
6462
6463#include <$ac_header>
6464_ACEOF
6465rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006466if { (ac_try="$ac_compile"
6467case "(($ac_try" in
6468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6469 *) ac_try_echo=$ac_try;;
6470esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006473 ac_status=$?
6474 grep -v '^ *+' conftest.er1 >conftest.err
6475 rm -f conftest.er1
6476 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006478 (exit $ac_status); } && {
6479 test -z "$ac_c_werror_flag" ||
6480 test ! -s conftest.err
6481 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006482 eval "$as_ac_Header=yes"
6483else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006484 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006485sed 's/^/| /' conftest.$ac_ext >&5
6486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006487 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006489
6490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006491fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006492ac_res=`eval echo '${'$as_ac_Header'}'`
6493 { echo "$as_me:$LINENO: result: $ac_res" >&5
6494echo "${ECHO_T}$ac_res" >&6; }
6495if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006496 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006497#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006498_ACEOF
6499
6500fi
6501
6502done
6503
6504
Guido van Rossum627b2d71993-12-24 10:39:16 +00006505# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006506was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006507{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6508echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006510/* confdefs.h. */
6511_ACEOF
6512cat confdefs.h >>conftest.$ac_ext
6513cat >>conftest.$ac_ext <<_ACEOF
6514/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006515#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006516
6517_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006519 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006520 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006521else
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523
6524cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006525#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006526_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006527
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006528
Guido van Rossum627b2d71993-12-24 10:39:16 +00006529fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00006530rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006531
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006532{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6533echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006534
Neal Norwitz11690112002-07-30 01:08:28 +00006535# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006536{ echo "$as_me:$LINENO: checking for makedev" >&5
6537echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006538cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006539/* confdefs.h. */
6540_ACEOF
6541cat confdefs.h >>conftest.$ac_ext
6542cat >>conftest.$ac_ext <<_ACEOF
6543/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006544#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006545int
6546main ()
6547{
6548 makedev(0, 0)
6549 ;
6550 return 0;
6551}
6552_ACEOF
6553rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554if { (ac_try="$ac_link"
6555case "(($ac_try" in
6556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6557 *) ac_try_echo=$ac_try;;
6558esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006560 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006562 grep -v '^ *+' conftest.er1 >conftest.err
6563 rm -f conftest.er1
6564 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006566 (exit $ac_status); } && {
6567 test -z "$ac_c_werror_flag" ||
6568 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006569 } && test -s conftest$ac_exeext &&
6570 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006571 ac_cv_has_makedev=yes
6572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006574sed 's/^/| /' conftest.$ac_ext >&5
6575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006576 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006578
6579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006580 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006581if test "$ac_cv_has_makedev" = "no"; then
6582 # we didn't link, try if _OSF_SOURCE will allow us to link
6583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006584/* confdefs.h. */
6585_ACEOF
6586cat confdefs.h >>conftest.$ac_ext
6587cat >>conftest.$ac_ext <<_ACEOF
6588/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006589
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006590#define _OSF_SOURCE 1
6591#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006592
Neal Norwitz11690112002-07-30 01:08:28 +00006593int
6594main ()
6595{
6596 makedev(0, 0)
6597 ;
6598 return 0;
6599}
6600_ACEOF
6601rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006602if { (ac_try="$ac_link"
6603case "(($ac_try" in
6604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6605 *) ac_try_echo=$ac_try;;
6606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006608 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006610 grep -v '^ *+' conftest.er1 >conftest.err
6611 rm -f conftest.er1
6612 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006614 (exit $ac_status); } && {
6615 test -z "$ac_c_werror_flag" ||
6616 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006617 } && test -s conftest$ac_exeext &&
6618 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006619 ac_cv_has_makedev=yes
6620else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006622sed 's/^/| /' conftest.$ac_ext >&5
6623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006624 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006626
6627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006628 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006629 if test "$ac_cv_has_makedev" = "yes"; then
6630
6631cat >>confdefs.h <<\_ACEOF
6632#define _OSF_SOURCE 1
6633_ACEOF
6634
6635 fi
6636fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006637{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6638echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006639if test "$ac_cv_has_makedev" = "yes"; then
6640
6641cat >>confdefs.h <<\_ACEOF
6642#define HAVE_MAKEDEV 1
6643_ACEOF
6644
6645fi
6646
Martin v. Löwis399a6892002-10-04 10:22:02 +00006647# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6648# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6649# defined, but the compiler does not support pragma redefine_extname,
6650# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6651# structures (such as rlimit64) without declaring them. As a
6652# work-around, disable LFS on such configurations
6653
6654use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006655{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6656echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006658/* confdefs.h. */
6659_ACEOF
6660cat confdefs.h >>conftest.$ac_ext
6661cat >>conftest.$ac_ext <<_ACEOF
6662/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006663
6664#define _LARGEFILE_SOURCE 1
6665#define _FILE_OFFSET_BITS 64
6666#include <sys/resource.h>
6667
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668int
6669main ()
6670{
6671struct rlimit foo;
6672 ;
6673 return 0;
6674}
6675_ACEOF
6676rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006677if { (ac_try="$ac_compile"
6678case "(($ac_try" in
6679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6680 *) ac_try_echo=$ac_try;;
6681esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006685 grep -v '^ *+' conftest.er1 >conftest.err
6686 rm -f conftest.er1
6687 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006689 (exit $ac_status); } && {
6690 test -z "$ac_c_werror_flag" ||
6691 test ! -s conftest.err
6692 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006693 sol_lfs_bug=no
6694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006696sed 's/^/| /' conftest.$ac_ext >&5
6697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006698 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700
6701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006702{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6703echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006704if test "$sol_lfs_bug" = "yes"; then
6705 use_lfs=no
6706fi
6707
6708if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006709# Two defines needed to enable largefile support on various platforms
6710# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712cat >>confdefs.h <<\_ACEOF
6713#define _LARGEFILE_SOURCE 1
6714_ACEOF
6715
6716
6717cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006718#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006719_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006720
Martin v. Löwis399a6892002-10-04 10:22:02 +00006721fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006722
Guido van Rossum84e7b241996-08-19 21:59:00 +00006723# Add some code to confdefs.h so that the test for off_t works on SCO
6724cat >> confdefs.h <<\EOF
6725#if defined(SCO_DS)
6726#undef _OFF_T
6727#endif
6728EOF
6729
Guido van Rossumef2255b2000-03-10 22:30:29 +00006730# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006731{ echo "$as_me:$LINENO: checking for mode_t" >&5
6732echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006733if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006735else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006736 cat >conftest.$ac_ext <<_ACEOF
6737/* confdefs.h. */
6738_ACEOF
6739cat confdefs.h >>conftest.$ac_ext
6740cat >>conftest.$ac_ext <<_ACEOF
6741/* end confdefs.h. */
6742$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006743typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006744int
6745main ()
6746{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006747if ((ac__type_new_ *) 0)
6748 return 0;
6749if (sizeof (ac__type_new_))
6750 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006751 ;
6752 return 0;
6753}
6754_ACEOF
6755rm -f conftest.$ac_objext
6756if { (ac_try="$ac_compile"
6757case "(($ac_try" in
6758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6759 *) ac_try_echo=$ac_try;;
6760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006762 (eval "$ac_compile") 2>conftest.er1
6763 ac_status=$?
6764 grep -v '^ *+' conftest.er1 >conftest.err
6765 rm -f conftest.er1
6766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006768 (exit $ac_status); } && {
6769 test -z "$ac_c_werror_flag" ||
6770 test ! -s conftest.err
6771 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006772 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006775sed 's/^/| /' conftest.$ac_ext >&5
6776
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006777 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006779
6780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006781fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006782{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6783echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6784if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006785 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006786else
Martin v. Löwis11437992002-04-12 09:54:03 +00006787
6788cat >>confdefs.h <<_ACEOF
6789#define mode_t int
6790_ACEOF
6791
6792fi
6793
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006794{ echo "$as_me:$LINENO: checking for off_t" >&5
6795echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006796if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006797 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006798else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006799 cat >conftest.$ac_ext <<_ACEOF
6800/* confdefs.h. */
6801_ACEOF
6802cat confdefs.h >>conftest.$ac_ext
6803cat >>conftest.$ac_ext <<_ACEOF
6804/* end confdefs.h. */
6805$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006806typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006807int
6808main ()
6809{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006810if ((ac__type_new_ *) 0)
6811 return 0;
6812if (sizeof (ac__type_new_))
6813 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006814 ;
6815 return 0;
6816}
6817_ACEOF
6818rm -f conftest.$ac_objext
6819if { (ac_try="$ac_compile"
6820case "(($ac_try" in
6821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6822 *) ac_try_echo=$ac_try;;
6823esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006825 (eval "$ac_compile") 2>conftest.er1
6826 ac_status=$?
6827 grep -v '^ *+' conftest.er1 >conftest.err
6828 rm -f conftest.er1
6829 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006831 (exit $ac_status); } && {
6832 test -z "$ac_c_werror_flag" ||
6833 test ! -s conftest.err
6834 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006835 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006836else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006838sed 's/^/| /' conftest.$ac_ext >&5
6839
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006840 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006842
6843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006844fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006845{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6846echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6847if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006848 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006849else
Martin v. Löwis11437992002-04-12 09:54:03 +00006850
6851cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006852#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006853_ACEOF
6854
6855fi
6856
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006857{ echo "$as_me:$LINENO: checking for pid_t" >&5
6858echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006859if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006860 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006861else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006862 cat >conftest.$ac_ext <<_ACEOF
6863/* confdefs.h. */
6864_ACEOF
6865cat confdefs.h >>conftest.$ac_ext
6866cat >>conftest.$ac_ext <<_ACEOF
6867/* end confdefs.h. */
6868$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006869typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006870int
6871main ()
6872{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006873if ((ac__type_new_ *) 0)
6874 return 0;
6875if (sizeof (ac__type_new_))
6876 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006877 ;
6878 return 0;
6879}
6880_ACEOF
6881rm -f conftest.$ac_objext
6882if { (ac_try="$ac_compile"
6883case "(($ac_try" in
6884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6885 *) ac_try_echo=$ac_try;;
6886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006888 (eval "$ac_compile") 2>conftest.er1
6889 ac_status=$?
6890 grep -v '^ *+' conftest.er1 >conftest.err
6891 rm -f conftest.er1
6892 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006894 (exit $ac_status); } && {
6895 test -z "$ac_c_werror_flag" ||
6896 test ! -s conftest.err
6897 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006898 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006899else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006901sed 's/^/| /' conftest.$ac_ext >&5
6902
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006903 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006905
6906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006907fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006908{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6909echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6910if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006911 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006912else
Martin v. Löwis11437992002-04-12 09:54:03 +00006913
6914cat >>confdefs.h <<_ACEOF
6915#define pid_t int
6916_ACEOF
6917
6918fi
6919
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006920{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6921echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006922if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006924else
6925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006926/* confdefs.h. */
6927_ACEOF
6928cat confdefs.h >>conftest.$ac_ext
6929cat >>conftest.$ac_ext <<_ACEOF
6930/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006931#include <sys/types.h>
6932#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934int
6935main ()
6936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006937return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006938 ;
6939 return 0;
6940}
6941_ACEOF
6942rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006943if { (ac_try="$ac_compile"
6944case "(($ac_try" in
6945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6946 *) ac_try_echo=$ac_try;;
6947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006951 grep -v '^ *+' conftest.er1 >conftest.err
6952 rm -f conftest.er1
6953 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955 (exit $ac_status); } && {
6956 test -z "$ac_c_werror_flag" ||
6957 test ! -s conftest.err
6958 } && test -s conftest.$ac_objext; then
6959 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006960else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006962sed 's/^/| /' conftest.$ac_ext >&5
6963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006964 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006966
6967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006968fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006969{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6970echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006971
Martin v. Löwis11437992002-04-12 09:54:03 +00006972cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006973#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006974_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006975
Michael W. Hudson54241132001-12-07 15:38:26 +00006976
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006977{ echo "$as_me:$LINENO: checking for size_t" >&5
6978echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006979if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006981else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006982 cat >conftest.$ac_ext <<_ACEOF
6983/* confdefs.h. */
6984_ACEOF
6985cat confdefs.h >>conftest.$ac_ext
6986cat >>conftest.$ac_ext <<_ACEOF
6987/* end confdefs.h. */
6988$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006989typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006990int
6991main ()
6992{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006993if ((ac__type_new_ *) 0)
6994 return 0;
6995if (sizeof (ac__type_new_))
6996 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006997 ;
6998 return 0;
6999}
7000_ACEOF
7001rm -f conftest.$ac_objext
7002if { (ac_try="$ac_compile"
7003case "(($ac_try" in
7004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7005 *) ac_try_echo=$ac_try;;
7006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007008 (eval "$ac_compile") 2>conftest.er1
7009 ac_status=$?
7010 grep -v '^ *+' conftest.er1 >conftest.err
7011 rm -f conftest.er1
7012 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007014 (exit $ac_status); } && {
7015 test -z "$ac_c_werror_flag" ||
7016 test ! -s conftest.err
7017 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007018 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007019else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007021sed 's/^/| /' conftest.$ac_ext >&5
7022
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007023 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007025
7026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007027fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007028{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7029echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7030if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007031 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007032else
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
7034cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007036_ACEOF
7037
7038fi
7039
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007040{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7041echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007042if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007043 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007044else
7045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007046/* confdefs.h. */
7047_ACEOF
7048cat confdefs.h >>conftest.$ac_ext
7049cat >>conftest.$ac_ext <<_ACEOF
7050/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007051#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007052
7053_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007055 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056 ac_cv_type_uid_t=yes
7057else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058 ac_cv_type_uid_t=no
7059fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00007060rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007063{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7064echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007065if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066
Martin v. Löwis11437992002-04-12 09:54:03 +00007067cat >>confdefs.h <<\_ACEOF
7068#define uid_t int
7069_ACEOF
7070
7071
7072cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007073#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007074_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075
7076fi
7077
Mark Dickinsonbd792642009-03-18 20:06:12 +00007078
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007079 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7080echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007081if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007082 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007083else
7084 ac_cv_c_uint32_t=no
7085 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7086 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7087 cat >conftest.$ac_ext <<_ACEOF
7088/* confdefs.h. */
7089_ACEOF
7090cat confdefs.h >>conftest.$ac_ext
7091cat >>conftest.$ac_ext <<_ACEOF
7092/* end confdefs.h. */
7093$ac_includes_default
7094int
7095main ()
7096{
7097static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7098test_array [0] = 0
7099
7100 ;
7101 return 0;
7102}
7103_ACEOF
7104rm -f conftest.$ac_objext
7105if { (ac_try="$ac_compile"
7106case "(($ac_try" in
7107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7108 *) ac_try_echo=$ac_try;;
7109esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007111 (eval "$ac_compile") 2>conftest.er1
7112 ac_status=$?
7113 grep -v '^ *+' conftest.er1 >conftest.err
7114 rm -f conftest.er1
7115 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007117 (exit $ac_status); } && {
7118 test -z "$ac_c_werror_flag" ||
7119 test ! -s conftest.err
7120 } && test -s conftest.$ac_objext; then
7121 case $ac_type in
7122 uint32_t) ac_cv_c_uint32_t=yes ;;
7123 *) ac_cv_c_uint32_t=$ac_type ;;
7124esac
7125
7126else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007127 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007128sed 's/^/| /' conftest.$ac_ext >&5
7129
7130
7131fi
7132
7133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7134 test "$ac_cv_c_uint32_t" != no && break
7135 done
7136fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007137{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7138echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007139 case $ac_cv_c_uint32_t in #(
7140 no|yes) ;; #(
7141 *)
7142
7143cat >>confdefs.h <<\_ACEOF
7144#define _UINT32_T 1
7145_ACEOF
7146
7147
7148cat >>confdefs.h <<_ACEOF
7149#define uint32_t $ac_cv_c_uint32_t
7150_ACEOF
7151;;
7152 esac
7153
7154
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007155 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7156echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007157if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007158 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007159else
7160 ac_cv_c_uint64_t=no
7161 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7162 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7163 cat >conftest.$ac_ext <<_ACEOF
7164/* confdefs.h. */
7165_ACEOF
7166cat confdefs.h >>conftest.$ac_ext
7167cat >>conftest.$ac_ext <<_ACEOF
7168/* end confdefs.h. */
7169$ac_includes_default
7170int
7171main ()
7172{
7173static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7174test_array [0] = 0
7175
7176 ;
7177 return 0;
7178}
7179_ACEOF
7180rm -f conftest.$ac_objext
7181if { (ac_try="$ac_compile"
7182case "(($ac_try" in
7183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7184 *) ac_try_echo=$ac_try;;
7185esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007187 (eval "$ac_compile") 2>conftest.er1
7188 ac_status=$?
7189 grep -v '^ *+' conftest.er1 >conftest.err
7190 rm -f conftest.er1
7191 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007193 (exit $ac_status); } && {
7194 test -z "$ac_c_werror_flag" ||
7195 test ! -s conftest.err
7196 } && test -s conftest.$ac_objext; then
7197 case $ac_type in
7198 uint64_t) ac_cv_c_uint64_t=yes ;;
7199 *) ac_cv_c_uint64_t=$ac_type ;;
7200esac
7201
7202else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007203 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007204sed 's/^/| /' conftest.$ac_ext >&5
7205
7206
7207fi
7208
7209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7210 test "$ac_cv_c_uint64_t" != no && break
7211 done
7212fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007213{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7214echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007215 case $ac_cv_c_uint64_t in #(
7216 no|yes) ;; #(
7217 *)
7218
7219cat >>confdefs.h <<\_ACEOF
7220#define _UINT64_T 1
7221_ACEOF
7222
7223
7224cat >>confdefs.h <<_ACEOF
7225#define uint64_t $ac_cv_c_uint64_t
7226_ACEOF
7227;;
7228 esac
7229
7230
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007231 { echo "$as_me:$LINENO: checking for int32_t" >&5
7232echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007233if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007234 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007235else
7236 ac_cv_c_int32_t=no
7237 for ac_type in 'int32_t' 'int' 'long int' \
7238 'long long int' 'short int' 'signed char'; do
7239 cat >conftest.$ac_ext <<_ACEOF
7240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
7245$ac_includes_default
7246int
7247main ()
7248{
7249static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7250test_array [0] = 0
7251
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
7257if { (ac_try="$ac_compile"
7258case "(($ac_try" in
7259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7260 *) ac_try_echo=$ac_try;;
7261esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007263 (eval "$ac_compile") 2>conftest.er1
7264 ac_status=$?
7265 grep -v '^ *+' conftest.er1 >conftest.err
7266 rm -f conftest.er1
7267 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007269 (exit $ac_status); } && {
7270 test -z "$ac_c_werror_flag" ||
7271 test ! -s conftest.err
7272 } && test -s conftest.$ac_objext; then
7273 cat >conftest.$ac_ext <<_ACEOF
7274/* confdefs.h. */
7275_ACEOF
7276cat confdefs.h >>conftest.$ac_ext
7277cat >>conftest.$ac_ext <<_ACEOF
7278/* end confdefs.h. */
7279$ac_includes_default
7280int
7281main ()
7282{
7283static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007284 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007285test_array [0] = 0
7286
7287 ;
7288 return 0;
7289}
7290_ACEOF
7291rm -f conftest.$ac_objext
7292if { (ac_try="$ac_compile"
7293case "(($ac_try" in
7294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7295 *) ac_try_echo=$ac_try;;
7296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007298 (eval "$ac_compile") 2>conftest.er1
7299 ac_status=$?
7300 grep -v '^ *+' conftest.er1 >conftest.err
7301 rm -f conftest.er1
7302 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007304 (exit $ac_status); } && {
7305 test -z "$ac_c_werror_flag" ||
7306 test ! -s conftest.err
7307 } && test -s conftest.$ac_objext; then
7308 :
7309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007310 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007311sed 's/^/| /' conftest.$ac_ext >&5
7312
7313 case $ac_type in
7314 int32_t) ac_cv_c_int32_t=yes ;;
7315 *) ac_cv_c_int32_t=$ac_type ;;
7316esac
7317
7318fi
7319
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7321else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007322 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007323sed 's/^/| /' conftest.$ac_ext >&5
7324
7325
7326fi
7327
7328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7329 test "$ac_cv_c_int32_t" != no && break
7330 done
7331fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007332{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7333echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007334 case $ac_cv_c_int32_t in #(
7335 no|yes) ;; #(
7336 *)
7337
7338cat >>confdefs.h <<_ACEOF
7339#define int32_t $ac_cv_c_int32_t
7340_ACEOF
7341;;
7342 esac
7343
7344
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007345 { echo "$as_me:$LINENO: checking for int64_t" >&5
7346echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007347if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007348 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007349else
7350 ac_cv_c_int64_t=no
7351 for ac_type in 'int64_t' 'int' 'long int' \
7352 'long long int' 'short int' 'signed char'; do
7353 cat >conftest.$ac_ext <<_ACEOF
7354/* confdefs.h. */
7355_ACEOF
7356cat confdefs.h >>conftest.$ac_ext
7357cat >>conftest.$ac_ext <<_ACEOF
7358/* end confdefs.h. */
7359$ac_includes_default
7360int
7361main ()
7362{
7363static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7364test_array [0] = 0
7365
7366 ;
7367 return 0;
7368}
7369_ACEOF
7370rm -f conftest.$ac_objext
7371if { (ac_try="$ac_compile"
7372case "(($ac_try" in
7373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7374 *) ac_try_echo=$ac_try;;
7375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007377 (eval "$ac_compile") 2>conftest.er1
7378 ac_status=$?
7379 grep -v '^ *+' conftest.er1 >conftest.err
7380 rm -f conftest.er1
7381 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007383 (exit $ac_status); } && {
7384 test -z "$ac_c_werror_flag" ||
7385 test ! -s conftest.err
7386 } && test -s conftest.$ac_objext; then
7387 cat >conftest.$ac_ext <<_ACEOF
7388/* confdefs.h. */
7389_ACEOF
7390cat confdefs.h >>conftest.$ac_ext
7391cat >>conftest.$ac_ext <<_ACEOF
7392/* end confdefs.h. */
7393$ac_includes_default
7394int
7395main ()
7396{
7397static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007398 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007399test_array [0] = 0
7400
7401 ;
7402 return 0;
7403}
7404_ACEOF
7405rm -f conftest.$ac_objext
7406if { (ac_try="$ac_compile"
7407case "(($ac_try" in
7408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7409 *) ac_try_echo=$ac_try;;
7410esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007412 (eval "$ac_compile") 2>conftest.er1
7413 ac_status=$?
7414 grep -v '^ *+' conftest.er1 >conftest.err
7415 rm -f conftest.er1
7416 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007418 (exit $ac_status); } && {
7419 test -z "$ac_c_werror_flag" ||
7420 test ! -s conftest.err
7421 } && test -s conftest.$ac_objext; then
7422 :
7423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007424 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007425sed 's/^/| /' conftest.$ac_ext >&5
7426
7427 case $ac_type in
7428 int64_t) ac_cv_c_int64_t=yes ;;
7429 *) ac_cv_c_int64_t=$ac_type ;;
7430esac
7431
7432fi
7433
7434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007436 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007437sed 's/^/| /' conftest.$ac_ext >&5
7438
7439
7440fi
7441
7442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7443 test "$ac_cv_c_int64_t" != no && break
7444 done
7445fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007446{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7447echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007448 case $ac_cv_c_int64_t in #(
7449 no|yes) ;; #(
7450 *)
7451
7452cat >>confdefs.h <<_ACEOF
7453#define int64_t $ac_cv_c_int64_t
7454_ACEOF
7455;;
7456 esac
7457
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007458{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7459echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007460if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007461 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007462else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007463 cat >conftest.$ac_ext <<_ACEOF
7464/* confdefs.h. */
7465_ACEOF
7466cat confdefs.h >>conftest.$ac_ext
7467cat >>conftest.$ac_ext <<_ACEOF
7468/* end confdefs.h. */
7469$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007470typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007471int
7472main ()
7473{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007474if ((ac__type_new_ *) 0)
7475 return 0;
7476if (sizeof (ac__type_new_))
7477 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007478 ;
7479 return 0;
7480}
7481_ACEOF
7482rm -f conftest.$ac_objext
7483if { (ac_try="$ac_compile"
7484case "(($ac_try" in
7485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7486 *) ac_try_echo=$ac_try;;
7487esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007489 (eval "$ac_compile") 2>conftest.er1
7490 ac_status=$?
7491 grep -v '^ *+' conftest.er1 >conftest.err
7492 rm -f conftest.er1
7493 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007495 (exit $ac_status); } && {
7496 test -z "$ac_c_werror_flag" ||
7497 test ! -s conftest.err
7498 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007499 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007500else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007501 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007502sed 's/^/| /' conftest.$ac_ext >&5
7503
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007504 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007506
7507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007508fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007509{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7510echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7511if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007512
7513cat >>confdefs.h <<\_ACEOF
7514#define HAVE_SSIZE_T 1
7515_ACEOF
7516
7517fi
7518
Jack Jansendd19cf82001-12-06 22:36:17 +00007519
Michael W. Hudson54241132001-12-07 15:38:26 +00007520# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007521# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007522{ echo "$as_me:$LINENO: checking for int" >&5
7523echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7524if test "${ac_cv_type_int+set}" = set; then
7525 echo $ECHO_N "(cached) $ECHO_C" >&6
7526else
7527 cat >conftest.$ac_ext <<_ACEOF
7528/* confdefs.h. */
7529_ACEOF
7530cat confdefs.h >>conftest.$ac_ext
7531cat >>conftest.$ac_ext <<_ACEOF
7532/* end confdefs.h. */
7533$ac_includes_default
7534typedef int ac__type_new_;
7535int
7536main ()
7537{
7538if ((ac__type_new_ *) 0)
7539 return 0;
7540if (sizeof (ac__type_new_))
7541 return 0;
7542 ;
7543 return 0;
7544}
7545_ACEOF
7546rm -f conftest.$ac_objext
7547if { (ac_try="$ac_compile"
7548case "(($ac_try" in
7549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7550 *) ac_try_echo=$ac_try;;
7551esac
7552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7553 (eval "$ac_compile") 2>conftest.er1
7554 ac_status=$?
7555 grep -v '^ *+' conftest.er1 >conftest.err
7556 rm -f conftest.er1
7557 cat conftest.err >&5
7558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7559 (exit $ac_status); } && {
7560 test -z "$ac_c_werror_flag" ||
7561 test ! -s conftest.err
7562 } && test -s conftest.$ac_objext; then
7563 ac_cv_type_int=yes
7564else
7565 echo "$as_me: failed program was:" >&5
7566sed 's/^/| /' conftest.$ac_ext >&5
7567
7568 ac_cv_type_int=no
7569fi
7570
7571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7572fi
7573{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7574echo "${ECHO_T}$ac_cv_type_int" >&6; }
7575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007576# The cast to long int works around a bug in the HP C Compiler
7577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7579# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007580{ echo "$as_me:$LINENO: checking size of int" >&5
7581echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007582if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007584else
Martin v. Löwis11437992002-04-12 09:54:03 +00007585 if test "$cross_compiling" = yes; then
7586 # Depending upon the size, compute the lo and hi bounds.
7587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007588/* confdefs.h. */
7589_ACEOF
7590cat confdefs.h >>conftest.$ac_ext
7591cat >>conftest.$ac_ext <<_ACEOF
7592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007593$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007594 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007595int
7596main ()
7597{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007598static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007599test_array [0] = 0
7600
7601 ;
7602 return 0;
7603}
7604_ACEOF
7605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606if { (ac_try="$ac_compile"
7607case "(($ac_try" in
7608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7609 *) ac_try_echo=$ac_try;;
7610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007614 grep -v '^ *+' conftest.er1 >conftest.err
7615 rm -f conftest.er1
7616 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618 (exit $ac_status); } && {
7619 test -z "$ac_c_werror_flag" ||
7620 test ! -s conftest.err
7621 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007622 ac_lo=0 ac_mid=0
7623 while :; do
7624 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007625/* confdefs.h. */
7626_ACEOF
7627cat confdefs.h >>conftest.$ac_ext
7628cat >>conftest.$ac_ext <<_ACEOF
7629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007630$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007631 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007632int
7633main ()
7634{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007635static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007636test_array [0] = 0
7637
7638 ;
7639 return 0;
7640}
7641_ACEOF
7642rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007643if { (ac_try="$ac_compile"
7644case "(($ac_try" in
7645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7646 *) ac_try_echo=$ac_try;;
7647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007651 grep -v '^ *+' conftest.er1 >conftest.err
7652 rm -f conftest.er1
7653 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007655 (exit $ac_status); } && {
7656 test -z "$ac_c_werror_flag" ||
7657 test ! -s conftest.err
7658 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007659 ac_hi=$ac_mid; break
7660else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007662sed 's/^/| /' conftest.$ac_ext >&5
7663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664 ac_lo=`expr $ac_mid + 1`
7665 if test $ac_lo -le $ac_mid; then
7666 ac_lo= ac_hi=
7667 break
7668 fi
7669 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671
7672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 done
7674else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007676sed 's/^/| /' conftest.$ac_ext >&5
7677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007679/* confdefs.h. */
7680_ACEOF
7681cat confdefs.h >>conftest.$ac_ext
7682cat >>conftest.$ac_ext <<_ACEOF
7683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007684$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007685 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007686int
7687main ()
7688{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007690test_array [0] = 0
7691
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007697if { (ac_try="$ac_compile"
7698case "(($ac_try" in
7699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7700 *) ac_try_echo=$ac_try;;
7701esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007705 grep -v '^ *+' conftest.er1 >conftest.err
7706 rm -f conftest.er1
7707 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007709 (exit $ac_status); } && {
7710 test -z "$ac_c_werror_flag" ||
7711 test ! -s conftest.err
7712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 ac_hi=-1 ac_mid=-1
7714 while :; do
7715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007716/* confdefs.h. */
7717_ACEOF
7718cat confdefs.h >>conftest.$ac_ext
7719cat >>conftest.$ac_ext <<_ACEOF
7720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007721$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007722 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007723int
7724main ()
7725{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007727test_array [0] = 0
7728
7729 ;
7730 return 0;
7731}
7732_ACEOF
7733rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734if { (ac_try="$ac_compile"
7735case "(($ac_try" in
7736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7737 *) ac_try_echo=$ac_try;;
7738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007742 grep -v '^ *+' conftest.er1 >conftest.err
7743 rm -f conftest.er1
7744 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746 (exit $ac_status); } && {
7747 test -z "$ac_c_werror_flag" ||
7748 test ! -s conftest.err
7749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 ac_lo=$ac_mid; break
7751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007753sed 's/^/| /' conftest.$ac_ext >&5
7754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755 ac_hi=`expr '(' $ac_mid ')' - 1`
7756 if test $ac_mid -le $ac_hi; then
7757 ac_lo= ac_hi=
7758 break
7759 fi
7760 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762
7763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007764 done
7765else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007767sed 's/^/| /' conftest.$ac_ext >&5
7768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771
7772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774
7775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007776# Binary search between lo and hi bounds.
7777while test "x$ac_lo" != "x$ac_hi"; do
7778 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007785$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007786 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007787int
7788main ()
7789{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007791test_array [0] = 0
7792
7793 ;
7794 return 0;
7795}
7796_ACEOF
7797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798if { (ac_try="$ac_compile"
7799case "(($ac_try" in
7800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7801 *) ac_try_echo=$ac_try;;
7802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007806 grep -v '^ *+' conftest.er1 >conftest.err
7807 rm -f conftest.er1
7808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 (exit $ac_status); } && {
7811 test -z "$ac_c_werror_flag" ||
7812 test ! -s conftest.err
7813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_hi=$ac_mid
7815else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007817sed 's/^/| /' conftest.$ac_ext >&5
7818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00007823done
7824case $ac_lo in
7825?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007826'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007827 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007828See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007829echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007830See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007831 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832 else
7833 ac_cv_sizeof_int=0
7834 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007835esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007836else
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007838/* confdefs.h. */
7839_ACEOF
7840cat confdefs.h >>conftest.$ac_ext
7841cat >>conftest.$ac_ext <<_ACEOF
7842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007843$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007844 typedef int ac__type_sizeof_;
7845static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7846static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007847#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007848#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007849int
7850main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007851{
Martin v. Löwis11437992002-04-12 09:54:03 +00007852
7853 FILE *f = fopen ("conftest.val", "w");
7854 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007856 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007859 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007861 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 }
7863 else
7864 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007866 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007868 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007870 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007871
7872 ;
7873 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007874}
Martin v. Löwis11437992002-04-12 09:54:03 +00007875_ACEOF
7876rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877if { (ac_try="$ac_link"
7878case "(($ac_try" in
7879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7880 *) ac_try_echo=$ac_try;;
7881esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887 { (case "(($ac_try" in
7888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7889 *) ac_try_echo=$ac_try;;
7890esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 (exit $ac_status); }; }; then
7896 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007898 echo "$as_me: program exited with status $ac_status" >&5
7899echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007900sed 's/^/| /' conftest.$ac_ext >&5
7901
Martin v. Löwis11437992002-04-12 09:54:03 +00007902( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007904 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007905See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007906echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007907See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007908 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909 else
7910 ac_cv_sizeof_int=0
7911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913rm -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 +00007914fi
7915rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007916fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007917{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7918echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919
7920
7921
Martin v. Löwis11437992002-04-12 09:54:03 +00007922cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007923#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007924_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007925
7926
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007927{ echo "$as_me:$LINENO: checking for long" >&5
7928echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7929if test "${ac_cv_type_long+set}" = set; then
7930 echo $ECHO_N "(cached) $ECHO_C" >&6
7931else
7932 cat >conftest.$ac_ext <<_ACEOF
7933/* confdefs.h. */
7934_ACEOF
7935cat confdefs.h >>conftest.$ac_ext
7936cat >>conftest.$ac_ext <<_ACEOF
7937/* end confdefs.h. */
7938$ac_includes_default
7939typedef long ac__type_new_;
7940int
7941main ()
7942{
7943if ((ac__type_new_ *) 0)
7944 return 0;
7945if (sizeof (ac__type_new_))
7946 return 0;
7947 ;
7948 return 0;
7949}
7950_ACEOF
7951rm -f conftest.$ac_objext
7952if { (ac_try="$ac_compile"
7953case "(($ac_try" in
7954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7955 *) ac_try_echo=$ac_try;;
7956esac
7957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7958 (eval "$ac_compile") 2>conftest.er1
7959 ac_status=$?
7960 grep -v '^ *+' conftest.er1 >conftest.err
7961 rm -f conftest.er1
7962 cat conftest.err >&5
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } && {
7965 test -z "$ac_c_werror_flag" ||
7966 test ! -s conftest.err
7967 } && test -s conftest.$ac_objext; then
7968 ac_cv_type_long=yes
7969else
7970 echo "$as_me: failed program was:" >&5
7971sed 's/^/| /' conftest.$ac_ext >&5
7972
7973 ac_cv_type_long=no
7974fi
7975
7976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7977fi
7978{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7979echo "${ECHO_T}$ac_cv_type_long" >&6; }
7980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981# The cast to long int works around a bug in the HP C Compiler
7982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7984# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007985{ echo "$as_me:$LINENO: checking size of long" >&5
7986echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007987if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007989else
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 if test "$cross_compiling" = yes; then
7991 # Depending upon the size, compute the lo and hi bounds.
7992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007993/* confdefs.h. */
7994_ACEOF
7995cat confdefs.h >>conftest.$ac_ext
7996cat >>conftest.$ac_ext <<_ACEOF
7997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007998$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007999 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008000int
8001main ()
8002{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008004test_array [0] = 0
8005
8006 ;
8007 return 0;
8008}
8009_ACEOF
8010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011if { (ac_try="$ac_compile"
8012case "(($ac_try" in
8013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8014 *) ac_try_echo=$ac_try;;
8015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008019 grep -v '^ *+' conftest.er1 >conftest.err
8020 rm -f conftest.er1
8021 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023 (exit $ac_status); } && {
8024 test -z "$ac_c_werror_flag" ||
8025 test ! -s conftest.err
8026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008027 ac_lo=0 ac_mid=0
8028 while :; do
8029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008030/* confdefs.h. */
8031_ACEOF
8032cat confdefs.h >>conftest.$ac_ext
8033cat >>conftest.$ac_ext <<_ACEOF
8034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008035$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008036 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008037int
8038main ()
8039{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008040static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008041test_array [0] = 0
8042
8043 ;
8044 return 0;
8045}
8046_ACEOF
8047rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048if { (ac_try="$ac_compile"
8049case "(($ac_try" in
8050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8051 *) ac_try_echo=$ac_try;;
8052esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008056 grep -v '^ *+' conftest.er1 >conftest.err
8057 rm -f conftest.er1
8058 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008060 (exit $ac_status); } && {
8061 test -z "$ac_c_werror_flag" ||
8062 test ! -s conftest.err
8063 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 ac_hi=$ac_mid; break
8065else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008067sed 's/^/| /' conftest.$ac_ext >&5
8068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069 ac_lo=`expr $ac_mid + 1`
8070 if test $ac_lo -le $ac_mid; then
8071 ac_lo= ac_hi=
8072 break
8073 fi
8074 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076
8077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 done
8079else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008081sed 's/^/| /' conftest.$ac_ext >&5
8082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008084/* confdefs.h. */
8085_ACEOF
8086cat confdefs.h >>conftest.$ac_ext
8087cat >>conftest.$ac_ext <<_ACEOF
8088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008089$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008090 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008091int
8092main ()
8093{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008095test_array [0] = 0
8096
8097 ;
8098 return 0;
8099}
8100_ACEOF
8101rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102if { (ac_try="$ac_compile"
8103case "(($ac_try" in
8104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8105 *) ac_try_echo=$ac_try;;
8106esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008110 grep -v '^ *+' conftest.er1 >conftest.err
8111 rm -f conftest.er1
8112 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114 (exit $ac_status); } && {
8115 test -z "$ac_c_werror_flag" ||
8116 test ! -s conftest.err
8117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 ac_hi=-1 ac_mid=-1
8119 while :; do
8120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008121/* confdefs.h. */
8122_ACEOF
8123cat confdefs.h >>conftest.$ac_ext
8124cat >>conftest.$ac_ext <<_ACEOF
8125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008126$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008127 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008128int
8129main ()
8130{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008131static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008132test_array [0] = 0
8133
8134 ;
8135 return 0;
8136}
8137_ACEOF
8138rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139if { (ac_try="$ac_compile"
8140case "(($ac_try" in
8141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8142 *) ac_try_echo=$ac_try;;
8143esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008147 grep -v '^ *+' conftest.er1 >conftest.err
8148 rm -f conftest.er1
8149 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151 (exit $ac_status); } && {
8152 test -z "$ac_c_werror_flag" ||
8153 test ! -s conftest.err
8154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 ac_lo=$ac_mid; break
8156else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008158sed 's/^/| /' conftest.$ac_ext >&5
8159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160 ac_hi=`expr '(' $ac_mid ')' - 1`
8161 if test $ac_mid -le $ac_hi; then
8162 ac_lo= ac_hi=
8163 break
8164 fi
8165 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167
8168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 done
8170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008172sed 's/^/| /' conftest.$ac_ext >&5
8173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176
8177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179
8180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008181# Binary search between lo and hi bounds.
8182while test "x$ac_lo" != "x$ac_hi"; do
8183 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008185/* confdefs.h. */
8186_ACEOF
8187cat confdefs.h >>conftest.$ac_ext
8188cat >>conftest.$ac_ext <<_ACEOF
8189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008190$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008191 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192int
8193main ()
8194{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008196test_array [0] = 0
8197
8198 ;
8199 return 0;
8200}
8201_ACEOF
8202rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203if { (ac_try="$ac_compile"
8204case "(($ac_try" in
8205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8206 *) ac_try_echo=$ac_try;;
8207esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008211 grep -v '^ *+' conftest.er1 >conftest.err
8212 rm -f conftest.er1
8213 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215 (exit $ac_status); } && {
8216 test -z "$ac_c_werror_flag" ||
8217 test ! -s conftest.err
8218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 ac_hi=$ac_mid
8220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008222sed 's/^/| /' conftest.$ac_ext >&5
8223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00008228done
8229case $ac_lo in
8230?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008231'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008232 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008233See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008234echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008235See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008236 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237 else
8238 ac_cv_sizeof_long=0
8239 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008240esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008241else
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008243/* confdefs.h. */
8244_ACEOF
8245cat confdefs.h >>conftest.$ac_ext
8246cat >>conftest.$ac_ext <<_ACEOF
8247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008248$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008249 typedef long ac__type_sizeof_;
8250static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8251static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008252#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008253#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008254int
8255main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008256{
Martin v. Löwis11437992002-04-12 09:54:03 +00008257
8258 FILE *f = fopen ("conftest.val", "w");
8259 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008261 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008264 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008266 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 }
8268 else
8269 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008271 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008273 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008275 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
8277 ;
8278 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008279}
Martin v. Löwis11437992002-04-12 09:54:03 +00008280_ACEOF
8281rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008282if { (ac_try="$ac_link"
8283case "(($ac_try" in
8284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8285 *) ac_try_echo=$ac_try;;
8286esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008288 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292 { (case "(($ac_try" in
8293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8294 *) ac_try_echo=$ac_try;;
8295esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 (exit $ac_status); }; }; then
8301 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008303 echo "$as_me: program exited with status $ac_status" >&5
8304echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008305sed 's/^/| /' conftest.$ac_ext >&5
8306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008309 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008310See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008311echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008312See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008313 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314 else
8315 ac_cv_sizeof_long=0
8316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318rm -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 +00008319fi
8320rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008321fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008322{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8323echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324
8325
8326
Martin v. Löwis11437992002-04-12 09:54:03 +00008327cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008328#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008329_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008330
8331
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008332{ echo "$as_me:$LINENO: checking for void *" >&5
8333echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8334if test "${ac_cv_type_void_p+set}" = set; then
8335 echo $ECHO_N "(cached) $ECHO_C" >&6
8336else
8337 cat >conftest.$ac_ext <<_ACEOF
8338/* confdefs.h. */
8339_ACEOF
8340cat confdefs.h >>conftest.$ac_ext
8341cat >>conftest.$ac_ext <<_ACEOF
8342/* end confdefs.h. */
8343$ac_includes_default
8344typedef void * ac__type_new_;
8345int
8346main ()
8347{
8348if ((ac__type_new_ *) 0)
8349 return 0;
8350if (sizeof (ac__type_new_))
8351 return 0;
8352 ;
8353 return 0;
8354}
8355_ACEOF
8356rm -f conftest.$ac_objext
8357if { (ac_try="$ac_compile"
8358case "(($ac_try" in
8359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8360 *) ac_try_echo=$ac_try;;
8361esac
8362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8363 (eval "$ac_compile") 2>conftest.er1
8364 ac_status=$?
8365 grep -v '^ *+' conftest.er1 >conftest.err
8366 rm -f conftest.er1
8367 cat conftest.err >&5
8368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8369 (exit $ac_status); } && {
8370 test -z "$ac_c_werror_flag" ||
8371 test ! -s conftest.err
8372 } && test -s conftest.$ac_objext; then
8373 ac_cv_type_void_p=yes
8374else
8375 echo "$as_me: failed program was:" >&5
8376sed 's/^/| /' conftest.$ac_ext >&5
8377
8378 ac_cv_type_void_p=no
8379fi
8380
8381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8382fi
8383{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8384echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386# The cast to long int works around a bug in the HP C Compiler
8387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8389# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008390{ echo "$as_me:$LINENO: checking size of void *" >&5
8391echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008392if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008394else
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 if test "$cross_compiling" = yes; then
8396 # Depending upon the size, compute the lo and hi bounds.
8397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008398/* confdefs.h. */
8399_ACEOF
8400cat confdefs.h >>conftest.$ac_ext
8401cat >>conftest.$ac_ext <<_ACEOF
8402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008403$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008404 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008405int
8406main ()
8407{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008409test_array [0] = 0
8410
8411 ;
8412 return 0;
8413}
8414_ACEOF
8415rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416if { (ac_try="$ac_compile"
8417case "(($ac_try" in
8418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8419 *) ac_try_echo=$ac_try;;
8420esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008424 grep -v '^ *+' conftest.er1 >conftest.err
8425 rm -f conftest.er1
8426 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428 (exit $ac_status); } && {
8429 test -z "$ac_c_werror_flag" ||
8430 test ! -s conftest.err
8431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008432 ac_lo=0 ac_mid=0
8433 while :; do
8434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008435/* confdefs.h. */
8436_ACEOF
8437cat confdefs.h >>conftest.$ac_ext
8438cat >>conftest.$ac_ext <<_ACEOF
8439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008440$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008441 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008442int
8443main ()
8444{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008445static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008446test_array [0] = 0
8447
8448 ;
8449 return 0;
8450}
8451_ACEOF
8452rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453if { (ac_try="$ac_compile"
8454case "(($ac_try" in
8455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8456 *) ac_try_echo=$ac_try;;
8457esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008461 grep -v '^ *+' conftest.er1 >conftest.err
8462 rm -f conftest.er1
8463 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465 (exit $ac_status); } && {
8466 test -z "$ac_c_werror_flag" ||
8467 test ! -s conftest.err
8468 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 ac_hi=$ac_mid; break
8470else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008472sed 's/^/| /' conftest.$ac_ext >&5
8473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 ac_lo=`expr $ac_mid + 1`
8475 if test $ac_lo -le $ac_mid; then
8476 ac_lo= ac_hi=
8477 break
8478 fi
8479 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481
8482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 done
8484else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008486sed 's/^/| /' conftest.$ac_ext >&5
8487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008489/* confdefs.h. */
8490_ACEOF
8491cat confdefs.h >>conftest.$ac_ext
8492cat >>conftest.$ac_ext <<_ACEOF
8493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008494$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008495 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008496int
8497main ()
8498{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008500test_array [0] = 0
8501
8502 ;
8503 return 0;
8504}
8505_ACEOF
8506rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507if { (ac_try="$ac_compile"
8508case "(($ac_try" in
8509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8510 *) ac_try_echo=$ac_try;;
8511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008515 grep -v '^ *+' conftest.er1 >conftest.err
8516 rm -f conftest.er1
8517 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519 (exit $ac_status); } && {
8520 test -z "$ac_c_werror_flag" ||
8521 test ! -s conftest.err
8522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ac_hi=-1 ac_mid=-1
8524 while :; do
8525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008526/* confdefs.h. */
8527_ACEOF
8528cat confdefs.h >>conftest.$ac_ext
8529cat >>conftest.$ac_ext <<_ACEOF
8530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008531$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008532 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008533int
8534main ()
8535{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008536static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008537test_array [0] = 0
8538
8539 ;
8540 return 0;
8541}
8542_ACEOF
8543rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544if { (ac_try="$ac_compile"
8545case "(($ac_try" in
8546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8547 *) ac_try_echo=$ac_try;;
8548esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008552 grep -v '^ *+' conftest.er1 >conftest.err
8553 rm -f conftest.er1
8554 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 (exit $ac_status); } && {
8557 test -z "$ac_c_werror_flag" ||
8558 test ! -s conftest.err
8559 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 ac_lo=$ac_mid; break
8561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008563sed 's/^/| /' conftest.$ac_ext >&5
8564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565 ac_hi=`expr '(' $ac_mid ')' - 1`
8566 if test $ac_mid -le $ac_hi; then
8567 ac_lo= ac_hi=
8568 break
8569 fi
8570 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572
8573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 done
8575else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008577sed 's/^/| /' conftest.$ac_ext >&5
8578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581
8582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584
8585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008586# Binary search between lo and hi bounds.
8587while test "x$ac_lo" != "x$ac_hi"; do
8588 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008590/* confdefs.h. */
8591_ACEOF
8592cat confdefs.h >>conftest.$ac_ext
8593cat >>conftest.$ac_ext <<_ACEOF
8594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008596 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008597int
8598main ()
8599{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008601test_array [0] = 0
8602
8603 ;
8604 return 0;
8605}
8606_ACEOF
8607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608if { (ac_try="$ac_compile"
8609case "(($ac_try" in
8610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8611 *) ac_try_echo=$ac_try;;
8612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008616 grep -v '^ *+' conftest.er1 >conftest.err
8617 rm -f conftest.er1
8618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620 (exit $ac_status); } && {
8621 test -z "$ac_c_werror_flag" ||
8622 test ! -s conftest.err
8623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_hi=$ac_mid
8625else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008627sed 's/^/| /' conftest.$ac_ext >&5
8628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00008633done
8634case $ac_lo in
8635?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008637 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008638See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008639echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008640See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008641 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642 else
8643 ac_cv_sizeof_void_p=0
8644 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008645esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008646else
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008648/* confdefs.h. */
8649_ACEOF
8650cat confdefs.h >>conftest.$ac_ext
8651cat >>conftest.$ac_ext <<_ACEOF
8652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008653$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008654 typedef void * ac__type_sizeof_;
8655static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8656static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008657#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008658#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008659int
8660main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008661{
Martin v. Löwis11437992002-04-12 09:54:03 +00008662
8663 FILE *f = fopen ("conftest.val", "w");
8664 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008666 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008669 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008671 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 }
8673 else
8674 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008676 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008678 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008681
8682 ;
8683 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008684}
Martin v. Löwis11437992002-04-12 09:54:03 +00008685_ACEOF
8686rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687if { (ac_try="$ac_link"
8688case "(($ac_try" in
8689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8690 *) ac_try_echo=$ac_try;;
8691esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008693 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008697 { (case "(($ac_try" in
8698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8699 *) ac_try_echo=$ac_try;;
8700esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 (exit $ac_status); }; }; then
8706 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008707else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008708 echo "$as_me: program exited with status $ac_status" >&5
8709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008710sed 's/^/| /' conftest.$ac_ext >&5
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008714 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008715See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008716echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008717See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008718 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719 else
8720 ac_cv_sizeof_void_p=0
8721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723rm -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 +00008724fi
8725rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008726fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008727{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8728echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729
8730
8731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008733#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008734_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008735
8736
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008737{ echo "$as_me:$LINENO: checking for short" >&5
8738echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8739if test "${ac_cv_type_short+set}" = set; then
8740 echo $ECHO_N "(cached) $ECHO_C" >&6
8741else
8742 cat >conftest.$ac_ext <<_ACEOF
8743/* confdefs.h. */
8744_ACEOF
8745cat confdefs.h >>conftest.$ac_ext
8746cat >>conftest.$ac_ext <<_ACEOF
8747/* end confdefs.h. */
8748$ac_includes_default
8749typedef short ac__type_new_;
8750int
8751main ()
8752{
8753if ((ac__type_new_ *) 0)
8754 return 0;
8755if (sizeof (ac__type_new_))
8756 return 0;
8757 ;
8758 return 0;
8759}
8760_ACEOF
8761rm -f conftest.$ac_objext
8762if { (ac_try="$ac_compile"
8763case "(($ac_try" in
8764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8765 *) ac_try_echo=$ac_try;;
8766esac
8767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8768 (eval "$ac_compile") 2>conftest.er1
8769 ac_status=$?
8770 grep -v '^ *+' conftest.er1 >conftest.err
8771 rm -f conftest.er1
8772 cat conftest.err >&5
8773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8774 (exit $ac_status); } && {
8775 test -z "$ac_c_werror_flag" ||
8776 test ! -s conftest.err
8777 } && test -s conftest.$ac_objext; then
8778 ac_cv_type_short=yes
8779else
8780 echo "$as_me: failed program was:" >&5
8781sed 's/^/| /' conftest.$ac_ext >&5
8782
8783 ac_cv_type_short=no
8784fi
8785
8786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8787fi
8788{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8789echo "${ECHO_T}$ac_cv_type_short" >&6; }
8790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791# The cast to long int works around a bug in the HP C Compiler
8792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8794# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008795{ echo "$as_me:$LINENO: checking size of short" >&5
8796echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008797if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008798 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008799else
Martin v. Löwis11437992002-04-12 09:54:03 +00008800 if test "$cross_compiling" = yes; then
8801 # Depending upon the size, compute the lo and hi bounds.
8802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008803/* confdefs.h. */
8804_ACEOF
8805cat confdefs.h >>conftest.$ac_ext
8806cat >>conftest.$ac_ext <<_ACEOF
8807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008808$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008809 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008810int
8811main ()
8812{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008814test_array [0] = 0
8815
8816 ;
8817 return 0;
8818}
8819_ACEOF
8820rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821if { (ac_try="$ac_compile"
8822case "(($ac_try" in
8823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8824 *) ac_try_echo=$ac_try;;
8825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008829 grep -v '^ *+' conftest.er1 >conftest.err
8830 rm -f conftest.er1
8831 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833 (exit $ac_status); } && {
8834 test -z "$ac_c_werror_flag" ||
8835 test ! -s conftest.err
8836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_lo=0 ac_mid=0
8838 while :; do
8839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008840/* confdefs.h. */
8841_ACEOF
8842cat confdefs.h >>conftest.$ac_ext
8843cat >>conftest.$ac_ext <<_ACEOF
8844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008845$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008846 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008847int
8848main ()
8849{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008851test_array [0] = 0
8852
8853 ;
8854 return 0;
8855}
8856_ACEOF
8857rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008858if { (ac_try="$ac_compile"
8859case "(($ac_try" in
8860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8861 *) ac_try_echo=$ac_try;;
8862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008866 grep -v '^ *+' conftest.er1 >conftest.err
8867 rm -f conftest.er1
8868 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870 (exit $ac_status); } && {
8871 test -z "$ac_c_werror_flag" ||
8872 test ! -s conftest.err
8873 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ac_hi=$ac_mid; break
8875else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008877sed 's/^/| /' conftest.$ac_ext >&5
8878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879 ac_lo=`expr $ac_mid + 1`
8880 if test $ac_lo -le $ac_mid; then
8881 ac_lo= ac_hi=
8882 break
8883 fi
8884 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886
8887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 done
8889else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008891sed 's/^/| /' conftest.$ac_ext >&5
8892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* confdefs.h. */
8895_ACEOF
8896cat confdefs.h >>conftest.$ac_ext
8897cat >>conftest.$ac_ext <<_ACEOF
8898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008899$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008900 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008901int
8902main ()
8903{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008904static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008905test_array [0] = 0
8906
8907 ;
8908 return 0;
8909}
8910_ACEOF
8911rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912if { (ac_try="$ac_compile"
8913case "(($ac_try" in
8914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8915 *) ac_try_echo=$ac_try;;
8916esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008920 grep -v '^ *+' conftest.er1 >conftest.err
8921 rm -f conftest.er1
8922 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924 (exit $ac_status); } && {
8925 test -z "$ac_c_werror_flag" ||
8926 test ! -s conftest.err
8927 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 ac_hi=-1 ac_mid=-1
8929 while :; do
8930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008931/* confdefs.h. */
8932_ACEOF
8933cat confdefs.h >>conftest.$ac_ext
8934cat >>conftest.$ac_ext <<_ACEOF
8935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008936$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008937 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008938int
8939main ()
8940{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008941static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008942test_array [0] = 0
8943
8944 ;
8945 return 0;
8946}
8947_ACEOF
8948rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949if { (ac_try="$ac_compile"
8950case "(($ac_try" in
8951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8952 *) ac_try_echo=$ac_try;;
8953esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008957 grep -v '^ *+' conftest.er1 >conftest.err
8958 rm -f conftest.er1
8959 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961 (exit $ac_status); } && {
8962 test -z "$ac_c_werror_flag" ||
8963 test ! -s conftest.err
8964 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 ac_lo=$ac_mid; break
8966else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008968sed 's/^/| /' conftest.$ac_ext >&5
8969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970 ac_hi=`expr '(' $ac_mid ')' - 1`
8971 if test $ac_mid -le $ac_hi; then
8972 ac_lo= ac_hi=
8973 break
8974 fi
8975 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977
8978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 done
8980else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008982sed 's/^/| /' conftest.$ac_ext >&5
8983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008986
8987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989
8990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008991# Binary search between lo and hi bounds.
8992while test "x$ac_lo" != "x$ac_hi"; do
8993 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* confdefs.h. */
8996_ACEOF
8997cat confdefs.h >>conftest.$ac_ext
8998cat >>conftest.$ac_ext <<_ACEOF
8999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009001 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009002int
9003main ()
9004{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009006test_array [0] = 0
9007
9008 ;
9009 return 0;
9010}
9011_ACEOF
9012rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013if { (ac_try="$ac_compile"
9014case "(($ac_try" in
9015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9016 *) ac_try_echo=$ac_try;;
9017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009021 grep -v '^ *+' conftest.er1 >conftest.err
9022 rm -f conftest.er1
9023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009025 (exit $ac_status); } && {
9026 test -z "$ac_c_werror_flag" ||
9027 test ! -s conftest.err
9028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_hi=$ac_mid
9030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009032sed 's/^/| /' conftest.$ac_ext >&5
9033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00009038done
9039case $ac_lo in
9040?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009041'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009042 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009043See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009044echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009045See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009046 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047 else
9048 ac_cv_sizeof_short=0
9049 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009050esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009051else
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009053/* confdefs.h. */
9054_ACEOF
9055cat confdefs.h >>conftest.$ac_ext
9056cat >>conftest.$ac_ext <<_ACEOF
9057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009058$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009059 typedef short ac__type_sizeof_;
9060static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9061static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009062#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009063#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009064int
9065main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009066{
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
9068 FILE *f = fopen ("conftest.val", "w");
9069 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009070 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009071 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009073 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009074 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009075 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009076 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 }
9078 else
9079 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009080 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009081 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009083 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009085 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009086
9087 ;
9088 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009089}
Martin v. Löwis11437992002-04-12 09:54:03 +00009090_ACEOF
9091rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009092if { (ac_try="$ac_link"
9093case "(($ac_try" in
9094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9095 *) ac_try_echo=$ac_try;;
9096esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009098 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009102 { (case "(($ac_try" in
9103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9104 *) ac_try_echo=$ac_try;;
9105esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 (exit $ac_status); }; }; then
9111 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009113 echo "$as_me: program exited with status $ac_status" >&5
9114echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009115sed 's/^/| /' conftest.$ac_ext >&5
9116
Martin v. Löwis11437992002-04-12 09:54:03 +00009117( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009118if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009119 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009120See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009121echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009122See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009123 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009124 else
9125 ac_cv_sizeof_short=0
9126 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128rm -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 +00009129fi
9130rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009131fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009132{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9133echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134
9135
9136
Martin v. Löwis11437992002-04-12 09:54:03 +00009137cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009138#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009139_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009140
9141
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009142{ echo "$as_me:$LINENO: checking for float" >&5
9143echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9144if test "${ac_cv_type_float+set}" = set; then
9145 echo $ECHO_N "(cached) $ECHO_C" >&6
9146else
9147 cat >conftest.$ac_ext <<_ACEOF
9148/* confdefs.h. */
9149_ACEOF
9150cat confdefs.h >>conftest.$ac_ext
9151cat >>conftest.$ac_ext <<_ACEOF
9152/* end confdefs.h. */
9153$ac_includes_default
9154typedef float ac__type_new_;
9155int
9156main ()
9157{
9158if ((ac__type_new_ *) 0)
9159 return 0;
9160if (sizeof (ac__type_new_))
9161 return 0;
9162 ;
9163 return 0;
9164}
9165_ACEOF
9166rm -f conftest.$ac_objext
9167if { (ac_try="$ac_compile"
9168case "(($ac_try" in
9169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9170 *) ac_try_echo=$ac_try;;
9171esac
9172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9173 (eval "$ac_compile") 2>conftest.er1
9174 ac_status=$?
9175 grep -v '^ *+' conftest.er1 >conftest.err
9176 rm -f conftest.er1
9177 cat conftest.err >&5
9178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9179 (exit $ac_status); } && {
9180 test -z "$ac_c_werror_flag" ||
9181 test ! -s conftest.err
9182 } && test -s conftest.$ac_objext; then
9183 ac_cv_type_float=yes
9184else
9185 echo "$as_me: failed program was:" >&5
9186sed 's/^/| /' conftest.$ac_ext >&5
9187
9188 ac_cv_type_float=no
9189fi
9190
9191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9192fi
9193{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9194echo "${ECHO_T}$ac_cv_type_float" >&6; }
9195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196# The cast to long int works around a bug in the HP C Compiler
9197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9199# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009200{ echo "$as_me:$LINENO: checking size of float" >&5
9201echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009202if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009204else
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 if test "$cross_compiling" = yes; then
9206 # Depending upon the size, compute the lo and hi bounds.
9207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009208/* confdefs.h. */
9209_ACEOF
9210cat confdefs.h >>conftest.$ac_ext
9211cat >>conftest.$ac_ext <<_ACEOF
9212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009213$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009214 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009215int
9216main ()
9217{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009218static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009219test_array [0] = 0
9220
9221 ;
9222 return 0;
9223}
9224_ACEOF
9225rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226if { (ac_try="$ac_compile"
9227case "(($ac_try" in
9228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9229 *) ac_try_echo=$ac_try;;
9230esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009234 grep -v '^ *+' conftest.er1 >conftest.err
9235 rm -f conftest.er1
9236 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238 (exit $ac_status); } && {
9239 test -z "$ac_c_werror_flag" ||
9240 test ! -s conftest.err
9241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009242 ac_lo=0 ac_mid=0
9243 while :; do
9244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009245/* confdefs.h. */
9246_ACEOF
9247cat confdefs.h >>conftest.$ac_ext
9248cat >>conftest.$ac_ext <<_ACEOF
9249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009250$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009251 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009252int
9253main ()
9254{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009256test_array [0] = 0
9257
9258 ;
9259 return 0;
9260}
9261_ACEOF
9262rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263if { (ac_try="$ac_compile"
9264case "(($ac_try" in
9265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9266 *) ac_try_echo=$ac_try;;
9267esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009271 grep -v '^ *+' conftest.er1 >conftest.err
9272 rm -f conftest.er1
9273 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275 (exit $ac_status); } && {
9276 test -z "$ac_c_werror_flag" ||
9277 test ! -s conftest.err
9278 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009279 ac_hi=$ac_mid; break
9280else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009282sed 's/^/| /' conftest.$ac_ext >&5
9283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009284 ac_lo=`expr $ac_mid + 1`
9285 if test $ac_lo -le $ac_mid; then
9286 ac_lo= ac_hi=
9287 break
9288 fi
9289 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009291
9292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 done
9294else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009296sed 's/^/| /' conftest.$ac_ext >&5
9297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009299/* confdefs.h. */
9300_ACEOF
9301cat confdefs.h >>conftest.$ac_ext
9302cat >>conftest.$ac_ext <<_ACEOF
9303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009304$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009305 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009306int
9307main ()
9308{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009309static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009310test_array [0] = 0
9311
9312 ;
9313 return 0;
9314}
9315_ACEOF
9316rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317if { (ac_try="$ac_compile"
9318case "(($ac_try" in
9319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9320 *) ac_try_echo=$ac_try;;
9321esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009325 grep -v '^ *+' conftest.er1 >conftest.err
9326 rm -f conftest.er1
9327 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329 (exit $ac_status); } && {
9330 test -z "$ac_c_werror_flag" ||
9331 test ! -s conftest.err
9332 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009333 ac_hi=-1 ac_mid=-1
9334 while :; do
9335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009336/* confdefs.h. */
9337_ACEOF
9338cat confdefs.h >>conftest.$ac_ext
9339cat >>conftest.$ac_ext <<_ACEOF
9340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009341$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009342 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009343int
9344main ()
9345{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009346static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009347test_array [0] = 0
9348
9349 ;
9350 return 0;
9351}
9352_ACEOF
9353rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354if { (ac_try="$ac_compile"
9355case "(($ac_try" in
9356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9357 *) ac_try_echo=$ac_try;;
9358esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009362 grep -v '^ *+' conftest.er1 >conftest.err
9363 rm -f conftest.er1
9364 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366 (exit $ac_status); } && {
9367 test -z "$ac_c_werror_flag" ||
9368 test ! -s conftest.err
9369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 ac_lo=$ac_mid; break
9371else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009373sed 's/^/| /' conftest.$ac_ext >&5
9374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009375 ac_hi=`expr '(' $ac_mid ')' - 1`
9376 if test $ac_mid -le $ac_hi; then
9377 ac_lo= ac_hi=
9378 break
9379 fi
9380 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009382
9383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 done
9385else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009387sed 's/^/| /' conftest.$ac_ext >&5
9388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391
9392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394
9395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009396# Binary search between lo and hi bounds.
9397while test "x$ac_lo" != "x$ac_hi"; do
9398 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* confdefs.h. */
9401_ACEOF
9402cat confdefs.h >>conftest.$ac_ext
9403cat >>conftest.$ac_ext <<_ACEOF
9404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009406 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009407int
9408main ()
9409{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009411test_array [0] = 0
9412
9413 ;
9414 return 0;
9415}
9416_ACEOF
9417rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418if { (ac_try="$ac_compile"
9419case "(($ac_try" in
9420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9421 *) ac_try_echo=$ac_try;;
9422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009426 grep -v '^ *+' conftest.er1 >conftest.err
9427 rm -f conftest.er1
9428 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430 (exit $ac_status); } && {
9431 test -z "$ac_c_werror_flag" ||
9432 test ! -s conftest.err
9433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_hi=$ac_mid
9435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009437sed 's/^/| /' conftest.$ac_ext >&5
9438
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00009443done
9444case $ac_lo in
9445?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009447 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009448See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009449echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009450See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009451 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452 else
9453 ac_cv_sizeof_float=0
9454 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009455esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009456else
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009458/* confdefs.h. */
9459_ACEOF
9460cat confdefs.h >>conftest.$ac_ext
9461cat >>conftest.$ac_ext <<_ACEOF
9462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009463$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009464 typedef float ac__type_sizeof_;
9465static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9466static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009467#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009468#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009469int
9470main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009471{
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
9473 FILE *f = fopen ("conftest.val", "w");
9474 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009476 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009479 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009481 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 }
9483 else
9484 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009488 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009491
9492 ;
9493 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009494}
Martin v. Löwis11437992002-04-12 09:54:03 +00009495_ACEOF
9496rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009497if { (ac_try="$ac_link"
9498case "(($ac_try" in
9499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9500 *) ac_try_echo=$ac_try;;
9501esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009507 { (case "(($ac_try" in
9508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9509 *) ac_try_echo=$ac_try;;
9510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 (exit $ac_status); }; }; then
9516 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009517else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009518 echo "$as_me: program exited with status $ac_status" >&5
9519echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009520sed 's/^/| /' conftest.$ac_ext >&5
9521
Martin v. Löwis11437992002-04-12 09:54:03 +00009522( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009524 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009525See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009526echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009527See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009528 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529 else
9530 ac_cv_sizeof_float=0
9531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009533rm -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 +00009534fi
9535rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009536fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009537{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9538echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539
9540
9541
Martin v. Löwis11437992002-04-12 09:54:03 +00009542cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009543#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009544_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009545
9546
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009547{ echo "$as_me:$LINENO: checking for double" >&5
9548echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9549if test "${ac_cv_type_double+set}" = set; then
9550 echo $ECHO_N "(cached) $ECHO_C" >&6
9551else
9552 cat >conftest.$ac_ext <<_ACEOF
9553/* confdefs.h. */
9554_ACEOF
9555cat confdefs.h >>conftest.$ac_ext
9556cat >>conftest.$ac_ext <<_ACEOF
9557/* end confdefs.h. */
9558$ac_includes_default
9559typedef double ac__type_new_;
9560int
9561main ()
9562{
9563if ((ac__type_new_ *) 0)
9564 return 0;
9565if (sizeof (ac__type_new_))
9566 return 0;
9567 ;
9568 return 0;
9569}
9570_ACEOF
9571rm -f conftest.$ac_objext
9572if { (ac_try="$ac_compile"
9573case "(($ac_try" in
9574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9575 *) ac_try_echo=$ac_try;;
9576esac
9577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9578 (eval "$ac_compile") 2>conftest.er1
9579 ac_status=$?
9580 grep -v '^ *+' conftest.er1 >conftest.err
9581 rm -f conftest.er1
9582 cat conftest.err >&5
9583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9584 (exit $ac_status); } && {
9585 test -z "$ac_c_werror_flag" ||
9586 test ! -s conftest.err
9587 } && test -s conftest.$ac_objext; then
9588 ac_cv_type_double=yes
9589else
9590 echo "$as_me: failed program was:" >&5
9591sed 's/^/| /' conftest.$ac_ext >&5
9592
9593 ac_cv_type_double=no
9594fi
9595
9596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9597fi
9598{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9599echo "${ECHO_T}$ac_cv_type_double" >&6; }
9600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601# The cast to long int works around a bug in the HP C Compiler
9602# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9603# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9604# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009605{ echo "$as_me:$LINENO: checking size of double" >&5
9606echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009607if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009608 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009609else
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 if test "$cross_compiling" = yes; then
9611 # Depending upon the size, compute the lo and hi bounds.
9612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* confdefs.h. */
9614_ACEOF
9615cat confdefs.h >>conftest.$ac_ext
9616cat >>conftest.$ac_ext <<_ACEOF
9617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009618$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009619 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009620int
9621main ()
9622{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009623static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009624test_array [0] = 0
9625
9626 ;
9627 return 0;
9628}
9629_ACEOF
9630rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631if { (ac_try="$ac_compile"
9632case "(($ac_try" in
9633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9634 *) ac_try_echo=$ac_try;;
9635esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009639 grep -v '^ *+' conftest.er1 >conftest.err
9640 rm -f conftest.er1
9641 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009643 (exit $ac_status); } && {
9644 test -z "$ac_c_werror_flag" ||
9645 test ! -s conftest.err
9646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_lo=0 ac_mid=0
9648 while :; do
9649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* confdefs.h. */
9651_ACEOF
9652cat confdefs.h >>conftest.$ac_ext
9653cat >>conftest.$ac_ext <<_ACEOF
9654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009655$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009656 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009657int
9658main ()
9659{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009660static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009661test_array [0] = 0
9662
9663 ;
9664 return 0;
9665}
9666_ACEOF
9667rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668if { (ac_try="$ac_compile"
9669case "(($ac_try" in
9670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9671 *) ac_try_echo=$ac_try;;
9672esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009676 grep -v '^ *+' conftest.er1 >conftest.err
9677 rm -f conftest.er1
9678 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680 (exit $ac_status); } && {
9681 test -z "$ac_c_werror_flag" ||
9682 test ! -s conftest.err
9683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ac_hi=$ac_mid; break
9685else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009687sed 's/^/| /' conftest.$ac_ext >&5
9688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689 ac_lo=`expr $ac_mid + 1`
9690 if test $ac_lo -le $ac_mid; then
9691 ac_lo= ac_hi=
9692 break
9693 fi
9694 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696
9697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 done
9699else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009701sed 's/^/| /' conftest.$ac_ext >&5
9702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009704/* confdefs.h. */
9705_ACEOF
9706cat confdefs.h >>conftest.$ac_ext
9707cat >>conftest.$ac_ext <<_ACEOF
9708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009709$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009710 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009711int
9712main ()
9713{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009714static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009715test_array [0] = 0
9716
9717 ;
9718 return 0;
9719}
9720_ACEOF
9721rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722if { (ac_try="$ac_compile"
9723case "(($ac_try" in
9724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9725 *) ac_try_echo=$ac_try;;
9726esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009730 grep -v '^ *+' conftest.er1 >conftest.err
9731 rm -f conftest.er1
9732 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734 (exit $ac_status); } && {
9735 test -z "$ac_c_werror_flag" ||
9736 test ! -s conftest.err
9737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ac_hi=-1 ac_mid=-1
9739 while :; do
9740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009741/* confdefs.h. */
9742_ACEOF
9743cat confdefs.h >>conftest.$ac_ext
9744cat >>conftest.$ac_ext <<_ACEOF
9745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009746$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009747 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009748int
9749main ()
9750{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009751static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009752test_array [0] = 0
9753
9754 ;
9755 return 0;
9756}
9757_ACEOF
9758rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759if { (ac_try="$ac_compile"
9760case "(($ac_try" in
9761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9762 *) ac_try_echo=$ac_try;;
9763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009767 grep -v '^ *+' conftest.er1 >conftest.err
9768 rm -f conftest.er1
9769 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771 (exit $ac_status); } && {
9772 test -z "$ac_c_werror_flag" ||
9773 test ! -s conftest.err
9774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ac_lo=$ac_mid; break
9776else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009778sed 's/^/| /' conftest.$ac_ext >&5
9779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780 ac_hi=`expr '(' $ac_mid ')' - 1`
9781 if test $ac_mid -le $ac_hi; then
9782 ac_lo= ac_hi=
9783 break
9784 fi
9785 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787
9788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 done
9790else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009792sed 's/^/| /' conftest.$ac_ext >&5
9793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796
9797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799
9800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009801# Binary search between lo and hi bounds.
9802while test "x$ac_lo" != "x$ac_hi"; do
9803 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009805/* confdefs.h. */
9806_ACEOF
9807cat confdefs.h >>conftest.$ac_ext
9808cat >>conftest.$ac_ext <<_ACEOF
9809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009810$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009811 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009812int
9813main ()
9814{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009816test_array [0] = 0
9817
9818 ;
9819 return 0;
9820}
9821_ACEOF
9822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823if { (ac_try="$ac_compile"
9824case "(($ac_try" in
9825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9826 *) ac_try_echo=$ac_try;;
9827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009831 grep -v '^ *+' conftest.er1 >conftest.err
9832 rm -f conftest.er1
9833 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835 (exit $ac_status); } && {
9836 test -z "$ac_c_werror_flag" ||
9837 test ! -s conftest.err
9838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ac_hi=$ac_mid
9840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009842sed 's/^/| /' conftest.$ac_ext >&5
9843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00009848done
9849case $ac_lo in
9850?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009851'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009852 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009853See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009854echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009855See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009856 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857 else
9858 ac_cv_sizeof_double=0
9859 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009860esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009861else
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009863/* confdefs.h. */
9864_ACEOF
9865cat confdefs.h >>conftest.$ac_ext
9866cat >>conftest.$ac_ext <<_ACEOF
9867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009868$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009869 typedef double ac__type_sizeof_;
9870static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9871static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009872#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009873#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009874int
9875main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009876{
Martin v. Löwis11437992002-04-12 09:54:03 +00009877
9878 FILE *f = fopen ("conftest.val", "w");
9879 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009881 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009886 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 }
9888 else
9889 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009891 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009893 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009896
9897 ;
9898 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009899}
Martin v. Löwis11437992002-04-12 09:54:03 +00009900_ACEOF
9901rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902if { (ac_try="$ac_link"
9903case "(($ac_try" in
9904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9905 *) ac_try_echo=$ac_try;;
9906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009912 { (case "(($ac_try" in
9913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9914 *) ac_try_echo=$ac_try;;
9915esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009918 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 (exit $ac_status); }; }; then
9921 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009923 echo "$as_me: program exited with status $ac_status" >&5
9924echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009925sed 's/^/| /' conftest.$ac_ext >&5
9926
Martin v. Löwis11437992002-04-12 09:54:03 +00009927( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009929 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009930See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009931echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009932See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009933 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934 else
9935 ac_cv_sizeof_double=0
9936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938rm -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 +00009939fi
9940rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009941fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009942{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9943echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944
9945
9946
Martin v. Löwis11437992002-04-12 09:54:03 +00009947cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009948#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009949_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009950
9951
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009952{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9953echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9954if test "${ac_cv_type_fpos_t+set}" = set; then
9955 echo $ECHO_N "(cached) $ECHO_C" >&6
9956else
9957 cat >conftest.$ac_ext <<_ACEOF
9958/* confdefs.h. */
9959_ACEOF
9960cat confdefs.h >>conftest.$ac_ext
9961cat >>conftest.$ac_ext <<_ACEOF
9962/* end confdefs.h. */
9963$ac_includes_default
9964typedef fpos_t ac__type_new_;
9965int
9966main ()
9967{
9968if ((ac__type_new_ *) 0)
9969 return 0;
9970if (sizeof (ac__type_new_))
9971 return 0;
9972 ;
9973 return 0;
9974}
9975_ACEOF
9976rm -f conftest.$ac_objext
9977if { (ac_try="$ac_compile"
9978case "(($ac_try" in
9979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9980 *) ac_try_echo=$ac_try;;
9981esac
9982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9983 (eval "$ac_compile") 2>conftest.er1
9984 ac_status=$?
9985 grep -v '^ *+' conftest.er1 >conftest.err
9986 rm -f conftest.er1
9987 cat conftest.err >&5
9988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9989 (exit $ac_status); } && {
9990 test -z "$ac_c_werror_flag" ||
9991 test ! -s conftest.err
9992 } && test -s conftest.$ac_objext; then
9993 ac_cv_type_fpos_t=yes
9994else
9995 echo "$as_me: failed program was:" >&5
9996sed 's/^/| /' conftest.$ac_ext >&5
9997
9998 ac_cv_type_fpos_t=no
9999fi
10000
10001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10002fi
10003{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10004echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010006# The cast to long int works around a bug in the HP C Compiler
10007# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10008# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10009# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010010{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10011echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010012if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010014else
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 if test "$cross_compiling" = yes; then
10016 # Depending upon the size, compute the lo and hi bounds.
10017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010018/* confdefs.h. */
10019_ACEOF
10020cat confdefs.h >>conftest.$ac_ext
10021cat >>conftest.$ac_ext <<_ACEOF
10022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010023$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010024 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010025int
10026main ()
10027{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010028static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010029test_array [0] = 0
10030
10031 ;
10032 return 0;
10033}
10034_ACEOF
10035rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036if { (ac_try="$ac_compile"
10037case "(($ac_try" in
10038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10039 *) ac_try_echo=$ac_try;;
10040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010044 grep -v '^ *+' conftest.er1 >conftest.err
10045 rm -f conftest.er1
10046 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048 (exit $ac_status); } && {
10049 test -z "$ac_c_werror_flag" ||
10050 test ! -s conftest.err
10051 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 ac_lo=0 ac_mid=0
10053 while :; do
10054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010055/* confdefs.h. */
10056_ACEOF
10057cat confdefs.h >>conftest.$ac_ext
10058cat >>conftest.$ac_ext <<_ACEOF
10059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010060$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010061 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010062int
10063main ()
10064{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010065static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010066test_array [0] = 0
10067
10068 ;
10069 return 0;
10070}
10071_ACEOF
10072rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010073if { (ac_try="$ac_compile"
10074case "(($ac_try" in
10075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10076 *) ac_try_echo=$ac_try;;
10077esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010081 grep -v '^ *+' conftest.er1 >conftest.err
10082 rm -f conftest.er1
10083 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085 (exit $ac_status); } && {
10086 test -z "$ac_c_werror_flag" ||
10087 test ! -s conftest.err
10088 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 ac_hi=$ac_mid; break
10090else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010092sed 's/^/| /' conftest.$ac_ext >&5
10093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094 ac_lo=`expr $ac_mid + 1`
10095 if test $ac_lo -le $ac_mid; then
10096 ac_lo= ac_hi=
10097 break
10098 fi
10099 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101
10102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 done
10104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010106sed 's/^/| /' conftest.$ac_ext >&5
10107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010109/* confdefs.h. */
10110_ACEOF
10111cat confdefs.h >>conftest.$ac_ext
10112cat >>conftest.$ac_ext <<_ACEOF
10113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010114$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010115 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010116int
10117main ()
10118{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010119static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010120test_array [0] = 0
10121
10122 ;
10123 return 0;
10124}
10125_ACEOF
10126rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127if { (ac_try="$ac_compile"
10128case "(($ac_try" in
10129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10130 *) ac_try_echo=$ac_try;;
10131esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010135 grep -v '^ *+' conftest.er1 >conftest.err
10136 rm -f conftest.er1
10137 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010139 (exit $ac_status); } && {
10140 test -z "$ac_c_werror_flag" ||
10141 test ! -s conftest.err
10142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 ac_hi=-1 ac_mid=-1
10144 while :; do
10145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010146/* confdefs.h. */
10147_ACEOF
10148cat confdefs.h >>conftest.$ac_ext
10149cat >>conftest.$ac_ext <<_ACEOF
10150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010151$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010152 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010153int
10154main ()
10155{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010156static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010157test_array [0] = 0
10158
10159 ;
10160 return 0;
10161}
10162_ACEOF
10163rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164if { (ac_try="$ac_compile"
10165case "(($ac_try" in
10166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10167 *) ac_try_echo=$ac_try;;
10168esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010172 grep -v '^ *+' conftest.er1 >conftest.err
10173 rm -f conftest.er1
10174 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176 (exit $ac_status); } && {
10177 test -z "$ac_c_werror_flag" ||
10178 test ! -s conftest.err
10179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_lo=$ac_mid; break
10181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010183sed 's/^/| /' conftest.$ac_ext >&5
10184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185 ac_hi=`expr '(' $ac_mid ')' - 1`
10186 if test $ac_mid -le $ac_hi; then
10187 ac_lo= ac_hi=
10188 break
10189 fi
10190 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192
10193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 done
10195else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010197sed 's/^/| /' conftest.$ac_ext >&5
10198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201
10202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204
10205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010206# Binary search between lo and hi bounds.
10207while test "x$ac_lo" != "x$ac_hi"; do
10208 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* confdefs.h. */
10211_ACEOF
10212cat confdefs.h >>conftest.$ac_ext
10213cat >>conftest.$ac_ext <<_ACEOF
10214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010215$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010216 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010217int
10218main ()
10219{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010221test_array [0] = 0
10222
10223 ;
10224 return 0;
10225}
10226_ACEOF
10227rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228if { (ac_try="$ac_compile"
10229case "(($ac_try" in
10230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10231 *) ac_try_echo=$ac_try;;
10232esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010236 grep -v '^ *+' conftest.er1 >conftest.err
10237 rm -f conftest.er1
10238 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240 (exit $ac_status); } && {
10241 test -z "$ac_c_werror_flag" ||
10242 test ! -s conftest.err
10243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_hi=$ac_mid
10245else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010247sed 's/^/| /' conftest.$ac_ext >&5
10248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +000010253done
10254case $ac_lo in
10255?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010257 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010258See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010259echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010260See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010261 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262 else
10263 ac_cv_sizeof_fpos_t=0
10264 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010265esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010266else
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* confdefs.h. */
10269_ACEOF
10270cat confdefs.h >>conftest.$ac_ext
10271cat >>conftest.$ac_ext <<_ACEOF
10272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010273$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010274 typedef fpos_t ac__type_sizeof_;
10275static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10276static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010277#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010278#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010279int
10280main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010281{
Martin v. Löwis11437992002-04-12 09:54:03 +000010282
10283 FILE *f = fopen ("conftest.val", "w");
10284 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010286 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010289 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010291 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 }
10293 else
10294 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010296 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010298 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010300 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010301
10302 ;
10303 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010304}
Martin v. Löwis11437992002-04-12 09:54:03 +000010305_ACEOF
10306rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307if { (ac_try="$ac_link"
10308case "(($ac_try" in
10309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10310 *) ac_try_echo=$ac_try;;
10311esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010313 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317 { (case "(($ac_try" in
10318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10319 *) ac_try_echo=$ac_try;;
10320esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 (exit $ac_status); }; }; then
10326 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010327else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010328 echo "$as_me: program exited with status $ac_status" >&5
10329echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010330sed 's/^/| /' conftest.$ac_ext >&5
10331
Martin v. Löwis11437992002-04-12 09:54:03 +000010332( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010334 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010335See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010336echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010337See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010338 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010339 else
10340 ac_cv_sizeof_fpos_t=0
10341 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343rm -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 +000010344fi
10345rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010346fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010347{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10348echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010349
10350
10351
Martin v. Löwis11437992002-04-12 09:54:03 +000010352cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010353#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010354_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010355
Michael W. Hudson54241132001-12-07 15:38:26 +000010356
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010357{ echo "$as_me:$LINENO: checking for size_t" >&5
10358echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10359if test "${ac_cv_type_size_t+set}" = set; then
10360 echo $ECHO_N "(cached) $ECHO_C" >&6
10361else
10362 cat >conftest.$ac_ext <<_ACEOF
10363/* confdefs.h. */
10364_ACEOF
10365cat confdefs.h >>conftest.$ac_ext
10366cat >>conftest.$ac_ext <<_ACEOF
10367/* end confdefs.h. */
10368$ac_includes_default
10369typedef size_t ac__type_new_;
10370int
10371main ()
10372{
10373if ((ac__type_new_ *) 0)
10374 return 0;
10375if (sizeof (ac__type_new_))
10376 return 0;
10377 ;
10378 return 0;
10379}
10380_ACEOF
10381rm -f conftest.$ac_objext
10382if { (ac_try="$ac_compile"
10383case "(($ac_try" in
10384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10385 *) ac_try_echo=$ac_try;;
10386esac
10387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10388 (eval "$ac_compile") 2>conftest.er1
10389 ac_status=$?
10390 grep -v '^ *+' conftest.er1 >conftest.err
10391 rm -f conftest.er1
10392 cat conftest.err >&5
10393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10394 (exit $ac_status); } && {
10395 test -z "$ac_c_werror_flag" ||
10396 test ! -s conftest.err
10397 } && test -s conftest.$ac_objext; then
10398 ac_cv_type_size_t=yes
10399else
10400 echo "$as_me: failed program was:" >&5
10401sed 's/^/| /' conftest.$ac_ext >&5
10402
10403 ac_cv_type_size_t=no
10404fi
10405
10406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10407fi
10408{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10409echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010411# The cast to long int works around a bug in the HP C Compiler
10412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10414# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010415{ echo "$as_me:$LINENO: checking size of size_t" >&5
10416echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010417if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010420 if test "$cross_compiling" = yes; then
10421 # Depending upon the size, compute the lo and hi bounds.
10422cat >conftest.$ac_ext <<_ACEOF
10423/* confdefs.h. */
10424_ACEOF
10425cat confdefs.h >>conftest.$ac_ext
10426cat >>conftest.$ac_ext <<_ACEOF
10427/* end confdefs.h. */
10428$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010429 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010430int
10431main ()
10432{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010433static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434test_array [0] = 0
10435
10436 ;
10437 return 0;
10438}
10439_ACEOF
10440rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441if { (ac_try="$ac_compile"
10442case "(($ac_try" in
10443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10444 *) ac_try_echo=$ac_try;;
10445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448 ac_status=$?
10449 grep -v '^ *+' conftest.er1 >conftest.err
10450 rm -f conftest.er1
10451 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453 (exit $ac_status); } && {
10454 test -z "$ac_c_werror_flag" ||
10455 test ! -s conftest.err
10456 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010457 ac_lo=0 ac_mid=0
10458 while :; do
10459 cat >conftest.$ac_ext <<_ACEOF
10460/* confdefs.h. */
10461_ACEOF
10462cat confdefs.h >>conftest.$ac_ext
10463cat >>conftest.$ac_ext <<_ACEOF
10464/* end confdefs.h. */
10465$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010466 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467int
10468main ()
10469{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010470static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471test_array [0] = 0
10472
10473 ;
10474 return 0;
10475}
10476_ACEOF
10477rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478if { (ac_try="$ac_compile"
10479case "(($ac_try" in
10480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10481 *) ac_try_echo=$ac_try;;
10482esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485 ac_status=$?
10486 grep -v '^ *+' conftest.er1 >conftest.err
10487 rm -f conftest.er1
10488 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490 (exit $ac_status); } && {
10491 test -z "$ac_c_werror_flag" ||
10492 test ! -s conftest.err
10493 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010494 ac_hi=$ac_mid; break
10495else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010496 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010497sed 's/^/| /' conftest.$ac_ext >&5
10498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499 ac_lo=`expr $ac_mid + 1`
10500 if test $ac_lo -le $ac_mid; then
10501 ac_lo= ac_hi=
10502 break
10503 fi
10504 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506
10507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010508 done
10509else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010510 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511sed 's/^/| /' conftest.$ac_ext >&5
10512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010513 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514/* confdefs.h. */
10515_ACEOF
10516cat confdefs.h >>conftest.$ac_ext
10517cat >>conftest.$ac_ext <<_ACEOF
10518/* end confdefs.h. */
10519$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010520 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521int
10522main ()
10523{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010524static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525test_array [0] = 0
10526
10527 ;
10528 return 0;
10529}
10530_ACEOF
10531rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532if { (ac_try="$ac_compile"
10533case "(($ac_try" in
10534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10535 *) ac_try_echo=$ac_try;;
10536esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539 ac_status=$?
10540 grep -v '^ *+' conftest.er1 >conftest.err
10541 rm -f conftest.er1
10542 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544 (exit $ac_status); } && {
10545 test -z "$ac_c_werror_flag" ||
10546 test ! -s conftest.err
10547 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010548 ac_hi=-1 ac_mid=-1
10549 while :; do
10550 cat >conftest.$ac_ext <<_ACEOF
10551/* confdefs.h. */
10552_ACEOF
10553cat confdefs.h >>conftest.$ac_ext
10554cat >>conftest.$ac_ext <<_ACEOF
10555/* end confdefs.h. */
10556$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010557 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558int
10559main ()
10560{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010561static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562test_array [0] = 0
10563
10564 ;
10565 return 0;
10566}
10567_ACEOF
10568rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569if { (ac_try="$ac_compile"
10570case "(($ac_try" in
10571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10572 *) ac_try_echo=$ac_try;;
10573esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576 ac_status=$?
10577 grep -v '^ *+' conftest.er1 >conftest.err
10578 rm -f conftest.er1
10579 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 (exit $ac_status); } && {
10582 test -z "$ac_c_werror_flag" ||
10583 test ! -s conftest.err
10584 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585 ac_lo=$ac_mid; break
10586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010587 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588sed 's/^/| /' conftest.$ac_ext >&5
10589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590 ac_hi=`expr '(' $ac_mid ')' - 1`
10591 if test $ac_mid -le $ac_hi; then
10592 ac_lo= ac_hi=
10593 break
10594 fi
10595 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597
10598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599 done
10600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010601 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602sed 's/^/| /' conftest.$ac_ext >&5
10603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010604 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010606
10607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010609
10610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611# Binary search between lo and hi bounds.
10612while test "x$ac_lo" != "x$ac_hi"; do
10613 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10614 cat >conftest.$ac_ext <<_ACEOF
10615/* confdefs.h. */
10616_ACEOF
10617cat confdefs.h >>conftest.$ac_ext
10618cat >>conftest.$ac_ext <<_ACEOF
10619/* end confdefs.h. */
10620$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010621 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622int
10623main ()
10624{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010625static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626test_array [0] = 0
10627
10628 ;
10629 return 0;
10630}
10631_ACEOF
10632rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633if { (ac_try="$ac_compile"
10634case "(($ac_try" in
10635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10636 *) ac_try_echo=$ac_try;;
10637esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640 ac_status=$?
10641 grep -v '^ *+' conftest.er1 >conftest.err
10642 rm -f conftest.er1
10643 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645 (exit $ac_status); } && {
10646 test -z "$ac_c_werror_flag" ||
10647 test ! -s conftest.err
10648 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649 ac_hi=$ac_mid
10650else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010651 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652sed 's/^/| /' conftest.$ac_ext >&5
10653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +000010658done
10659case $ac_lo in
10660?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010662 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010664echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010666 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667 else
10668 ac_cv_sizeof_size_t=0
10669 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670esac
10671else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672 cat >conftest.$ac_ext <<_ACEOF
10673/* confdefs.h. */
10674_ACEOF
10675cat confdefs.h >>conftest.$ac_ext
10676cat >>conftest.$ac_ext <<_ACEOF
10677/* end confdefs.h. */
10678$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010679 typedef size_t ac__type_sizeof_;
10680static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10681static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682#include <stdio.h>
10683#include <stdlib.h>
10684int
10685main ()
10686{
10687
10688 FILE *f = fopen ("conftest.val", "w");
10689 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010691 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010694 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010696 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697 }
10698 else
10699 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010701 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010703 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010706
10707 ;
10708 return 0;
10709}
10710_ACEOF
10711rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712if { (ac_try="$ac_link"
10713case "(($ac_try" in
10714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10715 *) ac_try_echo=$ac_try;;
10716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722 { (case "(($ac_try" in
10723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10724 *) ac_try_echo=$ac_try;;
10725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010728 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730 (exit $ac_status); }; }; then
10731 ac_cv_sizeof_size_t=`cat conftest.val`
10732else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010733 echo "$as_me: program exited with status $ac_status" >&5
10734echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735sed 's/^/| /' conftest.$ac_ext >&5
10736
10737( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010739 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010741echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010743 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010744 else
10745 ac_cv_sizeof_size_t=0
10746 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748rm -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 +000010749fi
10750rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010751fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010752{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10753echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010754
10755
10756
Martin v. Löwis18e16552006-02-15 17:27:45 +000010757cat >>confdefs.h <<_ACEOF
10758#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10759_ACEOF
10760
10761
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010762{ echo "$as_me:$LINENO: checking for pid_t" >&5
10763echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10764if test "${ac_cv_type_pid_t+set}" = set; then
10765 echo $ECHO_N "(cached) $ECHO_C" >&6
10766else
10767 cat >conftest.$ac_ext <<_ACEOF
10768/* confdefs.h. */
10769_ACEOF
10770cat confdefs.h >>conftest.$ac_ext
10771cat >>conftest.$ac_ext <<_ACEOF
10772/* end confdefs.h. */
10773$ac_includes_default
10774typedef pid_t ac__type_new_;
10775int
10776main ()
10777{
10778if ((ac__type_new_ *) 0)
10779 return 0;
10780if (sizeof (ac__type_new_))
10781 return 0;
10782 ;
10783 return 0;
10784}
10785_ACEOF
10786rm -f conftest.$ac_objext
10787if { (ac_try="$ac_compile"
10788case "(($ac_try" in
10789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10790 *) ac_try_echo=$ac_try;;
10791esac
10792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10793 (eval "$ac_compile") 2>conftest.er1
10794 ac_status=$?
10795 grep -v '^ *+' conftest.er1 >conftest.err
10796 rm -f conftest.er1
10797 cat conftest.err >&5
10798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10799 (exit $ac_status); } && {
10800 test -z "$ac_c_werror_flag" ||
10801 test ! -s conftest.err
10802 } && test -s conftest.$ac_objext; then
10803 ac_cv_type_pid_t=yes
10804else
10805 echo "$as_me: failed program was:" >&5
10806sed 's/^/| /' conftest.$ac_ext >&5
10807
10808 ac_cv_type_pid_t=no
10809fi
10810
10811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10812fi
10813{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10814echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10815
Christian Heimes400adb02008-02-01 08:12:03 +000010816# The cast to long int works around a bug in the HP C Compiler
10817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10819# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010820{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10821echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010822if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010823 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010824else
10825 if test "$cross_compiling" = yes; then
10826 # Depending upon the size, compute the lo and hi bounds.
10827cat >conftest.$ac_ext <<_ACEOF
10828/* confdefs.h. */
10829_ACEOF
10830cat confdefs.h >>conftest.$ac_ext
10831cat >>conftest.$ac_ext <<_ACEOF
10832/* end confdefs.h. */
10833$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010834 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010835int
10836main ()
10837{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010838static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010839test_array [0] = 0
10840
10841 ;
10842 return 0;
10843}
10844_ACEOF
10845rm -f conftest.$ac_objext
10846if { (ac_try="$ac_compile"
10847case "(($ac_try" in
10848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10849 *) ac_try_echo=$ac_try;;
10850esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010852 (eval "$ac_compile") 2>conftest.er1
10853 ac_status=$?
10854 grep -v '^ *+' conftest.er1 >conftest.err
10855 rm -f conftest.er1
10856 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010858 (exit $ac_status); } && {
10859 test -z "$ac_c_werror_flag" ||
10860 test ! -s conftest.err
10861 } && test -s conftest.$ac_objext; then
10862 ac_lo=0 ac_mid=0
10863 while :; do
10864 cat >conftest.$ac_ext <<_ACEOF
10865/* confdefs.h. */
10866_ACEOF
10867cat confdefs.h >>conftest.$ac_ext
10868cat >>conftest.$ac_ext <<_ACEOF
10869/* end confdefs.h. */
10870$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010871 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010872int
10873main ()
10874{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010875static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010876test_array [0] = 0
10877
10878 ;
10879 return 0;
10880}
10881_ACEOF
10882rm -f conftest.$ac_objext
10883if { (ac_try="$ac_compile"
10884case "(($ac_try" in
10885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10886 *) ac_try_echo=$ac_try;;
10887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010889 (eval "$ac_compile") 2>conftest.er1
10890 ac_status=$?
10891 grep -v '^ *+' conftest.er1 >conftest.err
10892 rm -f conftest.er1
10893 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010895 (exit $ac_status); } && {
10896 test -z "$ac_c_werror_flag" ||
10897 test ! -s conftest.err
10898 } && test -s conftest.$ac_objext; then
10899 ac_hi=$ac_mid; break
10900else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010901 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010902sed 's/^/| /' conftest.$ac_ext >&5
10903
10904 ac_lo=`expr $ac_mid + 1`
10905 if test $ac_lo -le $ac_mid; then
10906 ac_lo= ac_hi=
10907 break
10908 fi
10909 ac_mid=`expr 2 '*' $ac_mid + 1`
10910fi
10911
10912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10913 done
10914else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010915 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010916sed 's/^/| /' conftest.$ac_ext >&5
10917
10918 cat >conftest.$ac_ext <<_ACEOF
10919/* confdefs.h. */
10920_ACEOF
10921cat confdefs.h >>conftest.$ac_ext
10922cat >>conftest.$ac_ext <<_ACEOF
10923/* end confdefs.h. */
10924$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010925 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010926int
10927main ()
10928{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010929static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010930test_array [0] = 0
10931
10932 ;
10933 return 0;
10934}
10935_ACEOF
10936rm -f conftest.$ac_objext
10937if { (ac_try="$ac_compile"
10938case "(($ac_try" in
10939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10940 *) ac_try_echo=$ac_try;;
10941esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010943 (eval "$ac_compile") 2>conftest.er1
10944 ac_status=$?
10945 grep -v '^ *+' conftest.er1 >conftest.err
10946 rm -f conftest.er1
10947 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010949 (exit $ac_status); } && {
10950 test -z "$ac_c_werror_flag" ||
10951 test ! -s conftest.err
10952 } && test -s conftest.$ac_objext; then
10953 ac_hi=-1 ac_mid=-1
10954 while :; do
10955 cat >conftest.$ac_ext <<_ACEOF
10956/* confdefs.h. */
10957_ACEOF
10958cat confdefs.h >>conftest.$ac_ext
10959cat >>conftest.$ac_ext <<_ACEOF
10960/* end confdefs.h. */
10961$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010962 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010963int
10964main ()
10965{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010967test_array [0] = 0
10968
10969 ;
10970 return 0;
10971}
10972_ACEOF
10973rm -f conftest.$ac_objext
10974if { (ac_try="$ac_compile"
10975case "(($ac_try" in
10976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10977 *) ac_try_echo=$ac_try;;
10978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010980 (eval "$ac_compile") 2>conftest.er1
10981 ac_status=$?
10982 grep -v '^ *+' conftest.er1 >conftest.err
10983 rm -f conftest.er1
10984 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010986 (exit $ac_status); } && {
10987 test -z "$ac_c_werror_flag" ||
10988 test ! -s conftest.err
10989 } && test -s conftest.$ac_objext; then
10990 ac_lo=$ac_mid; break
10991else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010992 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010993sed 's/^/| /' conftest.$ac_ext >&5
10994
10995 ac_hi=`expr '(' $ac_mid ')' - 1`
10996 if test $ac_mid -le $ac_hi; then
10997 ac_lo= ac_hi=
10998 break
10999 fi
11000 ac_mid=`expr 2 '*' $ac_mid`
11001fi
11002
11003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11004 done
11005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011006 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011007sed 's/^/| /' conftest.$ac_ext >&5
11008
11009 ac_lo= ac_hi=
11010fi
11011
11012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11013fi
11014
11015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11016# Binary search between lo and hi bounds.
11017while test "x$ac_lo" != "x$ac_hi"; do
11018 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11019 cat >conftest.$ac_ext <<_ACEOF
11020/* confdefs.h. */
11021_ACEOF
11022cat confdefs.h >>conftest.$ac_ext
11023cat >>conftest.$ac_ext <<_ACEOF
11024/* end confdefs.h. */
11025$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011026 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011027int
11028main ()
11029{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011030static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011031test_array [0] = 0
11032
11033 ;
11034 return 0;
11035}
11036_ACEOF
11037rm -f conftest.$ac_objext
11038if { (ac_try="$ac_compile"
11039case "(($ac_try" in
11040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11041 *) ac_try_echo=$ac_try;;
11042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011044 (eval "$ac_compile") 2>conftest.er1
11045 ac_status=$?
11046 grep -v '^ *+' conftest.er1 >conftest.err
11047 rm -f conftest.er1
11048 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011050 (exit $ac_status); } && {
11051 test -z "$ac_c_werror_flag" ||
11052 test ! -s conftest.err
11053 } && test -s conftest.$ac_objext; then
11054 ac_hi=$ac_mid
11055else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011056 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011057sed 's/^/| /' conftest.$ac_ext >&5
11058
11059 ac_lo=`expr '(' $ac_mid ')' + 1`
11060fi
11061
11062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11063done
11064case $ac_lo in
11065?*) ac_cv_sizeof_pid_t=$ac_lo;;
11066'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011068See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011069echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011070See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011071 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011072 else
11073 ac_cv_sizeof_pid_t=0
11074 fi ;;
11075esac
11076else
11077 cat >conftest.$ac_ext <<_ACEOF
11078/* confdefs.h. */
11079_ACEOF
11080cat confdefs.h >>conftest.$ac_ext
11081cat >>conftest.$ac_ext <<_ACEOF
11082/* end confdefs.h. */
11083$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011084 typedef pid_t ac__type_sizeof_;
11085static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11086static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011087#include <stdio.h>
11088#include <stdlib.h>
11089int
11090main ()
11091{
11092
11093 FILE *f = fopen ("conftest.val", "w");
11094 if (! f)
11095 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011096 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011097 {
11098 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011099 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011100 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011101 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011102 }
11103 else
11104 {
11105 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011106 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011107 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011108 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011109 }
11110 return ferror (f) || fclose (f) != 0;
11111
11112 ;
11113 return 0;
11114}
11115_ACEOF
11116rm -f conftest$ac_exeext
11117if { (ac_try="$ac_link"
11118case "(($ac_try" in
11119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11120 *) ac_try_echo=$ac_try;;
11121esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011123 (eval "$ac_link") 2>&5
11124 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11127 { (case "(($ac_try" in
11128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11129 *) ac_try_echo=$ac_try;;
11130esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011132 (eval "$ac_try") 2>&5
11133 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011135 (exit $ac_status); }; }; then
11136 ac_cv_sizeof_pid_t=`cat conftest.val`
11137else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011138 echo "$as_me: program exited with status $ac_status" >&5
11139echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011140sed 's/^/| /' conftest.$ac_ext >&5
11141
11142( exit $ac_status )
11143if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011144 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011145See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011146echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011147See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011148 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011149 else
11150 ac_cv_sizeof_pid_t=0
11151 fi
11152fi
11153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11154fi
11155rm -f conftest.val
11156fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011157{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11158echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011159
11160
11161
11162cat >>confdefs.h <<_ACEOF
11163#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11164_ACEOF
11165
11166
Michael W. Hudson54241132001-12-07 15:38:26 +000011167
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011168{ echo "$as_me:$LINENO: checking for long long support" >&5
11169echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011170have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011172/* confdefs.h. */
11173_ACEOF
11174cat confdefs.h >>conftest.$ac_ext
11175cat >>conftest.$ac_ext <<_ACEOF
11176/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011177
Martin v. Löwis11437992002-04-12 09:54:03 +000011178int
11179main ()
11180{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011181long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011182 ;
11183 return 0;
11184}
11185_ACEOF
11186rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011187if { (ac_try="$ac_compile"
11188case "(($ac_try" in
11189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11190 *) ac_try_echo=$ac_try;;
11191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011195 grep -v '^ *+' conftest.er1 >conftest.err
11196 rm -f conftest.er1
11197 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011199 (exit $ac_status); } && {
11200 test -z "$ac_c_werror_flag" ||
11201 test ! -s conftest.err
11202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011203
11204
11205cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011206#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011207_ACEOF
11208
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011209 have_long_long=yes
11210
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011213sed 's/^/| /' conftest.$ac_ext >&5
11214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217
11218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011219{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11220echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011221if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011222{ echo "$as_me:$LINENO: checking for long long" >&5
11223echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11224if test "${ac_cv_type_long_long+set}" = set; then
11225 echo $ECHO_N "(cached) $ECHO_C" >&6
11226else
11227 cat >conftest.$ac_ext <<_ACEOF
11228/* confdefs.h. */
11229_ACEOF
11230cat confdefs.h >>conftest.$ac_ext
11231cat >>conftest.$ac_ext <<_ACEOF
11232/* end confdefs.h. */
11233$ac_includes_default
11234typedef long long ac__type_new_;
11235int
11236main ()
11237{
11238if ((ac__type_new_ *) 0)
11239 return 0;
11240if (sizeof (ac__type_new_))
11241 return 0;
11242 ;
11243 return 0;
11244}
11245_ACEOF
11246rm -f conftest.$ac_objext
11247if { (ac_try="$ac_compile"
11248case "(($ac_try" in
11249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11250 *) ac_try_echo=$ac_try;;
11251esac
11252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11253 (eval "$ac_compile") 2>conftest.er1
11254 ac_status=$?
11255 grep -v '^ *+' conftest.er1 >conftest.err
11256 rm -f conftest.er1
11257 cat conftest.err >&5
11258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11259 (exit $ac_status); } && {
11260 test -z "$ac_c_werror_flag" ||
11261 test ! -s conftest.err
11262 } && test -s conftest.$ac_objext; then
11263 ac_cv_type_long_long=yes
11264else
11265 echo "$as_me: failed program was:" >&5
11266sed 's/^/| /' conftest.$ac_ext >&5
11267
11268 ac_cv_type_long_long=no
11269fi
11270
11271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11272fi
11273{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11274echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276# The cast to long int works around a bug in the HP C Compiler
11277# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11278# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11279# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011280{ echo "$as_me:$LINENO: checking size of long long" >&5
11281echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011282if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011283 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011284else
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 if test "$cross_compiling" = yes; then
11286 # Depending upon the size, compute the lo and hi bounds.
11287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011288/* confdefs.h. */
11289_ACEOF
11290cat confdefs.h >>conftest.$ac_ext
11291cat >>conftest.$ac_ext <<_ACEOF
11292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011293$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011294 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011295int
11296main ()
11297{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011299test_array [0] = 0
11300
11301 ;
11302 return 0;
11303}
11304_ACEOF
11305rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306if { (ac_try="$ac_compile"
11307case "(($ac_try" in
11308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11309 *) ac_try_echo=$ac_try;;
11310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011314 grep -v '^ *+' conftest.er1 >conftest.err
11315 rm -f conftest.er1
11316 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318 (exit $ac_status); } && {
11319 test -z "$ac_c_werror_flag" ||
11320 test ! -s conftest.err
11321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ac_lo=0 ac_mid=0
11323 while :; do
11324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011325/* confdefs.h. */
11326_ACEOF
11327cat confdefs.h >>conftest.$ac_ext
11328cat >>conftest.$ac_ext <<_ACEOF
11329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011330$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011331 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011332int
11333main ()
11334{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011335static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011336test_array [0] = 0
11337
11338 ;
11339 return 0;
11340}
11341_ACEOF
11342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011343if { (ac_try="$ac_compile"
11344case "(($ac_try" in
11345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11346 *) ac_try_echo=$ac_try;;
11347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011351 grep -v '^ *+' conftest.er1 >conftest.err
11352 rm -f conftest.er1
11353 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355 (exit $ac_status); } && {
11356 test -z "$ac_c_werror_flag" ||
11357 test ! -s conftest.err
11358 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 ac_hi=$ac_mid; break
11360else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011362sed 's/^/| /' conftest.$ac_ext >&5
11363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364 ac_lo=`expr $ac_mid + 1`
11365 if test $ac_lo -le $ac_mid; then
11366 ac_lo= ac_hi=
11367 break
11368 fi
11369 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371
11372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 done
11374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011376sed 's/^/| /' conftest.$ac_ext >&5
11377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* confdefs.h. */
11380_ACEOF
11381cat confdefs.h >>conftest.$ac_ext
11382cat >>conftest.$ac_ext <<_ACEOF
11383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011384$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011385 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011386int
11387main ()
11388{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011389static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011390test_array [0] = 0
11391
11392 ;
11393 return 0;
11394}
11395_ACEOF
11396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397if { (ac_try="$ac_compile"
11398case "(($ac_try" in
11399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11400 *) ac_try_echo=$ac_try;;
11401esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011405 grep -v '^ *+' conftest.er1 >conftest.err
11406 rm -f conftest.er1
11407 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409 (exit $ac_status); } && {
11410 test -z "$ac_c_werror_flag" ||
11411 test ! -s conftest.err
11412 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 ac_hi=-1 ac_mid=-1
11414 while :; do
11415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011416/* confdefs.h. */
11417_ACEOF
11418cat confdefs.h >>conftest.$ac_ext
11419cat >>conftest.$ac_ext <<_ACEOF
11420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011421$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011422 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011423int
11424main ()
11425{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011426static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011427test_array [0] = 0
11428
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434if { (ac_try="$ac_compile"
11435case "(($ac_try" in
11436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11437 *) ac_try_echo=$ac_try;;
11438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011442 grep -v '^ *+' conftest.er1 >conftest.err
11443 rm -f conftest.er1
11444 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446 (exit $ac_status); } && {
11447 test -z "$ac_c_werror_flag" ||
11448 test ! -s conftest.err
11449 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ac_lo=$ac_mid; break
11451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011453sed 's/^/| /' conftest.$ac_ext >&5
11454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455 ac_hi=`expr '(' $ac_mid ')' - 1`
11456 if test $ac_mid -le $ac_hi; then
11457 ac_lo= ac_hi=
11458 break
11459 fi
11460 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011462
11463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 done
11465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011467sed 's/^/| /' conftest.$ac_ext >&5
11468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471
11472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474
11475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011476# Binary search between lo and hi bounds.
11477while test "x$ac_lo" != "x$ac_hi"; do
11478 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* confdefs.h. */
11481_ACEOF
11482cat confdefs.h >>conftest.$ac_ext
11483cat >>conftest.$ac_ext <<_ACEOF
11484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011485$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011486 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011487int
11488main ()
11489{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011491test_array [0] = 0
11492
11493 ;
11494 return 0;
11495}
11496_ACEOF
11497rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498if { (ac_try="$ac_compile"
11499case "(($ac_try" in
11500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11501 *) ac_try_echo=$ac_try;;
11502esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011506 grep -v '^ *+' conftest.er1 >conftest.err
11507 rm -f conftest.er1
11508 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510 (exit $ac_status); } && {
11511 test -z "$ac_c_werror_flag" ||
11512 test ! -s conftest.err
11513 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ac_hi=$ac_mid
11515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011517sed 's/^/| /' conftest.$ac_ext >&5
11518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +000011523done
11524case $ac_lo in
11525?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011527 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011528See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011529echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011530See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011531 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532 else
11533 ac_cv_sizeof_long_long=0
11534 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011535esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011536else
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011538/* confdefs.h. */
11539_ACEOF
11540cat confdefs.h >>conftest.$ac_ext
11541cat >>conftest.$ac_ext <<_ACEOF
11542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011543$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011544 typedef long long ac__type_sizeof_;
11545static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11546static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011547#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011548#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011549int
11550main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011551{
Martin v. Löwis11437992002-04-12 09:54:03 +000011552
11553 FILE *f = fopen ("conftest.val", "w");
11554 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011556 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011559 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011561 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 }
11563 else
11564 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011566 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011568 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
11572 ;
11573 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011574}
Martin v. Löwis11437992002-04-12 09:54:03 +000011575_ACEOF
11576rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577if { (ac_try="$ac_link"
11578case "(($ac_try" in
11579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11580 *) ac_try_echo=$ac_try;;
11581esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011587 { (case "(($ac_try" in
11588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11589 *) ac_try_echo=$ac_try;;
11590esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 (exit $ac_status); }; }; then
11596 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011597else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011598 echo "$as_me: program exited with status $ac_status" >&5
11599echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011600sed 's/^/| /' conftest.$ac_ext >&5
11601
Martin v. Löwis11437992002-04-12 09:54:03 +000011602( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011604 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011605See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011606echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011607See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011608 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011609 else
11610 ac_cv_sizeof_long_long=0
11611 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011613rm -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 +000011614fi
11615rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011616fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011617{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11618echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619
11620
11621
Martin v. Löwis11437992002-04-12 09:54:03 +000011622cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011623#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011624_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011625
Michael W. Hudson54241132001-12-07 15:38:26 +000011626
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011627fi
11628
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011629{ echo "$as_me:$LINENO: checking for long double support" >&5
11630echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011631have_long_double=no
11632cat >conftest.$ac_ext <<_ACEOF
11633/* confdefs.h. */
11634_ACEOF
11635cat confdefs.h >>conftest.$ac_ext
11636cat >>conftest.$ac_ext <<_ACEOF
11637/* end confdefs.h. */
11638
11639int
11640main ()
11641{
11642long double x; x = (long double)0;
11643 ;
11644 return 0;
11645}
11646_ACEOF
11647rm -f conftest.$ac_objext
11648if { (ac_try="$ac_compile"
11649case "(($ac_try" in
11650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11651 *) ac_try_echo=$ac_try;;
11652esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011654 (eval "$ac_compile") 2>conftest.er1
11655 ac_status=$?
11656 grep -v '^ *+' conftest.er1 >conftest.err
11657 rm -f conftest.er1
11658 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011660 (exit $ac_status); } && {
11661 test -z "$ac_c_werror_flag" ||
11662 test ! -s conftest.err
11663 } && test -s conftest.$ac_objext; then
11664
11665
11666cat >>confdefs.h <<\_ACEOF
11667#define HAVE_LONG_DOUBLE 1
11668_ACEOF
11669
11670 have_long_double=yes
11671
11672else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011673 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011674sed 's/^/| /' conftest.$ac_ext >&5
11675
11676
11677fi
11678
11679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011680{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11681echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011682if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011683{ echo "$as_me:$LINENO: checking for long double" >&5
11684echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11685if test "${ac_cv_type_long_double+set}" = set; then
11686 echo $ECHO_N "(cached) $ECHO_C" >&6
11687else
11688 cat >conftest.$ac_ext <<_ACEOF
11689/* confdefs.h. */
11690_ACEOF
11691cat confdefs.h >>conftest.$ac_ext
11692cat >>conftest.$ac_ext <<_ACEOF
11693/* end confdefs.h. */
11694$ac_includes_default
11695typedef long double ac__type_new_;
11696int
11697main ()
11698{
11699if ((ac__type_new_ *) 0)
11700 return 0;
11701if (sizeof (ac__type_new_))
11702 return 0;
11703 ;
11704 return 0;
11705}
11706_ACEOF
11707rm -f conftest.$ac_objext
11708if { (ac_try="$ac_compile"
11709case "(($ac_try" in
11710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11711 *) ac_try_echo=$ac_try;;
11712esac
11713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11714 (eval "$ac_compile") 2>conftest.er1
11715 ac_status=$?
11716 grep -v '^ *+' conftest.er1 >conftest.err
11717 rm -f conftest.er1
11718 cat conftest.err >&5
11719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720 (exit $ac_status); } && {
11721 test -z "$ac_c_werror_flag" ||
11722 test ! -s conftest.err
11723 } && test -s conftest.$ac_objext; then
11724 ac_cv_type_long_double=yes
11725else
11726 echo "$as_me: failed program was:" >&5
11727sed 's/^/| /' conftest.$ac_ext >&5
11728
11729 ac_cv_type_long_double=no
11730fi
11731
11732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11733fi
11734{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11735echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11736
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011737# The cast to long int works around a bug in the HP C Compiler
11738# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11739# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11740# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011741{ echo "$as_me:$LINENO: checking size of long double" >&5
11742echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011743if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011744 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011745else
11746 if test "$cross_compiling" = yes; then
11747 # Depending upon the size, compute the lo and hi bounds.
11748cat >conftest.$ac_ext <<_ACEOF
11749/* confdefs.h. */
11750_ACEOF
11751cat confdefs.h >>conftest.$ac_ext
11752cat >>conftest.$ac_ext <<_ACEOF
11753/* end confdefs.h. */
11754$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011755 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011756int
11757main ()
11758{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011759static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011760test_array [0] = 0
11761
11762 ;
11763 return 0;
11764}
11765_ACEOF
11766rm -f conftest.$ac_objext
11767if { (ac_try="$ac_compile"
11768case "(($ac_try" in
11769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11770 *) ac_try_echo=$ac_try;;
11771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011773 (eval "$ac_compile") 2>conftest.er1
11774 ac_status=$?
11775 grep -v '^ *+' conftest.er1 >conftest.err
11776 rm -f conftest.er1
11777 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011779 (exit $ac_status); } && {
11780 test -z "$ac_c_werror_flag" ||
11781 test ! -s conftest.err
11782 } && test -s conftest.$ac_objext; then
11783 ac_lo=0 ac_mid=0
11784 while :; do
11785 cat >conftest.$ac_ext <<_ACEOF
11786/* confdefs.h. */
11787_ACEOF
11788cat confdefs.h >>conftest.$ac_ext
11789cat >>conftest.$ac_ext <<_ACEOF
11790/* end confdefs.h. */
11791$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011792 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793int
11794main ()
11795{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011796static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011797test_array [0] = 0
11798
11799 ;
11800 return 0;
11801}
11802_ACEOF
11803rm -f conftest.$ac_objext
11804if { (ac_try="$ac_compile"
11805case "(($ac_try" in
11806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11807 *) ac_try_echo=$ac_try;;
11808esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011810 (eval "$ac_compile") 2>conftest.er1
11811 ac_status=$?
11812 grep -v '^ *+' conftest.er1 >conftest.err
11813 rm -f conftest.er1
11814 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011816 (exit $ac_status); } && {
11817 test -z "$ac_c_werror_flag" ||
11818 test ! -s conftest.err
11819 } && test -s conftest.$ac_objext; then
11820 ac_hi=$ac_mid; break
11821else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011822 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011823sed 's/^/| /' conftest.$ac_ext >&5
11824
11825 ac_lo=`expr $ac_mid + 1`
11826 if test $ac_lo -le $ac_mid; then
11827 ac_lo= ac_hi=
11828 break
11829 fi
11830 ac_mid=`expr 2 '*' $ac_mid + 1`
11831fi
11832
11833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11834 done
11835else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011836 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011837sed 's/^/| /' conftest.$ac_ext >&5
11838
11839 cat >conftest.$ac_ext <<_ACEOF
11840/* confdefs.h. */
11841_ACEOF
11842cat confdefs.h >>conftest.$ac_ext
11843cat >>conftest.$ac_ext <<_ACEOF
11844/* end confdefs.h. */
11845$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011846 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011847int
11848main ()
11849{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011851test_array [0] = 0
11852
11853 ;
11854 return 0;
11855}
11856_ACEOF
11857rm -f conftest.$ac_objext
11858if { (ac_try="$ac_compile"
11859case "(($ac_try" in
11860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11861 *) ac_try_echo=$ac_try;;
11862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011864 (eval "$ac_compile") 2>conftest.er1
11865 ac_status=$?
11866 grep -v '^ *+' conftest.er1 >conftest.err
11867 rm -f conftest.er1
11868 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011870 (exit $ac_status); } && {
11871 test -z "$ac_c_werror_flag" ||
11872 test ! -s conftest.err
11873 } && test -s conftest.$ac_objext; then
11874 ac_hi=-1 ac_mid=-1
11875 while :; do
11876 cat >conftest.$ac_ext <<_ACEOF
11877/* confdefs.h. */
11878_ACEOF
11879cat confdefs.h >>conftest.$ac_ext
11880cat >>conftest.$ac_ext <<_ACEOF
11881/* end confdefs.h. */
11882$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011883 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011884int
11885main ()
11886{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011887static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011888test_array [0] = 0
11889
11890 ;
11891 return 0;
11892}
11893_ACEOF
11894rm -f conftest.$ac_objext
11895if { (ac_try="$ac_compile"
11896case "(($ac_try" in
11897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11898 *) ac_try_echo=$ac_try;;
11899esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011901 (eval "$ac_compile") 2>conftest.er1
11902 ac_status=$?
11903 grep -v '^ *+' conftest.er1 >conftest.err
11904 rm -f conftest.er1
11905 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011907 (exit $ac_status); } && {
11908 test -z "$ac_c_werror_flag" ||
11909 test ! -s conftest.err
11910 } && test -s conftest.$ac_objext; then
11911 ac_lo=$ac_mid; break
11912else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011913 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011914sed 's/^/| /' conftest.$ac_ext >&5
11915
11916 ac_hi=`expr '(' $ac_mid ')' - 1`
11917 if test $ac_mid -le $ac_hi; then
11918 ac_lo= ac_hi=
11919 break
11920 fi
11921 ac_mid=`expr 2 '*' $ac_mid`
11922fi
11923
11924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11925 done
11926else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011927 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011928sed 's/^/| /' conftest.$ac_ext >&5
11929
11930 ac_lo= ac_hi=
11931fi
11932
11933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11934fi
11935
11936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11937# Binary search between lo and hi bounds.
11938while test "x$ac_lo" != "x$ac_hi"; do
11939 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11940 cat >conftest.$ac_ext <<_ACEOF
11941/* confdefs.h. */
11942_ACEOF
11943cat confdefs.h >>conftest.$ac_ext
11944cat >>conftest.$ac_ext <<_ACEOF
11945/* end confdefs.h. */
11946$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011947 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948int
11949main ()
11950{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011951static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011952test_array [0] = 0
11953
11954 ;
11955 return 0;
11956}
11957_ACEOF
11958rm -f conftest.$ac_objext
11959if { (ac_try="$ac_compile"
11960case "(($ac_try" in
11961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11962 *) ac_try_echo=$ac_try;;
11963esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011965 (eval "$ac_compile") 2>conftest.er1
11966 ac_status=$?
11967 grep -v '^ *+' conftest.er1 >conftest.err
11968 rm -f conftest.er1
11969 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011971 (exit $ac_status); } && {
11972 test -z "$ac_c_werror_flag" ||
11973 test ! -s conftest.err
11974 } && test -s conftest.$ac_objext; then
11975 ac_hi=$ac_mid
11976else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011977 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011978sed 's/^/| /' conftest.$ac_ext >&5
11979
11980 ac_lo=`expr '(' $ac_mid ')' + 1`
11981fi
11982
11983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11984done
11985case $ac_lo in
11986?*) ac_cv_sizeof_long_double=$ac_lo;;
11987'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011988 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011989See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011990echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011992 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011993 else
11994 ac_cv_sizeof_long_double=0
11995 fi ;;
11996esac
11997else
11998 cat >conftest.$ac_ext <<_ACEOF
11999/* confdefs.h. */
12000_ACEOF
12001cat confdefs.h >>conftest.$ac_ext
12002cat >>conftest.$ac_ext <<_ACEOF
12003/* end confdefs.h. */
12004$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012005 typedef long double ac__type_sizeof_;
12006static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12007static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008#include <stdio.h>
12009#include <stdlib.h>
12010int
12011main ()
12012{
12013
12014 FILE *f = fopen ("conftest.val", "w");
12015 if (! f)
12016 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012017 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012018 {
12019 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012020 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012021 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012022 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012023 }
12024 else
12025 {
12026 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012027 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012028 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012029 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012030 }
12031 return ferror (f) || fclose (f) != 0;
12032
12033 ;
12034 return 0;
12035}
12036_ACEOF
12037rm -f conftest$ac_exeext
12038if { (ac_try="$ac_link"
12039case "(($ac_try" in
12040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12041 *) ac_try_echo=$ac_try;;
12042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012044 (eval "$ac_link") 2>&5
12045 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12048 { (case "(($ac_try" in
12049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12050 *) ac_try_echo=$ac_try;;
12051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012053 (eval "$ac_try") 2>&5
12054 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012056 (exit $ac_status); }; }; then
12057 ac_cv_sizeof_long_double=`cat conftest.val`
12058else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012059 echo "$as_me: program exited with status $ac_status" >&5
12060echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012061sed 's/^/| /' conftest.$ac_ext >&5
12062
12063( exit $ac_status )
12064if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012065 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012066See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012067echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012068See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012069 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012070 else
12071 ac_cv_sizeof_long_double=0
12072 fi
12073fi
12074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12075fi
12076rm -f conftest.val
12077fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012078{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12079echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012080
12081
12082
12083cat >>confdefs.h <<_ACEOF
12084#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12085_ACEOF
12086
12087
12088fi
12089
12090
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012091{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12092echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012093have_c99_bool=no
12094cat >conftest.$ac_ext <<_ACEOF
12095/* confdefs.h. */
12096_ACEOF
12097cat confdefs.h >>conftest.$ac_ext
12098cat >>conftest.$ac_ext <<_ACEOF
12099/* end confdefs.h. */
12100
12101int
12102main ()
12103{
12104_Bool x; x = (_Bool)0;
12105 ;
12106 return 0;
12107}
12108_ACEOF
12109rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012110if { (ac_try="$ac_compile"
12111case "(($ac_try" in
12112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12113 *) ac_try_echo=$ac_try;;
12114esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012117 ac_status=$?
12118 grep -v '^ *+' conftest.er1 >conftest.err
12119 rm -f conftest.er1
12120 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012122 (exit $ac_status); } && {
12123 test -z "$ac_c_werror_flag" ||
12124 test ! -s conftest.err
12125 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012126
12127
12128cat >>confdefs.h <<\_ACEOF
12129#define HAVE_C99_BOOL 1
12130_ACEOF
12131
12132 have_c99_bool=yes
12133
12134else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012135 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012136sed 's/^/| /' conftest.$ac_ext >&5
12137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138
Thomas Woutersb2137042007-02-01 18:02:27 +000012139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140
12141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012142{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12143echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012144if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012145{ echo "$as_me:$LINENO: checking for _Bool" >&5
12146echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12147if test "${ac_cv_type__Bool+set}" = set; then
12148 echo $ECHO_N "(cached) $ECHO_C" >&6
12149else
12150 cat >conftest.$ac_ext <<_ACEOF
12151/* confdefs.h. */
12152_ACEOF
12153cat confdefs.h >>conftest.$ac_ext
12154cat >>conftest.$ac_ext <<_ACEOF
12155/* end confdefs.h. */
12156$ac_includes_default
12157typedef _Bool ac__type_new_;
12158int
12159main ()
12160{
12161if ((ac__type_new_ *) 0)
12162 return 0;
12163if (sizeof (ac__type_new_))
12164 return 0;
12165 ;
12166 return 0;
12167}
12168_ACEOF
12169rm -f conftest.$ac_objext
12170if { (ac_try="$ac_compile"
12171case "(($ac_try" in
12172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12173 *) ac_try_echo=$ac_try;;
12174esac
12175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12176 (eval "$ac_compile") 2>conftest.er1
12177 ac_status=$?
12178 grep -v '^ *+' conftest.er1 >conftest.err
12179 rm -f conftest.er1
12180 cat conftest.err >&5
12181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182 (exit $ac_status); } && {
12183 test -z "$ac_c_werror_flag" ||
12184 test ! -s conftest.err
12185 } && test -s conftest.$ac_objext; then
12186 ac_cv_type__Bool=yes
12187else
12188 echo "$as_me: failed program was:" >&5
12189sed 's/^/| /' conftest.$ac_ext >&5
12190
12191 ac_cv_type__Bool=no
12192fi
12193
12194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12195fi
12196{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12197echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199# The cast to long int works around a bug in the HP C Compiler
12200# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12201# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12202# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012203{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12204echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012205if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012206 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012207else
12208 if test "$cross_compiling" = yes; then
12209 # Depending upon the size, compute the lo and hi bounds.
12210cat >conftest.$ac_ext <<_ACEOF
12211/* confdefs.h. */
12212_ACEOF
12213cat confdefs.h >>conftest.$ac_ext
12214cat >>conftest.$ac_ext <<_ACEOF
12215/* end confdefs.h. */
12216$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012217 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012218int
12219main ()
12220{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012221static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012222test_array [0] = 0
12223
12224 ;
12225 return 0;
12226}
12227_ACEOF
12228rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229if { (ac_try="$ac_compile"
12230case "(($ac_try" in
12231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12232 *) ac_try_echo=$ac_try;;
12233esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012236 ac_status=$?
12237 grep -v '^ *+' conftest.er1 >conftest.err
12238 rm -f conftest.er1
12239 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241 (exit $ac_status); } && {
12242 test -z "$ac_c_werror_flag" ||
12243 test ! -s conftest.err
12244 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012245 ac_lo=0 ac_mid=0
12246 while :; do
12247 cat >conftest.$ac_ext <<_ACEOF
12248/* confdefs.h. */
12249_ACEOF
12250cat confdefs.h >>conftest.$ac_ext
12251cat >>conftest.$ac_ext <<_ACEOF
12252/* end confdefs.h. */
12253$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012254 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012255int
12256main ()
12257{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012258static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012259test_array [0] = 0
12260
12261 ;
12262 return 0;
12263}
12264_ACEOF
12265rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012266if { (ac_try="$ac_compile"
12267case "(($ac_try" in
12268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12269 *) ac_try_echo=$ac_try;;
12270esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012273 ac_status=$?
12274 grep -v '^ *+' conftest.er1 >conftest.err
12275 rm -f conftest.er1
12276 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278 (exit $ac_status); } && {
12279 test -z "$ac_c_werror_flag" ||
12280 test ! -s conftest.err
12281 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012282 ac_hi=$ac_mid; break
12283else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012284 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012285sed 's/^/| /' conftest.$ac_ext >&5
12286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287 ac_lo=`expr $ac_mid + 1`
12288 if test $ac_lo -le $ac_mid; then
12289 ac_lo= ac_hi=
12290 break
12291 fi
12292 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012294
12295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012296 done
12297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012298 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012299sed 's/^/| /' conftest.$ac_ext >&5
12300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012302/* confdefs.h. */
12303_ACEOF
12304cat confdefs.h >>conftest.$ac_ext
12305cat >>conftest.$ac_ext <<_ACEOF
12306/* end confdefs.h. */
12307$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012308 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012309int
12310main ()
12311{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012313test_array [0] = 0
12314
12315 ;
12316 return 0;
12317}
12318_ACEOF
12319rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320if { (ac_try="$ac_compile"
12321case "(($ac_try" in
12322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12323 *) ac_try_echo=$ac_try;;
12324esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012327 ac_status=$?
12328 grep -v '^ *+' conftest.er1 >conftest.err
12329 rm -f conftest.er1
12330 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012332 (exit $ac_status); } && {
12333 test -z "$ac_c_werror_flag" ||
12334 test ! -s conftest.err
12335 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012336 ac_hi=-1 ac_mid=-1
12337 while :; do
12338 cat >conftest.$ac_ext <<_ACEOF
12339/* confdefs.h. */
12340_ACEOF
12341cat confdefs.h >>conftest.$ac_ext
12342cat >>conftest.$ac_ext <<_ACEOF
12343/* end confdefs.h. */
12344$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012345 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012346int
12347main ()
12348{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012349static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012350test_array [0] = 0
12351
12352 ;
12353 return 0;
12354}
12355_ACEOF
12356rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357if { (ac_try="$ac_compile"
12358case "(($ac_try" in
12359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12360 *) ac_try_echo=$ac_try;;
12361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012364 ac_status=$?
12365 grep -v '^ *+' conftest.er1 >conftest.err
12366 rm -f conftest.er1
12367 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369 (exit $ac_status); } && {
12370 test -z "$ac_c_werror_flag" ||
12371 test ! -s conftest.err
12372 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012373 ac_lo=$ac_mid; break
12374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012375 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012376sed 's/^/| /' conftest.$ac_ext >&5
12377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378 ac_hi=`expr '(' $ac_mid ')' - 1`
12379 if test $ac_mid -le $ac_hi; then
12380 ac_lo= ac_hi=
12381 break
12382 fi
12383 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385
12386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012387 done
12388else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012389 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012390sed 's/^/| /' conftest.$ac_ext >&5
12391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394
12395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397
12398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012399# Binary search between lo and hi bounds.
12400while test "x$ac_lo" != "x$ac_hi"; do
12401 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12402 cat >conftest.$ac_ext <<_ACEOF
12403/* confdefs.h. */
12404_ACEOF
12405cat confdefs.h >>conftest.$ac_ext
12406cat >>conftest.$ac_ext <<_ACEOF
12407/* end confdefs.h. */
12408$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012409 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012410int
12411main ()
12412{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012413static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012414test_array [0] = 0
12415
12416 ;
12417 return 0;
12418}
12419_ACEOF
12420rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421if { (ac_try="$ac_compile"
12422case "(($ac_try" in
12423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12424 *) ac_try_echo=$ac_try;;
12425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012428 ac_status=$?
12429 grep -v '^ *+' conftest.er1 >conftest.err
12430 rm -f conftest.er1
12431 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433 (exit $ac_status); } && {
12434 test -z "$ac_c_werror_flag" ||
12435 test ! -s conftest.err
12436 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012437 ac_hi=$ac_mid
12438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012439 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012440sed 's/^/| /' conftest.$ac_ext >&5
12441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +000012446done
12447case $ac_lo in
12448?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012450 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012451See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012452echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012453See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012454 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455 else
12456 ac_cv_sizeof__Bool=0
12457 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012458esac
12459else
12460 cat >conftest.$ac_ext <<_ACEOF
12461/* confdefs.h. */
12462_ACEOF
12463cat confdefs.h >>conftest.$ac_ext
12464cat >>conftest.$ac_ext <<_ACEOF
12465/* end confdefs.h. */
12466$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012467 typedef _Bool ac__type_sizeof_;
12468static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12469static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012470#include <stdio.h>
12471#include <stdlib.h>
12472int
12473main ()
12474{
12475
12476 FILE *f = fopen ("conftest.val", "w");
12477 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012479 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012480 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012482 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012484 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012485 }
12486 else
12487 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012489 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012491 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012492 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012494
12495 ;
12496 return 0;
12497}
12498_ACEOF
12499rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500if { (ac_try="$ac_link"
12501case "(($ac_try" in
12502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12503 *) ac_try_echo=$ac_try;;
12504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012506 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012507 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012509 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510 { (case "(($ac_try" in
12511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12512 *) ac_try_echo=$ac_try;;
12513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012515 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012516 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012518 (exit $ac_status); }; }; then
12519 ac_cv_sizeof__Bool=`cat conftest.val`
12520else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012521 echo "$as_me: program exited with status $ac_status" >&5
12522echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012523sed 's/^/| /' conftest.$ac_ext >&5
12524
12525( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012527 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012528See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012529echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012530See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012531 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532 else
12533 ac_cv_sizeof__Bool=0
12534 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536rm -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 +000012537fi
12538rm -f conftest.val
12539fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012540{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12541echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542
12543
12544
Thomas Woutersb2137042007-02-01 18:02:27 +000012545cat >>confdefs.h <<_ACEOF
12546#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12547_ACEOF
12548
12549
12550fi
12551
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012552{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12553echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012554if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012555 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012556else
12557 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012558/* confdefs.h. */
12559_ACEOF
12560cat confdefs.h >>conftest.$ac_ext
12561cat >>conftest.$ac_ext <<_ACEOF
12562/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012563#ifdef HAVE_STDINT_H
12564 #include <stdint.h>
12565 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012566
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012567typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012568int
12569main ()
12570{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012571if ((ac__type_new_ *) 0)
12572 return 0;
12573if (sizeof (ac__type_new_))
12574 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 ;
12576 return 0;
12577}
12578_ACEOF
12579rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580if { (ac_try="$ac_compile"
12581case "(($ac_try" in
12582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12583 *) ac_try_echo=$ac_try;;
12584esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012588 grep -v '^ *+' conftest.er1 >conftest.err
12589 rm -f conftest.er1
12590 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592 (exit $ac_status); } && {
12593 test -z "$ac_c_werror_flag" ||
12594 test ! -s conftest.err
12595 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012596 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012597else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012599sed 's/^/| /' conftest.$ac_ext >&5
12600
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012601 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012603
12604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012605fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012606{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12607echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12608if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012609
12610cat >>confdefs.h <<_ACEOF
12611#define HAVE_UINTPTR_T 1
12612_ACEOF
12613
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012614{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12615echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12616if test "${ac_cv_type_uintptr_t+set}" = set; then
12617 echo $ECHO_N "(cached) $ECHO_C" >&6
12618else
12619 cat >conftest.$ac_ext <<_ACEOF
12620/* confdefs.h. */
12621_ACEOF
12622cat confdefs.h >>conftest.$ac_ext
12623cat >>conftest.$ac_ext <<_ACEOF
12624/* end confdefs.h. */
12625$ac_includes_default
12626typedef uintptr_t ac__type_new_;
12627int
12628main ()
12629{
12630if ((ac__type_new_ *) 0)
12631 return 0;
12632if (sizeof (ac__type_new_))
12633 return 0;
12634 ;
12635 return 0;
12636}
12637_ACEOF
12638rm -f conftest.$ac_objext
12639if { (ac_try="$ac_compile"
12640case "(($ac_try" in
12641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12642 *) ac_try_echo=$ac_try;;
12643esac
12644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12645 (eval "$ac_compile") 2>conftest.er1
12646 ac_status=$?
12647 grep -v '^ *+' conftest.er1 >conftest.err
12648 rm -f conftest.er1
12649 cat conftest.err >&5
12650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12651 (exit $ac_status); } && {
12652 test -z "$ac_c_werror_flag" ||
12653 test ! -s conftest.err
12654 } && test -s conftest.$ac_objext; then
12655 ac_cv_type_uintptr_t=yes
12656else
12657 echo "$as_me: failed program was:" >&5
12658sed 's/^/| /' conftest.$ac_ext >&5
12659
12660 ac_cv_type_uintptr_t=no
12661fi
12662
12663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12664fi
12665{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12666echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668# The cast to long int works around a bug in the HP C Compiler
12669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12671# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012672{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12673echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012674if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012675 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012676else
Martin v. Löwis11437992002-04-12 09:54:03 +000012677 if test "$cross_compiling" = yes; then
12678 # Depending upon the size, compute the lo and hi bounds.
12679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012680/* confdefs.h. */
12681_ACEOF
12682cat confdefs.h >>conftest.$ac_ext
12683cat >>conftest.$ac_ext <<_ACEOF
12684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012685$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012686 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012687int
12688main ()
12689{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012691test_array [0] = 0
12692
12693 ;
12694 return 0;
12695}
12696_ACEOF
12697rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698if { (ac_try="$ac_compile"
12699case "(($ac_try" in
12700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12701 *) ac_try_echo=$ac_try;;
12702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012706 grep -v '^ *+' conftest.er1 >conftest.err
12707 rm -f conftest.er1
12708 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710 (exit $ac_status); } && {
12711 test -z "$ac_c_werror_flag" ||
12712 test ! -s conftest.err
12713 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ac_lo=0 ac_mid=0
12715 while :; do
12716 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012717/* confdefs.h. */
12718_ACEOF
12719cat confdefs.h >>conftest.$ac_ext
12720cat >>conftest.$ac_ext <<_ACEOF
12721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012722$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012723 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012724int
12725main ()
12726{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012727static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012728test_array [0] = 0
12729
12730 ;
12731 return 0;
12732}
12733_ACEOF
12734rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735if { (ac_try="$ac_compile"
12736case "(($ac_try" in
12737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12738 *) ac_try_echo=$ac_try;;
12739esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012741 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012743 grep -v '^ *+' conftest.er1 >conftest.err
12744 rm -f conftest.er1
12745 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747 (exit $ac_status); } && {
12748 test -z "$ac_c_werror_flag" ||
12749 test ! -s conftest.err
12750 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 ac_hi=$ac_mid; break
12752else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012754sed 's/^/| /' conftest.$ac_ext >&5
12755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756 ac_lo=`expr $ac_mid + 1`
12757 if test $ac_lo -le $ac_mid; then
12758 ac_lo= ac_hi=
12759 break
12760 fi
12761 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012763
12764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 done
12766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012768sed 's/^/| /' conftest.$ac_ext >&5
12769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012771/* confdefs.h. */
12772_ACEOF
12773cat confdefs.h >>conftest.$ac_ext
12774cat >>conftest.$ac_ext <<_ACEOF
12775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012776$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012777 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012778int
12779main ()
12780{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012782test_array [0] = 0
12783
12784 ;
12785 return 0;
12786}
12787_ACEOF
12788rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789if { (ac_try="$ac_compile"
12790case "(($ac_try" in
12791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12792 *) ac_try_echo=$ac_try;;
12793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012797 grep -v '^ *+' conftest.er1 >conftest.err
12798 rm -f conftest.er1
12799 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801 (exit $ac_status); } && {
12802 test -z "$ac_c_werror_flag" ||
12803 test ! -s conftest.err
12804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ac_hi=-1 ac_mid=-1
12806 while :; do
12807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012808/* confdefs.h. */
12809_ACEOF
12810cat confdefs.h >>conftest.$ac_ext
12811cat >>conftest.$ac_ext <<_ACEOF
12812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012813$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012814 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012815int
12816main ()
12817{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012818static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012819test_array [0] = 0
12820
12821 ;
12822 return 0;
12823}
12824_ACEOF
12825rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826if { (ac_try="$ac_compile"
12827case "(($ac_try" in
12828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12829 *) ac_try_echo=$ac_try;;
12830esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012834 grep -v '^ *+' conftest.er1 >conftest.err
12835 rm -f conftest.er1
12836 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838 (exit $ac_status); } && {
12839 test -z "$ac_c_werror_flag" ||
12840 test ! -s conftest.err
12841 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 ac_lo=$ac_mid; break
12843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012845sed 's/^/| /' conftest.$ac_ext >&5
12846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012847 ac_hi=`expr '(' $ac_mid ')' - 1`
12848 if test $ac_mid -le $ac_hi; then
12849 ac_lo= ac_hi=
12850 break
12851 fi
12852 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854
12855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 done
12857else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012859sed 's/^/| /' conftest.$ac_ext >&5
12860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863
12864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866
12867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012868# Binary search between lo and hi bounds.
12869while test "x$ac_lo" != "x$ac_hi"; do
12870 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012872/* confdefs.h. */
12873_ACEOF
12874cat confdefs.h >>conftest.$ac_ext
12875cat >>conftest.$ac_ext <<_ACEOF
12876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012877$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012878 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012879int
12880main ()
12881{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012882static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012883test_array [0] = 0
12884
12885 ;
12886 return 0;
12887}
12888_ACEOF
12889rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890if { (ac_try="$ac_compile"
12891case "(($ac_try" in
12892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12893 *) ac_try_echo=$ac_try;;
12894esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012898 grep -v '^ *+' conftest.er1 >conftest.err
12899 rm -f conftest.er1
12900 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902 (exit $ac_status); } && {
12903 test -z "$ac_c_werror_flag" ||
12904 test ! -s conftest.err
12905 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 ac_hi=$ac_mid
12907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012909sed 's/^/| /' conftest.$ac_ext >&5
12910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +000012915done
12916case $ac_lo in
12917?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012920See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012921echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012922See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012923 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924 else
12925 ac_cv_sizeof_uintptr_t=0
12926 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012927esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012928else
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012930/* confdefs.h. */
12931_ACEOF
12932cat confdefs.h >>conftest.$ac_ext
12933cat >>conftest.$ac_ext <<_ACEOF
12934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012935$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012936 typedef uintptr_t ac__type_sizeof_;
12937static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12938static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012939#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012940#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012941int
12942main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012943{
Martin v. Löwis11437992002-04-12 09:54:03 +000012944
12945 FILE *f = fopen ("conftest.val", "w");
12946 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012948 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012951 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012953 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 }
12955 else
12956 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012958 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012960 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012963
12964 ;
12965 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012966}
Martin v. Löwis11437992002-04-12 09:54:03 +000012967_ACEOF
12968rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012969if { (ac_try="$ac_link"
12970case "(($ac_try" in
12971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12972 *) ac_try_echo=$ac_try;;
12973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012975 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012976 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979 { (case "(($ac_try" in
12980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12981 *) ac_try_echo=$ac_try;;
12982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012985 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 (exit $ac_status); }; }; then
12988 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012990 echo "$as_me: program exited with status $ac_status" >&5
12991echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012992sed 's/^/| /' conftest.$ac_ext >&5
12993
Martin v. Löwis11437992002-04-12 09:54:03 +000012994( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012996 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012997See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012998echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012999See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013000 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001 else
13002 ac_cv_sizeof_uintptr_t=0
13003 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005rm -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 +000013006fi
13007rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013008fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013009{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13010echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013011
13012
13013
Martin v. Löwis11437992002-04-12 09:54:03 +000013014cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013015#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013016_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013017
Michael W. Hudson54241132001-12-07 15:38:26 +000013018
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013019fi
13020
Thomas Wouters89f507f2006-12-13 04:49:30 +000013021
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013022{ echo "$as_me:$LINENO: checking for off_t" >&5
13023echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13024if test "${ac_cv_type_off_t+set}" = set; then
13025 echo $ECHO_N "(cached) $ECHO_C" >&6
13026else
13027 cat >conftest.$ac_ext <<_ACEOF
13028/* confdefs.h. */
13029_ACEOF
13030cat confdefs.h >>conftest.$ac_ext
13031cat >>conftest.$ac_ext <<_ACEOF
13032/* end confdefs.h. */
13033
13034#ifdef HAVE_SYS_TYPES_H
13035#include <sys/types.h>
13036#endif
13037
13038
13039typedef off_t ac__type_new_;
13040int
13041main ()
13042{
13043if ((ac__type_new_ *) 0)
13044 return 0;
13045if (sizeof (ac__type_new_))
13046 return 0;
13047 ;
13048 return 0;
13049}
13050_ACEOF
13051rm -f conftest.$ac_objext
13052if { (ac_try="$ac_compile"
13053case "(($ac_try" in
13054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13055 *) ac_try_echo=$ac_try;;
13056esac
13057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13058 (eval "$ac_compile") 2>conftest.er1
13059 ac_status=$?
13060 grep -v '^ *+' conftest.er1 >conftest.err
13061 rm -f conftest.er1
13062 cat conftest.err >&5
13063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13064 (exit $ac_status); } && {
13065 test -z "$ac_c_werror_flag" ||
13066 test ! -s conftest.err
13067 } && test -s conftest.$ac_objext; then
13068 ac_cv_type_off_t=yes
13069else
13070 echo "$as_me: failed program was:" >&5
13071sed 's/^/| /' conftest.$ac_ext >&5
13072
13073 ac_cv_type_off_t=no
13074fi
13075
13076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13077fi
13078{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13079echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13080
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013081# The cast to long int works around a bug in the HP C Compiler
13082# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13083# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13084# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013085{ echo "$as_me:$LINENO: checking size of off_t" >&5
13086echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013087if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013088 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013089else
13090 if test "$cross_compiling" = yes; then
13091 # Depending upon the size, compute the lo and hi bounds.
13092cat >conftest.$ac_ext <<_ACEOF
13093/* confdefs.h. */
13094_ACEOF
13095cat confdefs.h >>conftest.$ac_ext
13096cat >>conftest.$ac_ext <<_ACEOF
13097/* end confdefs.h. */
13098
13099#ifdef HAVE_SYS_TYPES_H
13100#include <sys/types.h>
13101#endif
13102
13103
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013104 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013105int
13106main ()
13107{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013108static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013109test_array [0] = 0
13110
13111 ;
13112 return 0;
13113}
13114_ACEOF
13115rm -f conftest.$ac_objext
13116if { (ac_try="$ac_compile"
13117case "(($ac_try" in
13118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13119 *) ac_try_echo=$ac_try;;
13120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122 (eval "$ac_compile") 2>conftest.er1
13123 ac_status=$?
13124 grep -v '^ *+' conftest.er1 >conftest.err
13125 rm -f conftest.er1
13126 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128 (exit $ac_status); } && {
13129 test -z "$ac_c_werror_flag" ||
13130 test ! -s conftest.err
13131 } && test -s conftest.$ac_objext; then
13132 ac_lo=0 ac_mid=0
13133 while :; do
13134 cat >conftest.$ac_ext <<_ACEOF
13135/* confdefs.h. */
13136_ACEOF
13137cat confdefs.h >>conftest.$ac_ext
13138cat >>conftest.$ac_ext <<_ACEOF
13139/* end confdefs.h. */
13140
13141#ifdef HAVE_SYS_TYPES_H
13142#include <sys/types.h>
13143#endif
13144
13145
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013146 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147int
13148main ()
13149{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013150static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013151test_array [0] = 0
13152
13153 ;
13154 return 0;
13155}
13156_ACEOF
13157rm -f conftest.$ac_objext
13158if { (ac_try="$ac_compile"
13159case "(($ac_try" in
13160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13161 *) ac_try_echo=$ac_try;;
13162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013164 (eval "$ac_compile") 2>conftest.er1
13165 ac_status=$?
13166 grep -v '^ *+' conftest.er1 >conftest.err
13167 rm -f conftest.er1
13168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013170 (exit $ac_status); } && {
13171 test -z "$ac_c_werror_flag" ||
13172 test ! -s conftest.err
13173 } && test -s conftest.$ac_objext; then
13174 ac_hi=$ac_mid; break
13175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013176 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013177sed 's/^/| /' conftest.$ac_ext >&5
13178
13179 ac_lo=`expr $ac_mid + 1`
13180 if test $ac_lo -le $ac_mid; then
13181 ac_lo= ac_hi=
13182 break
13183 fi
13184 ac_mid=`expr 2 '*' $ac_mid + 1`
13185fi
13186
13187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13188 done
13189else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013190 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013191sed 's/^/| /' conftest.$ac_ext >&5
13192
13193 cat >conftest.$ac_ext <<_ACEOF
13194/* confdefs.h. */
13195_ACEOF
13196cat confdefs.h >>conftest.$ac_ext
13197cat >>conftest.$ac_ext <<_ACEOF
13198/* end confdefs.h. */
13199
13200#ifdef HAVE_SYS_TYPES_H
13201#include <sys/types.h>
13202#endif
13203
13204
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013205 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013206int
13207main ()
13208{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013209static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013210test_array [0] = 0
13211
13212 ;
13213 return 0;
13214}
13215_ACEOF
13216rm -f conftest.$ac_objext
13217if { (ac_try="$ac_compile"
13218case "(($ac_try" in
13219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13220 *) ac_try_echo=$ac_try;;
13221esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013223 (eval "$ac_compile") 2>conftest.er1
13224 ac_status=$?
13225 grep -v '^ *+' conftest.er1 >conftest.err
13226 rm -f conftest.er1
13227 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013229 (exit $ac_status); } && {
13230 test -z "$ac_c_werror_flag" ||
13231 test ! -s conftest.err
13232 } && test -s conftest.$ac_objext; then
13233 ac_hi=-1 ac_mid=-1
13234 while :; do
13235 cat >conftest.$ac_ext <<_ACEOF
13236/* confdefs.h. */
13237_ACEOF
13238cat confdefs.h >>conftest.$ac_ext
13239cat >>conftest.$ac_ext <<_ACEOF
13240/* end confdefs.h. */
13241
13242#ifdef HAVE_SYS_TYPES_H
13243#include <sys/types.h>
13244#endif
13245
13246
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013247 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248int
13249main ()
13250{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013252test_array [0] = 0
13253
13254 ;
13255 return 0;
13256}
13257_ACEOF
13258rm -f conftest.$ac_objext
13259if { (ac_try="$ac_compile"
13260case "(($ac_try" in
13261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13262 *) ac_try_echo=$ac_try;;
13263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265 (eval "$ac_compile") 2>conftest.er1
13266 ac_status=$?
13267 grep -v '^ *+' conftest.er1 >conftest.err
13268 rm -f conftest.er1
13269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013271 (exit $ac_status); } && {
13272 test -z "$ac_c_werror_flag" ||
13273 test ! -s conftest.err
13274 } && test -s conftest.$ac_objext; then
13275 ac_lo=$ac_mid; break
13276else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013277 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013278sed 's/^/| /' conftest.$ac_ext >&5
13279
13280 ac_hi=`expr '(' $ac_mid ')' - 1`
13281 if test $ac_mid -le $ac_hi; then
13282 ac_lo= ac_hi=
13283 break
13284 fi
13285 ac_mid=`expr 2 '*' $ac_mid`
13286fi
13287
13288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13289 done
13290else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013291 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013292sed 's/^/| /' conftest.$ac_ext >&5
13293
13294 ac_lo= ac_hi=
13295fi
13296
13297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13298fi
13299
13300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13301# Binary search between lo and hi bounds.
13302while test "x$ac_lo" != "x$ac_hi"; do
13303 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13304 cat >conftest.$ac_ext <<_ACEOF
13305/* confdefs.h. */
13306_ACEOF
13307cat confdefs.h >>conftest.$ac_ext
13308cat >>conftest.$ac_ext <<_ACEOF
13309/* end confdefs.h. */
13310
13311#ifdef HAVE_SYS_TYPES_H
13312#include <sys/types.h>
13313#endif
13314
13315
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013316 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013317int
13318main ()
13319{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013321test_array [0] = 0
13322
13323 ;
13324 return 0;
13325}
13326_ACEOF
13327rm -f conftest.$ac_objext
13328if { (ac_try="$ac_compile"
13329case "(($ac_try" in
13330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13331 *) ac_try_echo=$ac_try;;
13332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334 (eval "$ac_compile") 2>conftest.er1
13335 ac_status=$?
13336 grep -v '^ *+' conftest.er1 >conftest.err
13337 rm -f conftest.er1
13338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013340 (exit $ac_status); } && {
13341 test -z "$ac_c_werror_flag" ||
13342 test ! -s conftest.err
13343 } && test -s conftest.$ac_objext; then
13344 ac_hi=$ac_mid
13345else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013346 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013347sed 's/^/| /' conftest.$ac_ext >&5
13348
13349 ac_lo=`expr '(' $ac_mid ')' + 1`
13350fi
13351
13352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13353done
13354case $ac_lo in
13355?*) ac_cv_sizeof_off_t=$ac_lo;;
13356'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013357 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013358See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013359echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013360See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013361 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013362 else
13363 ac_cv_sizeof_off_t=0
13364 fi ;;
13365esac
13366else
13367 cat >conftest.$ac_ext <<_ACEOF
13368/* confdefs.h. */
13369_ACEOF
13370cat confdefs.h >>conftest.$ac_ext
13371cat >>conftest.$ac_ext <<_ACEOF
13372/* end confdefs.h. */
13373
13374#ifdef HAVE_SYS_TYPES_H
13375#include <sys/types.h>
13376#endif
13377
13378
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013379 typedef off_t ac__type_sizeof_;
13380static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13381static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013382#include <stdio.h>
13383#include <stdlib.h>
13384int
13385main ()
13386{
13387
13388 FILE *f = fopen ("conftest.val", "w");
13389 if (! f)
13390 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013391 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013392 {
13393 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013394 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013395 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013396 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013397 }
13398 else
13399 {
13400 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013401 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013402 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013403 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013404 }
13405 return ferror (f) || fclose (f) != 0;
13406
13407 ;
13408 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013409}
Martin v. Löwis11437992002-04-12 09:54:03 +000013410_ACEOF
13411rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412if { (ac_try="$ac_link"
13413case "(($ac_try" in
13414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13415 *) ac_try_echo=$ac_try;;
13416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422 { (case "(($ac_try" in
13423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13424 *) ac_try_echo=$ac_try;;
13425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013428 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013431 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013433 echo "$as_me: program exited with status $ac_status" >&5
13434echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013435sed 's/^/| /' conftest.$ac_ext >&5
13436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013438if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013439 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013440See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013441echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013442See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013443 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013444 else
13445 ac_cv_sizeof_off_t=0
13446 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013448rm -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 +000013449fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013450rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013451fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013452{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13453echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013455
13456
Martin v. Löwis11437992002-04-12 09:54:03 +000013457cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013458#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013459_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013460
Michael W. Hudson54241132001-12-07 15:38:26 +000013461
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013462
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013463{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13464echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013465if test "$have_long_long" = yes
13466then
13467if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013468 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470cat >>confdefs.h <<\_ACEOF
13471#define HAVE_LARGEFILE_SUPPORT 1
13472_ACEOF
13473
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013474 { echo "$as_me:$LINENO: result: yes" >&5
13475echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013476else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013477 { echo "$as_me:$LINENO: result: no" >&5
13478echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013479fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013480else
13481 { echo "$as_me:$LINENO: result: no" >&5
13482echo "${ECHO_T}no" >&6; }
13483fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013484
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013485{ echo "$as_me:$LINENO: checking for time_t" >&5
13486echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13487if test "${ac_cv_type_time_t+set}" = set; then
13488 echo $ECHO_N "(cached) $ECHO_C" >&6
13489else
13490 cat >conftest.$ac_ext <<_ACEOF
13491/* confdefs.h. */
13492_ACEOF
13493cat confdefs.h >>conftest.$ac_ext
13494cat >>conftest.$ac_ext <<_ACEOF
13495/* end confdefs.h. */
13496
13497#ifdef HAVE_SYS_TYPES_H
13498#include <sys/types.h>
13499#endif
13500#ifdef HAVE_TIME_H
13501#include <time.h>
13502#endif
13503
13504
13505typedef time_t ac__type_new_;
13506int
13507main ()
13508{
13509if ((ac__type_new_ *) 0)
13510 return 0;
13511if (sizeof (ac__type_new_))
13512 return 0;
13513 ;
13514 return 0;
13515}
13516_ACEOF
13517rm -f conftest.$ac_objext
13518if { (ac_try="$ac_compile"
13519case "(($ac_try" in
13520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13521 *) ac_try_echo=$ac_try;;
13522esac
13523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13524 (eval "$ac_compile") 2>conftest.er1
13525 ac_status=$?
13526 grep -v '^ *+' conftest.er1 >conftest.err
13527 rm -f conftest.er1
13528 cat conftest.err >&5
13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530 (exit $ac_status); } && {
13531 test -z "$ac_c_werror_flag" ||
13532 test ! -s conftest.err
13533 } && test -s conftest.$ac_objext; then
13534 ac_cv_type_time_t=yes
13535else
13536 echo "$as_me: failed program was:" >&5
13537sed 's/^/| /' conftest.$ac_ext >&5
13538
13539 ac_cv_type_time_t=no
13540fi
13541
13542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13543fi
13544{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13545echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13546
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013547# The cast to long int works around a bug in the HP C Compiler
13548# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13549# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13550# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013551{ echo "$as_me:$LINENO: checking size of time_t" >&5
13552echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013553if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013554 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013555else
13556 if test "$cross_compiling" = yes; then
13557 # Depending upon the size, compute the lo and hi bounds.
13558cat >conftest.$ac_ext <<_ACEOF
13559/* confdefs.h. */
13560_ACEOF
13561cat confdefs.h >>conftest.$ac_ext
13562cat >>conftest.$ac_ext <<_ACEOF
13563/* end confdefs.h. */
13564
13565#ifdef HAVE_SYS_TYPES_H
13566#include <sys/types.h>
13567#endif
13568#ifdef HAVE_TIME_H
13569#include <time.h>
13570#endif
13571
13572
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013573 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013574int
13575main ()
13576{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013578test_array [0] = 0
13579
13580 ;
13581 return 0;
13582}
13583_ACEOF
13584rm -f conftest.$ac_objext
13585if { (ac_try="$ac_compile"
13586case "(($ac_try" in
13587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13588 *) ac_try_echo=$ac_try;;
13589esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013591 (eval "$ac_compile") 2>conftest.er1
13592 ac_status=$?
13593 grep -v '^ *+' conftest.er1 >conftest.err
13594 rm -f conftest.er1
13595 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013597 (exit $ac_status); } && {
13598 test -z "$ac_c_werror_flag" ||
13599 test ! -s conftest.err
13600 } && test -s conftest.$ac_objext; then
13601 ac_lo=0 ac_mid=0
13602 while :; do
13603 cat >conftest.$ac_ext <<_ACEOF
13604/* confdefs.h. */
13605_ACEOF
13606cat confdefs.h >>conftest.$ac_ext
13607cat >>conftest.$ac_ext <<_ACEOF
13608/* end confdefs.h. */
13609
13610#ifdef HAVE_SYS_TYPES_H
13611#include <sys/types.h>
13612#endif
13613#ifdef HAVE_TIME_H
13614#include <time.h>
13615#endif
13616
13617
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013618 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013619int
13620main ()
13621{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013623test_array [0] = 0
13624
13625 ;
13626 return 0;
13627}
13628_ACEOF
13629rm -f conftest.$ac_objext
13630if { (ac_try="$ac_compile"
13631case "(($ac_try" in
13632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13633 *) ac_try_echo=$ac_try;;
13634esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013636 (eval "$ac_compile") 2>conftest.er1
13637 ac_status=$?
13638 grep -v '^ *+' conftest.er1 >conftest.err
13639 rm -f conftest.er1
13640 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013642 (exit $ac_status); } && {
13643 test -z "$ac_c_werror_flag" ||
13644 test ! -s conftest.err
13645 } && test -s conftest.$ac_objext; then
13646 ac_hi=$ac_mid; break
13647else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013648 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013649sed 's/^/| /' conftest.$ac_ext >&5
13650
13651 ac_lo=`expr $ac_mid + 1`
13652 if test $ac_lo -le $ac_mid; then
13653 ac_lo= ac_hi=
13654 break
13655 fi
13656 ac_mid=`expr 2 '*' $ac_mid + 1`
13657fi
13658
13659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13660 done
13661else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013662 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013663sed 's/^/| /' conftest.$ac_ext >&5
13664
13665 cat >conftest.$ac_ext <<_ACEOF
13666/* confdefs.h. */
13667_ACEOF
13668cat confdefs.h >>conftest.$ac_ext
13669cat >>conftest.$ac_ext <<_ACEOF
13670/* end confdefs.h. */
13671
13672#ifdef HAVE_SYS_TYPES_H
13673#include <sys/types.h>
13674#endif
13675#ifdef HAVE_TIME_H
13676#include <time.h>
13677#endif
13678
13679
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013680 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013681int
13682main ()
13683{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013684static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013685test_array [0] = 0
13686
13687 ;
13688 return 0;
13689}
13690_ACEOF
13691rm -f conftest.$ac_objext
13692if { (ac_try="$ac_compile"
13693case "(($ac_try" in
13694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13695 *) ac_try_echo=$ac_try;;
13696esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013698 (eval "$ac_compile") 2>conftest.er1
13699 ac_status=$?
13700 grep -v '^ *+' conftest.er1 >conftest.err
13701 rm -f conftest.er1
13702 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013704 (exit $ac_status); } && {
13705 test -z "$ac_c_werror_flag" ||
13706 test ! -s conftest.err
13707 } && test -s conftest.$ac_objext; then
13708 ac_hi=-1 ac_mid=-1
13709 while :; do
13710 cat >conftest.$ac_ext <<_ACEOF
13711/* confdefs.h. */
13712_ACEOF
13713cat confdefs.h >>conftest.$ac_ext
13714cat >>conftest.$ac_ext <<_ACEOF
13715/* end confdefs.h. */
13716
13717#ifdef HAVE_SYS_TYPES_H
13718#include <sys/types.h>
13719#endif
13720#ifdef HAVE_TIME_H
13721#include <time.h>
13722#endif
13723
13724
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013725 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013726int
13727main ()
13728{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013729static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013730test_array [0] = 0
13731
13732 ;
13733 return 0;
13734}
13735_ACEOF
13736rm -f conftest.$ac_objext
13737if { (ac_try="$ac_compile"
13738case "(($ac_try" in
13739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13740 *) ac_try_echo=$ac_try;;
13741esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013743 (eval "$ac_compile") 2>conftest.er1
13744 ac_status=$?
13745 grep -v '^ *+' conftest.er1 >conftest.err
13746 rm -f conftest.er1
13747 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013749 (exit $ac_status); } && {
13750 test -z "$ac_c_werror_flag" ||
13751 test ! -s conftest.err
13752 } && test -s conftest.$ac_objext; then
13753 ac_lo=$ac_mid; break
13754else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013755 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013756sed 's/^/| /' conftest.$ac_ext >&5
13757
13758 ac_hi=`expr '(' $ac_mid ')' - 1`
13759 if test $ac_mid -le $ac_hi; then
13760 ac_lo= ac_hi=
13761 break
13762 fi
13763 ac_mid=`expr 2 '*' $ac_mid`
13764fi
13765
13766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13767 done
13768else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013769 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013770sed 's/^/| /' conftest.$ac_ext >&5
13771
13772 ac_lo= ac_hi=
13773fi
13774
13775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13776fi
13777
13778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13779# Binary search between lo and hi bounds.
13780while test "x$ac_lo" != "x$ac_hi"; do
13781 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13782 cat >conftest.$ac_ext <<_ACEOF
13783/* confdefs.h. */
13784_ACEOF
13785cat confdefs.h >>conftest.$ac_ext
13786cat >>conftest.$ac_ext <<_ACEOF
13787/* end confdefs.h. */
13788
13789#ifdef HAVE_SYS_TYPES_H
13790#include <sys/types.h>
13791#endif
13792#ifdef HAVE_TIME_H
13793#include <time.h>
13794#endif
13795
13796
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013797 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013798int
13799main ()
13800{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013802test_array [0] = 0
13803
13804 ;
13805 return 0;
13806}
13807_ACEOF
13808rm -f conftest.$ac_objext
13809if { (ac_try="$ac_compile"
13810case "(($ac_try" in
13811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13812 *) ac_try_echo=$ac_try;;
13813esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013815 (eval "$ac_compile") 2>conftest.er1
13816 ac_status=$?
13817 grep -v '^ *+' conftest.er1 >conftest.err
13818 rm -f conftest.er1
13819 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013821 (exit $ac_status); } && {
13822 test -z "$ac_c_werror_flag" ||
13823 test ! -s conftest.err
13824 } && test -s conftest.$ac_objext; then
13825 ac_hi=$ac_mid
13826else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013827 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013828sed 's/^/| /' conftest.$ac_ext >&5
13829
13830 ac_lo=`expr '(' $ac_mid ')' + 1`
13831fi
13832
13833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13834done
13835case $ac_lo in
13836?*) ac_cv_sizeof_time_t=$ac_lo;;
13837'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013838 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013839See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013840echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013841See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013842 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013843 else
13844 ac_cv_sizeof_time_t=0
13845 fi ;;
13846esac
13847else
13848 cat >conftest.$ac_ext <<_ACEOF
13849/* confdefs.h. */
13850_ACEOF
13851cat confdefs.h >>conftest.$ac_ext
13852cat >>conftest.$ac_ext <<_ACEOF
13853/* end confdefs.h. */
13854
13855#ifdef HAVE_SYS_TYPES_H
13856#include <sys/types.h>
13857#endif
13858#ifdef HAVE_TIME_H
13859#include <time.h>
13860#endif
13861
13862
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013863 typedef time_t ac__type_sizeof_;
13864static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13865static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013866#include <stdio.h>
13867#include <stdlib.h>
13868int
13869main ()
13870{
13871
13872 FILE *f = fopen ("conftest.val", "w");
13873 if (! f)
13874 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013875 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013876 {
13877 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013878 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013879 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013880 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013881 }
13882 else
13883 {
13884 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013885 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013886 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013887 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013888 }
13889 return ferror (f) || fclose (f) != 0;
13890
13891 ;
13892 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013893}
Martin v. Löwis11437992002-04-12 09:54:03 +000013894_ACEOF
13895rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013896if { (ac_try="$ac_link"
13897case "(($ac_try" in
13898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13899 *) ac_try_echo=$ac_try;;
13900esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906 { (case "(($ac_try" in
13907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13908 *) ac_try_echo=$ac_try;;
13909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013915 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013916else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013917 echo "$as_me: program exited with status $ac_status" >&5
13918echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013919sed 's/^/| /' conftest.$ac_ext >&5
13920
Martin v. Löwis11437992002-04-12 09:54:03 +000013921( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013922if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013923 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013924See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013925echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013926See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013927 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013928 else
13929 ac_cv_sizeof_time_t=0
13930 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932rm -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 +000013933fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013934rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013935fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013936{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13937echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013938
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013939
13940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013942#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013943_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013944
Michael W. Hudson54241132001-12-07 15:38:26 +000013945
13946
Trent Mick635f6fb2000-08-23 21:33:05 +000013947# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013948ac_save_cc="$CC"
13949if test "$ac_cv_kpthread" = "yes"
13950then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013951elif test "$ac_cv_kthread" = "yes"
13952then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013953elif test "$ac_cv_pthread" = "yes"
13954then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013955fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013956
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013957{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13958echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013959have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013961/* confdefs.h. */
13962_ACEOF
13963cat confdefs.h >>conftest.$ac_ext
13964cat >>conftest.$ac_ext <<_ACEOF
13965/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013966#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013967int
13968main ()
13969{
Guido van Rossum12580492000-09-24 16:47:19 +000013970pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 ;
13972 return 0;
13973}
13974_ACEOF
13975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013976if { (ac_try="$ac_compile"
13977case "(($ac_try" in
13978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13979 *) ac_try_echo=$ac_try;;
13980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013984 grep -v '^ *+' conftest.er1 >conftest.err
13985 rm -f conftest.er1
13986 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013988 (exit $ac_status); } && {
13989 test -z "$ac_c_werror_flag" ||
13990 test ! -s conftest.err
13991 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013992 have_pthread_t=yes
13993else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013995sed 's/^/| /' conftest.$ac_ext >&5
13996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013997
Trent Mick635f6fb2000-08-23 21:33:05 +000013998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013999
14000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014001{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14002echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014003if test "$have_pthread_t" = yes ; then
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; }
14006if test "${ac_cv_type_pthread_t+set}" = set; then
14007 echo $ECHO_N "(cached) $ECHO_C" >&6
14008else
14009 cat >conftest.$ac_ext <<_ACEOF
14010/* confdefs.h. */
14011_ACEOF
14012cat confdefs.h >>conftest.$ac_ext
14013cat >>conftest.$ac_ext <<_ACEOF
14014/* end confdefs.h. */
14015
14016#ifdef HAVE_PTHREAD_H
14017#include <pthread.h>
14018#endif
14019
14020
14021typedef pthread_t ac__type_new_;
14022int
14023main ()
14024{
14025if ((ac__type_new_ *) 0)
14026 return 0;
14027if (sizeof (ac__type_new_))
14028 return 0;
14029 ;
14030 return 0;
14031}
14032_ACEOF
14033rm -f conftest.$ac_objext
14034if { (ac_try="$ac_compile"
14035case "(($ac_try" in
14036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14037 *) ac_try_echo=$ac_try;;
14038esac
14039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14040 (eval "$ac_compile") 2>conftest.er1
14041 ac_status=$?
14042 grep -v '^ *+' conftest.er1 >conftest.err
14043 rm -f conftest.er1
14044 cat conftest.err >&5
14045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14046 (exit $ac_status); } && {
14047 test -z "$ac_c_werror_flag" ||
14048 test ! -s conftest.err
14049 } && test -s conftest.$ac_objext; then
14050 ac_cv_type_pthread_t=yes
14051else
14052 echo "$as_me: failed program was:" >&5
14053sed 's/^/| /' conftest.$ac_ext >&5
14054
14055 ac_cv_type_pthread_t=no
14056fi
14057
14058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14059fi
14060{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14061echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14062
14063# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14066# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014067{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14068echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014069if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014070 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014071else
14072 if test "$cross_compiling" = yes; then
14073 # Depending upon the size, compute the lo and hi bounds.
14074cat >conftest.$ac_ext <<_ACEOF
14075/* confdefs.h. */
14076_ACEOF
14077cat confdefs.h >>conftest.$ac_ext
14078cat >>conftest.$ac_ext <<_ACEOF
14079/* end confdefs.h. */
14080
14081#ifdef HAVE_PTHREAD_H
14082#include <pthread.h>
14083#endif
14084
14085
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014086 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014087int
14088main ()
14089{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014090static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014091test_array [0] = 0
14092
14093 ;
14094 return 0;
14095}
14096_ACEOF
14097rm -f conftest.$ac_objext
14098if { (ac_try="$ac_compile"
14099case "(($ac_try" in
14100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14101 *) ac_try_echo=$ac_try;;
14102esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014104 (eval "$ac_compile") 2>conftest.er1
14105 ac_status=$?
14106 grep -v '^ *+' conftest.er1 >conftest.err
14107 rm -f conftest.er1
14108 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014110 (exit $ac_status); } && {
14111 test -z "$ac_c_werror_flag" ||
14112 test ! -s conftest.err
14113 } && test -s conftest.$ac_objext; then
14114 ac_lo=0 ac_mid=0
14115 while :; do
14116 cat >conftest.$ac_ext <<_ACEOF
14117/* confdefs.h. */
14118_ACEOF
14119cat confdefs.h >>conftest.$ac_ext
14120cat >>conftest.$ac_ext <<_ACEOF
14121/* end confdefs.h. */
14122
14123#ifdef HAVE_PTHREAD_H
14124#include <pthread.h>
14125#endif
14126
14127
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014128 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014129int
14130main ()
14131{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014132static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014133test_array [0] = 0
14134
14135 ;
14136 return 0;
14137}
14138_ACEOF
14139rm -f conftest.$ac_objext
14140if { (ac_try="$ac_compile"
14141case "(($ac_try" in
14142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14143 *) ac_try_echo=$ac_try;;
14144esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014146 (eval "$ac_compile") 2>conftest.er1
14147 ac_status=$?
14148 grep -v '^ *+' conftest.er1 >conftest.err
14149 rm -f conftest.er1
14150 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014152 (exit $ac_status); } && {
14153 test -z "$ac_c_werror_flag" ||
14154 test ! -s conftest.err
14155 } && test -s conftest.$ac_objext; then
14156 ac_hi=$ac_mid; break
14157else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014158 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014159sed 's/^/| /' conftest.$ac_ext >&5
14160
14161 ac_lo=`expr $ac_mid + 1`
14162 if test $ac_lo -le $ac_mid; then
14163 ac_lo= ac_hi=
14164 break
14165 fi
14166 ac_mid=`expr 2 '*' $ac_mid + 1`
14167fi
14168
14169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14170 done
14171else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014172 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014173sed 's/^/| /' conftest.$ac_ext >&5
14174
14175 cat >conftest.$ac_ext <<_ACEOF
14176/* confdefs.h. */
14177_ACEOF
14178cat confdefs.h >>conftest.$ac_ext
14179cat >>conftest.$ac_ext <<_ACEOF
14180/* end confdefs.h. */
14181
14182#ifdef HAVE_PTHREAD_H
14183#include <pthread.h>
14184#endif
14185
14186
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014187 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014188int
14189main ()
14190{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014192test_array [0] = 0
14193
14194 ;
14195 return 0;
14196}
14197_ACEOF
14198rm -f conftest.$ac_objext
14199if { (ac_try="$ac_compile"
14200case "(($ac_try" in
14201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14202 *) ac_try_echo=$ac_try;;
14203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014205 (eval "$ac_compile") 2>conftest.er1
14206 ac_status=$?
14207 grep -v '^ *+' conftest.er1 >conftest.err
14208 rm -f conftest.er1
14209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014211 (exit $ac_status); } && {
14212 test -z "$ac_c_werror_flag" ||
14213 test ! -s conftest.err
14214 } && test -s conftest.$ac_objext; then
14215 ac_hi=-1 ac_mid=-1
14216 while :; do
14217 cat >conftest.$ac_ext <<_ACEOF
14218/* confdefs.h. */
14219_ACEOF
14220cat confdefs.h >>conftest.$ac_ext
14221cat >>conftest.$ac_ext <<_ACEOF
14222/* end confdefs.h. */
14223
14224#ifdef HAVE_PTHREAD_H
14225#include <pthread.h>
14226#endif
14227
14228
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014229 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014230int
14231main ()
14232{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014234test_array [0] = 0
14235
14236 ;
14237 return 0;
14238}
14239_ACEOF
14240rm -f conftest.$ac_objext
14241if { (ac_try="$ac_compile"
14242case "(($ac_try" in
14243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14244 *) ac_try_echo=$ac_try;;
14245esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247 (eval "$ac_compile") 2>conftest.er1
14248 ac_status=$?
14249 grep -v '^ *+' conftest.er1 >conftest.err
14250 rm -f conftest.er1
14251 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014253 (exit $ac_status); } && {
14254 test -z "$ac_c_werror_flag" ||
14255 test ! -s conftest.err
14256 } && test -s conftest.$ac_objext; then
14257 ac_lo=$ac_mid; break
14258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014259 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014260sed 's/^/| /' conftest.$ac_ext >&5
14261
14262 ac_hi=`expr '(' $ac_mid ')' - 1`
14263 if test $ac_mid -le $ac_hi; then
14264 ac_lo= ac_hi=
14265 break
14266 fi
14267 ac_mid=`expr 2 '*' $ac_mid`
14268fi
14269
14270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14271 done
14272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014273 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014274sed 's/^/| /' conftest.$ac_ext >&5
14275
14276 ac_lo= ac_hi=
14277fi
14278
14279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14280fi
14281
14282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14283# Binary search between lo and hi bounds.
14284while test "x$ac_lo" != "x$ac_hi"; do
14285 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14286 cat >conftest.$ac_ext <<_ACEOF
14287/* confdefs.h. */
14288_ACEOF
14289cat confdefs.h >>conftest.$ac_ext
14290cat >>conftest.$ac_ext <<_ACEOF
14291/* end confdefs.h. */
14292
14293#ifdef HAVE_PTHREAD_H
14294#include <pthread.h>
14295#endif
14296
14297
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014298 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014299int
14300main ()
14301{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014303test_array [0] = 0
14304
14305 ;
14306 return 0;
14307}
14308_ACEOF
14309rm -f conftest.$ac_objext
14310if { (ac_try="$ac_compile"
14311case "(($ac_try" in
14312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14313 *) ac_try_echo=$ac_try;;
14314esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014316 (eval "$ac_compile") 2>conftest.er1
14317 ac_status=$?
14318 grep -v '^ *+' conftest.er1 >conftest.err
14319 rm -f conftest.er1
14320 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014322 (exit $ac_status); } && {
14323 test -z "$ac_c_werror_flag" ||
14324 test ! -s conftest.err
14325 } && test -s conftest.$ac_objext; then
14326 ac_hi=$ac_mid
14327else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014328 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014329sed 's/^/| /' conftest.$ac_ext >&5
14330
14331 ac_lo=`expr '(' $ac_mid ')' + 1`
14332fi
14333
14334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14335done
14336case $ac_lo in
14337?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14338'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014339 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014340See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014341echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014342See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014343 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014344 else
14345 ac_cv_sizeof_pthread_t=0
14346 fi ;;
14347esac
14348else
14349 cat >conftest.$ac_ext <<_ACEOF
14350/* confdefs.h. */
14351_ACEOF
14352cat confdefs.h >>conftest.$ac_ext
14353cat >>conftest.$ac_ext <<_ACEOF
14354/* end confdefs.h. */
14355
14356#ifdef HAVE_PTHREAD_H
14357#include <pthread.h>
14358#endif
14359
14360
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014361 typedef pthread_t ac__type_sizeof_;
14362static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14363static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014364#include <stdio.h>
14365#include <stdlib.h>
14366int
14367main ()
14368{
14369
14370 FILE *f = fopen ("conftest.val", "w");
14371 if (! f)
14372 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014373 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014374 {
14375 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014376 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014377 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014378 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014379 }
14380 else
14381 {
14382 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014383 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014384 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014385 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014386 }
14387 return ferror (f) || fclose (f) != 0;
14388
14389 ;
14390 return 0;
14391}
Martin v. Löwis11437992002-04-12 09:54:03 +000014392_ACEOF
14393rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014394if { (ac_try="$ac_link"
14395case "(($ac_try" in
14396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14397 *) ac_try_echo=$ac_try;;
14398esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404 { (case "(($ac_try" in
14405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14406 *) ac_try_echo=$ac_try;;
14407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014413 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014415 echo "$as_me: program exited with status $ac_status" >&5
14416echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014417sed 's/^/| /' conftest.$ac_ext >&5
14418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014420if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014421 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014422See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014423echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014424See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014425 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014426 else
14427 ac_cv_sizeof_pthread_t=0
14428 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430rm -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 +000014431fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014432rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014433fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014434{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14435echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014437
14438
Martin v. Löwis11437992002-04-12 09:54:03 +000014439cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014440#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014441_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014442
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014443
Trent Mick635f6fb2000-08-23 21:33:05 +000014444fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014445CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014446
Michael W. Hudson54241132001-12-07 15:38:26 +000014447
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014448case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014449 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014450 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14451 ;;
14452 Darwin/*)
14453 OTHER_LIBTOOL_OPT=""
14454 ;;
14455esac
14456
14457
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014458ARCH_RUN_32BIT=""
14459
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014460case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014461 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014462 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14463 if test "${enable_universalsdk}"; then
14464 :
14465 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014466 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014467 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014468 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014469 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014470 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000014471 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014472 if test ${gcc_version} '<' 4.0
14473 then
14474 LIBTOOL_CRUFT="-lcc_dynamic"
14475 else
14476 LIBTOOL_CRUFT=""
14477 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014478 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014479 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014480else
14481 cat >conftest.$ac_ext <<_ACEOF
14482/* confdefs.h. */
14483_ACEOF
14484cat confdefs.h >>conftest.$ac_ext
14485cat >>conftest.$ac_ext <<_ACEOF
14486/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014487
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014488 #include <unistd.h>
14489 int main(int argc, char*argv[])
14490 {
14491 if (sizeof(long) == 4) {
14492 return 0;
14493 } else {
14494 return 1;
14495 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014496 }
14497
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014498_ACEOF
14499rm -f conftest$ac_exeext
14500if { (ac_try="$ac_link"
14501case "(($ac_try" in
14502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14503 *) ac_try_echo=$ac_try;;
14504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014506 (eval "$ac_link") 2>&5
14507 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014509 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14510 { (case "(($ac_try" in
14511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14512 *) ac_try_echo=$ac_try;;
14513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014515 (eval "$ac_try") 2>&5
14516 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014518 (exit $ac_status); }; }; then
14519 ac_osx_32bit=yes
14520else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014521 echo "$as_me: program exited with status $ac_status" >&5
14522echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014523sed 's/^/| /' conftest.$ac_ext >&5
14524
14525( exit $ac_status )
14526ac_osx_32bit=no
14527fi
14528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14529fi
14530
14531
14532
14533 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014534 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014535 i386)
14536 MACOSX_DEFAULT_ARCH="i386"
14537 ;;
14538 ppc)
14539 MACOSX_DEFAULT_ARCH="ppc"
14540 ;;
14541 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014542 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14543echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014544 { (exit 1); exit 1; }; }
14545 ;;
14546 esac
14547 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014548 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014549 i386)
14550 MACOSX_DEFAULT_ARCH="x86_64"
14551 ;;
14552 ppc)
14553 MACOSX_DEFAULT_ARCH="ppc64"
14554 ;;
14555 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014556 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14557echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014558 { (exit 1); exit 1; }; }
14559 ;;
14560 esac
14561
14562 #ARCH_RUN_32BIT="true"
14563 fi
14564
14565 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014566 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014567 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014568esac
14569
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014570{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14571echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014572if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014573then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014574 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014576 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014577
Martin v. Löwis11437992002-04-12 09:54:03 +000014578cat >>confdefs.h <<\_ACEOF
14579#define WITH_NEXT_FRAMEWORK 1
14580_ACEOF
14581
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014582 { echo "$as_me:$LINENO: result: yes" >&5
14583echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014584 if test $enable_shared = "yes"
14585 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014586 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14587echo "$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 +000014588 { (exit 1); exit 1; }; }
14589 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014591 { echo "$as_me:$LINENO: result: no" >&5
14592echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014593fi
14594
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014595{ echo "$as_me:$LINENO: checking for dyld" >&5
14596echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014597case $ac_sys_system/$ac_sys_release in
14598 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600cat >>confdefs.h <<\_ACEOF
14601#define WITH_DYLD 1
14602_ACEOF
14603
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014604 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14605echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014606 ;;
14607 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014608 { echo "$as_me:$LINENO: result: no" >&5
14609echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014610 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014611esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014612
Guido van Rossum0a516c91994-09-12 10:58:40 +000014613# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014614
Michael W. Hudson54241132001-12-07 15:38:26 +000014615
14616
14617
14618
Guido van Rossum0a516c91994-09-12 10:58:40 +000014619# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014620# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014621{ echo "$as_me:$LINENO: checking SO" >&5
14622echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014623if test -z "$SO"
14624then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014625 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014626 hp*|HP*)
14627 case `uname -m` in
14628 ia64) SO=.so;;
14629 *) SO=.sl;;
14630 esac
14631 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014632 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014633 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014634 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014635else
14636 # this might also be a termcap variable, see #610332
14637 echo
14638 echo '====================================================================='
14639 echo '+ +'
14640 echo '+ WARNING: You have set SO in your environment. +'
14641 echo '+ Do you really mean to change the extension for shared libraries? +'
14642 echo '+ Continuing in 10 seconds to let you to ponder. +'
14643 echo '+ +'
14644 echo '====================================================================='
14645 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014646fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014647{ echo "$as_me:$LINENO: result: $SO" >&5
14648echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014649
Georg Brandlb1441c72009-01-03 22:33:39 +000014650
Thomas Wouters477c8d52006-05-27 19:21:47 +000014651cat >>confdefs.h <<_ACEOF
14652#define SHLIB_EXT "$SO"
14653_ACEOF
14654
Guido van Rossum0a516c91994-09-12 10:58:40 +000014655# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014656# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014657# (Shared libraries in this instance are shared modules to be loaded into
14658# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014659{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14660echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014661if test -z "$LDSHARED"
14662then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014663 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014664 AIX*)
14665 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014666 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014667 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014668 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014669 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014670 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014671 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014672 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014673 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014674 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014675 hp*|HP*)
14676 if test "$GCC" = "yes"
14677 then LDSHARED='$(CC) -shared'
14678 else LDSHARED='ld -b';
14679 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014680 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014681 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014682 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14683 if test "$enable_framework" ; then
14684 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014685 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14686 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014687 else
14688 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014689 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014690 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014691 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014692 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14693 if test "$enable_framework" ; then
14694 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014695 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14696 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014697 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014698 # No framework, use the Python app as bundle-loader
14699 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014700 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014701 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014702 Darwin/*)
14703 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14704 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014705
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014706 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014707 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014708 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014709 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014710 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014711 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14712 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014713 else
14714 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14715 if test "$enable_framework" ; then
14716 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014717 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14718 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014719 else
14720 # No framework, use the Python app as bundle-loader
14721 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14722 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14723 fi
14724 fi
14725 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014726 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014727 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014728 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014729 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014730 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014731 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014732 else
14733 LDSHARED="ld -Bshareable ${LDFLAGS}"
14734 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014735 OpenBSD*)
14736 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14737 then
14738 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14739 else
14740 case `uname -r` in
14741 [01].* | 2.[0-7] | 2.[0-7].*)
14742 LDSHARED="ld -Bshareable ${LDFLAGS}"
14743 ;;
14744 *)
14745 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14746 ;;
14747 esac
14748 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014749 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014750 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014751 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014752 then LDSHARED='$(CC) -shared'
14753 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014754 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014755 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014756 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014757 *) LDSHARED="ld";;
14758 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014759fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014760{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14761echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014762BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014763# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014764# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014765{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14766echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014767if test -z "$CCSHARED"
14768then
Guido van Rossum07397971997-04-29 21:49:50 +000014769 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014770 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014771 then CCSHARED="-fPIC";
14772 elif test `uname -p` = sparc;
14773 then CCSHARED="-xcode=pic32";
14774 else CCSHARED="-Kpic";
14775 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014776 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014777 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014778 else CCSHARED="+z";
14779 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014780 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014781 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014782 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014783 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014784 if test "$GCC" = "yes"
14785 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014786 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014787 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014788 SCO_SV*)
14789 if test "$GCC" = "yes"
14790 then CCSHARED="-fPIC"
14791 else CCSHARED="-Kpic -belf"
14792 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014793 IRIX*/6*) case $CC in
14794 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014795 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014796 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014797 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014798fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014799{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14800echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014801# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014802# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014803{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14804echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014805if test -z "$LINKFORSHARED"
14806then
Guido van Rossum07397971997-04-29 21:49:50 +000014807 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014808 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014809 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014810 LINKFORSHARED="-Wl,-E -Wl,+s";;
14811# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014812 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014813 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014814 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014816 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014817 if test "$enable_framework"
14818 then
Jack Jansenda49e192005-01-07 13:08:22 +000014819 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014820 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014821 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014822 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014823 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014824 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014825 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014826 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14827 then
14828 LINKFORSHARED="-Wl,--export-dynamic"
14829 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014830 SunOS/5*) case $CC in
14831 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014832 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014833 then
14834 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014835 fi;;
14836 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014837 CYGWIN*)
14838 if test $enable_shared = "no"
14839 then
14840 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14841 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014842 QNX*)
14843 # -Wl,-E causes the symbols to be added to the dynamic
14844 # symbol table so that they can be found when a module
14845 # is loaded. -N 2048K causes the stack size to be set
14846 # to 2048 kilobytes so that the stack doesn't overflow
14847 # when running test_compile.py.
14848 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014849 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014850fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014851{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14852echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014853
Michael W. Hudson54241132001-12-07 15:38:26 +000014854
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014855
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014856{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14857echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014858if test ! "$LIBRARY" = "$LDLIBRARY"
14859then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014860 case $ac_sys_system in
14861 CYGWIN*)
14862 # Cygwin needs CCSHARED when building extension DLLs
14863 # but not when building the interpreter DLL.
14864 CFLAGSFORSHARED='';;
14865 *)
14866 CFLAGSFORSHARED='$(CCSHARED)'
14867 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014868fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014869{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14870echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014871
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014872# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14873# library (with --enable-shared).
14874# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014875# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14876# if it is not required, since it creates a dependency of the shared library
14877# to LIBS. This, in turn, means that applications linking the shared libpython
14878# don't need to link LIBS explicitly. The default should be only changed
14879# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014880
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014881{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14882echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014883case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014884 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014885 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014887{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14888echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014889
14890
Guido van Rossum627b2d71993-12-24 10:39:16 +000014891# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014892
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014893{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14894echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014895if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014896 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014897else
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014899LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014900cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014901/* confdefs.h. */
14902_ACEOF
14903cat confdefs.h >>conftest.$ac_ext
14904cat >>conftest.$ac_ext <<_ACEOF
14905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907/* Override any GCC internal prototype to avoid an error.
14908 Use char because int might match the return type of a GCC
14909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014910#ifdef __cplusplus
14911extern "C"
14912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014913char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014914int
14915main ()
14916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014918 ;
14919 return 0;
14920}
14921_ACEOF
14922rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923if { (ac_try="$ac_link"
14924case "(($ac_try" in
14925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14926 *) ac_try_echo=$ac_try;;
14927esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014931 grep -v '^ *+' conftest.er1 >conftest.err
14932 rm -f conftest.er1
14933 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935 (exit $ac_status); } && {
14936 test -z "$ac_c_werror_flag" ||
14937 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014938 } && test -s conftest$ac_exeext &&
14939 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014940 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014941else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014943sed 's/^/| /' conftest.$ac_ext >&5
14944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947
14948rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014949 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014950LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014951fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014952{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14953echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14954if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 cat >>confdefs.h <<_ACEOF
14956#define HAVE_LIBDL 1
14957_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014958
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014959 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014960
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014961fi
14962 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014964{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14965echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014966if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014967 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014968else
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014970LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014971cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014972/* confdefs.h. */
14973_ACEOF
14974cat confdefs.h >>conftest.$ac_ext
14975cat >>conftest.$ac_ext <<_ACEOF
14976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978/* Override any GCC internal prototype to avoid an error.
14979 Use char because int might match the return type of a GCC
14980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014981#ifdef __cplusplus
14982extern "C"
14983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014984char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014985int
14986main ()
14987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014988return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014989 ;
14990 return 0;
14991}
14992_ACEOF
14993rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994if { (ac_try="$ac_link"
14995case "(($ac_try" in
14996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14997 *) ac_try_echo=$ac_try;;
14998esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015002 grep -v '^ *+' conftest.er1 >conftest.err
15003 rm -f conftest.er1
15004 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 (exit $ac_status); } && {
15007 test -z "$ac_c_werror_flag" ||
15008 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015009 } && test -s conftest$ac_exeext &&
15010 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015012else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015014sed 's/^/| /' conftest.$ac_ext >&5
15015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018
15019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015021LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015022fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015023{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15024echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15025if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 cat >>confdefs.h <<_ACEOF
15027#define HAVE_LIBDLD 1
15028_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015029
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015030 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015031
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015032fi
15033 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015034
Georg Brandlb1441c72009-01-03 22:33:39 +000015035# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015036if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015037 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15038echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015039if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015040 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015041else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015042 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015043cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015044/* confdefs.h. */
15045_ACEOF
15046cat confdefs.h >>conftest.$ac_ext
15047cat >>conftest.$ac_ext <<_ACEOF
15048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015050/* Override any GCC internal prototype to avoid an error.
15051 Use char because int might match the return type of a GCC
15052 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015053#ifdef __cplusplus
15054extern "C"
15055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015056char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015057int
15058main ()
15059{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015061 ;
15062 return 0;
15063}
15064_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065for ac_lib in '' pthread rt posix4; do
15066 if test -z "$ac_lib"; then
15067 ac_res="none required"
15068 else
15069 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015070 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071 fi
15072 rm -f conftest.$ac_objext conftest$ac_exeext
15073if { (ac_try="$ac_link"
15074case "(($ac_try" in
15075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15076 *) ac_try_echo=$ac_try;;
15077esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015080 ac_status=$?
15081 grep -v '^ *+' conftest.er1 >conftest.err
15082 rm -f conftest.er1
15083 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085 (exit $ac_status); } && {
15086 test -z "$ac_c_werror_flag" ||
15087 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015088 } && test -s conftest$ac_exeext &&
15089 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015091else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015092 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015093sed 's/^/| /' conftest.$ac_ext >&5
15094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095
Thomas Wouters477c8d52006-05-27 19:21:47 +000015096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097
15098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15099 conftest$ac_exeext
15100 if test "${ac_cv_search_sem_init+set}" = set; then
15101 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103done
15104if test "${ac_cv_search_sem_init+set}" = set; then
15105 :
15106else
15107 ac_cv_search_sem_init=no
15108fi
15109rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015110LIBS=$ac_func_search_save_LIBS
15111fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015112{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15113echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114ac_res=$ac_cv_search_sem_init
15115if test "$ac_res" != no; then
15116 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015117
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015118fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015119 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015120 # posix4 on Solaris 2.6
15121 # pthread (first!) on Linux
15122fi
15123
Martin v. Löwis19d17342003-06-14 21:03:05 +000015124# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015125{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15126echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015127if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015128 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015129else
15130 ac_check_lib_save_LIBS=$LIBS
15131LIBS="-lintl $LIBS"
15132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015133/* confdefs.h. */
15134_ACEOF
15135cat confdefs.h >>conftest.$ac_ext
15136cat >>conftest.$ac_ext <<_ACEOF
15137/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139/* Override any GCC internal prototype to avoid an error.
15140 Use char because int might match the return type of a GCC
15141 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015142#ifdef __cplusplus
15143extern "C"
15144#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015145char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015146int
15147main ()
15148{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015150 ;
15151 return 0;
15152}
15153_ACEOF
15154rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155if { (ac_try="$ac_link"
15156case "(($ac_try" in
15157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15158 *) ac_try_echo=$ac_try;;
15159esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015163 grep -v '^ *+' conftest.er1 >conftest.err
15164 rm -f conftest.er1
15165 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015167 (exit $ac_status); } && {
15168 test -z "$ac_c_werror_flag" ||
15169 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015170 } && test -s conftest$ac_exeext &&
15171 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015172 ac_cv_lib_intl_textdomain=yes
15173else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015175sed 's/^/| /' conftest.$ac_ext >&5
15176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179
15180rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015181 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015182LIBS=$ac_check_lib_save_LIBS
15183fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015184{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15185echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15186if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015187
15188cat >>confdefs.h <<\_ACEOF
15189#define WITH_LIBINTL 1
15190_ACEOF
15191
Brett Cannonc6d936e2009-06-07 20:09:53 +000015192 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193fi
15194
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015195
15196# checks for system dependent C++ extensions support
15197case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015198 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15199echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015201/* confdefs.h. */
15202_ACEOF
15203cat confdefs.h >>conftest.$ac_ext
15204cat >>conftest.$ac_ext <<_ACEOF
15205/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015206#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015207int
15208main ()
15209{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015210loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 ;
15212 return 0;
15213}
15214_ACEOF
15215rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216if { (ac_try="$ac_link"
15217case "(($ac_try" in
15218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15219 *) ac_try_echo=$ac_try;;
15220esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015224 grep -v '^ *+' conftest.er1 >conftest.err
15225 rm -f conftest.er1
15226 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228 (exit $ac_status); } && {
15229 test -z "$ac_c_werror_flag" ||
15230 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015231 } && test -s conftest$ac_exeext &&
15232 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015233
Martin v. Löwis11437992002-04-12 09:54:03 +000015234cat >>confdefs.h <<\_ACEOF
15235#define AIX_GENUINE_CPLUSPLUS 1
15236_ACEOF
15237
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015238 { echo "$as_me:$LINENO: result: yes" >&5
15239echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015242sed 's/^/| /' conftest.$ac_ext >&5
15243
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015244 { echo "$as_me:$LINENO: result: no" >&5
15245echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247
15248rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015249 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015250 *) ;;
15251esac
15252
Guido van Rossum70c7f481998-03-26 18:44:10 +000015253# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015254{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15255echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015256if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015258else
Martin v. Löwis11437992002-04-12 09:54:03 +000015259 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015260LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015262/* confdefs.h. */
15263_ACEOF
15264cat confdefs.h >>conftest.$ac_ext
15265cat >>conftest.$ac_ext <<_ACEOF
15266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268/* Override any GCC internal prototype to avoid an error.
15269 Use char because int might match the return type of a GCC
15270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015271#ifdef __cplusplus
15272extern "C"
15273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015274char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015275int
15276main ()
15277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 ;
15280 return 0;
15281}
15282_ACEOF
15283rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015284if { (ac_try="$ac_link"
15285case "(($ac_try" in
15286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15287 *) ac_try_echo=$ac_try;;
15288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015292 grep -v '^ *+' conftest.er1 >conftest.err
15293 rm -f conftest.er1
15294 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296 (exit $ac_status); } && {
15297 test -z "$ac_c_werror_flag" ||
15298 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015299 } && test -s conftest$ac_exeext &&
15300 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015304sed 's/^/| /' conftest.$ac_ext >&5
15305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308
15309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015311LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015312fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015313{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15314echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15315if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015316 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015317fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015318 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015319{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15320echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015321if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015323else
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015325LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015327/* confdefs.h. */
15328_ACEOF
15329cat confdefs.h >>conftest.$ac_ext
15330cat >>conftest.$ac_ext <<_ACEOF
15331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333/* Override any GCC internal prototype to avoid an error.
15334 Use char because int might match the return type of a GCC
15335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015336#ifdef __cplusplus
15337extern "C"
15338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015339char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015340int
15341main ()
15342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 ;
15345 return 0;
15346}
15347_ACEOF
15348rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349if { (ac_try="$ac_link"
15350case "(($ac_try" in
15351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15352 *) ac_try_echo=$ac_try;;
15353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357 grep -v '^ *+' conftest.er1 >conftest.err
15358 rm -f conftest.er1
15359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361 (exit $ac_status); } && {
15362 test -z "$ac_c_werror_flag" ||
15363 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015364 } && test -s conftest$ac_exeext &&
15365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015369sed 's/^/| /' conftest.$ac_ext >&5
15370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373
15374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015376LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015377fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015378{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15379echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15380if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015381 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015382fi
15383 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015384
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015385{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15386echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015389if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015391{ echo "$as_me:$LINENO: result: $withval" >&5
15392echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015393LIBS="$withval $LIBS"
15394
15395else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015396 { echo "$as_me:$LINENO: result: no" >&5
15397echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398fi
15399
Guido van Rossum7f43da71994-08-01 12:15:30 +000015400
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015401if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000015402 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15403set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15404{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15405echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15406if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15407 echo $ECHO_N "(cached) $ECHO_C" >&6
15408else
15409 case $PKG_CONFIG in
15410 [\\/]* | ?:[\\/]*)
15411 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15412 ;;
15413 *)
15414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15415for as_dir in $PATH
15416do
15417 IFS=$as_save_IFS
15418 test -z "$as_dir" && as_dir=.
15419 for ac_exec_ext in '' $ac_executable_extensions; do
15420 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15421 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15422 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15423 break 2
15424 fi
15425done
15426done
15427IFS=$as_save_IFS
15428
15429 ;;
15430esac
15431fi
15432PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15433if test -n "$PKG_CONFIG"; then
15434 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15435echo "${ECHO_T}$PKG_CONFIG" >&6; }
15436else
15437 { echo "$as_me:$LINENO: result: no" >&5
15438echo "${ECHO_T}no" >&6; }
15439fi
15440
15441
15442fi
15443if test -z "$ac_cv_path_PKG_CONFIG"; then
15444 ac_pt_PKG_CONFIG=$PKG_CONFIG
15445 # Extract the first word of "pkg-config", so it can be a program name with args.
15446set dummy pkg-config; ac_word=$2
15447{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15448echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15449if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15450 echo $ECHO_N "(cached) $ECHO_C" >&6
15451else
15452 case $ac_pt_PKG_CONFIG in
15453 [\\/]* | ?:[\\/]*)
15454 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15455 ;;
15456 *)
15457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15458for as_dir in $PATH
15459do
15460 IFS=$as_save_IFS
15461 test -z "$as_dir" && as_dir=.
15462 for ac_exec_ext in '' $ac_executable_extensions; do
15463 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15464 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15465 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15466 break 2
15467 fi
15468done
15469done
15470IFS=$as_save_IFS
15471
15472 ;;
15473esac
15474fi
15475ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15476if test -n "$ac_pt_PKG_CONFIG"; then
15477 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15478echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15479else
15480 { echo "$as_me:$LINENO: result: no" >&5
15481echo "${ECHO_T}no" >&6; }
15482fi
15483
15484 if test "x$ac_pt_PKG_CONFIG" = x; then
15485 PKG_CONFIG=""
15486 else
15487 case $cross_compiling:$ac_tool_warned in
15488yes:)
15489{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15490whose name does not start with the host triplet. If you think this
15491configuration is useful to you, please write to autoconf@gnu.org." >&5
15492echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15493whose name does not start with the host triplet. If you think this
15494configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15495ac_tool_warned=yes ;;
15496esac
15497 PKG_CONFIG=$ac_pt_PKG_CONFIG
15498 fi
15499else
15500 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15501fi
15502
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015503
15504# Check for use of the system expat library
15505{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15506echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15507
15508# Check whether --with-system_expat was given.
15509if test "${with_system_expat+set}" = set; then
15510 withval=$with_system_expat;
15511fi
15512
15513
15514{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15515echo "${ECHO_T}$with_system_expat" >&6; }
15516
15517# Check for use of the system libffi library
15518{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15519echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15520
15521# Check whether --with-system_ffi was given.
15522if test "${with_system_ffi+set}" = set; then
15523 withval=$with_system_ffi;
15524fi
15525
15526
15527if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000015528 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15529else
15530 LIBFFI_INCLUDEDIR=""
15531fi
15532
15533
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015534{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15535echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015536
Matthias Klose55708cc2009-04-30 08:06:49 +000015537# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015538{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15539echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015540
15541# Check whether --with-dbmliborder was given.
15542if test "${with_dbmliborder+set}" = set; then
15543 withval=$with_dbmliborder;
15544if test x$with_dbmliborder = xyes
15545then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015546{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15547echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015548 { (exit 1); exit 1; }; }
15549else
15550 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15551 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15552 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015553 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15554echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015555 { (exit 1); exit 1; }; }
15556 fi
15557 done
15558fi
15559fi
15560
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015561{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15562echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015563
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015564# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015565
15566
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015567{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15568echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015570# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015571if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015572 withval=$with_signal_module;
15573fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015574
15575
15576if test -z "$with_signal_module"
15577then with_signal_module="yes"
15578fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015579{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15580echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015581
15582if test "${with_signal_module}" = "yes"; then
15583 USE_SIGNAL_MODULE=""
15584 SIGNAL_OBJS=""
15585else
15586 USE_SIGNAL_MODULE="#"
15587 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15588fi
15589
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015590# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015591
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015592USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015593
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015594{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15595echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015596
Guido van Rossumec2f0731997-01-22 20:54:01 +000015597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015598# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015599if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015601{ echo "$as_me:$LINENO: result: $withval" >&5
15602echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015603LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015604if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015605 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015606fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015607else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015608 { echo "$as_me:$LINENO: result: no" >&5
15609echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015610fi
15611
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
15613# Templates for things AC_DEFINEd more than once.
15614# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015615
15616
Martin v. Löwis11437992002-04-12 09:54:03 +000015617
15618
15619
15620
15621
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015622{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15623echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015626if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627 withval=$with_threads;
15628fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015629
15630
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015631# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015634if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635 withval=$with_thread; with_threads=$with_thread
15636fi
15637
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015638
15639if test -z "$with_threads"
15640then with_threads="yes"
15641fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015642{ echo "$as_me:$LINENO: result: $with_threads" >&5
15643echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015644
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015645
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015646if test "$with_threads" = "no"
15647then
15648 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015649elif test "$ac_cv_pthread_is_default" = yes
15650then
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015652#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015653_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015654
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015655 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015657#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015658_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015659
15660 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015662elif test "$ac_cv_kpthread" = "yes"
15663then
15664 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015665 if test "$ac_cv_cxx_thread" = "yes"; then
15666 CXX="$CXX -Kpthread"
15667 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015669#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015670_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015671
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015672 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015673 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015674elif test "$ac_cv_kthread" = "yes"
15675then
15676 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015677 if test "$ac_cv_cxx_thread" = "yes"; then
15678 CXX="$CXX -Kthread"
15679 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015680 cat >>confdefs.h <<\_ACEOF
15681#define WITH_THREAD 1
15682_ACEOF
15683
15684 posix_threads=yes
15685 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015686elif test "$ac_cv_pthread" = "yes"
15687then
15688 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015689 if test "$ac_cv_cxx_thread" = "yes"; then
15690 CXX="$CXX -pthread"
15691 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015692 cat >>confdefs.h <<\_ACEOF
15693#define WITH_THREAD 1
15694_ACEOF
15695
15696 posix_threads=yes
15697 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015698else
15699 if test ! -z "$with_threads" -a -d "$with_threads"
15700 then LDFLAGS="$LDFLAGS -L$with_threads"
15701 fi
15702 if test ! -z "$withval" -a -d "$withval"
15703 then LDFLAGS="$LDFLAGS -L$withval"
15704 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015705
15706 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015707 # define _POSIX_THREADS in unistd.h. Some apparently don't
15708 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015709 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15710echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015712/* confdefs.h. */
15713_ACEOF
15714cat confdefs.h >>conftest.$ac_ext
15715cat >>conftest.$ac_ext <<_ACEOF
15716/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015717
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015718#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015719#ifdef _POSIX_THREADS
15720yes
15721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015722
15723_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015725 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015726 unistd_defines_pthreads=yes
15727else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015728 unistd_defines_pthreads=no
15729fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015730rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015731
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015732 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15733echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015734
Martin v. Löwis11437992002-04-12 09:54:03 +000015735 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015736#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015737_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015738
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015740 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15741echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015742if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015743 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015744fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015745{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15746echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015747else
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015749{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15750echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015751cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015752/* confdefs.h. */
15753_ACEOF
15754cat confdefs.h >>conftest.$ac_ext
15755cat >>conftest.$ac_ext <<_ACEOF
15756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015757$ac_includes_default
15758#include <cthreads.h>
15759_ACEOF
15760rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015761if { (ac_try="$ac_compile"
15762case "(($ac_try" in
15763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15764 *) ac_try_echo=$ac_try;;
15765esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015769 grep -v '^ *+' conftest.er1 >conftest.err
15770 rm -f conftest.er1
15771 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773 (exit $ac_status); } && {
15774 test -z "$ac_c_werror_flag" ||
15775 test ! -s conftest.err
15776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015777 ac_header_compiler=yes
15778else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015780sed 's/^/| /' conftest.$ac_ext >&5
15781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015782 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784
15785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015786{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15787echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015788
15789# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015790{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15791echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015793/* confdefs.h. */
15794_ACEOF
15795cat confdefs.h >>conftest.$ac_ext
15796cat >>conftest.$ac_ext <<_ACEOF
15797/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015798#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015799_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800if { (ac_try="$ac_cpp conftest.$ac_ext"
15801case "(($ac_try" in
15802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15803 *) ac_try_echo=$ac_try;;
15804esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015807 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015808 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015809 rm -f conftest.er1
15810 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812 (exit $ac_status); } >/dev/null && {
15813 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15814 test ! -s conftest.err
15815 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 ac_header_preproc=yes
15817else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015819sed 's/^/| /' conftest.$ac_ext >&5
15820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015823
Martin v. Löwis11437992002-04-12 09:54:03 +000015824rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015825{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15826echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015827
15828# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015829case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15830 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015831 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15832echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15833 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15834echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015835 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015836 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015837 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015838 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15839echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15840 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15841echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15842 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15843echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15844 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15845echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15846 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15847echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15848 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15849echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015851## -------------------------------------- ##
15852## Report this to http://bugs.python.org/ ##
15853## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015854_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015855 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015856 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015857esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015858{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15859echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015860if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015861 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015862else
15863 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015864fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015865{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15866echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015867
15868fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015869if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015871#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015872_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015873
Martin v. Löwis11437992002-04-12 09:54:03 +000015874 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015875#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015876_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015877
Martin v. Löwis11437992002-04-12 09:54:03 +000015878
15879cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015880#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015881_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015882
15883 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015884 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015885else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015886
Martin v. Löwis11437992002-04-12 09:54:03 +000015887 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015888 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15889echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015890if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015891 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015892fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015893{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15894echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015895else
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015897{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15898echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015900/* confdefs.h. */
15901_ACEOF
15902cat confdefs.h >>conftest.$ac_ext
15903cat >>conftest.$ac_ext <<_ACEOF
15904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015905$ac_includes_default
15906#include <mach/cthreads.h>
15907_ACEOF
15908rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909if { (ac_try="$ac_compile"
15910case "(($ac_try" in
15911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15912 *) ac_try_echo=$ac_try;;
15913esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015917 grep -v '^ *+' conftest.er1 >conftest.err
15918 rm -f conftest.er1
15919 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921 (exit $ac_status); } && {
15922 test -z "$ac_c_werror_flag" ||
15923 test ! -s conftest.err
15924 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015925 ac_header_compiler=yes
15926else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015928sed 's/^/| /' conftest.$ac_ext >&5
15929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015930 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932
15933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015934{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15935echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015936
15937# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015938{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15939echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015940cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015941/* confdefs.h. */
15942_ACEOF
15943cat confdefs.h >>conftest.$ac_ext
15944cat >>conftest.$ac_ext <<_ACEOF
15945/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015946#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015947_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015948if { (ac_try="$ac_cpp conftest.$ac_ext"
15949case "(($ac_try" in
15950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15951 *) ac_try_echo=$ac_try;;
15952esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015954 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015956 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 rm -f conftest.er1
15958 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015960 (exit $ac_status); } >/dev/null && {
15961 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15962 test ! -s conftest.err
15963 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 ac_header_preproc=yes
15965else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015967sed 's/^/| /' conftest.$ac_ext >&5
15968
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015971
Martin v. Löwis11437992002-04-12 09:54:03 +000015972rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015973{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15974echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015975
15976# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015977case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15978 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015979 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15980echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15981 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15982echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015983 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015984 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015985 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015986 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15987echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15988 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15989echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15990 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15991echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15992 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15993echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15994 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15995echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15996 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15997echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015998 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015999## -------------------------------------- ##
16000## Report this to http://bugs.python.org/ ##
16001## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016002_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016003 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016004 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016005esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016006{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16007echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016008if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016009 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016010else
16011 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016012fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016013{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16014echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016015
16016fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016017if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016019#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016020_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016021
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016023#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016024_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016025
Martin v. Löwis11437992002-04-12 09:54:03 +000016026
16027cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016028#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016029_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016030
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016031 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016032else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016033
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016034 # Just looking for pthread_create in libpthread is not enough:
16035 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16036 # So we really have to include pthread.h, and then link.
16037 _libs=$LIBS
16038 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016039 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16040echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016042/* confdefs.h. */
16043_ACEOF
16044cat confdefs.h >>conftest.$ac_ext
16045cat >>conftest.$ac_ext <<_ACEOF
16046/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016047#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016048
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016049void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016050int
16051main ()
16052{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016053
16054pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016055 ;
16056 return 0;
16057}
16058_ACEOF
16059rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060if { (ac_try="$ac_link"
16061case "(($ac_try" in
16062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16063 *) ac_try_echo=$ac_try;;
16064esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016066 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016068 grep -v '^ *+' conftest.er1 >conftest.err
16069 rm -f conftest.er1
16070 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016072 (exit $ac_status); } && {
16073 test -z "$ac_c_werror_flag" ||
16074 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016075 } && test -s conftest$ac_exeext &&
16076 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016077
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016078 { echo "$as_me:$LINENO: result: yes" >&5
16079echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016081#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016082_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016083
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016084 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016085 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016088sed 's/^/| /' conftest.$ac_ext >&5
16089
Martin v. Löwis11437992002-04-12 09:54:03 +000016090
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016091 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016092 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16093echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016094if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016095 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016096else
Martin v. Löwis11437992002-04-12 09:54:03 +000016097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016098/* confdefs.h. */
16099_ACEOF
16100cat confdefs.h >>conftest.$ac_ext
16101cat >>conftest.$ac_ext <<_ACEOF
16102/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016103/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16104 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16105#define pthread_detach innocuous_pthread_detach
16106
Guido van Rossumad678af1998-10-02 14:42:15 +000016107/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016108 which can conflict with char pthread_detach (); below.
16109 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016110 <limits.h> exists even on freestanding compilers. */
16111
16112#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016113# include <limits.h>
16114#else
16115# include <assert.h>
16116#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016117
16118#undef pthread_detach
16119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016120/* Override any GCC internal prototype to avoid an error.
16121 Use char because int might match the return type of a GCC
16122 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016123#ifdef __cplusplus
16124extern "C"
16125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016126char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016127/* The GNU C library defines this for functions which it implements
16128 to always fail with ENOSYS. Some functions are actually named
16129 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016130#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016131choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016132#endif
16133
Skip Montanaro6dead952003-09-25 14:50:04 +000016134int
16135main ()
16136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016137return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016138 ;
16139 return 0;
16140}
16141_ACEOF
16142rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143if { (ac_try="$ac_link"
16144case "(($ac_try" in
16145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16146 *) ac_try_echo=$ac_try;;
16147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016149 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016151 grep -v '^ *+' conftest.er1 >conftest.err
16152 rm -f conftest.er1
16153 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016155 (exit $ac_status); } && {
16156 test -z "$ac_c_werror_flag" ||
16157 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016158 } && test -s conftest$ac_exeext &&
16159 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016160 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016163sed 's/^/| /' conftest.$ac_ext >&5
16164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167
16168rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016169 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016170fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016171{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16172echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16173if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016174 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016175#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016176_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016177
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016178 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016179 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016180else
Guido van Rossumad678af1998-10-02 14:42:15 +000016181
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016182 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16183echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016184if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016185 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016186else
Martin v. Löwis11437992002-04-12 09:54:03 +000016187 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016188LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016189cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016190/* confdefs.h. */
16191_ACEOF
16192cat confdefs.h >>conftest.$ac_ext
16193cat >>conftest.$ac_ext <<_ACEOF
16194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196/* Override any GCC internal prototype to avoid an error.
16197 Use char because int might match the return type of a GCC
16198 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016199#ifdef __cplusplus
16200extern "C"
16201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016202char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016203int
16204main ()
16205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016207 ;
16208 return 0;
16209}
16210_ACEOF
16211rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212if { (ac_try="$ac_link"
16213case "(($ac_try" in
16214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16215 *) ac_try_echo=$ac_try;;
16216esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016220 grep -v '^ *+' conftest.er1 >conftest.err
16221 rm -f conftest.er1
16222 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224 (exit $ac_status); } && {
16225 test -z "$ac_c_werror_flag" ||
16226 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016227 } && test -s conftest$ac_exeext &&
16228 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016230else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016232sed 's/^/| /' conftest.$ac_ext >&5
16233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236
16237rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016239LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016240fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016241{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16242echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16243if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016245#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016246_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016247
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016248 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016249 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016250 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016251else
Greg Steinadf63d62000-07-05 10:38:09 +000016252
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016253 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16254echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016255if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016256 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016257else
Martin v. Löwis11437992002-04-12 09:54:03 +000016258 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016259LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016260cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016261/* confdefs.h. */
16262_ACEOF
16263cat confdefs.h >>conftest.$ac_ext
16264cat >>conftest.$ac_ext <<_ACEOF
16265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267/* Override any GCC internal prototype to avoid an error.
16268 Use char because int might match the return type of a GCC
16269 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016270#ifdef __cplusplus
16271extern "C"
16272#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016273char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016274int
16275main ()
16276{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016277return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016278 ;
16279 return 0;
16280}
16281_ACEOF
16282rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283if { (ac_try="$ac_link"
16284case "(($ac_try" in
16285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16286 *) ac_try_echo=$ac_try;;
16287esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016291 grep -v '^ *+' conftest.er1 >conftest.err
16292 rm -f conftest.er1
16293 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016295 (exit $ac_status); } && {
16296 test -z "$ac_c_werror_flag" ||
16297 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016298 } && test -s conftest$ac_exeext &&
16299 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016303sed 's/^/| /' conftest.$ac_ext >&5
16304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016307
16308rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016309 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016310LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016311fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016312{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16313echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16314if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016315 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016316#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016317_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016318
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016319 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016320 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016321 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016322else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016323
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016324 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16325echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016326if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016328else
Martin v. Löwis11437992002-04-12 09:54:03 +000016329 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016330LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016332/* confdefs.h. */
16333_ACEOF
16334cat confdefs.h >>conftest.$ac_ext
16335cat >>conftest.$ac_ext <<_ACEOF
16336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338/* Override any GCC internal prototype to avoid an error.
16339 Use char because int might match the return type of a GCC
16340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016341#ifdef __cplusplus
16342extern "C"
16343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016344char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016345int
16346main ()
16347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016348return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016349 ;
16350 return 0;
16351}
16352_ACEOF
16353rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354if { (ac_try="$ac_link"
16355case "(($ac_try" in
16356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16357 *) ac_try_echo=$ac_try;;
16358esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016360 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016362 grep -v '^ *+' conftest.er1 >conftest.err
16363 rm -f conftest.er1
16364 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016366 (exit $ac_status); } && {
16367 test -z "$ac_c_werror_flag" ||
16368 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016369 } && test -s conftest$ac_exeext &&
16370 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016371 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016372else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016374sed 's/^/| /' conftest.$ac_ext >&5
16375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016376 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378
16379rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016381LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016382fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016383{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16384echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16385if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016386 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016387#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016388_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016389
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016390 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016391 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016392 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016393else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016394
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016395 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16396echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016397if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016398 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016399else
Martin v. Löwis11437992002-04-12 09:54:03 +000016400 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016401LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016403/* confdefs.h. */
16404_ACEOF
16405cat confdefs.h >>conftest.$ac_ext
16406cat >>conftest.$ac_ext <<_ACEOF
16407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409/* Override any GCC internal prototype to avoid an error.
16410 Use char because int might match the return type of a GCC
16411 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016412#ifdef __cplusplus
16413extern "C"
16414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016415char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016416int
16417main ()
16418{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016419return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016420 ;
16421 return 0;
16422}
16423_ACEOF
16424rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425if { (ac_try="$ac_link"
16426case "(($ac_try" in
16427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16428 *) ac_try_echo=$ac_try;;
16429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016431 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016433 grep -v '^ *+' conftest.er1 >conftest.err
16434 rm -f conftest.er1
16435 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016437 (exit $ac_status); } && {
16438 test -z "$ac_c_werror_flag" ||
16439 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016440 } && test -s conftest$ac_exeext &&
16441 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016442 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016443else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016445sed 's/^/| /' conftest.$ac_ext >&5
16446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016447 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016449
16450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016452LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016453fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016454{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16455echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16456if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016457 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016458#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016459_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016460
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016461 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016462 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016463 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016464else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016465
Martin v. Löwis130fb172001-07-19 11:00:41 +000016466 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016467fi
16468
Guido van Rossum627b2d71993-12-24 10:39:16 +000016469
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016470fi
16471
Guido van Rossum0be3e491997-05-22 20:33:33 +000016472fi
16473
Guido van Rossum49545951997-12-02 19:28:29 +000016474fi
16475
Guido van Rossumb93a8621998-05-07 13:27:32 +000016476fi
16477
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479
16480rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016481 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016482fi
16483
Martin v. Löwis11437992002-04-12 09:54:03 +000016484
16485fi
16486
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016487
Michael W. Hudson54241132001-12-07 15:38:26 +000016488
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016489 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16490echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016491if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016492 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016493else
Martin v. Löwis11437992002-04-12 09:54:03 +000016494 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016495LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016496cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016497/* confdefs.h. */
16498_ACEOF
16499cat confdefs.h >>conftest.$ac_ext
16500cat >>conftest.$ac_ext <<_ACEOF
16501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016503/* Override any GCC internal prototype to avoid an error.
16504 Use char because int might match the return type of a GCC
16505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016506#ifdef __cplusplus
16507extern "C"
16508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016509char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016510int
16511main ()
16512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016514 ;
16515 return 0;
16516}
16517_ACEOF
16518rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016519if { (ac_try="$ac_link"
16520case "(($ac_try" in
16521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16522 *) ac_try_echo=$ac_try;;
16523esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016525 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016527 grep -v '^ *+' conftest.er1 >conftest.err
16528 rm -f conftest.er1
16529 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531 (exit $ac_status); } && {
16532 test -z "$ac_c_werror_flag" ||
16533 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016534 } && test -s conftest$ac_exeext &&
16535 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016537else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016539sed 's/^/| /' conftest.$ac_ext >&5
16540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016541 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543
16544rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016545 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016546LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016547fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016548{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16549echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16550if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016551 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016552#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016553_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016554
Martin v. Löwis130fb172001-07-19 11:00:41 +000016555 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016556 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016557 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016558fi
16559
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016560
Neal Norwitza978ab02002-11-02 16:58:05 +000016561 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016562 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16563echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016564if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016565 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016566else
Martin v. Löwis11437992002-04-12 09:54:03 +000016567 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016568LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016569cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016570/* confdefs.h. */
16571_ACEOF
16572cat confdefs.h >>conftest.$ac_ext
16573cat >>conftest.$ac_ext <<_ACEOF
16574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016576/* Override any GCC internal prototype to avoid an error.
16577 Use char because int might match the return type of a GCC
16578 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016579#ifdef __cplusplus
16580extern "C"
16581#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016582char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016583int
16584main ()
16585{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016586return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016587 ;
16588 return 0;
16589}
16590_ACEOF
16591rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592if { (ac_try="$ac_link"
16593case "(($ac_try" in
16594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16595 *) ac_try_echo=$ac_try;;
16596esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016600 grep -v '^ *+' conftest.er1 >conftest.err
16601 rm -f conftest.er1
16602 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604 (exit $ac_status); } && {
16605 test -z "$ac_c_werror_flag" ||
16606 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016607 } && test -s conftest$ac_exeext &&
16608 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016609 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016610else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016612sed 's/^/| /' conftest.$ac_ext >&5
16613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616
16617rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016619LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016620fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016621{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16622echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16623if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016624 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016625#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016626_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016627
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016628 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016629 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016630 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016631fi
16632
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016633 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016634
Martin v. Löwis130fb172001-07-19 11:00:41 +000016635 if test "$USE_THREAD_MODULE" != "#"
16636 then
16637 # If the above checks didn't disable threads, (at least) OSF1
16638 # needs this '-threads' argument during linking.
16639 case $ac_sys_system in
16640 OSF1) LDLAST=-threads;;
16641 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016642 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016643fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016644
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016645if test "$posix_threads" = "yes"; then
16646 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016647
16648cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016649#define _POSIX_THREADS 1
16650_ACEOF
16651
16652 fi
16653
16654 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16655 case $ac_sys_system/$ac_sys_release in
16656 SunOS/5.6)
16657cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016658#define HAVE_PTHREAD_DESTRUCTOR 1
16659_ACEOF
16660
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016661 ;;
16662 SunOS/5.8)
16663cat >>confdefs.h <<\_ACEOF
16664#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16665_ACEOF
16666
16667 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016668 AIX/5)
16669cat >>confdefs.h <<\_ACEOF
16670#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16671_ACEOF
16672
16673 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016674 esac
16675
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016676 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16677echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016678 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016679 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016680else
16681 if test "$cross_compiling" = yes; then
16682 ac_cv_pthread_system_supported=no
16683else
16684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016685/* confdefs.h. */
16686_ACEOF
16687cat confdefs.h >>conftest.$ac_ext
16688cat >>conftest.$ac_ext <<_ACEOF
16689/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016690#include <pthread.h>
16691 void *foo(void *parm) {
16692 return NULL;
16693 }
16694 main() {
16695 pthread_attr_t attr;
16696 pthread_t id;
16697 if (pthread_attr_init(&attr)) exit(-1);
16698 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16699 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16700 exit(0);
16701 }
16702_ACEOF
16703rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704if { (ac_try="$ac_link"
16705case "(($ac_try" in
16706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16707 *) ac_try_echo=$ac_try;;
16708esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016711 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016713 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714 { (case "(($ac_try" in
16715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16716 *) ac_try_echo=$ac_try;;
16717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016720 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016722 (exit $ac_status); }; }; then
16723 ac_cv_pthread_system_supported=yes
16724else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016725 echo "$as_me: program exited with status $ac_status" >&5
16726echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016727sed 's/^/| /' conftest.$ac_ext >&5
16728
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016729( exit $ac_status )
16730ac_cv_pthread_system_supported=no
16731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016732rm -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 +000016733fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016735
16736
Guido van Rossum627b2d71993-12-24 10:39:16 +000016737fi
16738
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016739 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16740echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016741 if test "$ac_cv_pthread_system_supported" = "yes"; then
16742
16743cat >>confdefs.h <<\_ACEOF
16744#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16745_ACEOF
16746
16747 fi
16748
16749for ac_func in pthread_sigmask
16750do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016751as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16752{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16753echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016754if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016755 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016756else
16757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016758/* confdefs.h. */
16759_ACEOF
16760cat confdefs.h >>conftest.$ac_ext
16761cat >>conftest.$ac_ext <<_ACEOF
16762/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016763/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16764 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16765#define $ac_func innocuous_$ac_func
16766
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016767/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016768 which can conflict with char $ac_func (); below.
16769 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016770 <limits.h> exists even on freestanding compilers. */
16771
16772#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016773# include <limits.h>
16774#else
16775# include <assert.h>
16776#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016777
16778#undef $ac_func
16779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016780/* Override any GCC internal prototype to avoid an error.
16781 Use char because int might match the return type of a GCC
16782 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016783#ifdef __cplusplus
16784extern "C"
16785#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016786char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016787/* The GNU C library defines this for functions which it implements
16788 to always fail with ENOSYS. Some functions are actually named
16789 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016791choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016792#endif
16793
Skip Montanaro6dead952003-09-25 14:50:04 +000016794int
16795main ()
16796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016797return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016798 ;
16799 return 0;
16800}
16801_ACEOF
16802rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016803if { (ac_try="$ac_link"
16804case "(($ac_try" in
16805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16806 *) ac_try_echo=$ac_try;;
16807esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016809 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016811 grep -v '^ *+' conftest.er1 >conftest.err
16812 rm -f conftest.er1
16813 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016815 (exit $ac_status); } && {
16816 test -z "$ac_c_werror_flag" ||
16817 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016818 } && test -s conftest$ac_exeext &&
16819 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016820 eval "$as_ac_var=yes"
16821else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016823sed 's/^/| /' conftest.$ac_ext >&5
16824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016825 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827
16828rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016830fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016831ac_res=`eval echo '${'$as_ac_var'}'`
16832 { echo "$as_me:$LINENO: result: $ac_res" >&5
16833echo "${ECHO_T}$ac_res" >&6; }
16834if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016835 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016836#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016837_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016838 case $ac_sys_system in
16839 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016840
Jason Tishlerfac083d2003-07-22 15:20:49 +000016841cat >>confdefs.h <<\_ACEOF
16842#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16843_ACEOF
16844
16845 ;;
16846 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016847fi
16848done
16849
16850fi
16851
16852
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016853# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016854
16855
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016856{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16857echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016859if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016861 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016862 { echo "$as_me:$LINENO: result: no" >&5
16863echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016864 ipv6=no
16865 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016866 *) { echo "$as_me:$LINENO: result: yes" >&5
16867echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016868 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016869#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016870_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016871
16872 ipv6=yes
16873 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016875else
Martin v. Löwis11437992002-04-12 09:54:03 +000016876
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016877 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016878 { echo "$as_me:$LINENO: result: no" >&5
16879echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016880 ipv6=no
16881
16882else
Martin v. Löwis11437992002-04-12 09:54:03 +000016883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016884/* confdefs.h. */
16885_ACEOF
16886cat confdefs.h >>conftest.$ac_ext
16887cat >>conftest.$ac_ext <<_ACEOF
16888/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016889 /* AF_INET6 available check */
16890#include <sys/types.h>
16891#include <sys/socket.h>
16892main()
16893{
16894 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16895 exit(1);
16896 else
16897 exit(0);
16898}
16899
Martin v. Löwis11437992002-04-12 09:54:03 +000016900_ACEOF
16901rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902if { (ac_try="$ac_link"
16903case "(($ac_try" in
16904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16905 *) ac_try_echo=$ac_try;;
16906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016908 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912 { (case "(($ac_try" in
16913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16914 *) ac_try_echo=$ac_try;;
16915esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016918 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016920 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016921 { echo "$as_me:$LINENO: result: yes" >&5
16922echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016923 ipv6=yes
16924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016925 echo "$as_me: program exited with status $ac_status" >&5
16926echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016927sed 's/^/| /' conftest.$ac_ext >&5
16928
Martin v. Löwis11437992002-04-12 09:54:03 +000016929( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016930{ echo "$as_me:$LINENO: result: no" >&5
16931echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016932 ipv6=no
16933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016934rm -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 +000016935fi
16936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016937
16938
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016939if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016940 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16941echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016943/* confdefs.h. */
16944_ACEOF
16945cat confdefs.h >>conftest.$ac_ext
16946cat >>conftest.$ac_ext <<_ACEOF
16947/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016948#include <sys/types.h>
16949#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016950int
16951main ()
16952{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016953struct sockaddr_in6 x;
16954x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016955 ;
16956 return 0;
16957}
16958_ACEOF
16959rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016960if { (ac_try="$ac_compile"
16961case "(($ac_try" in
16962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16963 *) ac_try_echo=$ac_try;;
16964esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016968 grep -v '^ *+' conftest.er1 >conftest.err
16969 rm -f conftest.er1
16970 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016972 (exit $ac_status); } && {
16973 test -z "$ac_c_werror_flag" ||
16974 test ! -s conftest.err
16975 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016976 { echo "$as_me:$LINENO: result: yes" >&5
16977echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016978 ipv6=yes
16979else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016981sed 's/^/| /' conftest.$ac_ext >&5
16982
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016983 { echo "$as_me:$LINENO: result: no" >&5
16984echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016985 ipv6=no
16986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987
16988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016989fi
16990
16991if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016992 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016993#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016994_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016995
16996fi
16997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016998fi
16999
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017000
17001ipv6type=unknown
17002ipv6lib=none
17003ipv6trylibc=no
17004
17005if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017006 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17007echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017008 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17009 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017010 case $i in
17011 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017013/* confdefs.h. */
17014_ACEOF
17015cat confdefs.h >>conftest.$ac_ext
17016cat >>conftest.$ac_ext <<_ACEOF
17017/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017018
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017019#include <netinet/in.h>
17020#ifdef IPV6_INRIA_VERSION
17021yes
17022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017023_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017025 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017026 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017027fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017028rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017029
17030 ;;
17031 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017033/* confdefs.h. */
17034_ACEOF
17035cat confdefs.h >>conftest.$ac_ext
17036cat >>conftest.$ac_ext <<_ACEOF
17037/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017038
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017039#include <netinet/in.h>
17040#ifdef __KAME__
17041yes
17042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017043_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017045 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017046 ipv6type=$i;
17047 ipv6lib=inet6
17048 ipv6libdir=/usr/local/v6/lib
17049 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017050fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017051rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017052
17053 ;;
17054 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017056/* confdefs.h. */
17057_ACEOF
17058cat confdefs.h >>conftest.$ac_ext
17059cat >>conftest.$ac_ext <<_ACEOF
17060/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017061
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017062#include <features.h>
17063#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17064yes
17065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017066_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017068 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017069 ipv6type=$i;
17070 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017071fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017072rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017073
17074 ;;
17075 linux-inet6)
17076 if test -d /usr/inet6; then
17077 ipv6type=$i
17078 ipv6lib=inet6
17079 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017080 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017081 fi
17082 ;;
17083 solaris)
17084 if test -f /etc/netconfig; then
17085 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17086 ipv6type=$i
17087 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017088 fi
17089 fi
17090 ;;
17091 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017093/* confdefs.h. */
17094_ACEOF
17095cat confdefs.h >>conftest.$ac_ext
17096cat >>conftest.$ac_ext <<_ACEOF
17097/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017098
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017099#include <sys/param.h>
17100#ifdef _TOSHIBA_INET6
17101yes
17102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017103_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017105 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017106 ipv6type=$i;
17107 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017108 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017109fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017110rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017111
17112 ;;
17113 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017115/* confdefs.h. */
17116_ACEOF
17117cat confdefs.h >>conftest.$ac_ext
17118cat >>conftest.$ac_ext <<_ACEOF
17119/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017120
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017121#include </usr/local/v6/include/sys/v6config.h>
17122#ifdef __V6D__
17123yes
17124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017125_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017127 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017128 ipv6type=$i;
17129 ipv6lib=v6;
17130 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017131 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017132fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017133rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017134
17135 ;;
17136 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017138/* confdefs.h. */
17139_ACEOF
17140cat confdefs.h >>conftest.$ac_ext
17141cat >>conftest.$ac_ext <<_ACEOF
17142/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017143
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017144#include <sys/param.h>
17145#ifdef _ZETA_MINAMI_INET6
17146yes
17147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017148_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017150 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017151 ipv6type=$i;
17152 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017153 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017154fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017155rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017156
17157 ;;
17158 esac
17159 if test "$ipv6type" != "unknown"; then
17160 break
17161 fi
17162 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017163 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17164echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017165fi
17166
17167if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17168 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17169 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17170 echo "using lib$ipv6lib"
17171 else
17172 if test $ipv6trylibc = "yes"; then
17173 echo "using libc"
17174 else
17175 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17176 echo "You need to fetch lib$ipv6lib.a from appropriate"
17177 echo 'ipv6 kit and compile beforehand.'
17178 exit 1
17179 fi
17180 fi
17181fi
17182
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017183{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17184echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017185cat >conftest.$ac_ext <<_ACEOF
17186/* confdefs.h. */
17187_ACEOF
17188cat confdefs.h >>conftest.$ac_ext
17189cat >>conftest.$ac_ext <<_ACEOF
17190/* end confdefs.h. */
17191#include <Carbon/Carbon.h>
17192int
17193main ()
17194{
17195FSIORefNum fRef = 0
17196 ;
17197 return 0;
17198}
17199_ACEOF
17200rm -f conftest.$ac_objext
17201if { (ac_try="$ac_compile"
17202case "(($ac_try" in
17203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17204 *) ac_try_echo=$ac_try;;
17205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017207 (eval "$ac_compile") 2>conftest.er1
17208 ac_status=$?
17209 grep -v '^ *+' conftest.er1 >conftest.err
17210 rm -f conftest.er1
17211 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017213 (exit $ac_status); } && {
17214 test -z "$ac_c_werror_flag" ||
17215 test ! -s conftest.err
17216 } && test -s conftest.$ac_objext; then
17217
17218cat >>confdefs.h <<\_ACEOF
17219#define HAVE_OSX105_SDK 1
17220_ACEOF
17221
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017222 { echo "$as_me:$LINENO: result: yes" >&5
17223echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017225 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017226sed 's/^/| /' conftest.$ac_ext >&5
17227
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017228 { echo "$as_me:$LINENO: result: no" >&5
17229echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017230
17231fi
17232
17233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17234
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017235# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017236{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17237echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017240if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241 withval=$with_doc_strings;
17242fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017243
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017244
17245if test -z "$with_doc_strings"
17246then with_doc_strings="yes"
17247fi
17248if test "$with_doc_strings" != "no"
17249then
17250
17251cat >>confdefs.h <<\_ACEOF
17252#define WITH_DOC_STRINGS 1
17253_ACEOF
17254
17255fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017256{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17257echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017258
Neil Schemenauera35c6882001-02-27 04:45:05 +000017259# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017260{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17261echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017263# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017264if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017266if test "$withval" != no
17267then
17268
17269cat >>confdefs.h <<\_ACEOF
17270#define WITH_TSC 1
17271_ACEOF
17272
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017273 { echo "$as_me:$LINENO: result: yes" >&5
17274echo "${ECHO_T}yes" >&6; }
17275else { echo "$as_me:$LINENO: result: no" >&5
17276echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017277fi
17278else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017279 { echo "$as_me:$LINENO: result: no" >&5
17280echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281fi
17282
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017283
17284# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017285{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17286echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017289if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290 withval=$with_pymalloc;
17291fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017292
Neil Schemenauera35c6882001-02-27 04:45:05 +000017293
Neil Schemenauer16c22972002-03-22 15:34:49 +000017294if test -z "$with_pymalloc"
17295then with_pymalloc="yes"
17296fi
17297if test "$with_pymalloc" != "no"
17298then
Martin v. Löwis11437992002-04-12 09:54:03 +000017299
17300cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017301#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017302_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017303
17304fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017305{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17306echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017307
Benjamin Peterson05159c42009-12-03 03:01:27 +000017308# Check for Valgrind support
17309{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17310echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17311
17312# Check whether --with-valgrind was given.
17313if test "${with_valgrind+set}" = set; then
17314 withval=$with_valgrind;
17315else
17316 with_valgrind=no
17317fi
17318
17319{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17320echo "${ECHO_T}$with_valgrind" >&6; }
17321if test "$with_valgrind" != no; then
17322 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17323 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17324echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17325if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17326 echo $ECHO_N "(cached) $ECHO_C" >&6
17327fi
17328{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17329echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17330else
17331 # Is the header compilable?
17332{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17333echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17334cat >conftest.$ac_ext <<_ACEOF
17335/* confdefs.h. */
17336_ACEOF
17337cat confdefs.h >>conftest.$ac_ext
17338cat >>conftest.$ac_ext <<_ACEOF
17339/* end confdefs.h. */
17340$ac_includes_default
17341#include <valgrind/valgrind.h>
17342_ACEOF
17343rm -f conftest.$ac_objext
17344if { (ac_try="$ac_compile"
17345case "(($ac_try" in
17346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17347 *) ac_try_echo=$ac_try;;
17348esac
17349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17350 (eval "$ac_compile") 2>conftest.er1
17351 ac_status=$?
17352 grep -v '^ *+' conftest.er1 >conftest.err
17353 rm -f conftest.er1
17354 cat conftest.err >&5
17355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17356 (exit $ac_status); } && {
17357 test -z "$ac_c_werror_flag" ||
17358 test ! -s conftest.err
17359 } && test -s conftest.$ac_objext; then
17360 ac_header_compiler=yes
17361else
17362 echo "$as_me: failed program was:" >&5
17363sed 's/^/| /' conftest.$ac_ext >&5
17364
17365 ac_header_compiler=no
17366fi
17367
17368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17369{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17370echo "${ECHO_T}$ac_header_compiler" >&6; }
17371
17372# Is the header present?
17373{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17374echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17375cat >conftest.$ac_ext <<_ACEOF
17376/* confdefs.h. */
17377_ACEOF
17378cat confdefs.h >>conftest.$ac_ext
17379cat >>conftest.$ac_ext <<_ACEOF
17380/* end confdefs.h. */
17381#include <valgrind/valgrind.h>
17382_ACEOF
17383if { (ac_try="$ac_cpp conftest.$ac_ext"
17384case "(($ac_try" in
17385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17386 *) ac_try_echo=$ac_try;;
17387esac
17388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17389 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17390 ac_status=$?
17391 grep -v '^ *+' conftest.er1 >conftest.err
17392 rm -f conftest.er1
17393 cat conftest.err >&5
17394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17395 (exit $ac_status); } >/dev/null && {
17396 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17397 test ! -s conftest.err
17398 }; then
17399 ac_header_preproc=yes
17400else
17401 echo "$as_me: failed program was:" >&5
17402sed 's/^/| /' conftest.$ac_ext >&5
17403
17404 ac_header_preproc=no
17405fi
17406
17407rm -f conftest.err conftest.$ac_ext
17408{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17409echo "${ECHO_T}$ac_header_preproc" >&6; }
17410
17411# So? What about this header?
17412case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17413 yes:no: )
17414 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17415echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17416 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17417echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17418 ac_header_preproc=yes
17419 ;;
17420 no:yes:* )
17421 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17422echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17423 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17424echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17425 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17426echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17427 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17428echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17429 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17430echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17431 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17432echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17433 ( cat <<\_ASBOX
17434## -------------------------------------- ##
17435## Report this to http://bugs.python.org/ ##
17436## -------------------------------------- ##
17437_ASBOX
17438 ) | sed "s/^/$as_me: WARNING: /" >&2
17439 ;;
17440esac
17441{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17442echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17443if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17444 echo $ECHO_N "(cached) $ECHO_C" >&6
17445else
17446 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17447fi
17448{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17449echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17450
17451fi
17452if test $ac_cv_header_valgrind_valgrind_h = yes; then
17453
17454cat >>confdefs.h <<\_ACEOF
17455#define WITH_VALGRIND 1
17456_ACEOF
17457
17458else
17459 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17460echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17461 { (exit 1); exit 1; }; }
17462
17463fi
17464
17465
17466fi
17467
Barry Warsawef82cd72000-06-30 16:21:01 +000017468# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017469{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17470echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017472# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017473if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017475if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017476then
17477
17478cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017479#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017480_ACEOF
17481
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017482 { echo "$as_me:$LINENO: result: yes" >&5
17483echo "${ECHO_T}yes" >&6; }
17484else { echo "$as_me:$LINENO: result: no" >&5
17485echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017486fi
17487else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017488 { echo "$as_me:$LINENO: result: no" >&5
17489echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490fi
17491
Barry Warsawef82cd72000-06-30 16:21:01 +000017492
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017493# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017494
Guido van Rossum98935bf2001-09-05 19:13:16 +000017495DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017496
Guido van Rossume97ee181999-12-20 21:27:22 +000017497# the dlopen() function means we might want to use dynload_shlib.o. some
17498# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017499
Thomas Wouters3a584202000-08-05 23:28:51 +000017500for ac_func in dlopen
17501do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017502as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17503{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17504echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017505if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017506 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017507else
Martin v. Löwis11437992002-04-12 09:54:03 +000017508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017509/* confdefs.h. */
17510_ACEOF
17511cat confdefs.h >>conftest.$ac_ext
17512cat >>conftest.$ac_ext <<_ACEOF
17513/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017514/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17515 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17516#define $ac_func innocuous_$ac_func
17517
Guido van Rossume97ee181999-12-20 21:27:22 +000017518/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017519 which can conflict with char $ac_func (); below.
17520 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017521 <limits.h> exists even on freestanding compilers. */
17522
17523#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017524# include <limits.h>
17525#else
17526# include <assert.h>
17527#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017528
17529#undef $ac_func
17530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531/* Override any GCC internal prototype to avoid an error.
17532 Use char because int might match the return type of a GCC
17533 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017534#ifdef __cplusplus
17535extern "C"
17536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017537char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017538/* The GNU C library defines this for functions which it implements
17539 to always fail with ENOSYS. Some functions are actually named
17540 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017541#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017542choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017543#endif
17544
Skip Montanaro6dead952003-09-25 14:50:04 +000017545int
17546main ()
17547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017548return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017549 ;
17550 return 0;
17551}
17552_ACEOF
17553rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554if { (ac_try="$ac_link"
17555case "(($ac_try" in
17556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17557 *) ac_try_echo=$ac_try;;
17558esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017562 grep -v '^ *+' conftest.er1 >conftest.err
17563 rm -f conftest.er1
17564 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017566 (exit $ac_status); } && {
17567 test -z "$ac_c_werror_flag" ||
17568 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017569 } && test -s conftest$ac_exeext &&
17570 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017574sed 's/^/| /' conftest.$ac_ext >&5
17575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017576 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578
17579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017580 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017581fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017582ac_res=`eval echo '${'$as_ac_var'}'`
17583 { echo "$as_me:$LINENO: result: $ac_res" >&5
17584echo "${ECHO_T}$ac_res" >&6; }
17585if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017586 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017587#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017588_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017589
Guido van Rossume97ee181999-12-20 21:27:22 +000017590fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017591done
Guido van Rossume97ee181999-12-20 21:27:22 +000017592
Michael W. Hudson54241132001-12-07 15:38:26 +000017593
Guido van Rossume97ee181999-12-20 21:27:22 +000017594# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17595# loading of modules.
17596
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017597{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17598echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017599if test -z "$DYNLOADFILE"
17600then
17601 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017602 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17603 if test "$ac_cv_func_dlopen" = yes
17604 then DYNLOADFILE="dynload_shlib.o"
17605 else DYNLOADFILE="dynload_aix.o"
17606 fi
17607 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017608 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017609 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17610 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017611 *)
17612 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17613 # out any dynamic loading
17614 if test "$ac_cv_func_dlopen" = yes
17615 then DYNLOADFILE="dynload_shlib.o"
17616 else DYNLOADFILE="dynload_stub.o"
17617 fi
17618 ;;
17619 esac
17620fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017621{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17622echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017623if test "$DYNLOADFILE" != "dynload_stub.o"
17624then
Martin v. Löwis11437992002-04-12 09:54:03 +000017625
17626cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017627#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017628_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017629
17630fi
17631
Neil Schemenauer4e425612001-06-19 15:44:15 +000017632# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17633
Michael W. Hudson54241132001-12-07 15:38:26 +000017634
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017635{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17636echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017637if test -z "$MACHDEP_OBJS"
17638then
Jack Jansene578a632001-08-15 01:27:14 +000017639 MACHDEP_OBJS=$extra_machdep_objs
17640else
17641 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017642fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017643{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17644echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017645
Guido van Rossum627b2d71993-12-24 10:39:16 +000017646# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
Martin v. Löwisd6320502004-08-12 13:45:08 +000017718
Martin v. Löwisc3001752005-01-23 09:27:24 +000017719
17720
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017721
17722
Thomas Wouterscf297e42007-02-23 15:07:44 +000017723
17724
Gregory P. Smith25523d22007-09-03 16:44:55 +000017725
Christian Heimes4e30a842007-11-30 22:12:06 +000017726
Martin v. Löwis92fab752008-03-08 10:40:41 +000017727
Martin v. Löwis823725e2008-03-24 13:39:54 +000017728
17729
Benjamin Peterson965ce872009-04-05 21:24:58 +000017730
17731
17732
17733
Martin v. Löwis011e8422009-05-05 04:43:17 +000017734
Martin v. Löwis113a0852009-05-29 17:25:39 +000017735
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017736
17737
17738
17739
Antoine Pitroub7572f02009-12-02 20:46:48 +000017740
Martin v. Löwis823725e2008-03-24 13:39:54 +000017741for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17742 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017743 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017744 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017745 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017746 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017747 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017748 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17749 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017750 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17751 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017752 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017753 truncate uname unsetenv utimes waitpid wait3 wait4 \
17754 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017755do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017756as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17757{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17758echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017760 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017761else
Martin v. Löwis11437992002-04-12 09:54:03 +000017762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017763/* confdefs.h. */
17764_ACEOF
17765cat confdefs.h >>conftest.$ac_ext
17766cat >>conftest.$ac_ext <<_ACEOF
17767/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017768/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17769 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17770#define $ac_func innocuous_$ac_func
17771
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017772/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017773 which can conflict with char $ac_func (); below.
17774 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017775 <limits.h> exists even on freestanding compilers. */
17776
17777#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017778# include <limits.h>
17779#else
17780# include <assert.h>
17781#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017782
17783#undef $ac_func
17784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017785/* Override any GCC internal prototype to avoid an error.
17786 Use char because int might match the return type of a GCC
17787 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017788#ifdef __cplusplus
17789extern "C"
17790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017791char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017792/* The GNU C library defines this for functions which it implements
17793 to always fail with ENOSYS. Some functions are actually named
17794 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017796choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017797#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017798
Skip Montanaro6dead952003-09-25 14:50:04 +000017799int
17800main ()
17801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017802return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017803 ;
17804 return 0;
17805}
17806_ACEOF
17807rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017808if { (ac_try="$ac_link"
17809case "(($ac_try" in
17810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17811 *) ac_try_echo=$ac_try;;
17812esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017816 grep -v '^ *+' conftest.er1 >conftest.err
17817 rm -f conftest.er1
17818 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820 (exit $ac_status); } && {
17821 test -z "$ac_c_werror_flag" ||
17822 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017823 } && test -s conftest$ac_exeext &&
17824 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017825 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017826else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017828sed 's/^/| /' conftest.$ac_ext >&5
17829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017830 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832
17833rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017834 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017835fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017836ac_res=`eval echo '${'$as_ac_var'}'`
17837 { echo "$as_me:$LINENO: result: $ac_res" >&5
17838echo "${ECHO_T}$ac_res" >&6; }
17839if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017840 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017841#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017842_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017843
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017844fi
17845done
17846
Michael W. Hudson54241132001-12-07 15:38:26 +000017847
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017848# For some functions, having a definition is not sufficient, since
17849# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017850{ echo "$as_me:$LINENO: checking for chroot" >&5
17851echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017853/* confdefs.h. */
17854_ACEOF
17855cat confdefs.h >>conftest.$ac_ext
17856cat >>conftest.$ac_ext <<_ACEOF
17857/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017858#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017859int
17860main ()
17861{
17862void *x=chroot
17863 ;
17864 return 0;
17865}
17866_ACEOF
17867rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868if { (ac_try="$ac_compile"
17869case "(($ac_try" in
17870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17871 *) ac_try_echo=$ac_try;;
17872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017876 grep -v '^ *+' conftest.er1 >conftest.err
17877 rm -f conftest.er1
17878 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880 (exit $ac_status); } && {
17881 test -z "$ac_c_werror_flag" ||
17882 test ! -s conftest.err
17883 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017884
17885cat >>confdefs.h <<\_ACEOF
17886#define HAVE_CHROOT 1
17887_ACEOF
17888
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017889 { echo "$as_me:$LINENO: result: yes" >&5
17890echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017891else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017893sed 's/^/| /' conftest.$ac_ext >&5
17894
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017895 { echo "$as_me:$LINENO: result: no" >&5
17896echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017897
17898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899
17900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017901{ echo "$as_me:$LINENO: checking for link" >&5
17902echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017904/* confdefs.h. */
17905_ACEOF
17906cat confdefs.h >>conftest.$ac_ext
17907cat >>conftest.$ac_ext <<_ACEOF
17908/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017909#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017910int
17911main ()
17912{
17913void *x=link
17914 ;
17915 return 0;
17916}
17917_ACEOF
17918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017919if { (ac_try="$ac_compile"
17920case "(($ac_try" in
17921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17922 *) ac_try_echo=$ac_try;;
17923esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017927 grep -v '^ *+' conftest.er1 >conftest.err
17928 rm -f conftest.er1
17929 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017931 (exit $ac_status); } && {
17932 test -z "$ac_c_werror_flag" ||
17933 test ! -s conftest.err
17934 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017935
17936cat >>confdefs.h <<\_ACEOF
17937#define HAVE_LINK 1
17938_ACEOF
17939
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017940 { echo "$as_me:$LINENO: result: yes" >&5
17941echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017942else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017944sed 's/^/| /' conftest.$ac_ext >&5
17945
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017946 { echo "$as_me:$LINENO: result: no" >&5
17947echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017948
17949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017950
17951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017952{ echo "$as_me:$LINENO: checking for symlink" >&5
17953echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017954cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017955/* confdefs.h. */
17956_ACEOF
17957cat confdefs.h >>conftest.$ac_ext
17958cat >>conftest.$ac_ext <<_ACEOF
17959/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017960#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017961int
17962main ()
17963{
17964void *x=symlink
17965 ;
17966 return 0;
17967}
17968_ACEOF
17969rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017970if { (ac_try="$ac_compile"
17971case "(($ac_try" in
17972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17973 *) ac_try_echo=$ac_try;;
17974esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017978 grep -v '^ *+' conftest.er1 >conftest.err
17979 rm -f conftest.er1
17980 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982 (exit $ac_status); } && {
17983 test -z "$ac_c_werror_flag" ||
17984 test ! -s conftest.err
17985 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017986
17987cat >>confdefs.h <<\_ACEOF
17988#define HAVE_SYMLINK 1
17989_ACEOF
17990
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017991 { echo "$as_me:$LINENO: result: yes" >&5
17992echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017993else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017995sed 's/^/| /' conftest.$ac_ext >&5
17996
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017997 { echo "$as_me:$LINENO: result: no" >&5
17998echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017999
18000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018001
18002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018003{ echo "$as_me:$LINENO: checking for fchdir" >&5
18004echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018005cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018006/* confdefs.h. */
18007_ACEOF
18008cat confdefs.h >>conftest.$ac_ext
18009cat >>conftest.$ac_ext <<_ACEOF
18010/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018011#include <unistd.h>
18012int
18013main ()
18014{
18015void *x=fchdir
18016 ;
18017 return 0;
18018}
18019_ACEOF
18020rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021if { (ac_try="$ac_compile"
18022case "(($ac_try" in
18023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18024 *) ac_try_echo=$ac_try;;
18025esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018029 grep -v '^ *+' conftest.er1 >conftest.err
18030 rm -f conftest.er1
18031 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033 (exit $ac_status); } && {
18034 test -z "$ac_c_werror_flag" ||
18035 test ! -s conftest.err
18036 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018037
18038cat >>confdefs.h <<\_ACEOF
18039#define HAVE_FCHDIR 1
18040_ACEOF
18041
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018042 { echo "$as_me:$LINENO: result: yes" >&5
18043echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018044else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018046sed 's/^/| /' conftest.$ac_ext >&5
18047
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018048 { echo "$as_me:$LINENO: result: no" >&5
18049echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018050
18051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052
18053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018054{ echo "$as_me:$LINENO: checking for fsync" >&5
18055echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018056cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018057/* confdefs.h. */
18058_ACEOF
18059cat confdefs.h >>conftest.$ac_ext
18060cat >>conftest.$ac_ext <<_ACEOF
18061/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018062#include <unistd.h>
18063int
18064main ()
18065{
18066void *x=fsync
18067 ;
18068 return 0;
18069}
18070_ACEOF
18071rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072if { (ac_try="$ac_compile"
18073case "(($ac_try" in
18074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18075 *) ac_try_echo=$ac_try;;
18076esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018080 grep -v '^ *+' conftest.er1 >conftest.err
18081 rm -f conftest.er1
18082 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084 (exit $ac_status); } && {
18085 test -z "$ac_c_werror_flag" ||
18086 test ! -s conftest.err
18087 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018088
18089cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018090#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018091_ACEOF
18092
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018093 { echo "$as_me:$LINENO: result: yes" >&5
18094echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018095else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018097sed 's/^/| /' conftest.$ac_ext >&5
18098
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018099 { echo "$as_me:$LINENO: result: no" >&5
18100echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018101
18102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103
18104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018105{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18106echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018108/* confdefs.h. */
18109_ACEOF
18110cat confdefs.h >>conftest.$ac_ext
18111cat >>conftest.$ac_ext <<_ACEOF
18112/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018113#include <unistd.h>
18114int
18115main ()
18116{
18117void *x=fdatasync
18118 ;
18119 return 0;
18120}
18121_ACEOF
18122rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018123if { (ac_try="$ac_compile"
18124case "(($ac_try" in
18125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18126 *) ac_try_echo=$ac_try;;
18127esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018131 grep -v '^ *+' conftest.er1 >conftest.err
18132 rm -f conftest.er1
18133 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018135 (exit $ac_status); } && {
18136 test -z "$ac_c_werror_flag" ||
18137 test ! -s conftest.err
18138 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018139
18140cat >>confdefs.h <<\_ACEOF
18141#define HAVE_FDATASYNC 1
18142_ACEOF
18143
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018144 { echo "$as_me:$LINENO: result: yes" >&5
18145echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018146else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018148sed 's/^/| /' conftest.$ac_ext >&5
18149
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018150 { echo "$as_me:$LINENO: result: no" >&5
18151echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018152
18153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154
18155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018156{ echo "$as_me:$LINENO: checking for epoll" >&5
18157echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018158cat >conftest.$ac_ext <<_ACEOF
18159/* confdefs.h. */
18160_ACEOF
18161cat confdefs.h >>conftest.$ac_ext
18162cat >>conftest.$ac_ext <<_ACEOF
18163/* end confdefs.h. */
18164#include <sys/epoll.h>
18165int
18166main ()
18167{
18168void *x=epoll_create
18169 ;
18170 return 0;
18171}
18172_ACEOF
18173rm -f conftest.$ac_objext
18174if { (ac_try="$ac_compile"
18175case "(($ac_try" in
18176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18177 *) ac_try_echo=$ac_try;;
18178esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018180 (eval "$ac_compile") 2>conftest.er1
18181 ac_status=$?
18182 grep -v '^ *+' conftest.er1 >conftest.err
18183 rm -f conftest.er1
18184 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018186 (exit $ac_status); } && {
18187 test -z "$ac_c_werror_flag" ||
18188 test ! -s conftest.err
18189 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018190
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018191cat >>confdefs.h <<\_ACEOF
18192#define HAVE_EPOLL 1
18193_ACEOF
18194
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018195 { echo "$as_me:$LINENO: result: yes" >&5
18196echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018198 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018199sed 's/^/| /' conftest.$ac_ext >&5
18200
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018201 { echo "$as_me:$LINENO: result: no" >&5
18202echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018203
18204fi
18205
18206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018207{ echo "$as_me:$LINENO: checking for kqueue" >&5
18208echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018209cat >conftest.$ac_ext <<_ACEOF
18210/* confdefs.h. */
18211_ACEOF
18212cat confdefs.h >>conftest.$ac_ext
18213cat >>conftest.$ac_ext <<_ACEOF
18214/* end confdefs.h. */
18215
18216#include <sys/types.h>
18217#include <sys/event.h>
18218
18219int
18220main ()
18221{
18222int x=kqueue()
18223 ;
18224 return 0;
18225}
18226_ACEOF
18227rm -f conftest.$ac_objext
18228if { (ac_try="$ac_compile"
18229case "(($ac_try" in
18230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18231 *) ac_try_echo=$ac_try;;
18232esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018234 (eval "$ac_compile") 2>conftest.er1
18235 ac_status=$?
18236 grep -v '^ *+' conftest.er1 >conftest.err
18237 rm -f conftest.er1
18238 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018240 (exit $ac_status); } && {
18241 test -z "$ac_c_werror_flag" ||
18242 test ! -s conftest.err
18243 } && test -s conftest.$ac_objext; then
18244
18245cat >>confdefs.h <<\_ACEOF
18246#define HAVE_KQUEUE 1
18247_ACEOF
18248
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018249 { echo "$as_me:$LINENO: result: yes" >&5
18250echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018251else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018252 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018253sed 's/^/| /' conftest.$ac_ext >&5
18254
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018255 { echo "$as_me:$LINENO: result: no" >&5
18256echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018257
18258fi
18259
18260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018261# On some systems (eg. FreeBSD 5), we would find a definition of the
18262# functions ctermid_r, setgroups in the library, but no prototype
18263# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18264# address to avoid compiler warnings and potential miscompilations
18265# because of the missing prototypes.
18266
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018267{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18268echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018269cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018270/* confdefs.h. */
18271_ACEOF
18272cat confdefs.h >>conftest.$ac_ext
18273cat >>conftest.$ac_ext <<_ACEOF
18274/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018275
18276#include "confdefs.h"
18277#include <stdio.h>
18278
Martin v. Löwisd5843682002-11-21 20:41:28 +000018279int
18280main ()
18281{
18282void* p = ctermid_r
18283 ;
18284 return 0;
18285}
18286_ACEOF
18287rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018288if { (ac_try="$ac_compile"
18289case "(($ac_try" in
18290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18291 *) ac_try_echo=$ac_try;;
18292esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018296 grep -v '^ *+' conftest.er1 >conftest.err
18297 rm -f conftest.er1
18298 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018300 (exit $ac_status); } && {
18301 test -z "$ac_c_werror_flag" ||
18302 test ! -s conftest.err
18303 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018304
18305cat >>confdefs.h <<\_ACEOF
18306#define HAVE_CTERMID_R 1
18307_ACEOF
18308
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018309 { echo "$as_me:$LINENO: result: yes" >&5
18310echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018311else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018313sed 's/^/| /' conftest.$ac_ext >&5
18314
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018315 { echo "$as_me:$LINENO: result: no" >&5
18316echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018317
18318fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18321
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018322{ echo "$as_me:$LINENO: checking for flock" >&5
18323echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018324cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018325/* confdefs.h. */
18326_ACEOF
18327cat confdefs.h >>conftest.$ac_ext
18328cat >>conftest.$ac_ext <<_ACEOF
18329/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018330
18331#include "confdefs.h"
18332#include <sys/file.h>
18333
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018334int
18335main ()
18336{
18337void* p = flock
18338 ;
18339 return 0;
18340}
18341_ACEOF
18342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018343if { (ac_try="$ac_compile"
18344case "(($ac_try" in
18345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18346 *) ac_try_echo=$ac_try;;
18347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018351 grep -v '^ *+' conftest.er1 >conftest.err
18352 rm -f conftest.er1
18353 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018355 (exit $ac_status); } && {
18356 test -z "$ac_c_werror_flag" ||
18357 test ! -s conftest.err
18358 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018359
18360cat >>confdefs.h <<\_ACEOF
18361#define HAVE_FLOCK 1
18362_ACEOF
18363
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018364 { echo "$as_me:$LINENO: result: yes" >&5
18365echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018368sed 's/^/| /' conftest.$ac_ext >&5
18369
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018370 { echo "$as_me:$LINENO: result: no" >&5
18371echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018372
18373fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18376
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018377{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18378echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018379cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018380/* confdefs.h. */
18381_ACEOF
18382cat confdefs.h >>conftest.$ac_ext
18383cat >>conftest.$ac_ext <<_ACEOF
18384/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018385
18386#include "confdefs.h"
18387#include <unistd.h>
18388
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018389int
18390main ()
18391{
18392void* p = getpagesize
18393 ;
18394 return 0;
18395}
18396_ACEOF
18397rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398if { (ac_try="$ac_compile"
18399case "(($ac_try" in
18400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18401 *) ac_try_echo=$ac_try;;
18402esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018406 grep -v '^ *+' conftest.er1 >conftest.err
18407 rm -f conftest.er1
18408 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018410 (exit $ac_status); } && {
18411 test -z "$ac_c_werror_flag" ||
18412 test ! -s conftest.err
18413 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018414
18415cat >>confdefs.h <<\_ACEOF
18416#define HAVE_GETPAGESIZE 1
18417_ACEOF
18418
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018419 { echo "$as_me:$LINENO: result: yes" >&5
18420echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018421else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018423sed 's/^/| /' conftest.$ac_ext >&5
18424
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018425 { echo "$as_me:$LINENO: result: no" >&5
18426echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018427
18428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018429
18430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018431
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018432for ac_prog in true
18433do
18434 # Extract the first word of "$ac_prog", so it can be a program name with args.
18435set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018436{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018438if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018439 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018440else
18441 if test -n "$TRUE"; then
18442 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18443else
18444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18445for as_dir in $PATH
18446do
18447 IFS=$as_save_IFS
18448 test -z "$as_dir" && as_dir=.
18449 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018450 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 +000018451 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018452 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018453 break 2
18454 fi
18455done
18456done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018458
18459fi
18460fi
18461TRUE=$ac_cv_prog_TRUE
18462if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018463 { echo "$as_me:$LINENO: result: $TRUE" >&5
18464echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018466 { echo "$as_me:$LINENO: result: no" >&5
18467echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018468fi
18469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018471 test -n "$TRUE" && break
18472done
18473test -n "$TRUE" || TRUE="/bin/true"
18474
18475
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018476{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18477echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018478if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018479 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018480else
18481 ac_check_lib_save_LIBS=$LIBS
18482LIBS="-lc $LIBS"
18483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018484/* confdefs.h. */
18485_ACEOF
18486cat confdefs.h >>conftest.$ac_ext
18487cat >>conftest.$ac_ext <<_ACEOF
18488/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018490/* Override any GCC internal prototype to avoid an error.
18491 Use char because int might match the return type of a GCC
18492 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018493#ifdef __cplusplus
18494extern "C"
18495#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018496char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018497int
18498main ()
18499{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018501 ;
18502 return 0;
18503}
18504_ACEOF
18505rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018506if { (ac_try="$ac_link"
18507case "(($ac_try" in
18508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18509 *) ac_try_echo=$ac_try;;
18510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018512 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018514 grep -v '^ *+' conftest.er1 >conftest.err
18515 rm -f conftest.er1
18516 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518 (exit $ac_status); } && {
18519 test -z "$ac_c_werror_flag" ||
18520 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018521 } && test -s conftest$ac_exeext &&
18522 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018523 ac_cv_lib_c_inet_aton=yes
18524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018526sed 's/^/| /' conftest.$ac_ext >&5
18527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018528 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018530
18531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018533LIBS=$ac_check_lib_save_LIBS
18534fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018535{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18536echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18537if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018538 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018539else
18540
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018541{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18542echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018543if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018544 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018545else
18546 ac_check_lib_save_LIBS=$LIBS
18547LIBS="-lresolv $LIBS"
18548cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018549/* confdefs.h. */
18550_ACEOF
18551cat confdefs.h >>conftest.$ac_ext
18552cat >>conftest.$ac_ext <<_ACEOF
18553/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555/* Override any GCC internal prototype to avoid an error.
18556 Use char because int might match the return type of a GCC
18557 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018558#ifdef __cplusplus
18559extern "C"
18560#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018561char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018562int
18563main ()
18564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018565return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018566 ;
18567 return 0;
18568}
18569_ACEOF
18570rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018571if { (ac_try="$ac_link"
18572case "(($ac_try" in
18573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18574 *) ac_try_echo=$ac_try;;
18575esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018577 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018579 grep -v '^ *+' conftest.er1 >conftest.err
18580 rm -f conftest.er1
18581 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018583 (exit $ac_status); } && {
18584 test -z "$ac_c_werror_flag" ||
18585 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018586 } && test -s conftest$ac_exeext &&
18587 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018588 ac_cv_lib_resolv_inet_aton=yes
18589else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018591sed 's/^/| /' conftest.$ac_ext >&5
18592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018593 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018595
18596rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018597 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018598LIBS=$ac_check_lib_save_LIBS
18599fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018600{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18601echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18602if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018603 cat >>confdefs.h <<_ACEOF
18604#define HAVE_LIBRESOLV 1
18605_ACEOF
18606
18607 LIBS="-lresolv $LIBS"
18608
18609fi
18610
18611
18612fi
18613
18614
Christian Heimesd0764e22007-12-04 15:00:33 +000018615# On Tru64, chflags seems to be present, but calling it will
18616# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018617{ echo "$as_me:$LINENO: checking for chflags" >&5
18618echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018619if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018620 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018621else
18622 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018623 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018624else
18625 cat >conftest.$ac_ext <<_ACEOF
18626/* confdefs.h. */
18627_ACEOF
18628cat confdefs.h >>conftest.$ac_ext
18629cat >>conftest.$ac_ext <<_ACEOF
18630/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018631[
Christian Heimesd0764e22007-12-04 15:00:33 +000018632#include <sys/stat.h>
18633#include <unistd.h>
18634int main(int argc, char*argv[])
18635{
18636 if(chflags(argv[0], 0) != 0)
18637 return 1;
18638 return 0;
18639}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018640]
Christian Heimesd0764e22007-12-04 15:00:33 +000018641_ACEOF
18642rm -f conftest$ac_exeext
18643if { (ac_try="$ac_link"
18644case "(($ac_try" in
18645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18646 *) ac_try_echo=$ac_try;;
18647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018649 (eval "$ac_link") 2>&5
18650 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18653 { (case "(($ac_try" in
18654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18655 *) ac_try_echo=$ac_try;;
18656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018658 (eval "$ac_try") 2>&5
18659 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018661 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018662 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018664 echo "$as_me: program exited with status $ac_status" >&5
18665echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018666sed 's/^/| /' conftest.$ac_ext >&5
18667
18668( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018669ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018670fi
18671rm -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 +000018672fi
18673
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018674
18675
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018676fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018677{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18678echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018679if test "$ac_cv_have_chflags" = cross ; then
18680 { echo "$as_me:$LINENO: checking for chflags" >&5
18681echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18682if test "${ac_cv_func_chflags+set}" = set; then
18683 echo $ECHO_N "(cached) $ECHO_C" >&6
18684else
18685 cat >conftest.$ac_ext <<_ACEOF
18686/* confdefs.h. */
18687_ACEOF
18688cat confdefs.h >>conftest.$ac_ext
18689cat >>conftest.$ac_ext <<_ACEOF
18690/* end confdefs.h. */
18691/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18692 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18693#define chflags innocuous_chflags
18694
18695/* System header to define __stub macros and hopefully few prototypes,
18696 which can conflict with char chflags (); below.
18697 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18698 <limits.h> exists even on freestanding compilers. */
18699
18700#ifdef __STDC__
18701# include <limits.h>
18702#else
18703# include <assert.h>
18704#endif
18705
18706#undef chflags
18707
18708/* Override any GCC internal prototype to avoid an error.
18709 Use char because int might match the return type of a GCC
18710 builtin and then its argument prototype would still apply. */
18711#ifdef __cplusplus
18712extern "C"
18713#endif
18714char chflags ();
18715/* The GNU C library defines this for functions which it implements
18716 to always fail with ENOSYS. Some functions are actually named
18717 something starting with __ and the normal name is an alias. */
18718#if defined __stub_chflags || defined __stub___chflags
18719choke me
18720#endif
18721
18722int
18723main ()
18724{
18725return chflags ();
18726 ;
18727 return 0;
18728}
18729_ACEOF
18730rm -f conftest.$ac_objext conftest$ac_exeext
18731if { (ac_try="$ac_link"
18732case "(($ac_try" in
18733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18734 *) ac_try_echo=$ac_try;;
18735esac
18736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18737 (eval "$ac_link") 2>conftest.er1
18738 ac_status=$?
18739 grep -v '^ *+' conftest.er1 >conftest.err
18740 rm -f conftest.er1
18741 cat conftest.err >&5
18742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18743 (exit $ac_status); } && {
18744 test -z "$ac_c_werror_flag" ||
18745 test ! -s conftest.err
18746 } && test -s conftest$ac_exeext &&
18747 $as_test_x conftest$ac_exeext; then
18748 ac_cv_func_chflags=yes
18749else
18750 echo "$as_me: failed program was:" >&5
18751sed 's/^/| /' conftest.$ac_ext >&5
18752
18753 ac_cv_func_chflags=no
18754fi
18755
18756rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18757 conftest$ac_exeext conftest.$ac_ext
18758fi
18759{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18760echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18761if test $ac_cv_func_chflags = yes; then
18762 ac_cv_have_chflags="yes"
18763else
18764 ac_cv_have_chflags="no"
18765fi
18766
18767fi
18768if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018769
18770cat >>confdefs.h <<\_ACEOF
18771#define HAVE_CHFLAGS 1
18772_ACEOF
18773
18774fi
18775
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018776{ echo "$as_me:$LINENO: checking for lchflags" >&5
18777echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018778if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018779 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018780else
18781 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018782 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018783else
18784 cat >conftest.$ac_ext <<_ACEOF
18785/* confdefs.h. */
18786_ACEOF
18787cat confdefs.h >>conftest.$ac_ext
18788cat >>conftest.$ac_ext <<_ACEOF
18789/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018790[
Christian Heimesd0764e22007-12-04 15:00:33 +000018791#include <sys/stat.h>
18792#include <unistd.h>
18793int main(int argc, char*argv[])
18794{
18795 if(lchflags(argv[0], 0) != 0)
18796 return 1;
18797 return 0;
18798}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018799]
Christian Heimesd0764e22007-12-04 15:00:33 +000018800_ACEOF
18801rm -f conftest$ac_exeext
18802if { (ac_try="$ac_link"
18803case "(($ac_try" in
18804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18805 *) ac_try_echo=$ac_try;;
18806esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018808 (eval "$ac_link") 2>&5
18809 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018811 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18812 { (case "(($ac_try" in
18813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18814 *) ac_try_echo=$ac_try;;
18815esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018817 (eval "$ac_try") 2>&5
18818 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018820 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018821 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018822else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018823 echo "$as_me: program exited with status $ac_status" >&5
18824echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018825sed 's/^/| /' conftest.$ac_ext >&5
18826
18827( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018828ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018829fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18831fi
18832
18833
Christian Heimesd0764e22007-12-04 15:00:33 +000018834
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018835fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018836{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18837echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018838if test "$ac_cv_have_lchflags" = cross ; then
18839 { echo "$as_me:$LINENO: checking for lchflags" >&5
18840echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18841if test "${ac_cv_func_lchflags+set}" = set; then
18842 echo $ECHO_N "(cached) $ECHO_C" >&6
18843else
18844 cat >conftest.$ac_ext <<_ACEOF
18845/* confdefs.h. */
18846_ACEOF
18847cat confdefs.h >>conftest.$ac_ext
18848cat >>conftest.$ac_ext <<_ACEOF
18849/* end confdefs.h. */
18850/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18851 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18852#define lchflags innocuous_lchflags
18853
18854/* System header to define __stub macros and hopefully few prototypes,
18855 which can conflict with char lchflags (); below.
18856 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18857 <limits.h> exists even on freestanding compilers. */
18858
18859#ifdef __STDC__
18860# include <limits.h>
18861#else
18862# include <assert.h>
18863#endif
18864
18865#undef lchflags
18866
18867/* Override any GCC internal prototype to avoid an error.
18868 Use char because int might match the return type of a GCC
18869 builtin and then its argument prototype would still apply. */
18870#ifdef __cplusplus
18871extern "C"
18872#endif
18873char lchflags ();
18874/* The GNU C library defines this for functions which it implements
18875 to always fail with ENOSYS. Some functions are actually named
18876 something starting with __ and the normal name is an alias. */
18877#if defined __stub_lchflags || defined __stub___lchflags
18878choke me
18879#endif
18880
18881int
18882main ()
18883{
18884return lchflags ();
18885 ;
18886 return 0;
18887}
18888_ACEOF
18889rm -f conftest.$ac_objext conftest$ac_exeext
18890if { (ac_try="$ac_link"
18891case "(($ac_try" in
18892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18893 *) ac_try_echo=$ac_try;;
18894esac
18895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18896 (eval "$ac_link") 2>conftest.er1
18897 ac_status=$?
18898 grep -v '^ *+' conftest.er1 >conftest.err
18899 rm -f conftest.er1
18900 cat conftest.err >&5
18901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18902 (exit $ac_status); } && {
18903 test -z "$ac_c_werror_flag" ||
18904 test ! -s conftest.err
18905 } && test -s conftest$ac_exeext &&
18906 $as_test_x conftest$ac_exeext; then
18907 ac_cv_func_lchflags=yes
18908else
18909 echo "$as_me: failed program was:" >&5
18910sed 's/^/| /' conftest.$ac_ext >&5
18911
18912 ac_cv_func_lchflags=no
18913fi
18914
18915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18916 conftest$ac_exeext conftest.$ac_ext
18917fi
18918{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18919echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18920if test $ac_cv_func_lchflags = yes; then
18921 ac_cv_have_lchflags="yes"
18922else
18923 ac_cv_have_lchflags="no"
18924fi
18925
18926fi
18927if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018928
18929cat >>confdefs.h <<\_ACEOF
18930#define HAVE_LCHFLAGS 1
18931_ACEOF
18932
18933fi
18934
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018935case $ac_sys_system/$ac_sys_release in
18936Darwin/*)
18937 _CUR_CFLAGS="${CFLAGS}"
18938 _CUR_LDFLAGS="${LDFLAGS}"
18939 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18940 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18941 ;;
18942esac
18943
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018944{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18945echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018946if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018947 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018948else
18949 ac_check_lib_save_LIBS=$LIBS
18950LIBS="-lz $LIBS"
18951cat >conftest.$ac_ext <<_ACEOF
18952/* confdefs.h. */
18953_ACEOF
18954cat confdefs.h >>conftest.$ac_ext
18955cat >>conftest.$ac_ext <<_ACEOF
18956/* end confdefs.h. */
18957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018958/* Override any GCC internal prototype to avoid an error.
18959 Use char because int might match the return type of a GCC
18960 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018961#ifdef __cplusplus
18962extern "C"
18963#endif
18964char inflateCopy ();
18965int
18966main ()
18967{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018968return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018969 ;
18970 return 0;
18971}
18972_ACEOF
18973rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018974if { (ac_try="$ac_link"
18975case "(($ac_try" in
18976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18977 *) ac_try_echo=$ac_try;;
18978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018980 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018981 ac_status=$?
18982 grep -v '^ *+' conftest.er1 >conftest.err
18983 rm -f conftest.er1
18984 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018986 (exit $ac_status); } && {
18987 test -z "$ac_c_werror_flag" ||
18988 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018989 } && test -s conftest$ac_exeext &&
18990 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018991 ac_cv_lib_z_inflateCopy=yes
18992else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018993 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018994sed 's/^/| /' conftest.$ac_ext >&5
18995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018996 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018998
18999rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019000 conftest$ac_exeext conftest.$ac_ext
19001LIBS=$ac_check_lib_save_LIBS
19002fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019003{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19004echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19005if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019006
19007cat >>confdefs.h <<\_ACEOF
19008#define HAVE_ZLIB_COPY 1
19009_ACEOF
19010
19011fi
19012
19013
19014case $ac_sys_system/$ac_sys_release in
19015Darwin/*)
19016 CFLAGS="${_CUR_CFLAGS}"
19017 LDFLAGS="${_CUR_LDFLAGS}"
19018 ;;
19019esac
19020
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019021{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19022echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019024/* confdefs.h. */
19025_ACEOF
19026cat confdefs.h >>conftest.$ac_ext
19027cat >>conftest.$ac_ext <<_ACEOF
19028/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019029
19030#include "confdefs.h"
19031#include <netdb.h>
19032
Martin v. Löwise9416172003-05-03 10:12:45 +000019033int
19034main ()
19035{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019036void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019037 ;
19038 return 0;
19039}
19040_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019041rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019042if { (ac_try="$ac_link"
19043case "(($ac_try" in
19044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19045 *) ac_try_echo=$ac_try;;
19046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019048 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019050 grep -v '^ *+' conftest.er1 >conftest.err
19051 rm -f conftest.er1
19052 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019054 (exit $ac_status); } && {
19055 test -z "$ac_c_werror_flag" ||
19056 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019057 } && test -s conftest$ac_exeext &&
19058 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019059
19060cat >>confdefs.h <<\_ACEOF
19061#define HAVE_HSTRERROR 1
19062_ACEOF
19063
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019064 { echo "$as_me:$LINENO: result: yes" >&5
19065echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019066else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019068sed 's/^/| /' conftest.$ac_ext >&5
19069
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019070 { echo "$as_me:$LINENO: result: no" >&5
19071echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019072
19073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019074
19075rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019076 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019077
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019078{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19079echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019081/* confdefs.h. */
19082_ACEOF
19083cat confdefs.h >>conftest.$ac_ext
19084cat >>conftest.$ac_ext <<_ACEOF
19085/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019086
19087#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019088#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019089#include <sys/socket.h>
19090#include <netinet/in.h>
19091#include <arpa/inet.h>
19092
Martin v. Löwise9416172003-05-03 10:12:45 +000019093int
19094main ()
19095{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019096void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019097 ;
19098 return 0;
19099}
19100_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019101rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019102if { (ac_try="$ac_link"
19103case "(($ac_try" in
19104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19105 *) ac_try_echo=$ac_try;;
19106esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019108 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019110 grep -v '^ *+' conftest.er1 >conftest.err
19111 rm -f conftest.er1
19112 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019114 (exit $ac_status); } && {
19115 test -z "$ac_c_werror_flag" ||
19116 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019117 } && test -s conftest$ac_exeext &&
19118 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019119
19120cat >>confdefs.h <<\_ACEOF
19121#define HAVE_INET_ATON 1
19122_ACEOF
19123
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019124 { echo "$as_me:$LINENO: result: yes" >&5
19125echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019126else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019128sed 's/^/| /' conftest.$ac_ext >&5
19129
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019130 { echo "$as_me:$LINENO: result: no" >&5
19131echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019132
19133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019134
19135rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019137
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019138{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19139echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019141/* confdefs.h. */
19142_ACEOF
19143cat confdefs.h >>conftest.$ac_ext
19144cat >>conftest.$ac_ext <<_ACEOF
19145/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019146
19147#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019148#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019149#include <sys/socket.h>
19150#include <netinet/in.h>
19151#include <arpa/inet.h>
19152
Martin v. Löwise9416172003-05-03 10:12:45 +000019153int
19154main ()
19155{
19156void* p = inet_pton
19157 ;
19158 return 0;
19159}
19160_ACEOF
19161rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019162if { (ac_try="$ac_compile"
19163case "(($ac_try" in
19164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19165 *) ac_try_echo=$ac_try;;
19166esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019170 grep -v '^ *+' conftest.er1 >conftest.err
19171 rm -f conftest.er1
19172 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019174 (exit $ac_status); } && {
19175 test -z "$ac_c_werror_flag" ||
19176 test ! -s conftest.err
19177 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019178
19179cat >>confdefs.h <<\_ACEOF
19180#define HAVE_INET_PTON 1
19181_ACEOF
19182
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019183 { echo "$as_me:$LINENO: result: yes" >&5
19184echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019187sed 's/^/| /' conftest.$ac_ext >&5
19188
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019189 { echo "$as_me:$LINENO: result: no" >&5
19190echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019191
19192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019193
19194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019195
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019196# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019197{ echo "$as_me:$LINENO: checking for setgroups" >&5
19198echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019200/* confdefs.h. */
19201_ACEOF
19202cat confdefs.h >>conftest.$ac_ext
19203cat >>conftest.$ac_ext <<_ACEOF
19204/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019205
19206#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019207#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019208#ifdef HAVE_GRP_H
19209#include <grp.h>
19210#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019211
Martin v. Löwisd5843682002-11-21 20:41:28 +000019212int
19213main ()
19214{
19215void* p = setgroups
19216 ;
19217 return 0;
19218}
19219_ACEOF
19220rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019221if { (ac_try="$ac_compile"
19222case "(($ac_try" in
19223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19224 *) ac_try_echo=$ac_try;;
19225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019229 grep -v '^ *+' conftest.er1 >conftest.err
19230 rm -f conftest.er1
19231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019233 (exit $ac_status); } && {
19234 test -z "$ac_c_werror_flag" ||
19235 test ! -s conftest.err
19236 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019237
19238cat >>confdefs.h <<\_ACEOF
19239#define HAVE_SETGROUPS 1
19240_ACEOF
19241
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019242 { echo "$as_me:$LINENO: result: yes" >&5
19243echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019244else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019246sed 's/^/| /' conftest.$ac_ext >&5
19247
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019248 { echo "$as_me:$LINENO: result: no" >&5
19249echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019250
19251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019252
19253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019254
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019255# check for openpty and forkpty
19256
Martin v. Löwis11437992002-04-12 09:54:03 +000019257
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019258for ac_func in openpty
19259do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019260as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19261{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19262echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019263if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019265else
Martin v. Löwis11437992002-04-12 09:54:03 +000019266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019267/* confdefs.h. */
19268_ACEOF
19269cat confdefs.h >>conftest.$ac_ext
19270cat >>conftest.$ac_ext <<_ACEOF
19271/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019272/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19273 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19274#define $ac_func innocuous_$ac_func
19275
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019276/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019277 which can conflict with char $ac_func (); below.
19278 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019279 <limits.h> exists even on freestanding compilers. */
19280
19281#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019282# include <limits.h>
19283#else
19284# include <assert.h>
19285#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019286
19287#undef $ac_func
19288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019289/* Override any GCC internal prototype to avoid an error.
19290 Use char because int might match the return type of a GCC
19291 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019292#ifdef __cplusplus
19293extern "C"
19294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019295char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019296/* The GNU C library defines this for functions which it implements
19297 to always fail with ENOSYS. Some functions are actually named
19298 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019299#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019300choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019301#endif
19302
Skip Montanaro6dead952003-09-25 14:50:04 +000019303int
19304main ()
19305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019306return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019307 ;
19308 return 0;
19309}
19310_ACEOF
19311rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019312if { (ac_try="$ac_link"
19313case "(($ac_try" in
19314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19315 *) ac_try_echo=$ac_try;;
19316esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019318 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019320 grep -v '^ *+' conftest.er1 >conftest.err
19321 rm -f conftest.er1
19322 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019324 (exit $ac_status); } && {
19325 test -z "$ac_c_werror_flag" ||
19326 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019327 } && test -s conftest$ac_exeext &&
19328 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019329 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019330else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019332sed 's/^/| /' conftest.$ac_ext >&5
19333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019334 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019336
19337rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019338 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019339fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019340ac_res=`eval echo '${'$as_ac_var'}'`
19341 { echo "$as_me:$LINENO: result: $ac_res" >&5
19342echo "${ECHO_T}$ac_res" >&6; }
19343if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019344 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019345#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019346_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019347
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019348else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019349 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19350echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019351if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019352 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019353else
Martin v. Löwis11437992002-04-12 09:54:03 +000019354 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019355LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019356cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019357/* confdefs.h. */
19358_ACEOF
19359cat confdefs.h >>conftest.$ac_ext
19360cat >>conftest.$ac_ext <<_ACEOF
19361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019363/* Override any GCC internal prototype to avoid an error.
19364 Use char because int might match the return type of a GCC
19365 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019366#ifdef __cplusplus
19367extern "C"
19368#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019369char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019370int
19371main ()
19372{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019373return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019374 ;
19375 return 0;
19376}
19377_ACEOF
19378rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019379if { (ac_try="$ac_link"
19380case "(($ac_try" in
19381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19382 *) ac_try_echo=$ac_try;;
19383esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019385 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019387 grep -v '^ *+' conftest.er1 >conftest.err
19388 rm -f conftest.er1
19389 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019391 (exit $ac_status); } && {
19392 test -z "$ac_c_werror_flag" ||
19393 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019394 } && test -s conftest$ac_exeext &&
19395 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019396 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019397else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019399sed 's/^/| /' conftest.$ac_ext >&5
19400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019401 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019403
19404rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019405 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019406LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019407fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019408{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19409echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19410if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019411 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019412#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019413_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019414 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019415else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019416 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19417echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019418if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019419 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019420else
19421 ac_check_lib_save_LIBS=$LIBS
19422LIBS="-lbsd $LIBS"
19423cat >conftest.$ac_ext <<_ACEOF
19424/* confdefs.h. */
19425_ACEOF
19426cat confdefs.h >>conftest.$ac_ext
19427cat >>conftest.$ac_ext <<_ACEOF
19428/* end confdefs.h. */
19429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019430/* Override any GCC internal prototype to avoid an error.
19431 Use char because int might match the return type of a GCC
19432 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019433#ifdef __cplusplus
19434extern "C"
19435#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019436char openpty ();
19437int
19438main ()
19439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019440return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019441 ;
19442 return 0;
19443}
19444_ACEOF
19445rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019446if { (ac_try="$ac_link"
19447case "(($ac_try" in
19448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19449 *) ac_try_echo=$ac_try;;
19450esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019452 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019453 ac_status=$?
19454 grep -v '^ *+' conftest.er1 >conftest.err
19455 rm -f conftest.er1
19456 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019458 (exit $ac_status); } && {
19459 test -z "$ac_c_werror_flag" ||
19460 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019461 } && test -s conftest$ac_exeext &&
19462 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019463 ac_cv_lib_bsd_openpty=yes
19464else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019465 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019466sed 's/^/| /' conftest.$ac_ext >&5
19467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019468 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019470
19471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019472 conftest$ac_exeext conftest.$ac_ext
19473LIBS=$ac_check_lib_save_LIBS
19474fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019475{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19476echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19477if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019478 cat >>confdefs.h <<\_ACEOF
19479#define HAVE_OPENPTY 1
19480_ACEOF
19481 LIBS="$LIBS -lbsd"
19482fi
19483
19484
19485fi
19486
Fred Drake8cef4cf2000-06-28 16:40:38 +000019487
19488fi
19489done
19490
Martin v. Löwis11437992002-04-12 09:54:03 +000019491
Fred Drake8cef4cf2000-06-28 16:40:38 +000019492for ac_func in forkpty
19493do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019494as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19495{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19496echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019497if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019498 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019499else
Martin v. Löwis11437992002-04-12 09:54:03 +000019500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019501/* confdefs.h. */
19502_ACEOF
19503cat confdefs.h >>conftest.$ac_ext
19504cat >>conftest.$ac_ext <<_ACEOF
19505/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019506/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19507 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19508#define $ac_func innocuous_$ac_func
19509
Fred Drake8cef4cf2000-06-28 16:40:38 +000019510/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019511 which can conflict with char $ac_func (); below.
19512 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019513 <limits.h> exists even on freestanding compilers. */
19514
19515#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019516# include <limits.h>
19517#else
19518# include <assert.h>
19519#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019520
19521#undef $ac_func
19522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019523/* Override any GCC internal prototype to avoid an error.
19524 Use char because int might match the return type of a GCC
19525 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019526#ifdef __cplusplus
19527extern "C"
19528#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019529char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019530/* The GNU C library defines this for functions which it implements
19531 to always fail with ENOSYS. Some functions are actually named
19532 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019533#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019534choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019535#endif
19536
Skip Montanaro6dead952003-09-25 14:50:04 +000019537int
19538main ()
19539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019540return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019541 ;
19542 return 0;
19543}
19544_ACEOF
19545rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019546if { (ac_try="$ac_link"
19547case "(($ac_try" in
19548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19549 *) ac_try_echo=$ac_try;;
19550esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019552 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019554 grep -v '^ *+' conftest.er1 >conftest.err
19555 rm -f conftest.er1
19556 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019558 (exit $ac_status); } && {
19559 test -z "$ac_c_werror_flag" ||
19560 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019561 } && test -s conftest$ac_exeext &&
19562 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019563 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019564else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019566sed 's/^/| /' conftest.$ac_ext >&5
19567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019568 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019570
19571rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019572 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019573fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019574ac_res=`eval echo '${'$as_ac_var'}'`
19575 { echo "$as_me:$LINENO: result: $ac_res" >&5
19576echo "${ECHO_T}$ac_res" >&6; }
19577if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019578 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019579#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019580_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019581
Fred Drake8cef4cf2000-06-28 16:40:38 +000019582else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019583 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19584echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019585if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019586 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019587else
Martin v. Löwis11437992002-04-12 09:54:03 +000019588 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019589LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019590cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019591/* confdefs.h. */
19592_ACEOF
19593cat confdefs.h >>conftest.$ac_ext
19594cat >>conftest.$ac_ext <<_ACEOF
19595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019597/* Override any GCC internal prototype to avoid an error.
19598 Use char because int might match the return type of a GCC
19599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019600#ifdef __cplusplus
19601extern "C"
19602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019603char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019604int
19605main ()
19606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019607return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019608 ;
19609 return 0;
19610}
19611_ACEOF
19612rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019613if { (ac_try="$ac_link"
19614case "(($ac_try" in
19615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19616 *) ac_try_echo=$ac_try;;
19617esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019619 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019621 grep -v '^ *+' conftest.er1 >conftest.err
19622 rm -f conftest.er1
19623 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019625 (exit $ac_status); } && {
19626 test -z "$ac_c_werror_flag" ||
19627 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019628 } && test -s conftest$ac_exeext &&
19629 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019630 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019631else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019633sed 's/^/| /' conftest.$ac_ext >&5
19634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019635 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019637
19638rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019639 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019640LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019641fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019642{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19643echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19644if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019645 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019646#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019647_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019648 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019649else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019650 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19651echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019652if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019653 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019654else
19655 ac_check_lib_save_LIBS=$LIBS
19656LIBS="-lbsd $LIBS"
19657cat >conftest.$ac_ext <<_ACEOF
19658/* confdefs.h. */
19659_ACEOF
19660cat confdefs.h >>conftest.$ac_ext
19661cat >>conftest.$ac_ext <<_ACEOF
19662/* end confdefs.h. */
19663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019664/* Override any GCC internal prototype to avoid an error.
19665 Use char because int might match the return type of a GCC
19666 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019667#ifdef __cplusplus
19668extern "C"
19669#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019670char forkpty ();
19671int
19672main ()
19673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019674return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019675 ;
19676 return 0;
19677}
19678_ACEOF
19679rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019680if { (ac_try="$ac_link"
19681case "(($ac_try" in
19682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19683 *) ac_try_echo=$ac_try;;
19684esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019686 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019687 ac_status=$?
19688 grep -v '^ *+' conftest.er1 >conftest.err
19689 rm -f conftest.er1
19690 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019692 (exit $ac_status); } && {
19693 test -z "$ac_c_werror_flag" ||
19694 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019695 } && test -s conftest$ac_exeext &&
19696 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019697 ac_cv_lib_bsd_forkpty=yes
19698else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019699 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019700sed 's/^/| /' conftest.$ac_ext >&5
19701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019702 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019704
19705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019706 conftest$ac_exeext conftest.$ac_ext
19707LIBS=$ac_check_lib_save_LIBS
19708fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019709{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19710echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19711if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019712 cat >>confdefs.h <<\_ACEOF
19713#define HAVE_FORKPTY 1
19714_ACEOF
19715 LIBS="$LIBS -lbsd"
19716fi
19717
19718
19719fi
19720
Fred Drake8cef4cf2000-06-28 16:40:38 +000019721
19722fi
19723done
19724
Jack Jansendd19cf82001-12-06 22:36:17 +000019725
Christian Heimesb186d002008-03-18 15:15:01 +000019726# Stuff for expat.
19727
19728for ac_func in memmove
19729do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019730as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19731{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19732echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019733if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019734 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019735else
19736 cat >conftest.$ac_ext <<_ACEOF
19737/* confdefs.h. */
19738_ACEOF
19739cat confdefs.h >>conftest.$ac_ext
19740cat >>conftest.$ac_ext <<_ACEOF
19741/* end confdefs.h. */
19742/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19743 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19744#define $ac_func innocuous_$ac_func
19745
19746/* System header to define __stub macros and hopefully few prototypes,
19747 which can conflict with char $ac_func (); below.
19748 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19749 <limits.h> exists even on freestanding compilers. */
19750
19751#ifdef __STDC__
19752# include <limits.h>
19753#else
19754# include <assert.h>
19755#endif
19756
19757#undef $ac_func
19758
19759/* Override any GCC internal prototype to avoid an error.
19760 Use char because int might match the return type of a GCC
19761 builtin and then its argument prototype would still apply. */
19762#ifdef __cplusplus
19763extern "C"
19764#endif
19765char $ac_func ();
19766/* The GNU C library defines this for functions which it implements
19767 to always fail with ENOSYS. Some functions are actually named
19768 something starting with __ and the normal name is an alias. */
19769#if defined __stub_$ac_func || defined __stub___$ac_func
19770choke me
19771#endif
19772
19773int
19774main ()
19775{
19776return $ac_func ();
19777 ;
19778 return 0;
19779}
19780_ACEOF
19781rm -f conftest.$ac_objext conftest$ac_exeext
19782if { (ac_try="$ac_link"
19783case "(($ac_try" in
19784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19785 *) ac_try_echo=$ac_try;;
19786esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019788 (eval "$ac_link") 2>conftest.er1
19789 ac_status=$?
19790 grep -v '^ *+' conftest.er1 >conftest.err
19791 rm -f conftest.er1
19792 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019794 (exit $ac_status); } && {
19795 test -z "$ac_c_werror_flag" ||
19796 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019797 } && test -s conftest$ac_exeext &&
19798 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019799 eval "$as_ac_var=yes"
19800else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019801 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019802sed 's/^/| /' conftest.$ac_ext >&5
19803
19804 eval "$as_ac_var=no"
19805fi
19806
19807rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19808 conftest$ac_exeext conftest.$ac_ext
19809fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019810ac_res=`eval echo '${'$as_ac_var'}'`
19811 { echo "$as_me:$LINENO: result: $ac_res" >&5
19812echo "${ECHO_T}$ac_res" >&6; }
19813if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019814 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019815#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019816_ACEOF
19817
19818fi
19819done
19820
19821
Michael W. Hudson54241132001-12-07 15:38:26 +000019822# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019823
19824
19825
19826
19827
19828
Fred Drake8cef4cf2000-06-28 16:40:38 +000019829for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19830do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019831as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19832{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19833echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019834if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019835 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019836else
Martin v. Löwis11437992002-04-12 09:54:03 +000019837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019838/* confdefs.h. */
19839_ACEOF
19840cat confdefs.h >>conftest.$ac_ext
19841cat >>conftest.$ac_ext <<_ACEOF
19842/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019843/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19844 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19845#define $ac_func innocuous_$ac_func
19846
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019847/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019848 which can conflict with char $ac_func (); below.
19849 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019850 <limits.h> exists even on freestanding compilers. */
19851
19852#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019853# include <limits.h>
19854#else
19855# include <assert.h>
19856#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019857
19858#undef $ac_func
19859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019860/* Override any GCC internal prototype to avoid an error.
19861 Use char because int might match the return type of a GCC
19862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019863#ifdef __cplusplus
19864extern "C"
19865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019866char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019867/* The GNU C library defines this for functions which it implements
19868 to always fail with ENOSYS. Some functions are actually named
19869 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019870#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019871choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019872#endif
19873
Skip Montanaro6dead952003-09-25 14:50:04 +000019874int
19875main ()
19876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019877return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019878 ;
19879 return 0;
19880}
19881_ACEOF
19882rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019883if { (ac_try="$ac_link"
19884case "(($ac_try" in
19885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19886 *) ac_try_echo=$ac_try;;
19887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019889 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019891 grep -v '^ *+' conftest.er1 >conftest.err
19892 rm -f conftest.er1
19893 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019895 (exit $ac_status); } && {
19896 test -z "$ac_c_werror_flag" ||
19897 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019898 } && test -s conftest$ac_exeext &&
19899 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019900 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019901else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019903sed 's/^/| /' conftest.$ac_ext >&5
19904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019905 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019907
19908rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019909 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019910fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019911ac_res=`eval echo '${'$as_ac_var'}'`
19912 { echo "$as_me:$LINENO: result: $ac_res" >&5
19913echo "${ECHO_T}$ac_res" >&6; }
19914if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019915 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019916#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019917_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019918
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019919fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019920done
19921
Michael W. Hudson54241132001-12-07 15:38:26 +000019922
Martin v. Löwis11437992002-04-12 09:54:03 +000019923
19924
19925
Christian Heimesb186d002008-03-18 15:15:01 +000019926for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019927do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019928as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19929{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19930echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019931if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019932 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019933else
Martin v. Löwis11437992002-04-12 09:54:03 +000019934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019935/* confdefs.h. */
19936_ACEOF
19937cat confdefs.h >>conftest.$ac_ext
19938cat >>conftest.$ac_ext <<_ACEOF
19939/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019940/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19941 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19942#define $ac_func innocuous_$ac_func
19943
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019944/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019945 which can conflict with char $ac_func (); below.
19946 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019947 <limits.h> exists even on freestanding compilers. */
19948
19949#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019950# include <limits.h>
19951#else
19952# include <assert.h>
19953#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019954
19955#undef $ac_func
19956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019957/* Override any GCC internal prototype to avoid an error.
19958 Use char because int might match the return type of a GCC
19959 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019960#ifdef __cplusplus
19961extern "C"
19962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019963char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019964/* The GNU C library defines this for functions which it implements
19965 to always fail with ENOSYS. Some functions are actually named
19966 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019967#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019968choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019969#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019970
Skip Montanaro6dead952003-09-25 14:50:04 +000019971int
19972main ()
19973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019974return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019975 ;
19976 return 0;
19977}
19978_ACEOF
19979rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019980if { (ac_try="$ac_link"
19981case "(($ac_try" in
19982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19983 *) ac_try_echo=$ac_try;;
19984esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019986 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019988 grep -v '^ *+' conftest.er1 >conftest.err
19989 rm -f conftest.er1
19990 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019992 (exit $ac_status); } && {
19993 test -z "$ac_c_werror_flag" ||
19994 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019995 } && test -s conftest$ac_exeext &&
19996 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019997 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019998else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020000sed 's/^/| /' conftest.$ac_ext >&5
20001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020002 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020004
20005rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020007fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020008ac_res=`eval echo '${'$as_ac_var'}'`
20009 { echo "$as_me:$LINENO: result: $ac_res" >&5
20010echo "${ECHO_T}$ac_res" >&6; }
20011if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020012 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020013#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020014_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020015
Martin v. Löwis1142de32002-03-29 16:28:31 +000020016else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020017 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020018 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020019 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20020 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020021esac
20022
Martin v. Löwis1142de32002-03-29 16:28:31 +000020023fi
20024done
20025
20026
Martin v. Löwis11437992002-04-12 09:54:03 +000020027
Martin v. Löwis1142de32002-03-29 16:28:31 +000020028for ac_func in getpgrp
20029do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020030as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20031{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20032echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020033if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020034 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020035else
Martin v. Löwis11437992002-04-12 09:54:03 +000020036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020037/* confdefs.h. */
20038_ACEOF
20039cat confdefs.h >>conftest.$ac_ext
20040cat >>conftest.$ac_ext <<_ACEOF
20041/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020042/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20043 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20044#define $ac_func innocuous_$ac_func
20045
Martin v. Löwis1142de32002-03-29 16:28:31 +000020046/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020047 which can conflict with char $ac_func (); below.
20048 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020049 <limits.h> exists even on freestanding compilers. */
20050
20051#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020052# include <limits.h>
20053#else
20054# include <assert.h>
20055#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020056
20057#undef $ac_func
20058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020059/* Override any GCC internal prototype to avoid an error.
20060 Use char because int might match the return type of a GCC
20061 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020062#ifdef __cplusplus
20063extern "C"
20064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020065char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020066/* The GNU C library defines this for functions which it implements
20067 to always fail with ENOSYS. Some functions are actually named
20068 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020069#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020070choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020071#endif
20072
Skip Montanaro6dead952003-09-25 14:50:04 +000020073int
20074main ()
20075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020076return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 ;
20078 return 0;
20079}
20080_ACEOF
20081rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020082if { (ac_try="$ac_link"
20083case "(($ac_try" in
20084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20085 *) ac_try_echo=$ac_try;;
20086esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020088 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020090 grep -v '^ *+' conftest.er1 >conftest.err
20091 rm -f conftest.er1
20092 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020094 (exit $ac_status); } && {
20095 test -z "$ac_c_werror_flag" ||
20096 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020097 } && test -s conftest$ac_exeext &&
20098 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020099 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020100else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020102sed 's/^/| /' conftest.$ac_ext >&5
20103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020104 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020106
20107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020108 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020109fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020110ac_res=`eval echo '${'$as_ac_var'}'`
20111 { echo "$as_me:$LINENO: result: $ac_res" >&5
20112echo "${ECHO_T}$ac_res" >&6; }
20113if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020114 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020116_ACEOF
20117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020118/* confdefs.h. */
20119_ACEOF
20120cat confdefs.h >>conftest.$ac_ext
20121cat >>conftest.$ac_ext <<_ACEOF
20122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020123#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020124int
20125main ()
20126{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020127getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020128 ;
20129 return 0;
20130}
20131_ACEOF
20132rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020133if { (ac_try="$ac_compile"
20134case "(($ac_try" in
20135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20136 *) ac_try_echo=$ac_try;;
20137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020141 grep -v '^ *+' conftest.er1 >conftest.err
20142 rm -f conftest.er1
20143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020145 (exit $ac_status); } && {
20146 test -z "$ac_c_werror_flag" ||
20147 test ! -s conftest.err
20148 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020149
20150cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020151#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020152_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020153
Martin v. Löwis11437992002-04-12 09:54:03 +000020154
Guido van Rossumf78abae1997-01-21 22:02:36 +000020155else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020157sed 's/^/| /' conftest.$ac_ext >&5
20158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020159
Guido van Rossum627b2d71993-12-24 10:39:16 +000020160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020161
20162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020163
Guido van Rossum627b2d71993-12-24 10:39:16 +000020164fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020165done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020166
Jack Jansen150753c2003-03-29 22:07:47 +000020167
20168for ac_func in setpgrp
20169do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020170as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20171{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20172echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020173if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020174 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020175else
Martin v. Löwis11437992002-04-12 09:54:03 +000020176 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020177/* confdefs.h. */
20178_ACEOF
20179cat confdefs.h >>conftest.$ac_ext
20180cat >>conftest.$ac_ext <<_ACEOF
20181/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020182/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20183 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20184#define $ac_func innocuous_$ac_func
20185
Jack Jansen150753c2003-03-29 22:07:47 +000020186/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020187 which can conflict with char $ac_func (); below.
20188 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020189 <limits.h> exists even on freestanding compilers. */
20190
20191#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020192# include <limits.h>
20193#else
20194# include <assert.h>
20195#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020196
20197#undef $ac_func
20198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020199/* Override any GCC internal prototype to avoid an error.
20200 Use char because int might match the return type of a GCC
20201 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020202#ifdef __cplusplus
20203extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020204#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020205char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020206/* The GNU C library defines this for functions which it implements
20207 to always fail with ENOSYS. Some functions are actually named
20208 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020209#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020210choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020211#endif
20212
Skip Montanaro6dead952003-09-25 14:50:04 +000020213int
20214main ()
20215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020216return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020217 ;
20218 return 0;
20219}
20220_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020221rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020222if { (ac_try="$ac_link"
20223case "(($ac_try" in
20224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20225 *) ac_try_echo=$ac_try;;
20226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020228 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020230 grep -v '^ *+' conftest.er1 >conftest.err
20231 rm -f conftest.er1
20232 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020234 (exit $ac_status); } && {
20235 test -z "$ac_c_werror_flag" ||
20236 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020237 } && test -s conftest$ac_exeext &&
20238 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020239 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020242sed 's/^/| /' conftest.$ac_ext >&5
20243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020244 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020246
20247rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020248 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020249fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020250ac_res=`eval echo '${'$as_ac_var'}'`
20251 { echo "$as_me:$LINENO: result: $ac_res" >&5
20252echo "${ECHO_T}$ac_res" >&6; }
20253if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020254 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020255#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020256_ACEOF
20257 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020258/* confdefs.h. */
20259_ACEOF
20260cat confdefs.h >>conftest.$ac_ext
20261cat >>conftest.$ac_ext <<_ACEOF
20262/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020263#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020264int
20265main ()
20266{
20267setpgrp(0,0);
20268 ;
20269 return 0;
20270}
20271_ACEOF
20272rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020273if { (ac_try="$ac_compile"
20274case "(($ac_try" in
20275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20276 *) ac_try_echo=$ac_try;;
20277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020279 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020281 grep -v '^ *+' conftest.er1 >conftest.err
20282 rm -f conftest.er1
20283 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020285 (exit $ac_status); } && {
20286 test -z "$ac_c_werror_flag" ||
20287 test ! -s conftest.err
20288 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020289
20290cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020291#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020292_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020293
Jack Jansen150753c2003-03-29 22:07:47 +000020294
20295else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020297sed 's/^/| /' conftest.$ac_ext >&5
20298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020299
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020301
20302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020303
20304fi
20305done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020306
Martin v. Löwis11437992002-04-12 09:54:03 +000020307
Thomas Wouters3a584202000-08-05 23:28:51 +000020308for ac_func in gettimeofday
20309do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020310as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20311{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20312echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020313if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020314 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020315else
Martin v. Löwis11437992002-04-12 09:54:03 +000020316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020317/* confdefs.h. */
20318_ACEOF
20319cat confdefs.h >>conftest.$ac_ext
20320cat >>conftest.$ac_ext <<_ACEOF
20321/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020322/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20323 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20324#define $ac_func innocuous_$ac_func
20325
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020326/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020327 which can conflict with char $ac_func (); below.
20328 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020329 <limits.h> exists even on freestanding compilers. */
20330
20331#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020332# include <limits.h>
20333#else
20334# include <assert.h>
20335#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020336
20337#undef $ac_func
20338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020339/* Override any GCC internal prototype to avoid an error.
20340 Use char because int might match the return type of a GCC
20341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020342#ifdef __cplusplus
20343extern "C"
20344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020345char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020346/* The GNU C library defines this for functions which it implements
20347 to always fail with ENOSYS. Some functions are actually named
20348 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020349#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020350choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020351#endif
20352
Skip Montanaro6dead952003-09-25 14:50:04 +000020353int
20354main ()
20355{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020356return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020357 ;
20358 return 0;
20359}
20360_ACEOF
20361rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020362if { (ac_try="$ac_link"
20363case "(($ac_try" in
20364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20365 *) ac_try_echo=$ac_try;;
20366esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020368 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020369 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020370 grep -v '^ *+' conftest.er1 >conftest.err
20371 rm -f conftest.er1
20372 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020374 (exit $ac_status); } && {
20375 test -z "$ac_c_werror_flag" ||
20376 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020377 } && test -s conftest$ac_exeext &&
20378 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020379 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020380else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020382sed 's/^/| /' conftest.$ac_ext >&5
20383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020384 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020386
20387rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020388 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020389fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020390ac_res=`eval echo '${'$as_ac_var'}'`
20391 { echo "$as_me:$LINENO: result: $ac_res" >&5
20392echo "${ECHO_T}$ac_res" >&6; }
20393if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020394 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020395#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020396_ACEOF
20397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020398/* confdefs.h. */
20399_ACEOF
20400cat confdefs.h >>conftest.$ac_ext
20401cat >>conftest.$ac_ext <<_ACEOF
20402/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020403#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020404int
20405main ()
20406{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020407gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020408 ;
20409 return 0;
20410}
20411_ACEOF
20412rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020413if { (ac_try="$ac_compile"
20414case "(($ac_try" in
20415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20416 *) ac_try_echo=$ac_try;;
20417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020421 grep -v '^ *+' conftest.er1 >conftest.err
20422 rm -f conftest.er1
20423 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020425 (exit $ac_status); } && {
20426 test -z "$ac_c_werror_flag" ||
20427 test ! -s conftest.err
20428 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020429 :
20430else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020432sed 's/^/| /' conftest.$ac_ext >&5
20433
Martin v. Löwis11437992002-04-12 09:54:03 +000020434
20435cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020436#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020437_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020438
Martin v. Löwis11437992002-04-12 09:54:03 +000020439
Guido van Rossum627b2d71993-12-24 10:39:16 +000020440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020441
20442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020443
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020444fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020445done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020446
Michael W. Hudson54241132001-12-07 15:38:26 +000020447
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020448{ echo "$as_me:$LINENO: checking for major" >&5
20449echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020450cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020451/* confdefs.h. */
20452_ACEOF
20453cat confdefs.h >>conftest.$ac_ext
20454cat >>conftest.$ac_ext <<_ACEOF
20455/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020456
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020457#if defined(MAJOR_IN_MKDEV)
20458#include <sys/mkdev.h>
20459#elif defined(MAJOR_IN_SYSMACROS)
20460#include <sys/sysmacros.h>
20461#else
20462#include <sys/types.h>
20463#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020464
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020465int
20466main ()
20467{
20468
20469 makedev(major(0),minor(0));
20470
20471 ;
20472 return 0;
20473}
20474_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020475rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020476if { (ac_try="$ac_link"
20477case "(($ac_try" in
20478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20479 *) ac_try_echo=$ac_try;;
20480esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020482 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020484 grep -v '^ *+' conftest.er1 >conftest.err
20485 rm -f conftest.er1
20486 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020488 (exit $ac_status); } && {
20489 test -z "$ac_c_werror_flag" ||
20490 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020491 } && test -s conftest$ac_exeext &&
20492 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020493
20494
20495cat >>confdefs.h <<\_ACEOF
20496#define HAVE_DEVICE_MACROS 1
20497_ACEOF
20498
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020499 { echo "$as_me:$LINENO: result: yes" >&5
20500echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020501
20502else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020504sed 's/^/| /' conftest.$ac_ext >&5
20505
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020506
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020507 { echo "$as_me:$LINENO: result: no" >&5
20508echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020509
20510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020511
20512rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020513 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020514
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020515# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020516# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020517{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20518echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020519cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020520/* confdefs.h. */
20521_ACEOF
20522cat confdefs.h >>conftest.$ac_ext
20523cat >>conftest.$ac_ext <<_ACEOF
20524/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020525
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020526#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020527#include <sys/socket.h>
20528#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020529#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020530
Martin v. Löwis11437992002-04-12 09:54:03 +000020531int
20532main ()
20533{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020534getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020535 ;
20536 return 0;
20537}
20538_ACEOF
20539rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020540if { (ac_try="$ac_link"
20541case "(($ac_try" in
20542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20543 *) ac_try_echo=$ac_try;;
20544esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020546 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020548 grep -v '^ *+' conftest.er1 >conftest.err
20549 rm -f conftest.er1
20550 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020552 (exit $ac_status); } && {
20553 test -z "$ac_c_werror_flag" ||
20554 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020555 } && test -s conftest$ac_exeext &&
20556 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020557 have_getaddrinfo=yes
20558else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020559 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020560sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020561
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020562 have_getaddrinfo=no
20563fi
20564
20565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20566 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020567{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20568echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020569if test $have_getaddrinfo = yes
20570then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020571 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20572echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020573 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020574 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020575else
20576 if test "$cross_compiling" = yes; then
20577 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020578else
Martin v. Löwis11437992002-04-12 09:54:03 +000020579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020580/* confdefs.h. */
20581_ACEOF
20582cat confdefs.h >>conftest.$ac_ext
20583cat >>conftest.$ac_ext <<_ACEOF
20584/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020585
20586#include <sys/types.h>
20587#include <netdb.h>
20588#include <string.h>
20589#include <sys/socket.h>
20590#include <netinet/in.h>
20591
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020592int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020593{
20594 int passive, gaierr, inet4 = 0, inet6 = 0;
20595 struct addrinfo hints, *ai, *aitop;
20596 char straddr[INET6_ADDRSTRLEN], strport[16];
20597
20598 for (passive = 0; passive <= 1; passive++) {
20599 memset(&hints, 0, sizeof(hints));
20600 hints.ai_family = AF_UNSPEC;
20601 hints.ai_flags = passive ? AI_PASSIVE : 0;
20602 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020603 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020604 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20605 (void)gai_strerror(gaierr);
20606 goto bad;
20607 }
20608 for (ai = aitop; ai; ai = ai->ai_next) {
20609 if (ai->ai_addr == NULL ||
20610 ai->ai_addrlen == 0 ||
20611 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20612 straddr, sizeof(straddr), strport, sizeof(strport),
20613 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20614 goto bad;
20615 }
20616 switch (ai->ai_family) {
20617 case AF_INET:
20618 if (strcmp(strport, "54321") != 0) {
20619 goto bad;
20620 }
20621 if (passive) {
20622 if (strcmp(straddr, "0.0.0.0") != 0) {
20623 goto bad;
20624 }
20625 } else {
20626 if (strcmp(straddr, "127.0.0.1") != 0) {
20627 goto bad;
20628 }
20629 }
20630 inet4++;
20631 break;
20632 case AF_INET6:
20633 if (strcmp(strport, "54321") != 0) {
20634 goto bad;
20635 }
20636 if (passive) {
20637 if (strcmp(straddr, "::") != 0) {
20638 goto bad;
20639 }
20640 } else {
20641 if (strcmp(straddr, "::1") != 0) {
20642 goto bad;
20643 }
20644 }
20645 inet6++;
20646 break;
20647 case AF_UNSPEC:
20648 goto bad;
20649 break;
20650 default:
20651 /* another family support? */
20652 break;
20653 }
20654 }
20655 }
20656
20657 if (!(inet4 == 0 || inet4 == 2))
20658 goto bad;
20659 if (!(inet6 == 0 || inet6 == 2))
20660 goto bad;
20661
20662 if (aitop)
20663 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020664 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020665
20666 bad:
20667 if (aitop)
20668 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020669 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020670}
20671
Martin v. Löwis11437992002-04-12 09:54:03 +000020672_ACEOF
20673rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020674if { (ac_try="$ac_link"
20675case "(($ac_try" in
20676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20677 *) ac_try_echo=$ac_try;;
20678esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020680 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020681 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020683 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020684 { (case "(($ac_try" in
20685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20686 *) ac_try_echo=$ac_try;;
20687esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020689 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020690 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020692 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020693 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020695 echo "$as_me: program exited with status $ac_status" >&5
20696echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020697sed 's/^/| /' conftest.$ac_ext >&5
20698
Martin v. Löwis11437992002-04-12 09:54:03 +000020699( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020700ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020702rm -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 +000020703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020704
20705
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020706fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020707
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020709
Mark Dickinson2df5d282009-12-31 21:22:50 +000020710if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020711then
20712 if test $ipv6 = yes
20713 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020714 echo 'Fatal: You must get working getaddrinfo() function.'
20715 echo ' or you can specify "--disable-ipv6"'.
20716 exit 1
20717 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020718else
Martin v. Löwis11437992002-04-12 09:54:03 +000020719
20720cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020721#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020722_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020723
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020724fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020725
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020726for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020727do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020728as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20729{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20730echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020731if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020732 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020733else
Martin v. Löwis11437992002-04-12 09:54:03 +000020734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020735/* confdefs.h. */
20736_ACEOF
20737cat confdefs.h >>conftest.$ac_ext
20738cat >>conftest.$ac_ext <<_ACEOF
20739/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020740/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20741 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20742#define $ac_func innocuous_$ac_func
20743
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020744/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020745 which can conflict with char $ac_func (); below.
20746 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020747 <limits.h> exists even on freestanding compilers. */
20748
20749#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020750# include <limits.h>
20751#else
20752# include <assert.h>
20753#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020754
20755#undef $ac_func
20756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020757/* Override any GCC internal prototype to avoid an error.
20758 Use char because int might match the return type of a GCC
20759 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020760#ifdef __cplusplus
20761extern "C"
20762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020763char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020764/* The GNU C library defines this for functions which it implements
20765 to always fail with ENOSYS. Some functions are actually named
20766 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020767#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020768choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020769#endif
20770
Skip Montanaro6dead952003-09-25 14:50:04 +000020771int
20772main ()
20773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020774return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020775 ;
20776 return 0;
20777}
20778_ACEOF
20779rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020780if { (ac_try="$ac_link"
20781case "(($ac_try" in
20782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20783 *) ac_try_echo=$ac_try;;
20784esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020786 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020788 grep -v '^ *+' conftest.er1 >conftest.err
20789 rm -f conftest.er1
20790 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020792 (exit $ac_status); } && {
20793 test -z "$ac_c_werror_flag" ||
20794 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020795 } && test -s conftest$ac_exeext &&
20796 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020797 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020798else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020800sed 's/^/| /' conftest.$ac_ext >&5
20801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020802 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020804
20805rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020806 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020807fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020808ac_res=`eval echo '${'$as_ac_var'}'`
20809 { echo "$as_me:$LINENO: result: $ac_res" >&5
20810echo "${ECHO_T}$ac_res" >&6; }
20811if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020812 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020813#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020814_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020815
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020816fi
20817done
20818
Michael W. Hudson54241132001-12-07 15:38:26 +000020819
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020820# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020821{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20822echo $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 +000020823if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020824 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020825else
Martin v. Löwis11437992002-04-12 09:54:03 +000020826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020827/* confdefs.h. */
20828_ACEOF
20829cat confdefs.h >>conftest.$ac_ext
20830cat >>conftest.$ac_ext <<_ACEOF
20831/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020832#include <sys/types.h>
20833#include <sys/time.h>
20834#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020835
Martin v. Löwis11437992002-04-12 09:54:03 +000020836int
20837main ()
20838{
20839if ((struct tm *) 0)
20840return 0;
20841 ;
20842 return 0;
20843}
20844_ACEOF
20845rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020846if { (ac_try="$ac_compile"
20847case "(($ac_try" in
20848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20849 *) ac_try_echo=$ac_try;;
20850esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020852 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020854 grep -v '^ *+' conftest.er1 >conftest.err
20855 rm -f conftest.er1
20856 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020858 (exit $ac_status); } && {
20859 test -z "$ac_c_werror_flag" ||
20860 test ! -s conftest.err
20861 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020862 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020863else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020865sed 's/^/| /' conftest.$ac_ext >&5
20866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020867 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020869
20870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020871fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020872{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20873echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020874if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020875
20876cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020877#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020878_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020879
20880fi
20881
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020882{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20883echo $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 +000020884if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020885 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020886else
Martin v. Löwis11437992002-04-12 09:54:03 +000020887 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020888/* confdefs.h. */
20889_ACEOF
20890cat confdefs.h >>conftest.$ac_ext
20891cat >>conftest.$ac_ext <<_ACEOF
20892/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020893#include <sys/types.h>
20894#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020895
Martin v. Löwis11437992002-04-12 09:54:03 +000020896int
20897main ()
20898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020899struct tm tm;
20900 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020901 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020902 ;
20903 return 0;
20904}
20905_ACEOF
20906rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020907if { (ac_try="$ac_compile"
20908case "(($ac_try" in
20909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20910 *) ac_try_echo=$ac_try;;
20911esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020915 grep -v '^ *+' conftest.er1 >conftest.err
20916 rm -f conftest.er1
20917 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020919 (exit $ac_status); } && {
20920 test -z "$ac_c_werror_flag" ||
20921 test ! -s conftest.err
20922 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020923 ac_cv_struct_tm=time.h
20924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020926sed 's/^/| /' conftest.$ac_ext >&5
20927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020928 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020930
20931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020932fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020933{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20934echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020935if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020936
20937cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020938#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020939_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020940
20941fi
20942
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020943{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20944echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020945if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020946 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020947else
Martin v. Löwis11437992002-04-12 09:54:03 +000020948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020949/* confdefs.h. */
20950_ACEOF
20951cat confdefs.h >>conftest.$ac_ext
20952cat >>conftest.$ac_ext <<_ACEOF
20953/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020954#include <sys/types.h>
20955#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020956
20957
Martin v. Löwis11437992002-04-12 09:54:03 +000020958int
20959main ()
20960{
20961static struct tm ac_aggr;
20962if (ac_aggr.tm_zone)
20963return 0;
20964 ;
20965 return 0;
20966}
20967_ACEOF
20968rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020969if { (ac_try="$ac_compile"
20970case "(($ac_try" in
20971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20972 *) ac_try_echo=$ac_try;;
20973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020975 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020977 grep -v '^ *+' conftest.er1 >conftest.err
20978 rm -f conftest.er1
20979 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020981 (exit $ac_status); } && {
20982 test -z "$ac_c_werror_flag" ||
20983 test ! -s conftest.err
20984 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020985 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020986else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020988sed 's/^/| /' conftest.$ac_ext >&5
20989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020991/* confdefs.h. */
20992_ACEOF
20993cat confdefs.h >>conftest.$ac_ext
20994cat >>conftest.$ac_ext <<_ACEOF
20995/* end confdefs.h. */
20996#include <sys/types.h>
20997#include <$ac_cv_struct_tm>
20998
20999
21000int
21001main ()
21002{
21003static struct tm ac_aggr;
21004if (sizeof ac_aggr.tm_zone)
21005return 0;
21006 ;
21007 return 0;
21008}
21009_ACEOF
21010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021011if { (ac_try="$ac_compile"
21012case "(($ac_try" in
21013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21014 *) ac_try_echo=$ac_try;;
21015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021017 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021019 grep -v '^ *+' conftest.er1 >conftest.err
21020 rm -f conftest.er1
21021 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021023 (exit $ac_status); } && {
21024 test -z "$ac_c_werror_flag" ||
21025 test ! -s conftest.err
21026 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021027 ac_cv_member_struct_tm_tm_zone=yes
21028else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021030sed 's/^/| /' conftest.$ac_ext >&5
21031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021032 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021034
21035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021037
21038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021039fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021040{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21041echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21042if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021043
21044cat >>confdefs.h <<_ACEOF
21045#define HAVE_STRUCT_TM_TM_ZONE 1
21046_ACEOF
21047
21048
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021049fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021050
Martin v. Löwis11437992002-04-12 09:54:03 +000021051if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21052
21053cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021054#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021055_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021056
21057else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021058 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21059echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021060if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021061 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021062else
21063 cat >conftest.$ac_ext <<_ACEOF
21064/* confdefs.h. */
21065_ACEOF
21066cat confdefs.h >>conftest.$ac_ext
21067cat >>conftest.$ac_ext <<_ACEOF
21068/* end confdefs.h. */
21069#include <time.h>
21070
21071int
21072main ()
21073{
21074#ifndef tzname
21075 (void) tzname;
21076#endif
21077
21078 ;
21079 return 0;
21080}
21081_ACEOF
21082rm -f conftest.$ac_objext
21083if { (ac_try="$ac_compile"
21084case "(($ac_try" in
21085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21086 *) ac_try_echo=$ac_try;;
21087esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021089 (eval "$ac_compile") 2>conftest.er1
21090 ac_status=$?
21091 grep -v '^ *+' conftest.er1 >conftest.err
21092 rm -f conftest.er1
21093 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021095 (exit $ac_status); } && {
21096 test -z "$ac_c_werror_flag" ||
21097 test ! -s conftest.err
21098 } && test -s conftest.$ac_objext; then
21099 ac_cv_have_decl_tzname=yes
21100else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021101 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021102sed 's/^/| /' conftest.$ac_ext >&5
21103
21104 ac_cv_have_decl_tzname=no
21105fi
21106
21107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21108fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021109{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21110echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21111if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021112
21113cat >>confdefs.h <<_ACEOF
21114#define HAVE_DECL_TZNAME 1
21115_ACEOF
21116
21117
21118else
21119 cat >>confdefs.h <<_ACEOF
21120#define HAVE_DECL_TZNAME 0
21121_ACEOF
21122
21123
21124fi
21125
21126
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021127 { echo "$as_me:$LINENO: checking for tzname" >&5
21128echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021129if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021130 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021131else
Martin v. Löwis11437992002-04-12 09:54:03 +000021132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021133/* confdefs.h. */
21134_ACEOF
21135cat confdefs.h >>conftest.$ac_ext
21136cat >>conftest.$ac_ext <<_ACEOF
21137/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021138#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021139#if !HAVE_DECL_TZNAME
21140extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021142
Martin v. Löwis11437992002-04-12 09:54:03 +000021143int
21144main ()
21145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021146return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021147 ;
21148 return 0;
21149}
21150_ACEOF
21151rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021152if { (ac_try="$ac_link"
21153case "(($ac_try" in
21154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21155 *) ac_try_echo=$ac_try;;
21156esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021158 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021160 grep -v '^ *+' conftest.er1 >conftest.err
21161 rm -f conftest.er1
21162 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021164 (exit $ac_status); } && {
21165 test -z "$ac_c_werror_flag" ||
21166 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021167 } && test -s conftest$ac_exeext &&
21168 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021169 ac_cv_var_tzname=yes
21170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021172sed 's/^/| /' conftest.$ac_ext >&5
21173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021174 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021176
21177rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021178 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021179fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021180{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21181echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021182 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021183
21184cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021185#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021186_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021187
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021188 fi
21189fi
21190
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021191{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21192echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021193if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021194 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021195else
21196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021197/* confdefs.h. */
21198_ACEOF
21199cat confdefs.h >>conftest.$ac_ext
21200cat >>conftest.$ac_ext <<_ACEOF
21201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021202$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021203int
21204main ()
21205{
21206static struct stat ac_aggr;
21207if (ac_aggr.st_rdev)
21208return 0;
21209 ;
21210 return 0;
21211}
21212_ACEOF
21213rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021214if { (ac_try="$ac_compile"
21215case "(($ac_try" in
21216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21217 *) ac_try_echo=$ac_try;;
21218esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021220 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021222 grep -v '^ *+' conftest.er1 >conftest.err
21223 rm -f conftest.er1
21224 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021226 (exit $ac_status); } && {
21227 test -z "$ac_c_werror_flag" ||
21228 test ! -s conftest.err
21229 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 ac_cv_member_struct_stat_st_rdev=yes
21231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021233sed 's/^/| /' conftest.$ac_ext >&5
21234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021235 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021236/* confdefs.h. */
21237_ACEOF
21238cat confdefs.h >>conftest.$ac_ext
21239cat >>conftest.$ac_ext <<_ACEOF
21240/* end confdefs.h. */
21241$ac_includes_default
21242int
21243main ()
21244{
21245static struct stat ac_aggr;
21246if (sizeof ac_aggr.st_rdev)
21247return 0;
21248 ;
21249 return 0;
21250}
21251_ACEOF
21252rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021253if { (ac_try="$ac_compile"
21254case "(($ac_try" in
21255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21256 *) ac_try_echo=$ac_try;;
21257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021259 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021261 grep -v '^ *+' conftest.er1 >conftest.err
21262 rm -f conftest.er1
21263 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021265 (exit $ac_status); } && {
21266 test -z "$ac_c_werror_flag" ||
21267 test ! -s conftest.err
21268 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021269 ac_cv_member_struct_stat_st_rdev=yes
21270else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021272sed 's/^/| /' conftest.$ac_ext >&5
21273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021274 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021276
21277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021279
21280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021281fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021282{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21283echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21284if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021285
21286cat >>confdefs.h <<_ACEOF
21287#define HAVE_STRUCT_STAT_ST_RDEV 1
21288_ACEOF
21289
21290
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021291fi
21292
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021293{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21294echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021295if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021296 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021297else
Martin v. Löwis11437992002-04-12 09:54:03 +000021298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021299/* confdefs.h. */
21300_ACEOF
21301cat confdefs.h >>conftest.$ac_ext
21302cat >>conftest.$ac_ext <<_ACEOF
21303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021304$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021305int
21306main ()
21307{
21308static struct stat ac_aggr;
21309if (ac_aggr.st_blksize)
21310return 0;
21311 ;
21312 return 0;
21313}
21314_ACEOF
21315rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021316if { (ac_try="$ac_compile"
21317case "(($ac_try" in
21318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21319 *) ac_try_echo=$ac_try;;
21320esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021324 grep -v '^ *+' conftest.er1 >conftest.err
21325 rm -f conftest.er1
21326 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021328 (exit $ac_status); } && {
21329 test -z "$ac_c_werror_flag" ||
21330 test ! -s conftest.err
21331 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021332 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021333else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021335sed 's/^/| /' conftest.$ac_ext >&5
21336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021337 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021338/* confdefs.h. */
21339_ACEOF
21340cat confdefs.h >>conftest.$ac_ext
21341cat >>conftest.$ac_ext <<_ACEOF
21342/* end confdefs.h. */
21343$ac_includes_default
21344int
21345main ()
21346{
21347static struct stat ac_aggr;
21348if (sizeof ac_aggr.st_blksize)
21349return 0;
21350 ;
21351 return 0;
21352}
21353_ACEOF
21354rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021355if { (ac_try="$ac_compile"
21356case "(($ac_try" in
21357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21358 *) ac_try_echo=$ac_try;;
21359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021361 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021363 grep -v '^ *+' conftest.er1 >conftest.err
21364 rm -f conftest.er1
21365 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021367 (exit $ac_status); } && {
21368 test -z "$ac_c_werror_flag" ||
21369 test ! -s conftest.err
21370 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021371 ac_cv_member_struct_stat_st_blksize=yes
21372else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021374sed 's/^/| /' conftest.$ac_ext >&5
21375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021376 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021378
21379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021381
21382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021383fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021384{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21385echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21386if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021387
Martin v. Löwis11437992002-04-12 09:54:03 +000021388cat >>confdefs.h <<_ACEOF
21389#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21390_ACEOF
21391
21392
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021393fi
21394
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021395{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21396echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021397if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021398 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021399else
21400 cat >conftest.$ac_ext <<_ACEOF
21401/* confdefs.h. */
21402_ACEOF
21403cat confdefs.h >>conftest.$ac_ext
21404cat >>conftest.$ac_ext <<_ACEOF
21405/* end confdefs.h. */
21406$ac_includes_default
21407int
21408main ()
21409{
21410static struct stat ac_aggr;
21411if (ac_aggr.st_flags)
21412return 0;
21413 ;
21414 return 0;
21415}
21416_ACEOF
21417rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021418if { (ac_try="$ac_compile"
21419case "(($ac_try" in
21420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21421 *) ac_try_echo=$ac_try;;
21422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021424 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021425 ac_status=$?
21426 grep -v '^ *+' conftest.er1 >conftest.err
21427 rm -f conftest.er1
21428 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021430 (exit $ac_status); } && {
21431 test -z "$ac_c_werror_flag" ||
21432 test ! -s conftest.err
21433 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021434 ac_cv_member_struct_stat_st_flags=yes
21435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021436 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021437sed 's/^/| /' conftest.$ac_ext >&5
21438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021439 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021440/* confdefs.h. */
21441_ACEOF
21442cat confdefs.h >>conftest.$ac_ext
21443cat >>conftest.$ac_ext <<_ACEOF
21444/* end confdefs.h. */
21445$ac_includes_default
21446int
21447main ()
21448{
21449static struct stat ac_aggr;
21450if (sizeof ac_aggr.st_flags)
21451return 0;
21452 ;
21453 return 0;
21454}
21455_ACEOF
21456rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021457if { (ac_try="$ac_compile"
21458case "(($ac_try" in
21459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21460 *) ac_try_echo=$ac_try;;
21461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021463 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021464 ac_status=$?
21465 grep -v '^ *+' conftest.er1 >conftest.err
21466 rm -f conftest.er1
21467 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021469 (exit $ac_status); } && {
21470 test -z "$ac_c_werror_flag" ||
21471 test ! -s conftest.err
21472 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021473 ac_cv_member_struct_stat_st_flags=yes
21474else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021475 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021476sed 's/^/| /' conftest.$ac_ext >&5
21477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021478 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021480
21481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021483
21484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021485fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021486{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21487echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21488if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021489
21490cat >>confdefs.h <<_ACEOF
21491#define HAVE_STRUCT_STAT_ST_FLAGS 1
21492_ACEOF
21493
21494
21495fi
21496
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021497{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21498echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021499if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021500 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021501else
21502 cat >conftest.$ac_ext <<_ACEOF
21503/* confdefs.h. */
21504_ACEOF
21505cat confdefs.h >>conftest.$ac_ext
21506cat >>conftest.$ac_ext <<_ACEOF
21507/* end confdefs.h. */
21508$ac_includes_default
21509int
21510main ()
21511{
21512static struct stat ac_aggr;
21513if (ac_aggr.st_gen)
21514return 0;
21515 ;
21516 return 0;
21517}
21518_ACEOF
21519rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021520if { (ac_try="$ac_compile"
21521case "(($ac_try" in
21522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21523 *) ac_try_echo=$ac_try;;
21524esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021526 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021527 ac_status=$?
21528 grep -v '^ *+' conftest.er1 >conftest.err
21529 rm -f conftest.er1
21530 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021532 (exit $ac_status); } && {
21533 test -z "$ac_c_werror_flag" ||
21534 test ! -s conftest.err
21535 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021536 ac_cv_member_struct_stat_st_gen=yes
21537else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021538 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021539sed 's/^/| /' conftest.$ac_ext >&5
21540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021541 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021542/* confdefs.h. */
21543_ACEOF
21544cat confdefs.h >>conftest.$ac_ext
21545cat >>conftest.$ac_ext <<_ACEOF
21546/* end confdefs.h. */
21547$ac_includes_default
21548int
21549main ()
21550{
21551static struct stat ac_aggr;
21552if (sizeof ac_aggr.st_gen)
21553return 0;
21554 ;
21555 return 0;
21556}
21557_ACEOF
21558rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021559if { (ac_try="$ac_compile"
21560case "(($ac_try" in
21561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21562 *) ac_try_echo=$ac_try;;
21563esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021566 ac_status=$?
21567 grep -v '^ *+' conftest.er1 >conftest.err
21568 rm -f conftest.er1
21569 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021571 (exit $ac_status); } && {
21572 test -z "$ac_c_werror_flag" ||
21573 test ! -s conftest.err
21574 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021575 ac_cv_member_struct_stat_st_gen=yes
21576else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021577 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021578sed 's/^/| /' conftest.$ac_ext >&5
21579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021580 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021582
21583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021585
21586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021587fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021588{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21589echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21590if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021591
21592cat >>confdefs.h <<_ACEOF
21593#define HAVE_STRUCT_STAT_ST_GEN 1
21594_ACEOF
21595
21596
21597fi
21598
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021599{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21600echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021601if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021602 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021603else
21604 cat >conftest.$ac_ext <<_ACEOF
21605/* confdefs.h. */
21606_ACEOF
21607cat confdefs.h >>conftest.$ac_ext
21608cat >>conftest.$ac_ext <<_ACEOF
21609/* end confdefs.h. */
21610$ac_includes_default
21611int
21612main ()
21613{
21614static struct stat ac_aggr;
21615if (ac_aggr.st_birthtime)
21616return 0;
21617 ;
21618 return 0;
21619}
21620_ACEOF
21621rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021622if { (ac_try="$ac_compile"
21623case "(($ac_try" in
21624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21625 *) ac_try_echo=$ac_try;;
21626esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021629 ac_status=$?
21630 grep -v '^ *+' conftest.er1 >conftest.err
21631 rm -f conftest.er1
21632 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021634 (exit $ac_status); } && {
21635 test -z "$ac_c_werror_flag" ||
21636 test ! -s conftest.err
21637 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021638 ac_cv_member_struct_stat_st_birthtime=yes
21639else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021640 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021641sed 's/^/| /' conftest.$ac_ext >&5
21642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021643 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021644/* confdefs.h. */
21645_ACEOF
21646cat confdefs.h >>conftest.$ac_ext
21647cat >>conftest.$ac_ext <<_ACEOF
21648/* end confdefs.h. */
21649$ac_includes_default
21650int
21651main ()
21652{
21653static struct stat ac_aggr;
21654if (sizeof ac_aggr.st_birthtime)
21655return 0;
21656 ;
21657 return 0;
21658}
21659_ACEOF
21660rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021661if { (ac_try="$ac_compile"
21662case "(($ac_try" in
21663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21664 *) ac_try_echo=$ac_try;;
21665esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021668 ac_status=$?
21669 grep -v '^ *+' conftest.er1 >conftest.err
21670 rm -f conftest.er1
21671 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021673 (exit $ac_status); } && {
21674 test -z "$ac_c_werror_flag" ||
21675 test ! -s conftest.err
21676 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021677 ac_cv_member_struct_stat_st_birthtime=yes
21678else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021679 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021680sed 's/^/| /' conftest.$ac_ext >&5
21681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021682 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021684
21685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021687
21688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021689fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021690{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21691echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21692if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021693
21694cat >>confdefs.h <<_ACEOF
21695#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21696_ACEOF
21697
21698
21699fi
21700
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021701{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21702echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021703if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021704 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021705else
Martin v. Löwis11437992002-04-12 09:54:03 +000021706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021707/* confdefs.h. */
21708_ACEOF
21709cat confdefs.h >>conftest.$ac_ext
21710cat >>conftest.$ac_ext <<_ACEOF
21711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021712$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021713int
21714main ()
21715{
21716static struct stat ac_aggr;
21717if (ac_aggr.st_blocks)
21718return 0;
21719 ;
21720 return 0;
21721}
21722_ACEOF
21723rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021724if { (ac_try="$ac_compile"
21725case "(($ac_try" in
21726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21727 *) ac_try_echo=$ac_try;;
21728esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021732 grep -v '^ *+' conftest.er1 >conftest.err
21733 rm -f conftest.er1
21734 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021736 (exit $ac_status); } && {
21737 test -z "$ac_c_werror_flag" ||
21738 test ! -s conftest.err
21739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021740 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021741else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021743sed 's/^/| /' conftest.$ac_ext >&5
21744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021746/* confdefs.h. */
21747_ACEOF
21748cat confdefs.h >>conftest.$ac_ext
21749cat >>conftest.$ac_ext <<_ACEOF
21750/* end confdefs.h. */
21751$ac_includes_default
21752int
21753main ()
21754{
21755static struct stat ac_aggr;
21756if (sizeof ac_aggr.st_blocks)
21757return 0;
21758 ;
21759 return 0;
21760}
21761_ACEOF
21762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021763if { (ac_try="$ac_compile"
21764case "(($ac_try" in
21765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21766 *) ac_try_echo=$ac_try;;
21767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021769 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021771 grep -v '^ *+' conftest.er1 >conftest.err
21772 rm -f conftest.er1
21773 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021775 (exit $ac_status); } && {
21776 test -z "$ac_c_werror_flag" ||
21777 test ! -s conftest.err
21778 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021779 ac_cv_member_struct_stat_st_blocks=yes
21780else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021782sed 's/^/| /' conftest.$ac_ext >&5
21783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021784 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021786
21787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021789
21790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021791fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021792{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21793echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21794if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021795
Martin v. Löwis11437992002-04-12 09:54:03 +000021796cat >>confdefs.h <<_ACEOF
21797#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21798_ACEOF
21799
21800
21801cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021802#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021803_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021804
21805else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021806 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021807 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021808 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21809 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021810esac
21811
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021812fi
21813
Michael W. Hudson54241132001-12-07 15:38:26 +000021814
Martin v. Löwis11437992002-04-12 09:54:03 +000021815
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021816{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21817echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021818if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021820else
Martin v. Löwis11437992002-04-12 09:54:03 +000021821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021822/* confdefs.h. */
21823_ACEOF
21824cat confdefs.h >>conftest.$ac_ext
21825cat >>conftest.$ac_ext <<_ACEOF
21826/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021827#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021828int
21829main ()
21830{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021831return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021832 ;
21833 return 0;
21834}
21835_ACEOF
21836rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021837if { (ac_try="$ac_compile"
21838case "(($ac_try" in
21839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21840 *) ac_try_echo=$ac_try;;
21841esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021845 grep -v '^ *+' conftest.er1 >conftest.err
21846 rm -f conftest.er1
21847 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021849 (exit $ac_status); } && {
21850 test -z "$ac_c_werror_flag" ||
21851 test ! -s conftest.err
21852 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021853 ac_cv_header_time_altzone=yes
21854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021856sed 's/^/| /' conftest.$ac_ext >&5
21857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021858 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021859fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21862fi
21863
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021864{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21865echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021866if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021867
21868cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021869#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021870_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021871
21872fi
21873
Guido van Rossumda88dad1995-01-26 00:46:29 +000021874was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021875{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21876echo $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 +000021877cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021878/* confdefs.h. */
21879_ACEOF
21880cat confdefs.h >>conftest.$ac_ext
21881cat >>conftest.$ac_ext <<_ACEOF
21882/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021883
21884#include <sys/types.h>
21885#include <sys/select.h>
21886#include <sys/time.h>
21887
Martin v. Löwis11437992002-04-12 09:54:03 +000021888int
21889main ()
21890{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021891;
Martin v. Löwis11437992002-04-12 09:54:03 +000021892 ;
21893 return 0;
21894}
21895_ACEOF
21896rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021897if { (ac_try="$ac_compile"
21898case "(($ac_try" in
21899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21900 *) ac_try_echo=$ac_try;;
21901esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021905 grep -v '^ *+' conftest.er1 >conftest.err
21906 rm -f conftest.er1
21907 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021909 (exit $ac_status); } && {
21910 test -z "$ac_c_werror_flag" ||
21911 test ! -s conftest.err
21912 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021913
21914
21915cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021916#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021917_ACEOF
21918
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021919 was_it_defined=yes
21920
Guido van Rossumf78abae1997-01-21 22:02:36 +000021921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021923sed 's/^/| /' conftest.$ac_ext >&5
21924
Thomas Wouters477c8d52006-05-27 19:21:47 +000021925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021926fi
21927
21928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021929{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21930echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021931
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021932{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21933echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021934if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021935 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021936else
Martin v. Löwis11437992002-04-12 09:54:03 +000021937 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021938/* confdefs.h. */
21939_ACEOF
21940cat confdefs.h >>conftest.$ac_ext
21941cat >>conftest.$ac_ext <<_ACEOF
21942/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021943
21944# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021945int
21946main ()
21947{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021948struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021949 ;
21950 return 0;
21951}
21952_ACEOF
21953rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021954if { (ac_try="$ac_compile"
21955case "(($ac_try" in
21956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21957 *) ac_try_echo=$ac_try;;
21958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021962 grep -v '^ *+' conftest.er1 >conftest.err
21963 rm -f conftest.er1
21964 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021966 (exit $ac_status); } && {
21967 test -z "$ac_c_werror_flag" ||
21968 test ! -s conftest.err
21969 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021970 ac_cv_struct_addrinfo=yes
21971else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021973sed 's/^/| /' conftest.$ac_ext >&5
21974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021975 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021976fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21979fi
21980
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021981{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21982echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021983if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021984
21985cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021986#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021987_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021988
21989fi
21990
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021991{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21992echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021993if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021994 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021995else
Martin v. Löwis11437992002-04-12 09:54:03 +000021996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021997/* confdefs.h. */
21998_ACEOF
21999cat confdefs.h >>conftest.$ac_ext
22000cat >>conftest.$ac_ext <<_ACEOF
22001/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022002
22003# include <sys/types.h>
22004# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022005int
22006main ()
22007{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022008struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022009 ;
22010 return 0;
22011}
22012_ACEOF
22013rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022014if { (ac_try="$ac_compile"
22015case "(($ac_try" in
22016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22017 *) ac_try_echo=$ac_try;;
22018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022022 grep -v '^ *+' conftest.er1 >conftest.err
22023 rm -f conftest.er1
22024 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022026 (exit $ac_status); } && {
22027 test -z "$ac_c_werror_flag" ||
22028 test ! -s conftest.err
22029 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022030 ac_cv_struct_sockaddr_storage=yes
22031else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022033sed 's/^/| /' conftest.$ac_ext >&5
22034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022035 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022036fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22039fi
22040
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022041{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22042echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022043if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022044
22045cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022046#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022047_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022048
22049fi
22050
Guido van Rossum627b2d71993-12-24 10:39:16 +000022051# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022052
Michael W. Hudson54241132001-12-07 15:38:26 +000022053
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022054{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22055echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022056if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022057 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022058else
Martin v. Löwis11437992002-04-12 09:54:03 +000022059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022060/* confdefs.h. */
22061_ACEOF
22062cat confdefs.h >>conftest.$ac_ext
22063cat >>conftest.$ac_ext <<_ACEOF
22064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022065$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022066int
22067main ()
22068{
22069static int test_array [1 - 2 * !(((char) -1) < 0)];
22070test_array [0] = 0
22071
22072 ;
22073 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022074}
Martin v. Löwis11437992002-04-12 09:54:03 +000022075_ACEOF
22076rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022077if { (ac_try="$ac_compile"
22078case "(($ac_try" in
22079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22080 *) ac_try_echo=$ac_try;;
22081esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022085 grep -v '^ *+' conftest.er1 >conftest.err
22086 rm -f conftest.er1
22087 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022089 (exit $ac_status); } && {
22090 test -z "$ac_c_werror_flag" ||
22091 test ! -s conftest.err
22092 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022093 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022094else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022096sed 's/^/| /' conftest.$ac_ext >&5
22097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022098 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022100
22101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022102fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022103{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22104echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022105if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022106 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022107#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022108_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022109
22110fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022112{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22113echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022114if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022115 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022116else
22117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022118/* confdefs.h. */
22119_ACEOF
22120cat confdefs.h >>conftest.$ac_ext
22121cat >>conftest.$ac_ext <<_ACEOF
22122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022123
Martin v. Löwis11437992002-04-12 09:54:03 +000022124int
22125main ()
22126{
22127/* FIXME: Include the comments suggested by Paul. */
22128#ifndef __cplusplus
22129 /* Ultrix mips cc rejects this. */
22130 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022131 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022132 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022133 char const *const *pcpcc;
22134 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022135 /* NEC SVR4.0.2 mips cc rejects this. */
22136 struct point {int x, y;};
22137 static struct point const zero = {0,0};
22138 /* AIX XL C 1.02.0.0 rejects this.
22139 It does not let you subtract one const X* pointer from another in
22140 an arm of an if-expression whose if-part is not a constant
22141 expression */
22142 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022143 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022144 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022145 ++pcpcc;
22146 ppc = (char**) pcpcc;
22147 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022148 { /* SCO 3.2v4 cc rejects this. */
22149 char *t;
22150 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022151
Martin v. Löwis11437992002-04-12 09:54:03 +000022152 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022153 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022154 }
22155 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22156 int x[] = {25, 17};
22157 const int *foo = &x[0];
22158 ++foo;
22159 }
22160 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22161 typedef const int *iptr;
22162 iptr p = 0;
22163 ++p;
22164 }
22165 { /* AIX XL C 1.02.0.0 rejects this saying
22166 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22167 struct s { int j; const int *ap[3]; };
22168 struct s *b; b->j = 5;
22169 }
22170 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22171 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022172 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022173 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022174 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022175#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022176
Martin v. Löwis11437992002-04-12 09:54:03 +000022177 ;
22178 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022179}
Martin v. Löwis11437992002-04-12 09:54:03 +000022180_ACEOF
22181rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022182if { (ac_try="$ac_compile"
22183case "(($ac_try" in
22184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22185 *) ac_try_echo=$ac_try;;
22186esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022188 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022190 grep -v '^ *+' conftest.er1 >conftest.err
22191 rm -f conftest.er1
22192 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022194 (exit $ac_status); } && {
22195 test -z "$ac_c_werror_flag" ||
22196 test ! -s conftest.err
22197 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022198 ac_cv_c_const=yes
22199else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022201sed 's/^/| /' conftest.$ac_ext >&5
22202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022203 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022205
22206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022207fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022208{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22209echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022210if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022211
22212cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022213#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022214_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022215
22216fi
22217
Michael W. Hudson54241132001-12-07 15:38:26 +000022218
Guido van Rossumda88dad1995-01-26 00:46:29 +000022219works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022220{ echo "$as_me:$LINENO: checking for working volatile" >&5
22221echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022222cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022223/* confdefs.h. */
22224_ACEOF
22225cat confdefs.h >>conftest.$ac_ext
22226cat >>conftest.$ac_ext <<_ACEOF
22227/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022228
Martin v. Löwis11437992002-04-12 09:54:03 +000022229int
22230main ()
22231{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022232volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022233 ;
22234 return 0;
22235}
22236_ACEOF
22237rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022238if { (ac_try="$ac_compile"
22239case "(($ac_try" in
22240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22241 *) ac_try_echo=$ac_try;;
22242esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022244 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022246 grep -v '^ *+' conftest.er1 >conftest.err
22247 rm -f conftest.er1
22248 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022250 (exit $ac_status); } && {
22251 test -z "$ac_c_werror_flag" ||
22252 test ! -s conftest.err
22253 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022254 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022255else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022257sed 's/^/| /' conftest.$ac_ext >&5
22258
Martin v. Löwis11437992002-04-12 09:54:03 +000022259
22260cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022261#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022262_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022263
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022264
Guido van Rossum627b2d71993-12-24 10:39:16 +000022265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022266
22267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022268{ echo "$as_me:$LINENO: result: $works" >&5
22269echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022270
Guido van Rossumda88dad1995-01-26 00:46:29 +000022271works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022272{ echo "$as_me:$LINENO: checking for working signed char" >&5
22273echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022274cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022275/* confdefs.h. */
22276_ACEOF
22277cat confdefs.h >>conftest.$ac_ext
22278cat >>conftest.$ac_ext <<_ACEOF
22279/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022280
Martin v. Löwis11437992002-04-12 09:54:03 +000022281int
22282main ()
22283{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022284signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022285 ;
22286 return 0;
22287}
22288_ACEOF
22289rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022290if { (ac_try="$ac_compile"
22291case "(($ac_try" in
22292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22293 *) ac_try_echo=$ac_try;;
22294esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022298 grep -v '^ *+' conftest.er1 >conftest.err
22299 rm -f conftest.er1
22300 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022302 (exit $ac_status); } && {
22303 test -z "$ac_c_werror_flag" ||
22304 test ! -s conftest.err
22305 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022306 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022307else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022309sed 's/^/| /' conftest.$ac_ext >&5
22310
Martin v. Löwis11437992002-04-12 09:54:03 +000022311
22312cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022313#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022314_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022315
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022316
Guido van Rossum7f43da71994-08-01 12:15:30 +000022317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022318
22319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022320{ echo "$as_me:$LINENO: result: $works" >&5
22321echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022322
Guido van Rossumda88dad1995-01-26 00:46:29 +000022323have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022324{ echo "$as_me:$LINENO: checking for prototypes" >&5
22325echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022327/* confdefs.h. */
22328_ACEOF
22329cat confdefs.h >>conftest.$ac_ext
22330cat >>conftest.$ac_ext <<_ACEOF
22331/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022332int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022333int
22334main ()
22335{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022336return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022337 ;
22338 return 0;
22339}
22340_ACEOF
22341rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022342if { (ac_try="$ac_compile"
22343case "(($ac_try" in
22344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22345 *) ac_try_echo=$ac_try;;
22346esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022348 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022350 grep -v '^ *+' conftest.er1 >conftest.err
22351 rm -f conftest.er1
22352 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022354 (exit $ac_status); } && {
22355 test -z "$ac_c_werror_flag" ||
22356 test ! -s conftest.err
22357 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022358
22359
22360cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022361#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022362_ACEOF
22363
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022364 have_prototypes=yes
22365
Guido van Rossumf78abae1997-01-21 22:02:36 +000022366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022368sed 's/^/| /' conftest.$ac_ext >&5
22369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022370
Guido van Rossum7f43da71994-08-01 12:15:30 +000022371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022372
22373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022374{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22375echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022376
Guido van Rossumda88dad1995-01-26 00:46:29 +000022377works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022378{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22379echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022381/* confdefs.h. */
22382_ACEOF
22383cat confdefs.h >>conftest.$ac_ext
22384cat >>conftest.$ac_ext <<_ACEOF
22385/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022386
22387#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022388int foo(int x, ...) {
22389 va_list va;
22390 va_start(va, x);
22391 va_arg(va, int);
22392 va_arg(va, char *);
22393 va_arg(va, double);
22394 return 0;
22395}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022396
Martin v. Löwis11437992002-04-12 09:54:03 +000022397int
22398main ()
22399{
Guido van Rossum90eea071996-08-30 20:58:57 +000022400return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022401 ;
22402 return 0;
22403}
22404_ACEOF
22405rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022406if { (ac_try="$ac_compile"
22407case "(($ac_try" in
22408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22409 *) ac_try_echo=$ac_try;;
22410esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022414 grep -v '^ *+' conftest.er1 >conftest.err
22415 rm -f conftest.er1
22416 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022418 (exit $ac_status); } && {
22419 test -z "$ac_c_werror_flag" ||
22420 test ! -s conftest.err
22421 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022422
22423
22424cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022425#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022426_ACEOF
22427
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022428 works=yes
22429
Guido van Rossumf78abae1997-01-21 22:02:36 +000022430else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022432sed 's/^/| /' conftest.$ac_ext >&5
22433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022434
Guido van Rossum627b2d71993-12-24 10:39:16 +000022435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022436
22437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022438{ echo "$as_me:$LINENO: result: $works" >&5
22439echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022440
Martin v. Löwisd6320502004-08-12 13:45:08 +000022441# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022442{ echo "$as_me:$LINENO: checking for socketpair" >&5
22443echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022444cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022445/* confdefs.h. */
22446_ACEOF
22447cat confdefs.h >>conftest.$ac_ext
22448cat >>conftest.$ac_ext <<_ACEOF
22449/* end confdefs.h. */
22450
22451#include <sys/types.h>
22452#include <sys/socket.h>
22453
22454int
22455main ()
22456{
22457void *x=socketpair
22458 ;
22459 return 0;
22460}
22461_ACEOF
22462rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022463if { (ac_try="$ac_compile"
22464case "(($ac_try" in
22465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22466 *) ac_try_echo=$ac_try;;
22467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022471 grep -v '^ *+' conftest.er1 >conftest.err
22472 rm -f conftest.er1
22473 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022475 (exit $ac_status); } && {
22476 test -z "$ac_c_werror_flag" ||
22477 test ! -s conftest.err
22478 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022479
22480cat >>confdefs.h <<\_ACEOF
22481#define HAVE_SOCKETPAIR 1
22482_ACEOF
22483
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022484 { echo "$as_me:$LINENO: result: yes" >&5
22485echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022486else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022487 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022488sed 's/^/| /' conftest.$ac_ext >&5
22489
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022490 { echo "$as_me:$LINENO: result: no" >&5
22491echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022492
22493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022494
22495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022496
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022497# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022498{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22499echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022500cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022501/* confdefs.h. */
22502_ACEOF
22503cat confdefs.h >>conftest.$ac_ext
22504cat >>conftest.$ac_ext <<_ACEOF
22505/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022506#include <sys/types.h>
22507#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022508int
22509main ()
22510{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022511struct sockaddr x;
22512x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022513 ;
22514 return 0;
22515}
22516_ACEOF
22517rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022518if { (ac_try="$ac_compile"
22519case "(($ac_try" in
22520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22521 *) ac_try_echo=$ac_try;;
22522esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022526 grep -v '^ *+' conftest.er1 >conftest.err
22527 rm -f conftest.er1
22528 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022530 (exit $ac_status); } && {
22531 test -z "$ac_c_werror_flag" ||
22532 test ! -s conftest.err
22533 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022534 { echo "$as_me:$LINENO: result: yes" >&5
22535echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022536
22537cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022538#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022539_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022540
22541else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022543sed 's/^/| /' conftest.$ac_ext >&5
22544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022545 { echo "$as_me:$LINENO: result: no" >&5
22546echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022548
22549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022550
Guido van Rossumda88dad1995-01-26 00:46:29 +000022551va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022552{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22553echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022555/* confdefs.h. */
22556_ACEOF
22557cat confdefs.h >>conftest.$ac_ext
22558cat >>conftest.$ac_ext <<_ACEOF
22559/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022560
22561#ifdef HAVE_STDARG_PROTOTYPES
22562#include <stdarg.h>
22563#else
22564#include <varargs.h>
22565#endif
22566
Martin v. Löwis11437992002-04-12 09:54:03 +000022567int
22568main ()
22569{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022570va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022571 ;
22572 return 0;
22573}
22574_ACEOF
22575rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022576if { (ac_try="$ac_compile"
22577case "(($ac_try" in
22578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22579 *) ac_try_echo=$ac_try;;
22580esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022584 grep -v '^ *+' conftest.er1 >conftest.err
22585 rm -f conftest.er1
22586 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022588 (exit $ac_status); } && {
22589 test -z "$ac_c_werror_flag" ||
22590 test ! -s conftest.err
22591 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022592 :
22593else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022595sed 's/^/| /' conftest.$ac_ext >&5
22596
Martin v. Löwis11437992002-04-12 09:54:03 +000022597
22598
22599cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022600#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022601_ACEOF
22602
Guido van Rossumda88dad1995-01-26 00:46:29 +000022603 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022604
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022606
22607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022608{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22609echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022610
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022611# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022612
22613
22614
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022615{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22616echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022617if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022618 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022619else
Martin v. Löwis11437992002-04-12 09:54:03 +000022620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022621/* confdefs.h. */
22622_ACEOF
22623cat confdefs.h >>conftest.$ac_ext
22624cat >>conftest.$ac_ext <<_ACEOF
22625/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022626/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22627 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22628#define gethostbyname_r innocuous_gethostbyname_r
22629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022630/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022631 which can conflict with char gethostbyname_r (); below.
22632 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022633 <limits.h> exists even on freestanding compilers. */
22634
22635#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022636# include <limits.h>
22637#else
22638# include <assert.h>
22639#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022640
22641#undef gethostbyname_r
22642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022643/* Override any GCC internal prototype to avoid an error.
22644 Use char because int might match the return type of a GCC
22645 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022646#ifdef __cplusplus
22647extern "C"
22648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022649char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022650/* The GNU C library defines this for functions which it implements
22651 to always fail with ENOSYS. Some functions are actually named
22652 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022653#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022654choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022655#endif
22656
Skip Montanaro6dead952003-09-25 14:50:04 +000022657int
22658main ()
22659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022660return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022661 ;
22662 return 0;
22663}
22664_ACEOF
22665rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022666if { (ac_try="$ac_link"
22667case "(($ac_try" in
22668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22669 *) ac_try_echo=$ac_try;;
22670esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022672 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022674 grep -v '^ *+' conftest.er1 >conftest.err
22675 rm -f conftest.er1
22676 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022678 (exit $ac_status); } && {
22679 test -z "$ac_c_werror_flag" ||
22680 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022681 } && test -s conftest$ac_exeext &&
22682 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022683 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022684else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022686sed 's/^/| /' conftest.$ac_ext >&5
22687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022688 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022690
22691rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022692 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022693fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022694{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22695echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22696if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022697
Martin v. Löwis11437992002-04-12 09:54:03 +000022698 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022699#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022700_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022701
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022702 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22703echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022704 OLD_CFLAGS=$CFLAGS
22705 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022707/* confdefs.h. */
22708_ACEOF
22709cat confdefs.h >>conftest.$ac_ext
22710cat >>conftest.$ac_ext <<_ACEOF
22711/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022712
22713# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022714
Martin v. Löwis11437992002-04-12 09:54:03 +000022715int
22716main ()
22717{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022718
22719 char *name;
22720 struct hostent *he, *res;
22721 char buffer[2048];
22722 int buflen = 2048;
22723 int h_errnop;
22724
22725 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022726
22727 ;
22728 return 0;
22729}
22730_ACEOF
22731rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022732if { (ac_try="$ac_compile"
22733case "(($ac_try" in
22734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22735 *) ac_try_echo=$ac_try;;
22736esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022740 grep -v '^ *+' conftest.er1 >conftest.err
22741 rm -f conftest.er1
22742 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022744 (exit $ac_status); } && {
22745 test -z "$ac_c_werror_flag" ||
22746 test ! -s conftest.err
22747 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022748
22749 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022750#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022751_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022752
Martin v. Löwis11437992002-04-12 09:54:03 +000022753
22754cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022755#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022756_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022757
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022758 { echo "$as_me:$LINENO: result: yes" >&5
22759echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022760
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022761else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022763sed 's/^/| /' conftest.$ac_ext >&5
22764
Martin v. Löwis11437992002-04-12 09:54:03 +000022765
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022766 { echo "$as_me:$LINENO: result: no" >&5
22767echo "${ECHO_T}no" >&6; }
22768 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22769echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022771/* confdefs.h. */
22772_ACEOF
22773cat confdefs.h >>conftest.$ac_ext
22774cat >>conftest.$ac_ext <<_ACEOF
22775/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022776
22777# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022778
Martin v. Löwis11437992002-04-12 09:54:03 +000022779int
22780main ()
22781{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022782
22783 char *name;
22784 struct hostent *he;
22785 char buffer[2048];
22786 int buflen = 2048;
22787 int h_errnop;
22788
22789 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022790
22791 ;
22792 return 0;
22793}
22794_ACEOF
22795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022796if { (ac_try="$ac_compile"
22797case "(($ac_try" in
22798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22799 *) ac_try_echo=$ac_try;;
22800esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022804 grep -v '^ *+' conftest.er1 >conftest.err
22805 rm -f conftest.er1
22806 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022808 (exit $ac_status); } && {
22809 test -z "$ac_c_werror_flag" ||
22810 test ! -s conftest.err
22811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022812
22813 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022814#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022815_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022816
Martin v. Löwis11437992002-04-12 09:54:03 +000022817
22818cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022819#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022820_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022821
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022822 { echo "$as_me:$LINENO: result: yes" >&5
22823echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022824
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022825else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022827sed 's/^/| /' conftest.$ac_ext >&5
22828
Martin v. Löwis11437992002-04-12 09:54:03 +000022829
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022830 { echo "$as_me:$LINENO: result: no" >&5
22831echo "${ECHO_T}no" >&6; }
22832 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22833echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022835/* confdefs.h. */
22836_ACEOF
22837cat confdefs.h >>conftest.$ac_ext
22838cat >>conftest.$ac_ext <<_ACEOF
22839/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022840
22841# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022842
Martin v. Löwis11437992002-04-12 09:54:03 +000022843int
22844main ()
22845{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022846
22847 char *name;
22848 struct hostent *he;
22849 struct hostent_data data;
22850
22851 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022852
22853 ;
22854 return 0;
22855}
22856_ACEOF
22857rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022858if { (ac_try="$ac_compile"
22859case "(($ac_try" in
22860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22861 *) ac_try_echo=$ac_try;;
22862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022866 grep -v '^ *+' conftest.er1 >conftest.err
22867 rm -f conftest.er1
22868 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022870 (exit $ac_status); } && {
22871 test -z "$ac_c_werror_flag" ||
22872 test ! -s conftest.err
22873 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022874
22875 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022876#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022877_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022878
Martin v. Löwis11437992002-04-12 09:54:03 +000022879
22880cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022881#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022882_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022883
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022884 { echo "$as_me:$LINENO: result: yes" >&5
22885echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022886
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022887else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022889sed 's/^/| /' conftest.$ac_ext >&5
22890
Martin v. Löwis11437992002-04-12 09:54:03 +000022891
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022892 { echo "$as_me:$LINENO: result: no" >&5
22893echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022894
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022896
22897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022898
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022900
22901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022902
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022904
22905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022906 CFLAGS=$OLD_CFLAGS
22907
22908else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022909
Martin v. Löwis11437992002-04-12 09:54:03 +000022910
22911for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022912do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022913as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22914{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22915echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022916if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022918else
Martin v. Löwis11437992002-04-12 09:54:03 +000022919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022920/* confdefs.h. */
22921_ACEOF
22922cat confdefs.h >>conftest.$ac_ext
22923cat >>conftest.$ac_ext <<_ACEOF
22924/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022925/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22926 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22927#define $ac_func innocuous_$ac_func
22928
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022929/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022930 which can conflict with char $ac_func (); below.
22931 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022932 <limits.h> exists even on freestanding compilers. */
22933
22934#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022935# include <limits.h>
22936#else
22937# include <assert.h>
22938#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022939
22940#undef $ac_func
22941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022942/* Override any GCC internal prototype to avoid an error.
22943 Use char because int might match the return type of a GCC
22944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022945#ifdef __cplusplus
22946extern "C"
22947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022948char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022949/* The GNU C library defines this for functions which it implements
22950 to always fail with ENOSYS. Some functions are actually named
22951 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022952#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022953choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022954#endif
22955
Skip Montanaro6dead952003-09-25 14:50:04 +000022956int
22957main ()
22958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022959return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022960 ;
22961 return 0;
22962}
22963_ACEOF
22964rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022965if { (ac_try="$ac_link"
22966case "(($ac_try" in
22967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22968 *) ac_try_echo=$ac_try;;
22969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022971 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022973 grep -v '^ *+' conftest.er1 >conftest.err
22974 rm -f conftest.er1
22975 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022977 (exit $ac_status); } && {
22978 test -z "$ac_c_werror_flag" ||
22979 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022980 } && test -s conftest$ac_exeext &&
22981 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022982 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022983else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022985sed 's/^/| /' conftest.$ac_ext >&5
22986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022987 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022989
22990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022991 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022992fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022993ac_res=`eval echo '${'$as_ac_var'}'`
22994 { echo "$as_me:$LINENO: result: $ac_res" >&5
22995echo "${ECHO_T}$ac_res" >&6; }
22996if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022997 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022998#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022999_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023000
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023001fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023002done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023003
Michael W. Hudson54241132001-12-07 15:38:26 +000023004
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023005fi
23006
Michael W. Hudson54241132001-12-07 15:38:26 +000023007
23008
23009
23010
23011
23012
Guido van Rossum627b2d71993-12-24 10:39:16 +000023013# checks for system services
23014# (none yet)
23015
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023016# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023017{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23018echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023019if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023020 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023021else
Martin v. Löwis11437992002-04-12 09:54:03 +000023022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023023/* confdefs.h. */
23024_ACEOF
23025cat confdefs.h >>conftest.$ac_ext
23026cat >>conftest.$ac_ext <<_ACEOF
23027/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023028/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23029 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23030#define __fpu_control innocuous___fpu_control
23031
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023032/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023033 which can conflict with char __fpu_control (); below.
23034 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023035 <limits.h> exists even on freestanding compilers. */
23036
23037#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023038# include <limits.h>
23039#else
23040# include <assert.h>
23041#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023042
23043#undef __fpu_control
23044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023045/* Override any GCC internal prototype to avoid an error.
23046 Use char because int might match the return type of a GCC
23047 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023048#ifdef __cplusplus
23049extern "C"
23050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023051char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023052/* The GNU C library defines this for functions which it implements
23053 to always fail with ENOSYS. Some functions are actually named
23054 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023055#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023056choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023057#endif
23058
Skip Montanaro6dead952003-09-25 14:50:04 +000023059int
23060main ()
23061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023062return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023063 ;
23064 return 0;
23065}
23066_ACEOF
23067rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023068if { (ac_try="$ac_link"
23069case "(($ac_try" in
23070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23071 *) ac_try_echo=$ac_try;;
23072esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023074 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023076 grep -v '^ *+' conftest.er1 >conftest.err
23077 rm -f conftest.er1
23078 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023080 (exit $ac_status); } && {
23081 test -z "$ac_c_werror_flag" ||
23082 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023083 } && test -s conftest$ac_exeext &&
23084 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023085 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023088sed 's/^/| /' conftest.$ac_ext >&5
23089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023090 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023092
23093rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023094 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023095fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023096{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23097echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23098if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023099 :
23100else
Martin v. Löwis11437992002-04-12 09:54:03 +000023101
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023102{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23103echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023104if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023106else
Martin v. Löwis11437992002-04-12 09:54:03 +000023107 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023108LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023110/* confdefs.h. */
23111_ACEOF
23112cat confdefs.h >>conftest.$ac_ext
23113cat >>conftest.$ac_ext <<_ACEOF
23114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023116/* Override any GCC internal prototype to avoid an error.
23117 Use char because int might match the return type of a GCC
23118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023119#ifdef __cplusplus
23120extern "C"
23121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023122char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023123int
23124main ()
23125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023126return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023127 ;
23128 return 0;
23129}
23130_ACEOF
23131rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023132if { (ac_try="$ac_link"
23133case "(($ac_try" in
23134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23135 *) ac_try_echo=$ac_try;;
23136esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023138 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023140 grep -v '^ *+' conftest.er1 >conftest.err
23141 rm -f conftest.er1
23142 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023144 (exit $ac_status); } && {
23145 test -z "$ac_c_werror_flag" ||
23146 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023147 } && test -s conftest$ac_exeext &&
23148 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023149 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023152sed 's/^/| /' conftest.$ac_ext >&5
23153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023154 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023156
23157rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023158 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023159LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023160fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023161{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23162echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23163if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023164 cat >>confdefs.h <<_ACEOF
23165#define HAVE_LIBIEEE 1
23166_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023167
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023168 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023169
Guido van Rossum627b2d71993-12-24 10:39:16 +000023170fi
23171
Michael W. Hudson54241132001-12-07 15:38:26 +000023172
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023173fi
23174
Michael W. Hudson54241132001-12-07 15:38:26 +000023175
Guido van Rossum7f253911997-05-09 02:42:48 +000023176# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023177{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23178echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023180# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023181if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023182 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023183if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023184then
23185
23186cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023187#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023188_ACEOF
23189
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023190 { echo "$as_me:$LINENO: result: yes" >&5
23191echo "${ECHO_T}yes" >&6; }
23192else { echo "$as_me:$LINENO: result: no" >&5
23193echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023194fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023195else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023196 { echo "$as_me:$LINENO: result: no" >&5
23197echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023198fi
23199
Guido van Rossum7f253911997-05-09 02:42:48 +000023200
Guido van Rossum7f43da71994-08-01 12:15:30 +000023201# check for --with-libm=...
23202
Guido van Rossum563e7081996-09-10 18:20:48 +000023203case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023204Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023205*) LIBM=-lm
23206esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023207{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23208echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023210# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023211if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023212 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023213if test "$withval" = no
23214then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023215 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23216echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023217elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023218then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023219 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23220echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23221else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23222echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023223 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023224fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023225else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023226 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23227echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023228fi
23229
Guido van Rossum7f43da71994-08-01 12:15:30 +000023230
23231# check for --with-libc=...
23232
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023233{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23234echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023236# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023237if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023238 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023239if test "$withval" = no
23240then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023241 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23242echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023243elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023244then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023245 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23246echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23247else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23248echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023249 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023250fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023251else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023252 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23253echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023254fi
23255
Guido van Rossum7f43da71994-08-01 12:15:30 +000023256
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023257# **************************************************
23258# * Check for various properties of floating point *
23259# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023260
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023261{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23262echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023263if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023264 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023265else
23266
23267if test "$cross_compiling" = yes; then
23268 ac_cv_little_endian_double=no
23269else
23270 cat >conftest.$ac_ext <<_ACEOF
23271/* confdefs.h. */
23272_ACEOF
23273cat confdefs.h >>conftest.$ac_ext
23274cat >>conftest.$ac_ext <<_ACEOF
23275/* end confdefs.h. */
23276
23277#include <string.h>
23278int main() {
23279 double x = 9006104071832581.0;
23280 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23281 return 0;
23282 else
23283 return 1;
23284}
23285
23286_ACEOF
23287rm -f conftest$ac_exeext
23288if { (ac_try="$ac_link"
23289case "(($ac_try" in
23290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23291 *) ac_try_echo=$ac_try;;
23292esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023294 (eval "$ac_link") 2>&5
23295 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023297 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23298 { (case "(($ac_try" in
23299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23300 *) ac_try_echo=$ac_try;;
23301esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023303 (eval "$ac_try") 2>&5
23304 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023306 (exit $ac_status); }; }; then
23307 ac_cv_little_endian_double=yes
23308else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023309 echo "$as_me: program exited with status $ac_status" >&5
23310echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023311sed 's/^/| /' conftest.$ac_ext >&5
23312
23313( exit $ac_status )
23314ac_cv_little_endian_double=no
23315fi
23316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23317fi
23318
23319
23320fi
23321
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023322{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23323echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023324if test "$ac_cv_little_endian_double" = yes
23325then
23326
23327cat >>confdefs.h <<\_ACEOF
23328#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23329_ACEOF
23330
23331fi
23332
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023333{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23334echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023335if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023336 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023337else
23338
23339if test "$cross_compiling" = yes; then
23340 ac_cv_big_endian_double=no
23341else
23342 cat >conftest.$ac_ext <<_ACEOF
23343/* confdefs.h. */
23344_ACEOF
23345cat confdefs.h >>conftest.$ac_ext
23346cat >>conftest.$ac_ext <<_ACEOF
23347/* end confdefs.h. */
23348
23349#include <string.h>
23350int main() {
23351 double x = 9006104071832581.0;
23352 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23353 return 0;
23354 else
23355 return 1;
23356}
23357
23358_ACEOF
23359rm -f conftest$ac_exeext
23360if { (ac_try="$ac_link"
23361case "(($ac_try" in
23362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23363 *) ac_try_echo=$ac_try;;
23364esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023366 (eval "$ac_link") 2>&5
23367 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023369 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23370 { (case "(($ac_try" in
23371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23372 *) ac_try_echo=$ac_try;;
23373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023375 (eval "$ac_try") 2>&5
23376 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023378 (exit $ac_status); }; }; then
23379 ac_cv_big_endian_double=yes
23380else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023381 echo "$as_me: program exited with status $ac_status" >&5
23382echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023383sed 's/^/| /' conftest.$ac_ext >&5
23384
23385( exit $ac_status )
23386ac_cv_big_endian_double=no
23387fi
23388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23389fi
23390
23391
23392fi
23393
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023394{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23395echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023396if test "$ac_cv_big_endian_double" = yes
23397then
23398
23399cat >>confdefs.h <<\_ACEOF
23400#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23401_ACEOF
23402
23403fi
23404
23405# Some ARM platforms use a mixed-endian representation for doubles.
23406# While Python doesn't currently have full support for these platforms
23407# (see e.g., issue 1762561), we can at least make sure that float <-> string
23408# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023409{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23410echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023411if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023412 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023413else
23414
23415if test "$cross_compiling" = yes; then
23416 ac_cv_mixed_endian_double=no
23417else
23418 cat >conftest.$ac_ext <<_ACEOF
23419/* confdefs.h. */
23420_ACEOF
23421cat confdefs.h >>conftest.$ac_ext
23422cat >>conftest.$ac_ext <<_ACEOF
23423/* end confdefs.h. */
23424
23425#include <string.h>
23426int main() {
23427 double x = 9006104071832581.0;
23428 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23429 return 0;
23430 else
23431 return 1;
23432}
23433
23434_ACEOF
23435rm -f conftest$ac_exeext
23436if { (ac_try="$ac_link"
23437case "(($ac_try" in
23438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23439 *) ac_try_echo=$ac_try;;
23440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023442 (eval "$ac_link") 2>&5
23443 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23446 { (case "(($ac_try" in
23447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23448 *) ac_try_echo=$ac_try;;
23449esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023451 (eval "$ac_try") 2>&5
23452 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023454 (exit $ac_status); }; }; then
23455 ac_cv_mixed_endian_double=yes
23456else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023457 echo "$as_me: program exited with status $ac_status" >&5
23458echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023459sed 's/^/| /' conftest.$ac_ext >&5
23460
23461( exit $ac_status )
23462ac_cv_mixed_endian_double=no
23463fi
23464rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23465fi
23466
23467
23468fi
23469
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023470{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23471echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023472if test "$ac_cv_mixed_endian_double" = yes
23473then
23474
23475cat >>confdefs.h <<\_ACEOF
23476#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23477_ACEOF
23478
23479fi
23480
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023481# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023482# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023483# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023484# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023485# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023486# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023487
23488# This inline assembler syntax may also work for suncc and icc,
23489# so we try it on all platforms.
23490
23491{ 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 +000023492echo $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 +000023493cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023494/* confdefs.h. */
23495_ACEOF
23496cat confdefs.h >>conftest.$ac_ext
23497cat >>conftest.$ac_ext <<_ACEOF
23498/* end confdefs.h. */
23499
23500int
23501main ()
23502{
23503
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023504 unsigned short cw;
23505 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23506 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023507
23508 ;
23509 return 0;
23510}
23511_ACEOF
23512rm -f conftest.$ac_objext
23513if { (ac_try="$ac_compile"
23514case "(($ac_try" in
23515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23516 *) ac_try_echo=$ac_try;;
23517esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023519 (eval "$ac_compile") 2>conftest.er1
23520 ac_status=$?
23521 grep -v '^ *+' conftest.er1 >conftest.err
23522 rm -f conftest.er1
23523 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023525 (exit $ac_status); } && {
23526 test -z "$ac_c_werror_flag" ||
23527 test ! -s conftest.err
23528 } && test -s conftest.$ac_objext; then
23529 have_gcc_asm_for_x87=yes
23530else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023531 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023532sed 's/^/| /' conftest.$ac_ext >&5
23533
23534 have_gcc_asm_for_x87=no
23535fi
23536
23537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023538{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023539echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023540if test "$have_gcc_asm_for_x87" = yes
23541then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023542
23543cat >>confdefs.h <<\_ACEOF
23544#define HAVE_GCC_ASM_FOR_X87 1
23545_ACEOF
23546
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023547fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023548
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023549# Detect whether system arithmetic is subject to x87-style double
23550# rounding issues. The result of this test has little meaning on non
23551# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23552# mode is round-to-nearest and double rounding issues are present, and
23553# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023554{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23555echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023556# $BASECFLAGS may affect the result
23557ac_save_cc="$CC"
23558CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023559if test "$cross_compiling" = yes; then
23560 ac_cv_x87_double_rounding=no
23561else
23562 cat >conftest.$ac_ext <<_ACEOF
23563/* confdefs.h. */
23564_ACEOF
23565cat confdefs.h >>conftest.$ac_ext
23566cat >>conftest.$ac_ext <<_ACEOF
23567/* end confdefs.h. */
23568
23569#include <stdlib.h>
23570#include <math.h>
23571int main() {
23572 volatile double x, y, z;
23573 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23574 x = 0.99999999999999989; /* 1-2**-53 */
23575 y = 1./x;
23576 if (y != 1.)
23577 exit(0);
23578 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23579 x = 1e16;
23580 y = 2.99999;
23581 z = x + y;
23582 if (z != 1e16+4.)
23583 exit(0);
23584 /* both tests show evidence of double rounding */
23585 exit(1);
23586}
23587
23588_ACEOF
23589rm -f conftest$ac_exeext
23590if { (ac_try="$ac_link"
23591case "(($ac_try" in
23592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23593 *) ac_try_echo=$ac_try;;
23594esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023596 (eval "$ac_link") 2>&5
23597 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023599 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23600 { (case "(($ac_try" in
23601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23602 *) ac_try_echo=$ac_try;;
23603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023605 (eval "$ac_try") 2>&5
23606 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023608 (exit $ac_status); }; }; then
23609 ac_cv_x87_double_rounding=no
23610else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023611 echo "$as_me: program exited with status $ac_status" >&5
23612echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023613sed 's/^/| /' conftest.$ac_ext >&5
23614
23615( exit $ac_status )
23616ac_cv_x87_double_rounding=yes
23617fi
23618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23619fi
23620
23621
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023622CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023623{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23624echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023625if test "$ac_cv_x87_double_rounding" = yes
23626then
23627
23628cat >>confdefs.h <<\_ACEOF
23629#define X87_DOUBLE_ROUNDING 1
23630_ACEOF
23631
23632fi
23633
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023634# ************************************
23635# * Check for mathematical functions *
23636# ************************************
23637
23638LIBS_SAVE=$LIBS
23639LIBS="$LIBS $LIBM"
23640
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023641# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23642# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023643{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23644echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023645if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023646 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023647else
23648
23649if test "$cross_compiling" = yes; then
23650 ac_cv_tanh_preserves_zero_sign=no
23651else
23652 cat >conftest.$ac_ext <<_ACEOF
23653/* confdefs.h. */
23654_ACEOF
23655cat confdefs.h >>conftest.$ac_ext
23656cat >>conftest.$ac_ext <<_ACEOF
23657/* end confdefs.h. */
23658
23659#include <math.h>
23660#include <stdlib.h>
23661int main() {
23662 /* return 0 if either negative zeros don't exist
23663 on this platform or if negative zeros exist
23664 and tanh(-0.) == -0. */
23665 if (atan2(0., -1.) == atan2(-0., -1.) ||
23666 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23667 else exit(1);
23668}
23669
23670_ACEOF
23671rm -f conftest$ac_exeext
23672if { (ac_try="$ac_link"
23673case "(($ac_try" in
23674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23675 *) ac_try_echo=$ac_try;;
23676esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023678 (eval "$ac_link") 2>&5
23679 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023681 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23682 { (case "(($ac_try" in
23683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23684 *) ac_try_echo=$ac_try;;
23685esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023687 (eval "$ac_try") 2>&5
23688 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023690 (exit $ac_status); }; }; then
23691 ac_cv_tanh_preserves_zero_sign=yes
23692else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023693 echo "$as_me: program exited with status $ac_status" >&5
23694echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023695sed 's/^/| /' conftest.$ac_ext >&5
23696
23697( exit $ac_status )
23698ac_cv_tanh_preserves_zero_sign=no
23699fi
23700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23701fi
23702
23703
23704fi
23705
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023706{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23707echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023708if test "$ac_cv_tanh_preserves_zero_sign" = yes
23709then
23710
23711cat >>confdefs.h <<\_ACEOF
23712#define TANH_PRESERVES_ZERO_SIGN 1
23713_ACEOF
23714
23715fi
23716
23717
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023718
Michael W. Hudson54241132001-12-07 15:38:26 +000023719
Christian Heimes99170a52007-12-19 02:07:34 +000023720
23721
23722
23723
23724
Mark Dickinsonf2537862009-04-18 13:58:18 +000023725
Mark Dickinson9c113362009-09-05 10:36:23 +000023726for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23727do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023728as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23729{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23730echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023731if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023732 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023733else
23734 cat >conftest.$ac_ext <<_ACEOF
23735/* confdefs.h. */
23736_ACEOF
23737cat confdefs.h >>conftest.$ac_ext
23738cat >>conftest.$ac_ext <<_ACEOF
23739/* end confdefs.h. */
23740/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23741 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23742#define $ac_func innocuous_$ac_func
23743
23744/* System header to define __stub macros and hopefully few prototypes,
23745 which can conflict with char $ac_func (); below.
23746 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23747 <limits.h> exists even on freestanding compilers. */
23748
23749#ifdef __STDC__
23750# include <limits.h>
23751#else
23752# include <assert.h>
23753#endif
23754
23755#undef $ac_func
23756
23757/* Override any GCC internal prototype to avoid an error.
23758 Use char because int might match the return type of a GCC
23759 builtin and then its argument prototype would still apply. */
23760#ifdef __cplusplus
23761extern "C"
23762#endif
23763char $ac_func ();
23764/* The GNU C library defines this for functions which it implements
23765 to always fail with ENOSYS. Some functions are actually named
23766 something starting with __ and the normal name is an alias. */
23767#if defined __stub_$ac_func || defined __stub___$ac_func
23768choke me
23769#endif
23770
23771int
23772main ()
23773{
23774return $ac_func ();
23775 ;
23776 return 0;
23777}
23778_ACEOF
23779rm -f conftest.$ac_objext conftest$ac_exeext
23780if { (ac_try="$ac_link"
23781case "(($ac_try" in
23782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23783 *) ac_try_echo=$ac_try;;
23784esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023786 (eval "$ac_link") 2>conftest.er1
23787 ac_status=$?
23788 grep -v '^ *+' conftest.er1 >conftest.err
23789 rm -f conftest.er1
23790 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023792 (exit $ac_status); } && {
23793 test -z "$ac_c_werror_flag" ||
23794 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023795 } && test -s conftest$ac_exeext &&
23796 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023797 eval "$as_ac_var=yes"
23798else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023799 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023800sed 's/^/| /' conftest.$ac_ext >&5
23801
23802 eval "$as_ac_var=no"
23803fi
23804
23805rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23806 conftest$ac_exeext conftest.$ac_ext
23807fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023808ac_res=`eval echo '${'$as_ac_var'}'`
23809 { echo "$as_me:$LINENO: result: $ac_res" >&5
23810echo "${ECHO_T}$ac_res" >&6; }
23811if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023812 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023813#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023814_ACEOF
23815
23816fi
23817done
23818
23819
23820
23821
23822
23823
23824for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023825do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023826as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23827{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23828echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023829if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023830 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023831else
23832 cat >conftest.$ac_ext <<_ACEOF
23833/* confdefs.h. */
23834_ACEOF
23835cat confdefs.h >>conftest.$ac_ext
23836cat >>conftest.$ac_ext <<_ACEOF
23837/* end confdefs.h. */
23838/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23839 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23840#define $ac_func innocuous_$ac_func
23841
23842/* System header to define __stub macros and hopefully few prototypes,
23843 which can conflict with char $ac_func (); below.
23844 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23845 <limits.h> exists even on freestanding compilers. */
23846
23847#ifdef __STDC__
23848# include <limits.h>
23849#else
23850# include <assert.h>
23851#endif
23852
23853#undef $ac_func
23854
23855/* Override any GCC internal prototype to avoid an error.
23856 Use char because int might match the return type of a GCC
23857 builtin and then its argument prototype would still apply. */
23858#ifdef __cplusplus
23859extern "C"
23860#endif
23861char $ac_func ();
23862/* The GNU C library defines this for functions which it implements
23863 to always fail with ENOSYS. Some functions are actually named
23864 something starting with __ and the normal name is an alias. */
23865#if defined __stub_$ac_func || defined __stub___$ac_func
23866choke me
23867#endif
23868
23869int
23870main ()
23871{
23872return $ac_func ();
23873 ;
23874 return 0;
23875}
23876_ACEOF
23877rm -f conftest.$ac_objext conftest$ac_exeext
23878if { (ac_try="$ac_link"
23879case "(($ac_try" in
23880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23881 *) ac_try_echo=$ac_try;;
23882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023884 (eval "$ac_link") 2>conftest.er1
23885 ac_status=$?
23886 grep -v '^ *+' conftest.er1 >conftest.err
23887 rm -f conftest.er1
23888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023890 (exit $ac_status); } && {
23891 test -z "$ac_c_werror_flag" ||
23892 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023893 } && test -s conftest$ac_exeext &&
23894 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023895 eval "$as_ac_var=yes"
23896else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023897 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023898sed 's/^/| /' conftest.$ac_ext >&5
23899
23900 eval "$as_ac_var=no"
23901fi
23902
23903rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23904 conftest$ac_exeext conftest.$ac_ext
23905fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023906ac_res=`eval echo '${'$as_ac_var'}'`
23907 { echo "$as_me:$LINENO: result: $ac_res" >&5
23908echo "${ECHO_T}$ac_res" >&6; }
23909if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023910 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023911#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023912_ACEOF
23913
23914fi
23915done
23916
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023917{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23918echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023919if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023920 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023921else
23922 cat >conftest.$ac_ext <<_ACEOF
23923/* confdefs.h. */
23924_ACEOF
23925cat confdefs.h >>conftest.$ac_ext
23926cat >>conftest.$ac_ext <<_ACEOF
23927/* end confdefs.h. */
23928#include <math.h>
23929
23930int
23931main ()
23932{
23933#ifndef isinf
23934 (void) isinf;
23935#endif
23936
23937 ;
23938 return 0;
23939}
23940_ACEOF
23941rm -f conftest.$ac_objext
23942if { (ac_try="$ac_compile"
23943case "(($ac_try" in
23944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23945 *) ac_try_echo=$ac_try;;
23946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023948 (eval "$ac_compile") 2>conftest.er1
23949 ac_status=$?
23950 grep -v '^ *+' conftest.er1 >conftest.err
23951 rm -f conftest.er1
23952 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023954 (exit $ac_status); } && {
23955 test -z "$ac_c_werror_flag" ||
23956 test ! -s conftest.err
23957 } && test -s conftest.$ac_objext; then
23958 ac_cv_have_decl_isinf=yes
23959else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023960 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023961sed 's/^/| /' conftest.$ac_ext >&5
23962
23963 ac_cv_have_decl_isinf=no
23964fi
23965
23966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23967fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023968{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23969echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23970if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023971
23972cat >>confdefs.h <<_ACEOF
23973#define HAVE_DECL_ISINF 1
23974_ACEOF
23975
23976
23977else
23978 cat >>confdefs.h <<_ACEOF
23979#define HAVE_DECL_ISINF 0
23980_ACEOF
23981
23982
23983fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023984{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23985echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023986if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023987 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023988else
23989 cat >conftest.$ac_ext <<_ACEOF
23990/* confdefs.h. */
23991_ACEOF
23992cat confdefs.h >>conftest.$ac_ext
23993cat >>conftest.$ac_ext <<_ACEOF
23994/* end confdefs.h. */
23995#include <math.h>
23996
23997int
23998main ()
23999{
24000#ifndef isnan
24001 (void) isnan;
24002#endif
24003
24004 ;
24005 return 0;
24006}
24007_ACEOF
24008rm -f conftest.$ac_objext
24009if { (ac_try="$ac_compile"
24010case "(($ac_try" in
24011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24012 *) ac_try_echo=$ac_try;;
24013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024015 (eval "$ac_compile") 2>conftest.er1
24016 ac_status=$?
24017 grep -v '^ *+' conftest.er1 >conftest.err
24018 rm -f conftest.er1
24019 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024021 (exit $ac_status); } && {
24022 test -z "$ac_c_werror_flag" ||
24023 test ! -s conftest.err
24024 } && test -s conftest.$ac_objext; then
24025 ac_cv_have_decl_isnan=yes
24026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024027 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024028sed 's/^/| /' conftest.$ac_ext >&5
24029
24030 ac_cv_have_decl_isnan=no
24031fi
24032
24033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24034fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024035{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24036echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24037if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024038
24039cat >>confdefs.h <<_ACEOF
24040#define HAVE_DECL_ISNAN 1
24041_ACEOF
24042
24043
24044else
24045 cat >>confdefs.h <<_ACEOF
24046#define HAVE_DECL_ISNAN 0
24047_ACEOF
24048
24049
24050fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024051{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24052echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024053if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024054 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024055else
24056 cat >conftest.$ac_ext <<_ACEOF
24057/* confdefs.h. */
24058_ACEOF
24059cat confdefs.h >>conftest.$ac_ext
24060cat >>conftest.$ac_ext <<_ACEOF
24061/* end confdefs.h. */
24062#include <math.h>
24063
24064int
24065main ()
24066{
24067#ifndef isfinite
24068 (void) isfinite;
24069#endif
24070
24071 ;
24072 return 0;
24073}
24074_ACEOF
24075rm -f conftest.$ac_objext
24076if { (ac_try="$ac_compile"
24077case "(($ac_try" in
24078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24079 *) ac_try_echo=$ac_try;;
24080esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024082 (eval "$ac_compile") 2>conftest.er1
24083 ac_status=$?
24084 grep -v '^ *+' conftest.er1 >conftest.err
24085 rm -f conftest.er1
24086 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024088 (exit $ac_status); } && {
24089 test -z "$ac_c_werror_flag" ||
24090 test ! -s conftest.err
24091 } && test -s conftest.$ac_objext; then
24092 ac_cv_have_decl_isfinite=yes
24093else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024094 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024095sed 's/^/| /' conftest.$ac_ext >&5
24096
24097 ac_cv_have_decl_isfinite=no
24098fi
24099
24100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24101fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024102{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24103echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24104if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024105
24106cat >>confdefs.h <<_ACEOF
24107#define HAVE_DECL_ISFINITE 1
24108_ACEOF
24109
24110
24111else
24112 cat >>confdefs.h <<_ACEOF
24113#define HAVE_DECL_ISFINITE 0
24114_ACEOF
24115
24116
24117fi
24118
24119
Christian Heimes99170a52007-12-19 02:07:34 +000024120
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024121LIBS=$LIBS_SAVE
24122
Mark Dickinsona614f042009-11-28 12:48:43 +000024123# For multiprocessing module, check that sem_open
24124# actually works. For FreeBSD versions <= 7.2,
24125# the kernel module that provides POSIX semaphores
24126# isn't loaded by default, so an attempt to call
24127# sem_open results in a 'Signal 12' error.
24128{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24129echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24130if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24131 echo $ECHO_N "(cached) $ECHO_C" >&6
24132else
24133 if test "$cross_compiling" = yes; then
24134 ac_cv_posix_semaphores_enabled=yes
24135else
24136 cat >conftest.$ac_ext <<_ACEOF
24137/* confdefs.h. */
24138_ACEOF
24139cat confdefs.h >>conftest.$ac_ext
24140cat >>conftest.$ac_ext <<_ACEOF
24141/* end confdefs.h. */
24142
24143#include <unistd.h>
24144#include <fcntl.h>
24145#include <stdio.h>
24146#include <semaphore.h>
24147#include <sys/stat.h>
24148
24149int main(void) {
24150 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24151 if (a == SEM_FAILED) {
24152 perror("sem_open");
24153 return 1;
24154 }
24155 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024156 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024157 return 0;
24158}
24159
24160_ACEOF
24161rm -f conftest$ac_exeext
24162if { (ac_try="$ac_link"
24163case "(($ac_try" in
24164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24165 *) ac_try_echo=$ac_try;;
24166esac
24167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24168 (eval "$ac_link") 2>&5
24169 ac_status=$?
24170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24171 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24172 { (case "(($ac_try" in
24173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24174 *) ac_try_echo=$ac_try;;
24175esac
24176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24177 (eval "$ac_try") 2>&5
24178 ac_status=$?
24179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24180 (exit $ac_status); }; }; then
24181 ac_cv_posix_semaphores_enabled=yes
24182else
24183 echo "$as_me: program exited with status $ac_status" >&5
24184echo "$as_me: failed program was:" >&5
24185sed 's/^/| /' conftest.$ac_ext >&5
24186
24187( exit $ac_status )
24188ac_cv_posix_semaphores_enabled=no
24189fi
24190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24191fi
24192
24193
24194
24195fi
24196
24197{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24198echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24199if test $ac_cv_posix_semaphores_enabled = no
24200then
24201
24202cat >>confdefs.h <<\_ACEOF
24203#define POSIX_SEMAPHORES_NOT_ENABLED 1
24204_ACEOF
24205
24206fi
24207
Mark Dickinson10683072009-04-18 21:18:19 +000024208# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024209{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24210echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024211if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024212 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024213else
24214 if test "$cross_compiling" = yes; then
24215 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024216else
24217 cat >conftest.$ac_ext <<_ACEOF
24218/* confdefs.h. */
24219_ACEOF
24220cat confdefs.h >>conftest.$ac_ext
24221cat >>conftest.$ac_ext <<_ACEOF
24222/* end confdefs.h. */
24223
24224#include <unistd.h>
24225#include <fcntl.h>
24226#include <stdio.h>
24227#include <semaphore.h>
24228#include <sys/stat.h>
24229
24230int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024231 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024232 int count;
24233 int res;
24234 if(a==SEM_FAILED){
24235 perror("sem_open");
24236 return 1;
24237
24238 }
24239 res = sem_getvalue(a, &count);
24240 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024241 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024242 return res==-1 ? 1 : 0;
24243}
24244
Mark Dickinson10683072009-04-18 21:18:19 +000024245_ACEOF
24246rm -f conftest$ac_exeext
24247if { (ac_try="$ac_link"
24248case "(($ac_try" in
24249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24250 *) ac_try_echo=$ac_try;;
24251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024253 (eval "$ac_link") 2>&5
24254 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024256 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24257 { (case "(($ac_try" in
24258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24259 *) ac_try_echo=$ac_try;;
24260esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024262 (eval "$ac_try") 2>&5
24263 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024265 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024266 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024267else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024268 echo "$as_me: program exited with status $ac_status" >&5
24269echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024270sed 's/^/| /' conftest.$ac_ext >&5
24271
24272( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024273ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024274fi
24275rm -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 +000024276fi
24277
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024278
24279
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024280fi
24281
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024282{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24283echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024284if test $ac_cv_broken_sem_getvalue = yes
24285then
24286
24287cat >>confdefs.h <<\_ACEOF
24288#define HAVE_BROKEN_SEM_GETVALUE 1
24289_ACEOF
24290
24291fi
24292
Mark Dickinsonbd792642009-03-18 20:06:12 +000024293# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024294{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24295echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024296# Check whether --enable-big-digits was given.
24297if test "${enable_big_digits+set}" = set; then
24298 enableval=$enable_big_digits; case $enable_big_digits in
24299yes)
24300 enable_big_digits=30 ;;
24301no)
24302 enable_big_digits=15 ;;
2430315|30)
24304 ;;
24305*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024306 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24307echo "$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 +000024308 { (exit 1); exit 1; }; } ;;
24309esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024310{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24311echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024312
24313cat >>confdefs.h <<_ACEOF
24314#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24315_ACEOF
24316
24317
24318else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024319 { echo "$as_me:$LINENO: result: no value specified" >&5
24320echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024321fi
24322
24323
Guido van Rossumef2255b2000-03-10 22:30:29 +000024324# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024325if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024326 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24327echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024328if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024329 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024330fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024331{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24332echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024333else
Martin v. Löwis11437992002-04-12 09:54:03 +000024334 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024335{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24336echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024338/* confdefs.h. */
24339_ACEOF
24340cat confdefs.h >>conftest.$ac_ext
24341cat >>conftest.$ac_ext <<_ACEOF
24342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024343$ac_includes_default
24344#include <wchar.h>
24345_ACEOF
24346rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024347if { (ac_try="$ac_compile"
24348case "(($ac_try" in
24349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24350 *) ac_try_echo=$ac_try;;
24351esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024355 grep -v '^ *+' conftest.er1 >conftest.err
24356 rm -f conftest.er1
24357 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024359 (exit $ac_status); } && {
24360 test -z "$ac_c_werror_flag" ||
24361 test ! -s conftest.err
24362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024363 ac_header_compiler=yes
24364else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024366sed 's/^/| /' conftest.$ac_ext >&5
24367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024368 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024370
24371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024372{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24373echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024374
24375# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024376{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24377echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024378cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024379/* confdefs.h. */
24380_ACEOF
24381cat confdefs.h >>conftest.$ac_ext
24382cat >>conftest.$ac_ext <<_ACEOF
24383/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024384#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024385_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024386if { (ac_try="$ac_cpp conftest.$ac_ext"
24387case "(($ac_try" in
24388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24389 *) ac_try_echo=$ac_try;;
24390esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024392 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024393 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024394 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024395 rm -f conftest.er1
24396 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024398 (exit $ac_status); } >/dev/null && {
24399 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24400 test ! -s conftest.err
24401 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024402 ac_header_preproc=yes
24403else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024405sed 's/^/| /' conftest.$ac_ext >&5
24406
Martin v. Löwis11437992002-04-12 09:54:03 +000024407 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024409
Martin v. Löwis11437992002-04-12 09:54:03 +000024410rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024411{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24412echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024413
24414# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024415case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24416 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024417 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24418echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24419 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24420echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024421 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024422 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024423 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024424 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24425echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24426 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24427echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24428 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24429echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24430 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24431echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24432 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24433echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24434 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24435echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024436 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024437## -------------------------------------- ##
24438## Report this to http://bugs.python.org/ ##
24439## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024440_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024441 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024442 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024443esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024444{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24445echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024446if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024447 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024448else
24449 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024450fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024451{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24452echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024453
24454fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024455if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024456
24457
24458cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024459#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024460_ACEOF
24461
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024462 wchar_h="yes"
24463
Guido van Rossumef2255b2000-03-10 22:30:29 +000024464else
Martin v. Löwis11437992002-04-12 09:54:03 +000024465 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024466
24467fi
24468
Michael W. Hudson54241132001-12-07 15:38:26 +000024469
Martin v. Löwis11437992002-04-12 09:54:03 +000024470
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024471# determine wchar_t size
24472if test "$wchar_h" = yes
24473then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024474 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24475echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24476if test "${ac_cv_type_wchar_t+set}" = set; then
24477 echo $ECHO_N "(cached) $ECHO_C" >&6
24478else
24479 cat >conftest.$ac_ext <<_ACEOF
24480/* confdefs.h. */
24481_ACEOF
24482cat confdefs.h >>conftest.$ac_ext
24483cat >>conftest.$ac_ext <<_ACEOF
24484/* end confdefs.h. */
24485#include <wchar.h>
24486
24487typedef wchar_t ac__type_new_;
24488int
24489main ()
24490{
24491if ((ac__type_new_ *) 0)
24492 return 0;
24493if (sizeof (ac__type_new_))
24494 return 0;
24495 ;
24496 return 0;
24497}
24498_ACEOF
24499rm -f conftest.$ac_objext
24500if { (ac_try="$ac_compile"
24501case "(($ac_try" in
24502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24503 *) ac_try_echo=$ac_try;;
24504esac
24505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24506 (eval "$ac_compile") 2>conftest.er1
24507 ac_status=$?
24508 grep -v '^ *+' conftest.er1 >conftest.err
24509 rm -f conftest.er1
24510 cat conftest.err >&5
24511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24512 (exit $ac_status); } && {
24513 test -z "$ac_c_werror_flag" ||
24514 test ! -s conftest.err
24515 } && test -s conftest.$ac_objext; then
24516 ac_cv_type_wchar_t=yes
24517else
24518 echo "$as_me: failed program was:" >&5
24519sed 's/^/| /' conftest.$ac_ext >&5
24520
24521 ac_cv_type_wchar_t=no
24522fi
24523
24524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24525fi
24526{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24527echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24528
24529# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024530# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24531# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24532# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024533{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24534echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024535if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024536 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024537else
Martin v. Löwis11437992002-04-12 09:54:03 +000024538 if test "$cross_compiling" = yes; then
24539 # Depending upon the size, compute the lo and hi bounds.
24540cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024541/* confdefs.h. */
24542_ACEOF
24543cat confdefs.h >>conftest.$ac_ext
24544cat >>conftest.$ac_ext <<_ACEOF
24545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024546#include <wchar.h>
24547
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024548 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024549int
24550main ()
24551{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024553test_array [0] = 0
24554
24555 ;
24556 return 0;
24557}
24558_ACEOF
24559rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024560if { (ac_try="$ac_compile"
24561case "(($ac_try" in
24562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24563 *) ac_try_echo=$ac_try;;
24564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024568 grep -v '^ *+' conftest.er1 >conftest.err
24569 rm -f conftest.er1
24570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024572 (exit $ac_status); } && {
24573 test -z "$ac_c_werror_flag" ||
24574 test ! -s conftest.err
24575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024576 ac_lo=0 ac_mid=0
24577 while :; do
24578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024579/* confdefs.h. */
24580_ACEOF
24581cat confdefs.h >>conftest.$ac_ext
24582cat >>conftest.$ac_ext <<_ACEOF
24583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024584#include <wchar.h>
24585
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024586 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024587int
24588main ()
24589{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024590static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024591test_array [0] = 0
24592
24593 ;
24594 return 0;
24595}
24596_ACEOF
24597rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024598if { (ac_try="$ac_compile"
24599case "(($ac_try" in
24600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24601 *) ac_try_echo=$ac_try;;
24602esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024606 grep -v '^ *+' conftest.er1 >conftest.err
24607 rm -f conftest.er1
24608 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024610 (exit $ac_status); } && {
24611 test -z "$ac_c_werror_flag" ||
24612 test ! -s conftest.err
24613 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024614 ac_hi=$ac_mid; break
24615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024617sed 's/^/| /' conftest.$ac_ext >&5
24618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024619 ac_lo=`expr $ac_mid + 1`
24620 if test $ac_lo -le $ac_mid; then
24621 ac_lo= ac_hi=
24622 break
24623 fi
24624 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024626
24627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024628 done
24629else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024631sed 's/^/| /' conftest.$ac_ext >&5
24632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024634/* confdefs.h. */
24635_ACEOF
24636cat confdefs.h >>conftest.$ac_ext
24637cat >>conftest.$ac_ext <<_ACEOF
24638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024639#include <wchar.h>
24640
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024641 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024642int
24643main ()
24644{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024645static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024646test_array [0] = 0
24647
24648 ;
24649 return 0;
24650}
24651_ACEOF
24652rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024653if { (ac_try="$ac_compile"
24654case "(($ac_try" in
24655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24656 *) ac_try_echo=$ac_try;;
24657esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024659 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024661 grep -v '^ *+' conftest.er1 >conftest.err
24662 rm -f conftest.er1
24663 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024665 (exit $ac_status); } && {
24666 test -z "$ac_c_werror_flag" ||
24667 test ! -s conftest.err
24668 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024669 ac_hi=-1 ac_mid=-1
24670 while :; do
24671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024672/* confdefs.h. */
24673_ACEOF
24674cat confdefs.h >>conftest.$ac_ext
24675cat >>conftest.$ac_ext <<_ACEOF
24676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024677#include <wchar.h>
24678
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024679 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024680int
24681main ()
24682{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024683static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024684test_array [0] = 0
24685
24686 ;
24687 return 0;
24688}
24689_ACEOF
24690rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024691if { (ac_try="$ac_compile"
24692case "(($ac_try" in
24693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24694 *) ac_try_echo=$ac_try;;
24695esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024699 grep -v '^ *+' conftest.er1 >conftest.err
24700 rm -f conftest.er1
24701 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024703 (exit $ac_status); } && {
24704 test -z "$ac_c_werror_flag" ||
24705 test ! -s conftest.err
24706 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024707 ac_lo=$ac_mid; break
24708else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024710sed 's/^/| /' conftest.$ac_ext >&5
24711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024712 ac_hi=`expr '(' $ac_mid ')' - 1`
24713 if test $ac_mid -le $ac_hi; then
24714 ac_lo= ac_hi=
24715 break
24716 fi
24717 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024719
24720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024721 done
24722else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024724sed 's/^/| /' conftest.$ac_ext >&5
24725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024726 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024728
24729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024731
24732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024733# Binary search between lo and hi bounds.
24734while test "x$ac_lo" != "x$ac_hi"; do
24735 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024737/* confdefs.h. */
24738_ACEOF
24739cat confdefs.h >>conftest.$ac_ext
24740cat >>conftest.$ac_ext <<_ACEOF
24741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024742#include <wchar.h>
24743
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024744 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024745int
24746main ()
24747{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024749test_array [0] = 0
24750
24751 ;
24752 return 0;
24753}
24754_ACEOF
24755rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024756if { (ac_try="$ac_compile"
24757case "(($ac_try" in
24758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24759 *) ac_try_echo=$ac_try;;
24760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024764 grep -v '^ *+' conftest.er1 >conftest.err
24765 rm -f conftest.er1
24766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024768 (exit $ac_status); } && {
24769 test -z "$ac_c_werror_flag" ||
24770 test ! -s conftest.err
24771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024772 ac_hi=$ac_mid
24773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024775sed 's/^/| /' conftest.$ac_ext >&5
24776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024777 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024779
24780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024781done
24782case $ac_lo in
24783?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024784'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024785 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024786See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024787echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024788See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024789 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024790 else
24791 ac_cv_sizeof_wchar_t=0
24792 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024793esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024794else
Martin v. Löwis11437992002-04-12 09:54:03 +000024795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024796/* confdefs.h. */
24797_ACEOF
24798cat confdefs.h >>conftest.$ac_ext
24799cat >>conftest.$ac_ext <<_ACEOF
24800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024801#include <wchar.h>
24802
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024803 typedef wchar_t ac__type_sizeof_;
24804static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24805static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024806#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024807#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024808int
24809main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024810{
Martin v. Löwis11437992002-04-12 09:54:03 +000024811
24812 FILE *f = fopen ("conftest.val", "w");
24813 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024814 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024815 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024816 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024817 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024818 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024820 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024821 }
24822 else
24823 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024824 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024825 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024826 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024827 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024828 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024829 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024830
24831 ;
24832 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024833}
Martin v. Löwis11437992002-04-12 09:54:03 +000024834_ACEOF
24835rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024836if { (ac_try="$ac_link"
24837case "(($ac_try" in
24838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24839 *) ac_try_echo=$ac_try;;
24840esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024842 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024843 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024845 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024846 { (case "(($ac_try" in
24847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24848 *) ac_try_echo=$ac_try;;
24849esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024851 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024852 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024854 (exit $ac_status); }; }; then
24855 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024856else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024857 echo "$as_me: program exited with status $ac_status" >&5
24858echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024859sed 's/^/| /' conftest.$ac_ext >&5
24860
Martin v. Löwis11437992002-04-12 09:54:03 +000024861( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024862if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024863 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024864See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024865echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024866See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024867 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024868 else
24869 ac_cv_sizeof_wchar_t=0
24870 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024872rm -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 +000024873fi
24874rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024875fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024876{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24877echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024878
24879
24880
Martin v. Löwis11437992002-04-12 09:54:03 +000024881cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024882#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024883_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024884
Michael W. Hudson54241132001-12-07 15:38:26 +000024885
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024886fi
24887
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024888{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24889echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024890have_ucs4_tcl=no
24891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024892/* confdefs.h. */
24893_ACEOF
24894cat confdefs.h >>conftest.$ac_ext
24895cat >>conftest.$ac_ext <<_ACEOF
24896/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024897
24898#include <tcl.h>
24899#if TCL_UTF_MAX != 6
24900# error "NOT UCS4_TCL"
24901#endif
24902int
24903main ()
24904{
24905
24906 ;
24907 return 0;
24908}
24909_ACEOF
24910rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024911if { (ac_try="$ac_compile"
24912case "(($ac_try" in
24913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24914 *) ac_try_echo=$ac_try;;
24915esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024919 grep -v '^ *+' conftest.er1 >conftest.err
24920 rm -f conftest.er1
24921 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024923 (exit $ac_status); } && {
24924 test -z "$ac_c_werror_flag" ||
24925 test ! -s conftest.err
24926 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024927
24928
24929cat >>confdefs.h <<\_ACEOF
24930#define HAVE_UCS4_TCL 1
24931_ACEOF
24932
24933 have_ucs4_tcl=yes
24934
24935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024937sed 's/^/| /' conftest.$ac_ext >&5
24938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024939
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024941
24942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024943{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24944echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024945
Skip Montanaro6dead952003-09-25 14:50:04 +000024946# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024947if test "$wchar_h" = yes
24948then
24949 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024950 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24951echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024952 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024953 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024954else
24955
24956 if test "$cross_compiling" = yes; then
24957 ac_cv_wchar_t_signed=yes
24958else
24959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024960/* confdefs.h. */
24961_ACEOF
24962cat confdefs.h >>conftest.$ac_ext
24963cat >>conftest.$ac_ext <<_ACEOF
24964/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024965
24966 #include <wchar.h>
24967 int main()
24968 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024969 /* Success: exit code 0 */
24970 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024971 }
24972
24973_ACEOF
24974rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024975if { (ac_try="$ac_link"
24976case "(($ac_try" in
24977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24978 *) ac_try_echo=$ac_try;;
24979esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024981 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024982 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024984 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024985 { (case "(($ac_try" in
24986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24987 *) ac_try_echo=$ac_try;;
24988esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024990 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024991 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024993 (exit $ac_status); }; }; then
24994 ac_cv_wchar_t_signed=yes
24995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024996 echo "$as_me: program exited with status $ac_status" >&5
24997echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024998sed 's/^/| /' conftest.$ac_ext >&5
24999
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025000( exit $ac_status )
25001ac_cv_wchar_t_signed=no
25002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025003rm -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 +000025004fi
25005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025006
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025007fi
25008
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025009 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25010echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025011fi
25012
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025013{ echo "$as_me:$LINENO: checking what type to use for str" >&5
25014echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000025015
25016# Check whether --with-wide-unicode was given.
25017if test "${with_wide_unicode+set}" = set; then
25018 withval=$with_wide_unicode;
25019if test "$withval" != no
25020then unicode_size="4"
25021else unicode_size="2"
25022fi
25023
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025024else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025025
Georg Brandl52d168a2008-01-07 18:10:24 +000025026case "$have_ucs4_tcl" in
25027 yes) unicode_size="4" ;;
25028 *) unicode_size="2" ;;
25029esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025030
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025031fi
25032
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025033
25034
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025035
Georg Brandl52d168a2008-01-07 18:10:24 +000025036case "$unicode_size" in
25037 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025038#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025039_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000025040 ;;
25041 *) cat >>confdefs.h <<\_ACEOF
25042#define Py_UNICODE_SIZE 2
25043_ACEOF
25044 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025045esac
25046
Michael W. Hudson54241132001-12-07 15:38:26 +000025047
Martin v. Löwis11437992002-04-12 09:54:03 +000025048
25049
Georg Brandl52d168a2008-01-07 18:10:24 +000025050# wchar_t is only usable if it maps to an unsigned type
25051if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025052 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000025053then
25054 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025055
Martin v. Löwis11437992002-04-12 09:54:03 +000025056cat >>confdefs.h <<\_ACEOF
25057#define HAVE_USABLE_WCHAR_T 1
25058_ACEOF
25059
Georg Brandl52d168a2008-01-07 18:10:24 +000025060 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025061#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025062_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025063
Georg Brandl52d168a2008-01-07 18:10:24 +000025064elif test "$ac_cv_sizeof_short" = "$unicode_size"
25065then
25066 PY_UNICODE_TYPE="unsigned short"
25067 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025068#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025069_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025070
Georg Brandl52d168a2008-01-07 18:10:24 +000025071elif test "$ac_cv_sizeof_long" = "$unicode_size"
25072then
25073 PY_UNICODE_TYPE="unsigned long"
25074 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025075#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025076_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025077
Georg Brandl52d168a2008-01-07 18:10:24 +000025078else
25079 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025080fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025081{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25082echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025083
25084# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025085{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25086echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025087if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025088 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025089else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025090 # See if sys/param.h defines the BYTE_ORDER macro.
25091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025092/* confdefs.h. */
25093_ACEOF
25094cat confdefs.h >>conftest.$ac_ext
25095cat >>conftest.$ac_ext <<_ACEOF
25096/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025097#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025098#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025099
Martin v. Löwis11437992002-04-12 09:54:03 +000025100int
25101main ()
25102{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025103#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25104 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25105 bogus endian macros
25106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025107
25108 ;
25109 return 0;
25110}
25111_ACEOF
25112rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025113if { (ac_try="$ac_compile"
25114case "(($ac_try" in
25115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25116 *) ac_try_echo=$ac_try;;
25117esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025121 grep -v '^ *+' conftest.er1 >conftest.err
25122 rm -f conftest.er1
25123 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025125 (exit $ac_status); } && {
25126 test -z "$ac_c_werror_flag" ||
25127 test ! -s conftest.err
25128 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025129 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025130cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025131/* confdefs.h. */
25132_ACEOF
25133cat confdefs.h >>conftest.$ac_ext
25134cat >>conftest.$ac_ext <<_ACEOF
25135/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025136#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025137#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025138
Martin v. Löwis11437992002-04-12 09:54:03 +000025139int
25140main ()
25141{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025142#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025143 not big endian
25144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025145
25146 ;
25147 return 0;
25148}
25149_ACEOF
25150rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025151if { (ac_try="$ac_compile"
25152case "(($ac_try" in
25153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25154 *) ac_try_echo=$ac_try;;
25155esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025159 grep -v '^ *+' conftest.er1 >conftest.err
25160 rm -f conftest.er1
25161 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025163 (exit $ac_status); } && {
25164 test -z "$ac_c_werror_flag" ||
25165 test ! -s conftest.err
25166 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025167 ac_cv_c_bigendian=yes
25168else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025170sed 's/^/| /' conftest.$ac_ext >&5
25171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025172 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025174
25175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025176else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025178sed 's/^/| /' conftest.$ac_ext >&5
25179
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025180 # It does not; compile a test program.
25181if test "$cross_compiling" = yes; then
25182 # try to guess the endianness by grepping values into an object file
25183 ac_cv_c_bigendian=unknown
25184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025185/* confdefs.h. */
25186_ACEOF
25187cat confdefs.h >>conftest.$ac_ext
25188cat >>conftest.$ac_ext <<_ACEOF
25189/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025190short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25191short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25192void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25193short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25194short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25195void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025196int
25197main ()
25198{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025199 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025200 ;
25201 return 0;
25202}
25203_ACEOF
25204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025205if { (ac_try="$ac_compile"
25206case "(($ac_try" in
25207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25208 *) ac_try_echo=$ac_try;;
25209esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025213 grep -v '^ *+' conftest.er1 >conftest.err
25214 rm -f conftest.er1
25215 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025217 (exit $ac_status); } && {
25218 test -z "$ac_c_werror_flag" ||
25219 test ! -s conftest.err
25220 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025221 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025222 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025223fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025224if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25225 if test "$ac_cv_c_bigendian" = unknown; then
25226 ac_cv_c_bigendian=no
25227 else
25228 # finding both strings is unlikely to happen, but who knows?
25229 ac_cv_c_bigendian=unknown
25230 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025231fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025232else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025234sed 's/^/| /' conftest.$ac_ext >&5
25235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025236
Martin v. Löwis11437992002-04-12 09:54:03 +000025237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025238
25239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025240else
25241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025242/* confdefs.h. */
25243_ACEOF
25244cat confdefs.h >>conftest.$ac_ext
25245cat >>conftest.$ac_ext <<_ACEOF
25246/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025247$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025248int
25249main ()
25250{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025251
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025252 /* Are we little or big endian? From Harbison&Steele. */
25253 union
25254 {
25255 long int l;
25256 char c[sizeof (long int)];
25257 } u;
25258 u.l = 1;
25259 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025260
25261 ;
25262 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025263}
Martin v. Löwis11437992002-04-12 09:54:03 +000025264_ACEOF
25265rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025266if { (ac_try="$ac_link"
25267case "(($ac_try" in
25268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25269 *) ac_try_echo=$ac_try;;
25270esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025272 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025273 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025275 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025276 { (case "(($ac_try" in
25277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25278 *) ac_try_echo=$ac_try;;
25279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025281 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025282 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025284 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025285 ac_cv_c_bigendian=no
25286else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025287 echo "$as_me: program exited with status $ac_status" >&5
25288echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025289sed 's/^/| /' conftest.$ac_ext >&5
25290
Martin v. Löwis11437992002-04-12 09:54:03 +000025291( exit $ac_status )
25292ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025294rm -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 +000025295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025296
25297
Martin v. Löwis11437992002-04-12 09:54:03 +000025298fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025299
25300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25301fi
25302{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25303echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25304case $ac_cv_c_bigendian in
25305 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025306
25307cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025308#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025309_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025310 ;;
25311 no)
25312 ;;
25313 *)
25314 { { echo "$as_me:$LINENO: error: unknown endianness
25315presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25316echo "$as_me: error: unknown endianness
25317presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025318 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025319esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025320
Michael W. Hudson54241132001-12-07 15:38:26 +000025321
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025322# Check whether right shifting a negative integer extends the sign bit
25323# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025324{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25325echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025326if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025327 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025328else
Martin v. Löwis11437992002-04-12 09:54:03 +000025329
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025330if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025331 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025332else
Martin v. Löwis11437992002-04-12 09:54:03 +000025333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025334/* confdefs.h. */
25335_ACEOF
25336cat confdefs.h >>conftest.$ac_ext
25337cat >>conftest.$ac_ext <<_ACEOF
25338/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025339
25340int main()
25341{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025342 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025343}
25344
Martin v. Löwis11437992002-04-12 09:54:03 +000025345_ACEOF
25346rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025347if { (ac_try="$ac_link"
25348case "(($ac_try" in
25349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25350 *) ac_try_echo=$ac_try;;
25351esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025353 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025354 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025357 { (case "(($ac_try" in
25358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25359 *) ac_try_echo=$ac_try;;
25360esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025362 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025363 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025365 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025366 ac_cv_rshift_extends_sign=yes
25367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025368 echo "$as_me: program exited with status $ac_status" >&5
25369echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025370sed 's/^/| /' conftest.$ac_ext >&5
25371
Martin v. Löwis11437992002-04-12 09:54:03 +000025372( exit $ac_status )
25373ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025375rm -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 +000025376fi
25377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025378
25379fi
25380
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025381{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25382echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025383if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025384then
Martin v. Löwis11437992002-04-12 09:54:03 +000025385
25386cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025387#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025388_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025389
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025390fi
25391
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025392# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025393{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25394echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025395if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025396 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025397else
Martin v. Löwis11437992002-04-12 09:54:03 +000025398
25399cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025400/* confdefs.h. */
25401_ACEOF
25402cat confdefs.h >>conftest.$ac_ext
25403cat >>conftest.$ac_ext <<_ACEOF
25404/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025405#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025406int
25407main ()
25408{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025409
25410 FILE *f = fopen("/dev/null", "r");
25411 flockfile(f);
25412 getc_unlocked(f);
25413 funlockfile(f);
25414
Martin v. Löwis11437992002-04-12 09:54:03 +000025415 ;
25416 return 0;
25417}
25418_ACEOF
25419rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025420if { (ac_try="$ac_link"
25421case "(($ac_try" in
25422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25423 *) ac_try_echo=$ac_try;;
25424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025426 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025428 grep -v '^ *+' conftest.er1 >conftest.err
25429 rm -f conftest.er1
25430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025432 (exit $ac_status); } && {
25433 test -z "$ac_c_werror_flag" ||
25434 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025435 } && test -s conftest$ac_exeext &&
25436 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025437 ac_cv_have_getc_unlocked=yes
25438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025440sed 's/^/| /' conftest.$ac_ext >&5
25441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025442 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025444
25445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025446 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025447fi
25448
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025449{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25450echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025451if test "$ac_cv_have_getc_unlocked" = yes
25452then
Martin v. Löwis11437992002-04-12 09:54:03 +000025453
25454cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025455#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025456_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025457
25458fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025459
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025460# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025461# save the value of LIBS so we don't actually link Python with readline
25462LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025463
Gregory P. Smith18820942008-09-07 06:24:49 +000025464# On some systems we need to link readline to a termcap compatible
25465# library. NOTE: Keep the precedence of listed libraries synchronised
25466# with setup.py.
25467py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025468{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25469echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025470for py_libtermcap in "" ncursesw ncurses curses termcap; do
25471 if test -z "$py_libtermcap"; then
25472 READLINE_LIBS="-lreadline"
25473 else
25474 READLINE_LIBS="-lreadline -l$py_libtermcap"
25475 fi
25476 LIBS="$READLINE_LIBS $LIBS_no_readline"
25477 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025478/* confdefs.h. */
25479_ACEOF
25480cat confdefs.h >>conftest.$ac_ext
25481cat >>conftest.$ac_ext <<_ACEOF
25482/* end confdefs.h. */
25483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025484/* Override any GCC internal prototype to avoid an error.
25485 Use char because int might match the return type of a GCC
25486 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025487#ifdef __cplusplus
25488extern "C"
25489#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025490char readline ();
25491int
25492main ()
25493{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025494return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025495 ;
25496 return 0;
25497}
25498_ACEOF
25499rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025500if { (ac_try="$ac_link"
25501case "(($ac_try" in
25502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25503 *) ac_try_echo=$ac_try;;
25504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025506 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025507 ac_status=$?
25508 grep -v '^ *+' conftest.er1 >conftest.err
25509 rm -f conftest.er1
25510 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025512 (exit $ac_status); } && {
25513 test -z "$ac_c_werror_flag" ||
25514 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025515 } && test -s conftest$ac_exeext &&
25516 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025517 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025518else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025519 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025520sed 's/^/| /' conftest.$ac_ext >&5
25521
Gregory P. Smith18820942008-09-07 06:24:49 +000025522
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025524
25525rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025526 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025527 if test $py_cv_lib_readline = yes; then
25528 break
25529 fi
25530done
25531# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25532#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025533if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025534 { echo "$as_me:$LINENO: result: none" >&5
25535echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025536else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025537 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25538echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025539
25540cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025541#define HAVE_LIBREADLINE 1
25542_ACEOF
25543
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025544fi
25545
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025546# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025547{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25548echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025549if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025550 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025551else
25552 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025553LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025554cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025555/* confdefs.h. */
25556_ACEOF
25557cat confdefs.h >>conftest.$ac_ext
25558cat >>conftest.$ac_ext <<_ACEOF
25559/* end confdefs.h. */
25560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025561/* Override any GCC internal prototype to avoid an error.
25562 Use char because int might match the return type of a GCC
25563 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025564#ifdef __cplusplus
25565extern "C"
25566#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025567char rl_callback_handler_install ();
25568int
25569main ()
25570{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025571return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025572 ;
25573 return 0;
25574}
25575_ACEOF
25576rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025577if { (ac_try="$ac_link"
25578case "(($ac_try" in
25579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25580 *) ac_try_echo=$ac_try;;
25581esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025583 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025585 grep -v '^ *+' conftest.er1 >conftest.err
25586 rm -f conftest.er1
25587 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025589 (exit $ac_status); } && {
25590 test -z "$ac_c_werror_flag" ||
25591 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025592 } && test -s conftest$ac_exeext &&
25593 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025594 ac_cv_lib_readline_rl_callback_handler_install=yes
25595else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025596 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025597sed 's/^/| /' conftest.$ac_ext >&5
25598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025599 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025601
25602rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025603 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025604LIBS=$ac_check_lib_save_LIBS
25605fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025606{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25607echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25608if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025609
25610cat >>confdefs.h <<\_ACEOF
25611#define HAVE_RL_CALLBACK 1
25612_ACEOF
25613
25614fi
25615
25616
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025617# check for readline 2.2
25618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025619/* confdefs.h. */
25620_ACEOF
25621cat confdefs.h >>conftest.$ac_ext
25622cat >>conftest.$ac_ext <<_ACEOF
25623/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025624#include <readline/readline.h>
25625_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025626if { (ac_try="$ac_cpp conftest.$ac_ext"
25627case "(($ac_try" in
25628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25629 *) ac_try_echo=$ac_try;;
25630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025632 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025633 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025634 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025635 rm -f conftest.er1
25636 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025638 (exit $ac_status); } >/dev/null && {
25639 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25640 test ! -s conftest.err
25641 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025642 have_readline=yes
25643else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025645sed 's/^/| /' conftest.$ac_ext >&5
25646
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025647 have_readline=no
25648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025649
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025650rm -f conftest.err conftest.$ac_ext
25651if test $have_readline = yes
25652then
25653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025654/* confdefs.h. */
25655_ACEOF
25656cat confdefs.h >>conftest.$ac_ext
25657cat >>conftest.$ac_ext <<_ACEOF
25658/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025659#include <readline/readline.h>
25660
25661_ACEOF
25662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025663 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025664
25665cat >>confdefs.h <<\_ACEOF
25666#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25667_ACEOF
25668
25669fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000025670rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025671
Antoine Pitroud5131772009-10-26 19:22:14 +000025672 cat >conftest.$ac_ext <<_ACEOF
25673/* confdefs.h. */
25674_ACEOF
25675cat confdefs.h >>conftest.$ac_ext
25676cat >>conftest.$ac_ext <<_ACEOF
25677/* end confdefs.h. */
25678#include <readline/readline.h>
25679
25680_ACEOF
25681if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25682 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25683
25684cat >>confdefs.h <<\_ACEOF
25685#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25686_ACEOF
25687
25688fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000025689rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025690
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025691fi
25692
Martin v. Löwis0daad592001-09-30 21:09:59 +000025693# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025694{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25695echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025696if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025698else
Martin v. Löwis11437992002-04-12 09:54:03 +000025699 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025700LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025702/* confdefs.h. */
25703_ACEOF
25704cat confdefs.h >>conftest.$ac_ext
25705cat >>conftest.$ac_ext <<_ACEOF
25706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025708/* Override any GCC internal prototype to avoid an error.
25709 Use char because int might match the return type of a GCC
25710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025711#ifdef __cplusplus
25712extern "C"
25713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025714char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025715int
25716main ()
25717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025718return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025719 ;
25720 return 0;
25721}
25722_ACEOF
25723rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025724if { (ac_try="$ac_link"
25725case "(($ac_try" in
25726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25727 *) ac_try_echo=$ac_try;;
25728esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025730 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025732 grep -v '^ *+' conftest.er1 >conftest.err
25733 rm -f conftest.er1
25734 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025736 (exit $ac_status); } && {
25737 test -z "$ac_c_werror_flag" ||
25738 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025739 } && test -s conftest$ac_exeext &&
25740 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025741 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025742else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025744sed 's/^/| /' conftest.$ac_ext >&5
25745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025746 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025748
25749rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025751LIBS=$ac_check_lib_save_LIBS
25752fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025753{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25754echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25755if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025756
Martin v. Löwis11437992002-04-12 09:54:03 +000025757cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025758#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025759_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025760
Martin v. Löwis0daad592001-09-30 21:09:59 +000025761fi
25762
Michael W. Hudson54241132001-12-07 15:38:26 +000025763
Thomas Wouters89d996e2007-09-08 17:39:28 +000025764# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025765{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25766echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025767if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025768 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025769else
25770 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025771LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025772cat >conftest.$ac_ext <<_ACEOF
25773/* confdefs.h. */
25774_ACEOF
25775cat confdefs.h >>conftest.$ac_ext
25776cat >>conftest.$ac_ext <<_ACEOF
25777/* end confdefs.h. */
25778
25779/* Override any GCC internal prototype to avoid an error.
25780 Use char because int might match the return type of a GCC
25781 builtin and then its argument prototype would still apply. */
25782#ifdef __cplusplus
25783extern "C"
25784#endif
25785char rl_completion_display_matches_hook ();
25786int
25787main ()
25788{
25789return rl_completion_display_matches_hook ();
25790 ;
25791 return 0;
25792}
25793_ACEOF
25794rm -f conftest.$ac_objext conftest$ac_exeext
25795if { (ac_try="$ac_link"
25796case "(($ac_try" in
25797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25798 *) ac_try_echo=$ac_try;;
25799esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025801 (eval "$ac_link") 2>conftest.er1
25802 ac_status=$?
25803 grep -v '^ *+' conftest.er1 >conftest.err
25804 rm -f conftest.er1
25805 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025807 (exit $ac_status); } && {
25808 test -z "$ac_c_werror_flag" ||
25809 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025810 } && test -s conftest$ac_exeext &&
25811 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025812 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25813else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025814 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025815sed 's/^/| /' conftest.$ac_ext >&5
25816
25817 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25818fi
25819
25820rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25821 conftest$ac_exeext conftest.$ac_ext
25822LIBS=$ac_check_lib_save_LIBS
25823fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025824{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25825echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25826if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025827
25828cat >>confdefs.h <<\_ACEOF
25829#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25830_ACEOF
25831
25832fi
25833
25834
Martin v. Löwis0daad592001-09-30 21:09:59 +000025835# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025836{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25837echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025838if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025839 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025840else
Martin v. Löwis11437992002-04-12 09:54:03 +000025841 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025842LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025843cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025844/* confdefs.h. */
25845_ACEOF
25846cat confdefs.h >>conftest.$ac_ext
25847cat >>conftest.$ac_ext <<_ACEOF
25848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025850/* Override any GCC internal prototype to avoid an error.
25851 Use char because int might match the return type of a GCC
25852 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025853#ifdef __cplusplus
25854extern "C"
25855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025856char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025857int
25858main ()
25859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025860return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025861 ;
25862 return 0;
25863}
25864_ACEOF
25865rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025866if { (ac_try="$ac_link"
25867case "(($ac_try" in
25868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25869 *) ac_try_echo=$ac_try;;
25870esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025872 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025874 grep -v '^ *+' conftest.er1 >conftest.err
25875 rm -f conftest.er1
25876 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025878 (exit $ac_status); } && {
25879 test -z "$ac_c_werror_flag" ||
25880 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025881 } && test -s conftest$ac_exeext &&
25882 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025883 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025884else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025886sed 's/^/| /' conftest.$ac_ext >&5
25887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025888 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025890
25891rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025893LIBS=$ac_check_lib_save_LIBS
25894fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025895{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25896echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25897if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025898
Martin v. Löwis11437992002-04-12 09:54:03 +000025899cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025900#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025901_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025902
Guido van Rossum353ae582001-07-10 16:45:32 +000025903fi
25904
Jack Jansendd19cf82001-12-06 22:36:17 +000025905
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025906# also in readline 4.2
25907cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025908/* confdefs.h. */
25909_ACEOF
25910cat confdefs.h >>conftest.$ac_ext
25911cat >>conftest.$ac_ext <<_ACEOF
25912/* end confdefs.h. */
25913#include <readline/readline.h>
25914_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025915if { (ac_try="$ac_cpp conftest.$ac_ext"
25916case "(($ac_try" in
25917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25918 *) ac_try_echo=$ac_try;;
25919esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025921 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025922 ac_status=$?
25923 grep -v '^ *+' conftest.er1 >conftest.err
25924 rm -f conftest.er1
25925 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025927 (exit $ac_status); } >/dev/null && {
25928 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25929 test ! -s conftest.err
25930 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025931 have_readline=yes
25932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025933 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025934sed 's/^/| /' conftest.$ac_ext >&5
25935
25936 have_readline=no
25937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025938
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025939rm -f conftest.err conftest.$ac_ext
25940if test $have_readline = yes
25941then
25942 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025943/* confdefs.h. */
25944_ACEOF
25945cat confdefs.h >>conftest.$ac_ext
25946cat >>conftest.$ac_ext <<_ACEOF
25947/* end confdefs.h. */
25948#include <readline/readline.h>
25949
25950_ACEOF
25951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25952 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25953
25954cat >>confdefs.h <<\_ACEOF
25955#define HAVE_RL_CATCH_SIGNAL 1
25956_ACEOF
25957
25958fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000025959rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025960
25961fi
25962
Martin v. Löwis82bca632006-02-10 20:49:30 +000025963# End of readline checks: restore LIBS
25964LIBS=$LIBS_no_readline
25965
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025966{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25967echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025968if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025969 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025970else
Martin v. Löwis11437992002-04-12 09:54:03 +000025971
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025972if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025973 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025974else
Martin v. Löwis11437992002-04-12 09:54:03 +000025975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025976/* confdefs.h. */
25977_ACEOF
25978cat confdefs.h >>conftest.$ac_ext
25979cat >>conftest.$ac_ext <<_ACEOF
25980/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025981
25982int main()
25983{
25984 int val1 = nice(1);
25985 if (val1 != -1 && val1 == nice(2))
25986 exit(0);
25987 exit(1);
25988}
25989
Martin v. Löwis11437992002-04-12 09:54:03 +000025990_ACEOF
25991rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025992if { (ac_try="$ac_link"
25993case "(($ac_try" in
25994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25995 *) ac_try_echo=$ac_try;;
25996esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025998 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025999 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026001 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026002 { (case "(($ac_try" in
26003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26004 *) ac_try_echo=$ac_try;;
26005esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026007 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026008 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026010 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026011 ac_cv_broken_nice=yes
26012else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026013 echo "$as_me: program exited with status $ac_status" >&5
26014echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026015sed 's/^/| /' conftest.$ac_ext >&5
26016
Martin v. Löwis11437992002-04-12 09:54:03 +000026017( exit $ac_status )
26018ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026020rm -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 +000026021fi
26022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026023
26024fi
26025
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026026{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26027echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026028if test "$ac_cv_broken_nice" = yes
26029then
Martin v. Löwis11437992002-04-12 09:54:03 +000026030
26031cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026032#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026033_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026034
26035fi
26036
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026037{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26038echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026039if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026040 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026041else
26042 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026043 ac_cv_broken_poll=no
26044else
26045 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026046/* confdefs.h. */
26047_ACEOF
26048cat confdefs.h >>conftest.$ac_ext
26049cat >>conftest.$ac_ext <<_ACEOF
26050/* end confdefs.h. */
26051
26052#include <poll.h>
26053
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026054int main()
26055{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026056 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026057 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026058
26059 close (42);
26060
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026061 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026062 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026063 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026064 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026065 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026066 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026067 return 1;
26068}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026069
26070_ACEOF
26071rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026072if { (ac_try="$ac_link"
26073case "(($ac_try" in
26074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26075 *) ac_try_echo=$ac_try;;
26076esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026078 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026079 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026081 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026082 { (case "(($ac_try" in
26083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26084 *) ac_try_echo=$ac_try;;
26085esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026087 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026088 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026090 (exit $ac_status); }; }; then
26091 ac_cv_broken_poll=yes
26092else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026093 echo "$as_me: program exited with status $ac_status" >&5
26094echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026095sed 's/^/| /' conftest.$ac_ext >&5
26096
26097( exit $ac_status )
26098ac_cv_broken_poll=no
26099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026100rm -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 +000026101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026102
26103
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026104fi
26105
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026106{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26107echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026108if test "$ac_cv_broken_poll" = yes
26109then
26110
26111cat >>confdefs.h <<\_ACEOF
26112#define HAVE_BROKEN_POLL 1
26113_ACEOF
26114
26115fi
26116
Brett Cannon43802422005-02-10 20:48:03 +000026117# 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 +000026118# (which is not required by ISO C or UNIX spec) and/or if we support
26119# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026120{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26121echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026122if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026123 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026124else
26125 cat >conftest.$ac_ext <<_ACEOF
26126/* confdefs.h. */
26127_ACEOF
26128cat confdefs.h >>conftest.$ac_ext
26129cat >>conftest.$ac_ext <<_ACEOF
26130/* end confdefs.h. */
26131#include <sys/types.h>
26132#include <$ac_cv_struct_tm>
26133
26134
26135int
26136main ()
26137{
26138static struct tm ac_aggr;
26139if (ac_aggr.tm_zone)
26140return 0;
26141 ;
26142 return 0;
26143}
26144_ACEOF
26145rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026146if { (ac_try="$ac_compile"
26147case "(($ac_try" in
26148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26149 *) ac_try_echo=$ac_try;;
26150esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026152 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026153 ac_status=$?
26154 grep -v '^ *+' conftest.er1 >conftest.err
26155 rm -f conftest.er1
26156 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026158 (exit $ac_status); } && {
26159 test -z "$ac_c_werror_flag" ||
26160 test ! -s conftest.err
26161 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026162 ac_cv_member_struct_tm_tm_zone=yes
26163else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026164 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026165sed 's/^/| /' conftest.$ac_ext >&5
26166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026167 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026168/* confdefs.h. */
26169_ACEOF
26170cat confdefs.h >>conftest.$ac_ext
26171cat >>conftest.$ac_ext <<_ACEOF
26172/* end confdefs.h. */
26173#include <sys/types.h>
26174#include <$ac_cv_struct_tm>
26175
26176
26177int
26178main ()
26179{
26180static struct tm ac_aggr;
26181if (sizeof ac_aggr.tm_zone)
26182return 0;
26183 ;
26184 return 0;
26185}
26186_ACEOF
26187rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026188if { (ac_try="$ac_compile"
26189case "(($ac_try" in
26190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26191 *) ac_try_echo=$ac_try;;
26192esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026194 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026195 ac_status=$?
26196 grep -v '^ *+' conftest.er1 >conftest.err
26197 rm -f conftest.er1
26198 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026200 (exit $ac_status); } && {
26201 test -z "$ac_c_werror_flag" ||
26202 test ! -s conftest.err
26203 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026204 ac_cv_member_struct_tm_tm_zone=yes
26205else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026206 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026207sed 's/^/| /' conftest.$ac_ext >&5
26208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026209 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026211
26212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026214
26215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026216fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026217{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26218echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26219if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026220
26221cat >>confdefs.h <<_ACEOF
26222#define HAVE_STRUCT_TM_TM_ZONE 1
26223_ACEOF
26224
26225
26226fi
26227
26228if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26229
26230cat >>confdefs.h <<\_ACEOF
26231#define HAVE_TM_ZONE 1
26232_ACEOF
26233
26234else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026235 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26236echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026237if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026238 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026239else
26240 cat >conftest.$ac_ext <<_ACEOF
26241/* confdefs.h. */
26242_ACEOF
26243cat confdefs.h >>conftest.$ac_ext
26244cat >>conftest.$ac_ext <<_ACEOF
26245/* end confdefs.h. */
26246#include <time.h>
26247
26248int
26249main ()
26250{
26251#ifndef tzname
26252 (void) tzname;
26253#endif
26254
26255 ;
26256 return 0;
26257}
26258_ACEOF
26259rm -f conftest.$ac_objext
26260if { (ac_try="$ac_compile"
26261case "(($ac_try" in
26262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26263 *) ac_try_echo=$ac_try;;
26264esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026266 (eval "$ac_compile") 2>conftest.er1
26267 ac_status=$?
26268 grep -v '^ *+' conftest.er1 >conftest.err
26269 rm -f conftest.er1
26270 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026272 (exit $ac_status); } && {
26273 test -z "$ac_c_werror_flag" ||
26274 test ! -s conftest.err
26275 } && test -s conftest.$ac_objext; then
26276 ac_cv_have_decl_tzname=yes
26277else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026278 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026279sed 's/^/| /' conftest.$ac_ext >&5
26280
26281 ac_cv_have_decl_tzname=no
26282fi
26283
26284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26285fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026286{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26287echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26288if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026289
26290cat >>confdefs.h <<_ACEOF
26291#define HAVE_DECL_TZNAME 1
26292_ACEOF
26293
26294
26295else
26296 cat >>confdefs.h <<_ACEOF
26297#define HAVE_DECL_TZNAME 0
26298_ACEOF
26299
26300
26301fi
26302
26303
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026304 { echo "$as_me:$LINENO: checking for tzname" >&5
26305echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026306if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026307 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026308else
26309 cat >conftest.$ac_ext <<_ACEOF
26310/* confdefs.h. */
26311_ACEOF
26312cat confdefs.h >>conftest.$ac_ext
26313cat >>conftest.$ac_ext <<_ACEOF
26314/* end confdefs.h. */
26315#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026316#if !HAVE_DECL_TZNAME
26317extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026318#endif
26319
26320int
26321main ()
26322{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026323return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026324 ;
26325 return 0;
26326}
26327_ACEOF
26328rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026329if { (ac_try="$ac_link"
26330case "(($ac_try" in
26331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26332 *) ac_try_echo=$ac_try;;
26333esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026335 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026336 ac_status=$?
26337 grep -v '^ *+' conftest.er1 >conftest.err
26338 rm -f conftest.er1
26339 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026341 (exit $ac_status); } && {
26342 test -z "$ac_c_werror_flag" ||
26343 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026344 } && test -s conftest$ac_exeext &&
26345 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026346 ac_cv_var_tzname=yes
26347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026348 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026349sed 's/^/| /' conftest.$ac_ext >&5
26350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026351 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026353
26354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026355 conftest$ac_exeext conftest.$ac_ext
26356fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026357{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26358echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026359 if test $ac_cv_var_tzname = yes; then
26360
26361cat >>confdefs.h <<\_ACEOF
26362#define HAVE_TZNAME 1
26363_ACEOF
26364
26365 fi
26366fi
26367
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026368
Martin v. Löwis1d459062005-03-14 21:23:33 +000026369# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026370{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26371echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026372if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026373 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026374else
26375
26376if test "$cross_compiling" = yes; then
26377 ac_cv_working_tzset=no
26378else
26379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026380/* confdefs.h. */
26381_ACEOF
26382cat confdefs.h >>conftest.$ac_ext
26383cat >>conftest.$ac_ext <<_ACEOF
26384/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026385
26386#include <stdlib.h>
26387#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026388#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026389
26390#if HAVE_TZNAME
26391extern char *tzname[];
26392#endif
26393
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026394int main()
26395{
Brett Cannon18367812003-09-19 00:59:16 +000026396 /* Note that we need to ensure that not only does tzset(3)
26397 do 'something' with localtime, but it works as documented
26398 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026399 This includes making sure that tzname is set properly if
26400 tm->tm_zone does not exist since it is the alternative way
26401 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026402
26403 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026404 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026405 */
26406
Martin v. Löwis1d459062005-03-14 21:23:33 +000026407 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026408 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26409
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026410 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026411 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026412 if (localtime(&groundhogday)->tm_hour != 0)
26413 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026414#if HAVE_TZNAME
26415 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26416 if (strcmp(tzname[0], "UTC") ||
26417 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26418 exit(1);
26419#endif
Brett Cannon18367812003-09-19 00:59:16 +000026420
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026421 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026422 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026423 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026424 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026425#if HAVE_TZNAME
26426 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26427 exit(1);
26428#endif
Brett Cannon18367812003-09-19 00:59:16 +000026429
26430 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26431 tzset();
26432 if (localtime(&groundhogday)->tm_hour != 11)
26433 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026434#if HAVE_TZNAME
26435 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26436 exit(1);
26437#endif
26438
26439#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026440 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26441 exit(1);
26442 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26443 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026444#endif
Brett Cannon18367812003-09-19 00:59:16 +000026445
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026446 exit(0);
26447}
26448
26449_ACEOF
26450rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451if { (ac_try="$ac_link"
26452case "(($ac_try" in
26453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26454 *) ac_try_echo=$ac_try;;
26455esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026457 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026458 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026460 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026461 { (case "(($ac_try" in
26462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26463 *) ac_try_echo=$ac_try;;
26464esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026466 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026467 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026469 (exit $ac_status); }; }; then
26470 ac_cv_working_tzset=yes
26471else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026472 echo "$as_me: program exited with status $ac_status" >&5
26473echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026474sed 's/^/| /' conftest.$ac_ext >&5
26475
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026476( exit $ac_status )
26477ac_cv_working_tzset=no
26478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026479rm -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 +000026480fi
26481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026482
26483fi
26484
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026485{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26486echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026487if test "$ac_cv_working_tzset" = yes
26488then
26489
26490cat >>confdefs.h <<\_ACEOF
26491#define HAVE_WORKING_TZSET 1
26492_ACEOF
26493
26494fi
26495
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026496# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026497{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26498echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026499if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026500 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026501else
26502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026503/* confdefs.h. */
26504_ACEOF
26505cat confdefs.h >>conftest.$ac_ext
26506cat >>conftest.$ac_ext <<_ACEOF
26507/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026508#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026509int
26510main ()
26511{
26512
26513struct stat st;
26514st.st_mtim.tv_nsec = 1;
26515
26516 ;
26517 return 0;
26518}
26519_ACEOF
26520rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026521if { (ac_try="$ac_compile"
26522case "(($ac_try" in
26523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26524 *) ac_try_echo=$ac_try;;
26525esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026529 grep -v '^ *+' conftest.er1 >conftest.err
26530 rm -f conftest.er1
26531 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026533 (exit $ac_status); } && {
26534 test -z "$ac_c_werror_flag" ||
26535 test ! -s conftest.err
26536 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026537 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026540sed 's/^/| /' conftest.$ac_ext >&5
26541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026542 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026543fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26546fi
26547
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026548{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26549echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026550if test "$ac_cv_stat_tv_nsec" = yes
26551then
26552
26553cat >>confdefs.h <<\_ACEOF
26554#define HAVE_STAT_TV_NSEC 1
26555_ACEOF
26556
26557fi
26558
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026559# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026560{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26561echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026562if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026563 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026564else
26565 cat >conftest.$ac_ext <<_ACEOF
26566/* confdefs.h. */
26567_ACEOF
26568cat confdefs.h >>conftest.$ac_ext
26569cat >>conftest.$ac_ext <<_ACEOF
26570/* end confdefs.h. */
26571#include <sys/stat.h>
26572int
26573main ()
26574{
26575
26576struct stat st;
26577st.st_mtimespec.tv_nsec = 1;
26578
26579 ;
26580 return 0;
26581}
26582_ACEOF
26583rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026584if { (ac_try="$ac_compile"
26585case "(($ac_try" in
26586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26587 *) ac_try_echo=$ac_try;;
26588esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026591 ac_status=$?
26592 grep -v '^ *+' conftest.er1 >conftest.err
26593 rm -f conftest.er1
26594 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026596 (exit $ac_status); } && {
26597 test -z "$ac_c_werror_flag" ||
26598 test ! -s conftest.err
26599 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026600 ac_cv_stat_tv_nsec2=yes
26601else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026602 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026603sed 's/^/| /' conftest.$ac_ext >&5
26604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026605 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026606fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26609fi
26610
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026611{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26612echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026613if test "$ac_cv_stat_tv_nsec2" = yes
26614then
26615
26616cat >>confdefs.h <<\_ACEOF
26617#define HAVE_STAT_TV_NSEC2 1
26618_ACEOF
26619
26620fi
26621
Jack Jansen666b1e72001-10-31 12:11:48 +000026622# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026623{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26624echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026625if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026626 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026627else
Martin v. Löwis11437992002-04-12 09:54:03 +000026628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026629/* confdefs.h. */
26630_ACEOF
26631cat confdefs.h >>conftest.$ac_ext
26632cat >>conftest.$ac_ext <<_ACEOF
26633/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026634#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026635int
26636main ()
26637{
Jack Jansen666b1e72001-10-31 12:11:48 +000026638
26639 int rtn;
26640 rtn = mvwdelch(0,0,0);
26641
Martin v. Löwis11437992002-04-12 09:54:03 +000026642 ;
26643 return 0;
26644}
26645_ACEOF
26646rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026647if { (ac_try="$ac_compile"
26648case "(($ac_try" in
26649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26650 *) ac_try_echo=$ac_try;;
26651esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026655 grep -v '^ *+' conftest.er1 >conftest.err
26656 rm -f conftest.er1
26657 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026659 (exit $ac_status); } && {
26660 test -z "$ac_c_werror_flag" ||
26661 test ! -s conftest.err
26662 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026663 ac_cv_mvwdelch_is_expression=yes
26664else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026666sed 's/^/| /' conftest.$ac_ext >&5
26667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026668 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026669fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26672fi
26673
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026674{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26675echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026676
26677if test "$ac_cv_mvwdelch_is_expression" = yes
26678then
Martin v. Löwis11437992002-04-12 09:54:03 +000026679
26680cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026681#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026682_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026683
26684fi
26685
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026686{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26687echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026688if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026689 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026690else
Martin v. Löwis11437992002-04-12 09:54:03 +000026691 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026692/* confdefs.h. */
26693_ACEOF
26694cat confdefs.h >>conftest.$ac_ext
26695cat >>conftest.$ac_ext <<_ACEOF
26696/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026697#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026698int
26699main ()
26700{
Jack Jansen666b1e72001-10-31 12:11:48 +000026701
26702 WINDOW *w;
26703 w->_flags = 0;
26704
Martin v. Löwis11437992002-04-12 09:54:03 +000026705 ;
26706 return 0;
26707}
26708_ACEOF
26709rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026710if { (ac_try="$ac_compile"
26711case "(($ac_try" in
26712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26713 *) ac_try_echo=$ac_try;;
26714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026718 grep -v '^ *+' conftest.er1 >conftest.err
26719 rm -f conftest.er1
26720 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026722 (exit $ac_status); } && {
26723 test -z "$ac_c_werror_flag" ||
26724 test ! -s conftest.err
26725 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026726 ac_cv_window_has_flags=yes
26727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026729sed 's/^/| /' conftest.$ac_ext >&5
26730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026731 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026732fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26735fi
26736
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026737{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26738echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026739
Jack Jansen666b1e72001-10-31 12:11:48 +000026740
26741if test "$ac_cv_window_has_flags" = yes
26742then
Martin v. Löwis11437992002-04-12 09:54:03 +000026743
26744cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026745#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026746_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026747
26748fi
26749
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026750{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26751echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026752cat >conftest.$ac_ext <<_ACEOF
26753/* confdefs.h. */
26754_ACEOF
26755cat confdefs.h >>conftest.$ac_ext
26756cat >>conftest.$ac_ext <<_ACEOF
26757/* end confdefs.h. */
26758#include <curses.h>
26759int
26760main ()
26761{
26762void *x=is_term_resized
26763 ;
26764 return 0;
26765}
26766_ACEOF
26767rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026768if { (ac_try="$ac_compile"
26769case "(($ac_try" in
26770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26771 *) ac_try_echo=$ac_try;;
26772esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026774 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026775 ac_status=$?
26776 grep -v '^ *+' conftest.er1 >conftest.err
26777 rm -f conftest.er1
26778 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026780 (exit $ac_status); } && {
26781 test -z "$ac_c_werror_flag" ||
26782 test ! -s conftest.err
26783 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026784
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026785cat >>confdefs.h <<\_ACEOF
26786#define HAVE_CURSES_IS_TERM_RESIZED 1
26787_ACEOF
26788
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026789 { echo "$as_me:$LINENO: result: yes" >&5
26790echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026791else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026792 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026793sed 's/^/| /' conftest.$ac_ext >&5
26794
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026795 { echo "$as_me:$LINENO: result: no" >&5
26796echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026797
26798fi
26799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26801
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026802{ echo "$as_me:$LINENO: checking for resize_term" >&5
26803echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026804cat >conftest.$ac_ext <<_ACEOF
26805/* confdefs.h. */
26806_ACEOF
26807cat confdefs.h >>conftest.$ac_ext
26808cat >>conftest.$ac_ext <<_ACEOF
26809/* end confdefs.h. */
26810#include <curses.h>
26811int
26812main ()
26813{
26814void *x=resize_term
26815 ;
26816 return 0;
26817}
26818_ACEOF
26819rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026820if { (ac_try="$ac_compile"
26821case "(($ac_try" in
26822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26823 *) ac_try_echo=$ac_try;;
26824esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026826 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026827 ac_status=$?
26828 grep -v '^ *+' conftest.er1 >conftest.err
26829 rm -f conftest.er1
26830 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026832 (exit $ac_status); } && {
26833 test -z "$ac_c_werror_flag" ||
26834 test ! -s conftest.err
26835 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026836
26837cat >>confdefs.h <<\_ACEOF
26838#define HAVE_CURSES_RESIZE_TERM 1
26839_ACEOF
26840
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026841 { echo "$as_me:$LINENO: result: yes" >&5
26842echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026844 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026845sed 's/^/| /' conftest.$ac_ext >&5
26846
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026847 { echo "$as_me:$LINENO: result: no" >&5
26848echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026849
26850fi
26851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26853
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026854{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26855echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026856cat >conftest.$ac_ext <<_ACEOF
26857/* confdefs.h. */
26858_ACEOF
26859cat confdefs.h >>conftest.$ac_ext
26860cat >>conftest.$ac_ext <<_ACEOF
26861/* end confdefs.h. */
26862#include <curses.h>
26863int
26864main ()
26865{
26866void *x=resizeterm
26867 ;
26868 return 0;
26869}
26870_ACEOF
26871rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026872if { (ac_try="$ac_compile"
26873case "(($ac_try" in
26874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26875 *) ac_try_echo=$ac_try;;
26876esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026878 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026879 ac_status=$?
26880 grep -v '^ *+' conftest.er1 >conftest.err
26881 rm -f conftest.er1
26882 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026884 (exit $ac_status); } && {
26885 test -z "$ac_c_werror_flag" ||
26886 test ! -s conftest.err
26887 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026888
26889cat >>confdefs.h <<\_ACEOF
26890#define HAVE_CURSES_RESIZETERM 1
26891_ACEOF
26892
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026893 { echo "$as_me:$LINENO: result: yes" >&5
26894echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026896 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026897sed 's/^/| /' conftest.$ac_ext >&5
26898
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026899 { echo "$as_me:$LINENO: result: no" >&5
26900echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026901
26902fi
26903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26905
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026906{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26907echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026908
26909if test -r /dev/ptmx
26910then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026911 { echo "$as_me:$LINENO: result: yes" >&5
26912echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026913
26914cat >>confdefs.h <<\_ACEOF
26915#define HAVE_DEV_PTMX 1
26916_ACEOF
26917
Thomas Wouters89f507f2006-12-13 04:49:30 +000026918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026919 { echo "$as_me:$LINENO: result: no" >&5
26920echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026921fi
26922
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026923{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26924echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026925
26926if test -r /dev/ptc
26927then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026928 { echo "$as_me:$LINENO: result: yes" >&5
26929echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026930
26931cat >>confdefs.h <<\_ACEOF
26932#define HAVE_DEV_PTC 1
26933_ACEOF
26934
Thomas Wouters89f507f2006-12-13 04:49:30 +000026935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026936 { echo "$as_me:$LINENO: result: no" >&5
26937echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026938fi
26939
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026940if test "$have_long_long" = yes
26941then
26942 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26943echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26944 if test "${ac_cv_have_long_long_format+set}" = set; then
26945 echo $ECHO_N "(cached) $ECHO_C" >&6
26946else
26947 if test "$cross_compiling" = yes; then
26948 ac_cv_have_long_long_format=no
26949else
26950 cat >conftest.$ac_ext <<_ACEOF
26951/* confdefs.h. */
26952_ACEOF
26953cat confdefs.h >>conftest.$ac_ext
26954cat >>conftest.$ac_ext <<_ACEOF
26955/* end confdefs.h. */
26956
26957 #include <stdio.h>
26958 #include <stddef.h>
26959 #include <string.h>
26960
26961 #ifdef HAVE_SYS_TYPES_H
26962 #include <sys/types.h>
26963 #endif
26964
26965 int main()
26966 {
26967 char buffer[256];
26968
26969 if (sprintf(buffer, "%lld", (long long)123) < 0)
26970 return 1;
26971 if (strcmp(buffer, "123"))
26972 return 1;
26973
26974 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26975 return 1;
26976 if (strcmp(buffer, "-123"))
26977 return 1;
26978
26979 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26980 return 1;
26981 if (strcmp(buffer, "123"))
26982 return 1;
26983
26984 return 0;
26985 }
26986
26987_ACEOF
26988rm -f conftest$ac_exeext
26989if { (ac_try="$ac_link"
26990case "(($ac_try" in
26991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26992 *) ac_try_echo=$ac_try;;
26993esac
26994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26995 (eval "$ac_link") 2>&5
26996 ac_status=$?
26997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26999 { (case "(($ac_try" in
27000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27001 *) ac_try_echo=$ac_try;;
27002esac
27003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27004 (eval "$ac_try") 2>&5
27005 ac_status=$?
27006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27007 (exit $ac_status); }; }; then
27008 ac_cv_have_long_long_format=yes
27009else
27010 echo "$as_me: program exited with status $ac_status" >&5
27011echo "$as_me: failed program was:" >&5
27012sed 's/^/| /' conftest.$ac_ext >&5
27013
27014( exit $ac_status )
27015ac_cv_have_long_long_format=no
27016fi
27017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27018fi
27019
27020
27021
27022fi
27023
27024 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27025echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27026fi
27027
Mark Dickinson89d7d412009-12-31 20:50:59 +000027028if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027029then
27030
27031cat >>confdefs.h <<\_ACEOF
27032#define PY_FORMAT_LONG_LONG "ll"
27033_ACEOF
27034
27035fi
27036
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000027037if test $ac_sys_system = Darwin
27038then
27039 LIBS="$LIBS -framework CoreFoundation"
27040fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027041
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027042{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27043echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027044if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027045 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027046else
27047 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027048 ac_cv_have_size_t_format="cross -- assuming yes"
27049
Thomas Wouters477c8d52006-05-27 19:21:47 +000027050else
27051 cat >conftest.$ac_ext <<_ACEOF
27052/* confdefs.h. */
27053_ACEOF
27054cat confdefs.h >>conftest.$ac_ext
27055cat >>conftest.$ac_ext <<_ACEOF
27056/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027057
Thomas Wouters477c8d52006-05-27 19:21:47 +000027058#include <stdio.h>
27059#include <stddef.h>
27060#include <string.h>
27061
Christian Heimes2c181612007-12-17 20:04:13 +000027062#ifdef HAVE_SYS_TYPES_H
27063#include <sys/types.h>
27064#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027065
27066#ifdef HAVE_SSIZE_T
27067typedef ssize_t Py_ssize_t;
27068#elif SIZEOF_VOID_P == SIZEOF_LONG
27069typedef long Py_ssize_t;
27070#else
27071typedef int Py_ssize_t;
27072#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027073
Christian Heimes2c181612007-12-17 20:04:13 +000027074int main()
27075{
27076 char buffer[256];
27077
Thomas Wouters477c8d52006-05-27 19:21:47 +000027078 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27079 return 1;
27080
Thomas Wouters89f507f2006-12-13 04:49:30 +000027081 if (strcmp(buffer, "123"))
27082 return 1;
27083
27084 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27085 return 1;
27086
27087 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027088 return 1;
27089
27090 return 0;
27091}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027092
Thomas Wouters477c8d52006-05-27 19:21:47 +000027093_ACEOF
27094rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027095if { (ac_try="$ac_link"
27096case "(($ac_try" in
27097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27098 *) ac_try_echo=$ac_try;;
27099esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027101 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027102 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027104 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027105 { (case "(($ac_try" in
27106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27107 *) ac_try_echo=$ac_try;;
27108esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027110 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027111 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027113 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027114 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027115else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027116 echo "$as_me: program exited with status $ac_status" >&5
27117echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027118sed 's/^/| /' conftest.$ac_ext >&5
27119
27120( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027121ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027122fi
27123rm -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 +000027124fi
27125
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027127fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027128{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27129echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027130if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027131
27132cat >>confdefs.h <<\_ACEOF
27133#define PY_FORMAT_SIZE_T "z"
27134_ACEOF
27135
27136fi
27137
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027138{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27139echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027140if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027141 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027142else
Martin v. Löwis11437992002-04-12 09:54:03 +000027143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027144/* confdefs.h. */
27145_ACEOF
27146cat confdefs.h >>conftest.$ac_ext
27147cat >>conftest.$ac_ext <<_ACEOF
27148/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027149
27150#ifdef HAVE_SYS_TYPES_H
27151#include <sys/types.h>
27152#endif
27153#ifdef HAVE_SYS_SOCKET_H
27154#include <sys/socket.h>
27155#endif
27156
27157
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027158typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027159int
27160main ()
27161{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027162if ((ac__type_new_ *) 0)
27163 return 0;
27164if (sizeof (ac__type_new_))
27165 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027166 ;
27167 return 0;
27168}
27169_ACEOF
27170rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027171if { (ac_try="$ac_compile"
27172case "(($ac_try" in
27173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27174 *) ac_try_echo=$ac_try;;
27175esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027179 grep -v '^ *+' conftest.er1 >conftest.err
27180 rm -f conftest.er1
27181 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027183 (exit $ac_status); } && {
27184 test -z "$ac_c_werror_flag" ||
27185 test ! -s conftest.err
27186 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027187 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027188else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027190sed 's/^/| /' conftest.$ac_ext >&5
27191
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027192 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027194
27195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027196fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027197{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27198echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27199if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027200 :
27201else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027202
Martin v. Löwis01c04012002-11-11 14:58:44 +000027203cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027204#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027205_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027206
27207fi
27208
Michael W. Hudson54241132001-12-07 15:38:26 +000027209
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027210{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27211echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027212if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027213 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027214else
27215 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027216 ac_cv_broken_mbstowcs=no
27217else
27218 cat >conftest.$ac_ext <<_ACEOF
27219/* confdefs.h. */
27220_ACEOF
27221cat confdefs.h >>conftest.$ac_ext
27222cat >>conftest.$ac_ext <<_ACEOF
27223/* end confdefs.h. */
27224
27225#include<stdlib.h>
27226int main() {
27227 size_t len = -1;
27228 const char *str = "text";
27229 len = mbstowcs(NULL, str, 0);
27230 return (len != 4);
27231}
27232
27233_ACEOF
27234rm -f conftest$ac_exeext
27235if { (ac_try="$ac_link"
27236case "(($ac_try" in
27237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27238 *) ac_try_echo=$ac_try;;
27239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027241 (eval "$ac_link") 2>&5
27242 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027244 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27245 { (case "(($ac_try" in
27246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27247 *) ac_try_echo=$ac_try;;
27248esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027250 (eval "$ac_try") 2>&5
27251 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027253 (exit $ac_status); }; }; then
27254 ac_cv_broken_mbstowcs=no
27255else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027256 echo "$as_me: program exited with status $ac_status" >&5
27257echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027258sed 's/^/| /' conftest.$ac_ext >&5
27259
27260( exit $ac_status )
27261ac_cv_broken_mbstowcs=yes
27262fi
27263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27264fi
27265
27266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027267fi
27268
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027269{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27270echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027271if test "$ac_cv_broken_mbstowcs" = yes
27272then
27273
27274cat >>confdefs.h <<\_ACEOF
27275#define HAVE_BROKEN_MBSTOWCS 1
27276_ACEOF
27277
27278fi
27279
Antoine Pitroub52ec782009-01-25 16:34:23 +000027280# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027281{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27282echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027283
27284# Check whether --with-computed-gotos was given.
27285if test "${with_computed_gotos+set}" = set; then
27286 withval=$with_computed_gotos;
27287if test "$withval" != no
27288then
27289
27290cat >>confdefs.h <<\_ACEOF
27291#define USE_COMPUTED_GOTOS 1
27292_ACEOF
27293
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027294 { echo "$as_me:$LINENO: result: yes" >&5
27295echo "${ECHO_T}yes" >&6; }
27296else { echo "$as_me:$LINENO: result: no" >&5
27297echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027298fi
27299else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027300 { echo "$as_me:$LINENO: result: no" >&5
27301echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027302fi
27303
27304
27305
Michael W. Hudson54241132001-12-07 15:38:26 +000027306
27307
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027308for h in `(cd $srcdir;echo Python/thread_*.h)`
27309do
27310 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27311done
27312
Michael W. Hudson54241132001-12-07 15:38:26 +000027313
Neal Norwitzd24499d2005-12-18 21:36:39 +000027314SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027315{ echo "$as_me:$LINENO: checking for build directories" >&5
27316echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027317for dir in $SRCDIRS; do
27318 if test ! -d $dir; then
27319 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027320 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027321done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027322{ echo "$as_me:$LINENO: result: done" >&5
27323echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027324
Guido van Rossum627b2d71993-12-24 10:39:16 +000027325# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027326ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027327
Martin v. Löwis11437992002-04-12 09:54:03 +000027328cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027329# This file is a shell script that caches the results of configure
27330# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027331# scripts and configure runs, see configure's option --config-cache.
27332# It is not useful on other systems. If it contains results you don't
27333# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027334#
Martin v. Löwis11437992002-04-12 09:54:03 +000027335# config.status only pays attention to the cache file if you give it
27336# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027337#
Skip Montanaro6dead952003-09-25 14:50:04 +000027338# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027339# loading this file, other *unset* `ac_cv_foo' will be assigned the
27340# following values.
27341
27342_ACEOF
27343
Guido van Rossumf78abae1997-01-21 22:02:36 +000027344# The following way of writing the cache mishandles newlines in values,
27345# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027346# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027347# Ultrix sh set writes to stderr and can't be redirected directly,
27348# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027349(
27350 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27351 eval ac_val=\$$ac_var
27352 case $ac_val in #(
27353 *${as_nl}*)
27354 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027355 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27356echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027357 esac
27358 case $ac_var in #(
27359 _ | IFS | as_nl) ;; #(
27360 *) $as_unset $ac_var ;;
27361 esac ;;
27362 esac
27363 done
27364
Martin v. Löwis11437992002-04-12 09:54:03 +000027365 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027366 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27367 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027368 # `set' does not quote correctly, so add quotes (double-quote
27369 # substitution turns \\\\ into \\, and sed turns \\ into \).
27370 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027371 "s/'/'\\\\''/g;
27372 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027373 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027374 *)
27375 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027376 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027377 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027378 esac |
27379 sort
27380) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027381 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027382 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027383 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027384 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027385 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27386 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027387 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27388 :end' >>confcache
27389if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27390 if test -w "$cache_file"; then
27391 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027392 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27393echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027394 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027395 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027396 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27397echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027398 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027399fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027400rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027401
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027402test "x$prefix" = xNONE && prefix=$ac_default_prefix
27403# Let make expand exec_prefix.
27404test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027405
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027406DEFS=-DHAVE_CONFIG_H
27407
Skip Montanaro6dead952003-09-25 14:50:04 +000027408ac_libobjs=
27409ac_ltlibobjs=
27410for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27411 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027412 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027413 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027414 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27415 # will be set to the directory where LIBOBJS objects are built.
27416 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27417 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027418done
27419LIBOBJS=$ac_libobjs
27420
27421LTLIBOBJS=$ac_ltlibobjs
27422
27423
Martin v. Löwis11437992002-04-12 09:54:03 +000027424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027425: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027426ac_clean_files_save=$ac_clean_files
27427ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027428{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27429echo "$as_me: creating $CONFIG_STATUS" >&6;}
27430cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027431#! $SHELL
27432# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027433# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027434# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027435# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027436
Martin v. Löwis11437992002-04-12 09:54:03 +000027437debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027438ac_cs_recheck=false
27439ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027440SHELL=\${CONFIG_SHELL-$SHELL}
27441_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027442
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027443cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027444## --------------------- ##
27445## M4sh Initialization. ##
27446## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027448# Be more Bourne compatible
27449DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027450if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27451 emulate sh
27452 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027453 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027454 # is contrary to our usage. Disable this feature.
27455 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027456 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027457else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027458 case `(set -o) 2>/dev/null` in
27459 *posix*) set -o posix ;;
27460esac
27461
Michael W. Hudson54241132001-12-07 15:38:26 +000027462fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027463
27464
Michael W. Hudson54241132001-12-07 15:38:26 +000027465
Michael W. Hudson54241132001-12-07 15:38:26 +000027466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027467# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027468# Avoid depending upon Character Ranges.
27469as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27470as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27471as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27472as_cr_digits='0123456789'
27473as_cr_alnum=$as_cr_Letters$as_cr_digits
27474
27475# The user is always right.
27476if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027477 echo "#! /bin/sh" >conf$$.sh
27478 echo "exit 0" >>conf$$.sh
27479 chmod +x conf$$.sh
27480 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27481 PATH_SEPARATOR=';'
27482 else
27483 PATH_SEPARATOR=:
27484 fi
27485 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027486fi
27487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027488# Support unset when possible.
27489if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27490 as_unset=unset
27491else
27492 as_unset=false
27493fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027495
27496# IFS
27497# We need space, tab and new line, in precisely that order. Quoting is
27498# there to prevent editors from complaining about space-tab.
27499# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27500# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027501as_nl='
27502'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027503IFS=" "" $as_nl"
27504
27505# Find who we are. Look in the path if we contain no directory separator.
27506case $0 in
27507 *[\\/]* ) as_myself=$0 ;;
27508 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027509for as_dir in $PATH
27510do
27511 IFS=$as_save_IFS
27512 test -z "$as_dir" && as_dir=.
27513 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27514done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027515IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027517 ;;
27518esac
27519# We did not find ourselves, most probably we were run as `sh COMMAND'
27520# in which case we are not to be found in the path.
27521if test "x$as_myself" = x; then
27522 as_myself=$0
27523fi
27524if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027525 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027526 { (exit 1); exit 1; }
27527fi
27528
27529# Work around bugs in pre-3.0 UWIN ksh.
27530for as_var in ENV MAIL MAILPATH
27531do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27532done
27533PS1='$ '
27534PS2='> '
27535PS4='+ '
27536
27537# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027538for as_var in \
27539 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27540 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27541 LC_TELEPHONE LC_TIME
27542do
27543 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27544 eval $as_var=C; export $as_var
27545 else
27546 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27547 fi
27548done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027549
27550# Required to use basename.
27551if expr a : '\(a\)' >/dev/null 2>&1 &&
27552 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27553 as_expr=expr
27554else
27555 as_expr=false
27556fi
27557
27558if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27559 as_basename=basename
27560else
27561 as_basename=false
27562fi
27563
27564
27565# Name of the executable.
27566as_me=`$as_basename -- "$0" ||
27567$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27568 X"$0" : 'X\(//\)$' \| \
27569 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027570echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027571 sed '/^.*\/\([^/][^/]*\)\/*$/{
27572 s//\1/
27573 q
27574 }
27575 /^X\/\(\/\/\)$/{
27576 s//\1/
27577 q
27578 }
27579 /^X\/\(\/\).*/{
27580 s//\1/
27581 q
27582 }
27583 s/.*/./; q'`
27584
27585# CDPATH.
27586$as_unset CDPATH
27587
27588
27589
Martin v. Löwis11437992002-04-12 09:54:03 +000027590 as_lineno_1=$LINENO
27591 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027592 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027593 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027594
Martin v. Löwis11437992002-04-12 09:54:03 +000027595 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27596 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027597 # line-number line after each line using $LINENO; the second 'sed'
27598 # does the real work. The second script uses 'N' to pair each
27599 # line-number line with the line containing $LINENO, and appends
27600 # trailing '-' during substitution so that $LINENO is not a special
27601 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027602 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027603 # scripts with optimization help from Paolo Bonzini. Blame Lee
27604 # E. McMahon (1931-1989) for sed's syntax. :-)
27605 sed -n '
27606 p
27607 /[$]LINENO/=
27608 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027609 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027610 s/[$]LINENO.*/&-/
27611 t lineno
27612 b
27613 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027614 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027615 :loop
27616 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027617 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027618 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027619 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027620 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027621 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027622 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027623
Martin v. Löwis11437992002-04-12 09:54:03 +000027624 # Don't try to exec as it changes $[0], causing all sort of problems
27625 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027626 # original and so on. Autoconf is especially sensitive to this).
27627 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027628 # Exit status is that of the last command.
27629 exit
27630}
27631
27632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027633if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27634 as_dirname=dirname
27635else
27636 as_dirname=false
27637fi
27638
27639ECHO_C= ECHO_N= ECHO_T=
27640case `echo -n x` in
27641-n*)
27642 case `echo 'x\c'` in
27643 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27644 *) ECHO_C='\c';;
27645 esac;;
27646*)
27647 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027648esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027650if expr a : '\(a\)' >/dev/null 2>&1 &&
27651 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027652 as_expr=expr
27653else
27654 as_expr=false
27655fi
27656
27657rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027658if test -d conf$$.dir; then
27659 rm -f conf$$.dir/conf$$.file
27660else
27661 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027662 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027663fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027664echo >conf$$.file
27665if ln -s conf$$.file conf$$ 2>/dev/null; then
27666 as_ln_s='ln -s'
27667 # ... but there are two gotchas:
27668 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27669 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27670 # In both cases, we have to default to `cp -p'.
27671 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027672 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027673elif ln conf$$.file conf$$ 2>/dev/null; then
27674 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027675else
27676 as_ln_s='cp -p'
27677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027678rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27679rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027680
Skip Montanaro6dead952003-09-25 14:50:04 +000027681if mkdir -p . 2>/dev/null; then
27682 as_mkdir_p=:
27683else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027684 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027685 as_mkdir_p=false
27686fi
27687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027688if test -x / >/dev/null 2>&1; then
27689 as_test_x='test -x'
27690else
27691 if ls -dL / >/dev/null 2>&1; then
27692 as_ls_L_option=L
27693 else
27694 as_ls_L_option=
27695 fi
27696 as_test_x='
27697 eval sh -c '\''
27698 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027699 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027700 else
27701 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027702 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027703 esac;
27704 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27705 ???[sx]*):;;*)false;;esac;fi
27706 '\'' sh
27707 '
27708fi
27709as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027710
27711# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027712as_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 +000027713
27714# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027715as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027716
27717
Martin v. Löwis11437992002-04-12 09:54:03 +000027718exec 6>&1
27719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027720# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027721# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027722# values after options handling.
27723ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027724This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027725generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027726
27727 CONFIG_FILES = $CONFIG_FILES
27728 CONFIG_HEADERS = $CONFIG_HEADERS
27729 CONFIG_LINKS = $CONFIG_LINKS
27730 CONFIG_COMMANDS = $CONFIG_COMMANDS
27731 $ $0 $@
27732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027733on `(hostname || uname -n) 2>/dev/null | sed 1q`
27734"
27735
Martin v. Löwis11437992002-04-12 09:54:03 +000027736_ACEOF
27737
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027738cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027739# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027740config_files="$ac_config_files"
27741config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027743_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027744
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027745cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027746ac_cs_usage="\
27747\`$as_me' instantiates files from templates according to the
27748current configuration.
27749
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027750Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027751
27752 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027753 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027754 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027755 -d, --debug don't remove temporary files
27756 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027757 --file=FILE[:TEMPLATE]
27758 instantiate the configuration file FILE
27759 --header=FILE[:TEMPLATE]
27760 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027761
27762Configuration files:
27763$config_files
27764
27765Configuration headers:
27766$config_headers
27767
27768Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027770_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027771cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027772ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027773python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027774configured by $0, generated by GNU Autoconf 2.61,
27775 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027776
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027777Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027778This config.status script is free software; the Free Software Foundation
27779gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027780
27781ac_pwd='$ac_pwd'
27782srcdir='$srcdir'
27783INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027784_ACEOF
27785
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027786cat >>$CONFIG_STATUS <<\_ACEOF
27787# If no file are specified by the user, then we need to provide default
27788# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027789ac_need_defaults=:
27790while test $# != 0
27791do
27792 case $1 in
27793 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027794 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27795 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027796 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027797 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027798 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027799 ac_option=$1
27800 ac_optarg=$2
27801 ac_shift=shift
27802 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027803 esac
27804
Skip Montanaro6dead952003-09-25 14:50:04 +000027805 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027806 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027807 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27808 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027809 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027810 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027811 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027812 debug=: ;;
27813 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027814 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027815 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027816 ac_need_defaults=false;;
27817 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027818 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027819 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027820 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027821 --he | --h)
27822 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027823 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027824Try \`$0 --help' for more information." >&2
27825 { (exit 1); exit 1; }; };;
27826 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027827 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027828 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27829 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27830 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027831
27832 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027833 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027834Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027835 { (exit 1); exit 1; }; } ;;
27836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027837 *) ac_config_targets="$ac_config_targets $1"
27838 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027839
27840 esac
27841 shift
27842done
27843
Skip Montanaro6dead952003-09-25 14:50:04 +000027844ac_configure_extra_args=
27845
27846if $ac_cs_silent; then
27847 exec 6>/dev/null
27848 ac_configure_extra_args="$ac_configure_extra_args --silent"
27849fi
27850
27851_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027852cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027853if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027854 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27855 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027856 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027857 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027858fi
27859
Martin v. Löwis11437992002-04-12 09:54:03 +000027860_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027861cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027862exec 5>>config.log
27863{
27864 echo
27865 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27866## Running $as_me. ##
27867_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027868 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027869} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027872cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027873_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027874
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027875cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027876
27877# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027878for ac_config_target in $ac_config_targets
27879do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027880 case $ac_config_target in
27881 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27882 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27883 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027884 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27885 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027886 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27887 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027888 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027889
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027890 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27891echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027892 { (exit 1); exit 1; }; };;
27893 esac
27894done
27895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027896
Martin v. Löwis11437992002-04-12 09:54:03 +000027897# If the user did not use the arguments to specify the items to instantiate,
27898# then the envvar interface is used. Set only those that are not.
27899# We use the long form for the default assignment because of an extremely
27900# bizarre bug on SunOS 4.1.3.
27901if $ac_need_defaults; then
27902 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27903 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27904fi
27905
Skip Montanaro6dead952003-09-25 14:50:04 +000027906# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027907# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027908# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027909# Hook for its removal unless debugging.
27910# Note that there is a small window in which the directory will not be cleaned:
27911# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027912$debug ||
27913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027914 tmp=
27915 trap 'exit_status=$?
27916 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27917' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027918 trap '{ (exit 1); exit 1; }' 1 2 13 15
27919}
Martin v. Löwis11437992002-04-12 09:54:03 +000027920# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027921
Martin v. Löwis11437992002-04-12 09:54:03 +000027922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027923 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027924 test -n "$tmp" && test -d "$tmp"
27925} ||
27926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027927 tmp=./conf$$-$RANDOM
27928 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027929} ||
27930{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027931 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027932 { (exit 1); exit 1; }
27933}
27934
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027935#
27936# Set up the sed scripts for CONFIG_FILES section.
27937#
27938
27939# No need to generate the scripts if there are no CONFIG_FILES.
27940# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027941if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027942
27943_ACEOF
27944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027945
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027947ac_delim='%!_!# '
27948for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027949 cat >conf$$subs.sed <<_ACEOF
27950SHELL!$SHELL$ac_delim
27951PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27952PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27953PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27954PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27955PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27956PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27957exec_prefix!$exec_prefix$ac_delim
27958prefix!$prefix$ac_delim
27959program_transform_name!$program_transform_name$ac_delim
27960bindir!$bindir$ac_delim
27961sbindir!$sbindir$ac_delim
27962libexecdir!$libexecdir$ac_delim
27963datarootdir!$datarootdir$ac_delim
27964datadir!$datadir$ac_delim
27965sysconfdir!$sysconfdir$ac_delim
27966sharedstatedir!$sharedstatedir$ac_delim
27967localstatedir!$localstatedir$ac_delim
27968includedir!$includedir$ac_delim
27969oldincludedir!$oldincludedir$ac_delim
27970docdir!$docdir$ac_delim
27971infodir!$infodir$ac_delim
27972htmldir!$htmldir$ac_delim
27973dvidir!$dvidir$ac_delim
27974pdfdir!$pdfdir$ac_delim
27975psdir!$psdir$ac_delim
27976libdir!$libdir$ac_delim
27977localedir!$localedir$ac_delim
27978mandir!$mandir$ac_delim
27979DEFS!$DEFS$ac_delim
27980ECHO_C!$ECHO_C$ac_delim
27981ECHO_N!$ECHO_N$ac_delim
27982ECHO_T!$ECHO_T$ac_delim
27983LIBS!$LIBS$ac_delim
27984build_alias!$build_alias$ac_delim
27985host_alias!$host_alias$ac_delim
27986target_alias!$target_alias$ac_delim
27987VERSION!$VERSION$ac_delim
27988SOVERSION!$SOVERSION$ac_delim
27989CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27990UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27991ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027992LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027993PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27994PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27995PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27996PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27997PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27998FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27999FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28000FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28001FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28002FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28003MACHDEP!$MACHDEP$ac_delim
28004SGI_ABI!$SGI_ABI$ac_delim
28005CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28006EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28007CC!$CC$ac_delim
28008CFLAGS!$CFLAGS$ac_delim
28009LDFLAGS!$LDFLAGS$ac_delim
28010CPPFLAGS!$CPPFLAGS$ac_delim
28011ac_ct_CC!$ac_ct_CC$ac_delim
28012EXEEXT!$EXEEXT$ac_delim
28013OBJEXT!$OBJEXT$ac_delim
28014CXX!$CXX$ac_delim
28015MAINCC!$MAINCC$ac_delim
28016CPP!$CPP$ac_delim
28017GREP!$GREP$ac_delim
28018EGREP!$EGREP$ac_delim
28019BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28020LIBRARY!$LIBRARY$ac_delim
28021LDLIBRARY!$LDLIBRARY$ac_delim
28022DLLLIBRARY!$DLLLIBRARY$ac_delim
28023BLDLIBRARY!$BLDLIBRARY$ac_delim
28024LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28025INSTSONAME!$INSTSONAME$ac_delim
28026RUNSHARED!$RUNSHARED$ac_delim
28027LINKCC!$LINKCC$ac_delim
28028GNULD!$GNULD$ac_delim
28029RANLIB!$RANLIB$ac_delim
28030AR!$AR$ac_delim
28031ARFLAGS!$ARFLAGS$ac_delim
28032SVNVERSION!$SVNVERSION$ac_delim
28033INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28034INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28035INSTALL_DATA!$INSTALL_DATA$ac_delim
28036LN!$LN$ac_delim
28037OPT!$OPT$ac_delim
28038BASECFLAGS!$BASECFLAGS$ac_delim
28039UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28040OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28041LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28042SO!$SO$ac_delim
28043LDSHARED!$LDSHARED$ac_delim
28044BLDSHARED!$BLDSHARED$ac_delim
28045CCSHARED!$CCSHARED$ac_delim
28046LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028047_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028048
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028049 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028050 break
28051 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028052 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28053echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028054 { (exit 1); exit 1; }; }
28055 else
28056 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028057 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028058done
28059
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028060ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28061if test -n "$ac_eof"; then
28062 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28063 ac_eof=`expr $ac_eof + 1`
28064fi
28065
28066cat >>$CONFIG_STATUS <<_ACEOF
28067cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28068/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028069_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028070sed '
28071s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28072s/^/s,@/; s/!/@,|#_!!_#|/
28073:n
28074t n
28075s/'"$ac_delim"'$/,g/; t
28076s/$/\\/; p
28077N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28078' >>$CONFIG_STATUS <conf$$subs.sed
28079rm -f conf$$subs.sed
28080cat >>$CONFIG_STATUS <<_ACEOF
28081CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028082_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028083
28084
28085ac_delim='%!_!# '
28086for ac_last_try in false false false false false :; do
28087 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028088CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028089SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028090PKG_CONFIG!$PKG_CONFIG$ac_delim
28091LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028092USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28093SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28094USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28095LDLAST!$LDLAST$ac_delim
28096THREADOBJ!$THREADOBJ$ac_delim
28097DLINCLDIR!$DLINCLDIR$ac_delim
28098DYNLOADFILE!$DYNLOADFILE$ac_delim
28099MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28100TRUE!$TRUE$ac_delim
28101LIBOBJS!$LIBOBJS$ac_delim
28102HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28103HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28104HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28105HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28106HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28107LIBM!$LIBM$ac_delim
28108LIBC!$LIBC$ac_delim
28109THREADHEADERS!$THREADHEADERS$ac_delim
28110SRCDIRS!$SRCDIRS$ac_delim
28111LTLIBOBJS!$LTLIBOBJS$ac_delim
28112_ACEOF
28113
Benjamin Petersond78735d2010-01-01 16:04:23 +000028114 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028115 break
28116 elif $ac_last_try; then
28117 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28118echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028119 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028120 else
28121 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28122 fi
28123done
28124
28125ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28126if test -n "$ac_eof"; then
28127 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28128 ac_eof=`expr $ac_eof + 1`
28129fi
28130
28131cat >>$CONFIG_STATUS <<_ACEOF
28132cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28133/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028134_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028135sed '
28136s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28137s/^/s,@/; s/!/@,|#_!!_#|/
28138:n
28139t n
28140s/'"$ac_delim"'$/,g/; t
28141s/$/\\/; p
28142N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28143' >>$CONFIG_STATUS <conf$$subs.sed
28144rm -f conf$$subs.sed
28145cat >>$CONFIG_STATUS <<_ACEOF
28146:end
28147s/|#_!!_#|//g
28148CEOF$ac_eof
28149_ACEOF
28150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028151
28152# VPATH may cause trouble with some makes, so we remove $(srcdir),
28153# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28154# trailing colons and then remove the whole line if VPATH becomes empty
28155# (actually we leave an empty line to preserve line numbers).
28156if test "x$srcdir" = x.; then
28157 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28158s/:*\$(srcdir):*/:/
28159s/:*\${srcdir}:*/:/
28160s/:*@srcdir@:*/:/
28161s/^\([^=]*=[ ]*\):*/\1/
28162s/:*$//
28163s/^[^=]*=[ ]*$//
28164}'
28165fi
28166
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028167cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028168fi # test -n "$CONFIG_FILES"
28169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028170
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028171for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028172do
28173 case $ac_tag in
28174 :[FHLC]) ac_mode=$ac_tag; continue;;
28175 esac
28176 case $ac_mode$ac_tag in
28177 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028178 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28179echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028180 { (exit 1); exit 1; }; };;
28181 :[FH]-) ac_tag=-:-;;
28182 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28183 esac
28184 ac_save_IFS=$IFS
28185 IFS=:
28186 set x $ac_tag
28187 IFS=$ac_save_IFS
28188 shift
28189 ac_file=$1
28190 shift
28191
28192 case $ac_mode in
28193 :L) ac_source=$1;;
28194 :[FH])
28195 ac_file_inputs=
28196 for ac_f
28197 do
28198 case $ac_f in
28199 -) ac_f="$tmp/stdin";;
28200 *) # Look for the file first in the build tree, then in the source tree
28201 # (if the path is not absolute). The absolute path cannot be DOS-style,
28202 # because $ac_f cannot contain `:'.
28203 test -f "$ac_f" ||
28204 case $ac_f in
28205 [\\/$]*) false;;
28206 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28207 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028208 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28209echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028210 { (exit 1); exit 1; }; };;
28211 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028212 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028213 done
28214
28215 # Let's still pretend it is `configure' which instantiates (i.e., don't
28216 # use $as_me), people would be surprised to read:
28217 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028218 configure_input="Generated from "`IFS=:
28219 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028220 if test x"$ac_file" != x-; then
28221 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028222 { echo "$as_me:$LINENO: creating $ac_file" >&5
28223echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028224 fi
28225
28226 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028227 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028228 esac
28229 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028230 esac
28231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028232 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028233$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028234 X"$ac_file" : 'X\(//\)[^/]' \| \
28235 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028236 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028237echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028238 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28239 s//\1/
28240 q
28241 }
28242 /^X\(\/\/\)[^/].*/{
28243 s//\1/
28244 q
28245 }
28246 /^X\(\/\/\)$/{
28247 s//\1/
28248 q
28249 }
28250 /^X\(\/\).*/{
28251 s//\1/
28252 q
28253 }
28254 s/.*/./; q'`
28255 { as_dir="$ac_dir"
28256 case $as_dir in #(
28257 -*) as_dir=./$as_dir;;
28258 esac
28259 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028260 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028261 while :; do
28262 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028263 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028264 *) as_qdir=$as_dir;;
28265 esac
28266 as_dirs="'$as_qdir' $as_dirs"
28267 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028268$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028269 X"$as_dir" : 'X\(//\)[^/]' \| \
28270 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028271 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028272echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028273 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28274 s//\1/
28275 q
28276 }
28277 /^X\(\/\/\)[^/].*/{
28278 s//\1/
28279 q
28280 }
28281 /^X\(\/\/\)$/{
28282 s//\1/
28283 q
28284 }
28285 /^X\(\/\).*/{
28286 s//\1/
28287 q
28288 }
28289 s/.*/./; q'`
28290 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028291 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028292 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028293 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28294echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028295 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028296 ac_builddir=.
28297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028298case "$ac_dir" in
28299.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28300*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028301 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028302 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028303 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028304 case $ac_top_builddir_sub in
28305 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28306 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28307 esac ;;
28308esac
28309ac_abs_top_builddir=$ac_pwd
28310ac_abs_builddir=$ac_pwd$ac_dir_suffix
28311# for backward compatibility:
28312ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028313
28314case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028315 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028316 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028317 ac_top_srcdir=$ac_top_builddir_sub
28318 ac_abs_top_srcdir=$ac_pwd ;;
28319 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028320 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028321 ac_top_srcdir=$srcdir
28322 ac_abs_top_srcdir=$srcdir ;;
28323 *) # Relative name.
28324 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28325 ac_top_srcdir=$ac_top_build_prefix$srcdir
28326 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028327esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028328ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028329
Martin v. Löwis11437992002-04-12 09:54:03 +000028330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028331 case $ac_mode in
28332 :F)
28333 #
28334 # CONFIG_FILE
28335 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028336
28337 case $INSTALL in
28338 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028339 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028340 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028341_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028342
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028343cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028344# If the template does not know about datarootdir, expand it.
28345# FIXME: This hack should be removed a few years after 2.60.
28346ac_datarootdir_hack=; ac_datarootdir_seen=
28347
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028348case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028349 p
28350 q
28351}
28352/@datadir@/p
28353/@docdir@/p
28354/@infodir@/p
28355/@localedir@/p
28356/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028357' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028358*datarootdir*) ac_datarootdir_seen=yes;;
28359*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028360 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28361echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028362_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028363cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028364 ac_datarootdir_hack='
28365 s&@datadir@&$datadir&g
28366 s&@docdir@&$docdir&g
28367 s&@infodir@&$infodir&g
28368 s&@localedir@&$localedir&g
28369 s&@mandir@&$mandir&g
28370 s&\\\${datarootdir}&$datarootdir&g' ;;
28371esac
28372_ACEOF
28373
28374# Neutralize VPATH when `$srcdir' = `.'.
28375# Shell code in configure.ac might set extrasub.
28376# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028377cat >>$CONFIG_STATUS <<_ACEOF
28378 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028379$extrasub
28380_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028381cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028382:t
28383/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028384s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028385s&@top_builddir@&$ac_top_builddir_sub&;t t
28386s&@srcdir@&$ac_srcdir&;t t
28387s&@abs_srcdir@&$ac_abs_srcdir&;t t
28388s&@top_srcdir@&$ac_top_srcdir&;t t
28389s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28390s&@builddir@&$ac_builddir&;t t
28391s&@abs_builddir@&$ac_abs_builddir&;t t
28392s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28393s&@INSTALL@&$ac_INSTALL&;t t
28394$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028395" $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 +000028396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028397test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28398 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28399 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028400 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028401which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028402echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028403which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028405 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028406 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028407 -) cat "$tmp/out"; rm -f "$tmp/out";;
28408 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28409 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028410 ;;
28411 :H)
28412 #
28413 # CONFIG_HEADER
28414 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028415_ACEOF
28416
28417# Transform confdefs.h into a sed script `conftest.defines', that
28418# substitutes the proper values into config.h.in to produce config.h.
28419rm -f conftest.defines conftest.tail
28420# First, append a space to every undef/define line, to ease matching.
28421echo 's/$/ /' >conftest.defines
28422# Then, protect against being on the right side of a sed subst, or in
28423# an unquoted here document, in config.status. If some macros were
28424# called several times there might be several #defines for the same
28425# symbol, which is useless. But do not sort them, since the last
28426# AC_DEFINE must be honored.
28427ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28428# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28429# NAME is the cpp macro being defined, VALUE is the value it is being given.
28430# PARAMS is the parameter list in the macro definition--in most cases, it's
28431# just an empty string.
28432ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28433ac_dB='\\)[ (].*,\\1define\\2'
28434ac_dC=' '
28435ac_dD=' ,'
28436
28437uniq confdefs.h |
28438 sed -n '
28439 t rset
28440 :rset
28441 s/^[ ]*#[ ]*define[ ][ ]*//
28442 t ok
28443 d
28444 :ok
28445 s/[\\&,]/\\&/g
28446 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28447 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28448 ' >>conftest.defines
28449
28450# Remove the space that was appended to ease matching.
28451# Then replace #undef with comments. This is necessary, for
28452# example, in the case of _POSIX_SOURCE, which is predefined and required
28453# on some systems where configure will not decide to define it.
28454# (The regexp can be short, since the line contains either #define or #undef.)
28455echo 's/ $//
28456s,^[ #]*u.*,/* & */,' >>conftest.defines
28457
28458# Break up conftest.defines:
28459ac_max_sed_lines=50
28460
28461# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28462# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28463# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28464# et cetera.
28465ac_in='$ac_file_inputs'
28466ac_out='"$tmp/out1"'
28467ac_nxt='"$tmp/out2"'
28468
28469while :
28470do
28471 # Write a here document:
28472 cat >>$CONFIG_STATUS <<_ACEOF
28473 # First, check the format of the line:
28474 cat >"\$tmp/defines.sed" <<\\CEOF
28475/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28476/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28477b
28478:def
28479_ACEOF
28480 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28481 echo 'CEOF
28482 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28483 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28484 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28485 grep . conftest.tail >/dev/null || break
28486 rm -f conftest.defines
28487 mv conftest.tail conftest.defines
28488done
28489rm -f conftest.defines conftest.tail
28490
28491echo "ac_result=$ac_in" >>$CONFIG_STATUS
28492cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028493 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028494 echo "/* $configure_input */" >"$tmp/config.h"
28495 cat "$ac_result" >>"$tmp/config.h"
28496 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28497 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28498echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028499 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028500 rm -f $ac_file
28501 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028502 fi
28503 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028504 echo "/* $configure_input */"
28505 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028506 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028507 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028508 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028510
28511 esac
28512
28513done # for ac_tag
28514
Guido van Rossum627b2d71993-12-24 10:39:16 +000028515
Martin v. Löwis11437992002-04-12 09:54:03 +000028516{ (exit 0); exit 0; }
28517_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028518chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028519ac_clean_files=$ac_clean_files_save
28520
28521
28522# configure is writing to config.log, and then calls config.status.
28523# config.status does its own redirection, appending to config.log.
28524# Unfortunately, on DOS this fails, as config.log is still kept open
28525# by configure, so config.status won't be able to write to it; its
28526# output is simply discarded. So we exec the FD to /dev/null,
28527# effectively closing config.log, so it can be properly (re)opened and
28528# appended to by config.status. When coming back to configure, we
28529# need to make the FD available again.
28530if test "$no_create" != yes; then
28531 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028532 ac_config_status_args=
28533 test "$silent" = yes &&
28534 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028535 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028536 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028537 exec 5>>config.log
28538 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28539 # would make configure fail if this is the last instruction.
28540 $ac_cs_success || { (exit 1); exit 1; }
28541fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028542
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028543
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028544echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028545if test ! -f Modules/Setup
28546then
28547 cp $srcdir/Modules/Setup.dist Modules/Setup
28548fi
28549
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028550echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028551if test ! -f Modules/Setup.local
28552then
28553 echo "# Edit this file for local setup changes" >Modules/Setup.local
28554fi
28555
28556echo "creating Makefile"
28557$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28558 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028559 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028560mv config.c Modules