blob: c122fa619698ec44bcdbbb64abcda5367b5145d8 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren79a93512010-04-18 19:08:47 +00002# From configure.in Revision: 79354 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004# Generated by GNU Autoconf 2.61 for python 3.1.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Christian Heimes70e5cab2008-12-03 18:18:23 +0000578PACKAGE_VERSION='3.1'
579PACKAGE_STRING='python 3.1'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000619ac_subst_vars='SHELL
Benjamin Petersona8332062009-09-11 22:36:27 +0000620PATH_SEPARATOR
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Benjamin Petersone7e59c22010-03-23 21:05:56 +0000661LIPO_32BIT_FLAGS
662LIPO_64BIT_FLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000663PYTHONFRAMEWORK
664PYTHONFRAMEWORKIDENTIFIER
665PYTHONFRAMEWORKDIR
666PYTHONFRAMEWORKPREFIX
667PYTHONFRAMEWORKINSTALLDIR
668FRAMEWORKINSTALLFIRST
669FRAMEWORKINSTALLLAST
670FRAMEWORKALTINSTALLFIRST
671FRAMEWORKALTINSTALLLAST
672FRAMEWORKUNIXTOOLSPREFIX
673MACHDEP
674SGI_ABI
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698GNULD
699RANLIB
700AR
701ARFLAGS
702SVNVERSION
703INSTALL_PROGRAM
704INSTALL_SCRIPT
705INSTALL_DATA
706LN
707OPT
708BASECFLAGS
709UNIVERSAL_ARCH_FLAGS
710OTHER_LIBTOOL_OPT
711LIBTOOL_CRUFT
712SO
713LDSHARED
714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
719USE_SIGNAL_MODULE
720SIGNAL_OBJS
721USE_THREAD_MODULE
722LDLAST
723THREADOBJ
724DLINCLDIR
725DYNLOADFILE
726MACHDEP_OBJS
727TRUE
728LIBOBJS
729HAVE_GETHOSTBYNAME_R_6_ARG
730HAVE_GETHOSTBYNAME_R_5_ARG
731HAVE_GETHOSTBYNAME_R_3_ARG
732HAVE_GETHOSTBYNAME_R
733HAVE_GETHOSTBYNAME
734LIBM
735LIBC
736THREADHEADERS
737SRCDIRS
738LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000739ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000740 ac_precious_vars='build_alias
741host_alias
742target_alias
743CC
744CFLAGS
745LDFLAGS
746LIBS
747CPPFLAGS
748CPP'
749
Guido van Rossum627b2d71993-12-24 10:39:16 +0000750
Guido van Rossum7f43da71994-08-01 12:15:30 +0000751# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752ac_init_help=
753ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754# The variables have the same names as the options, with
755# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000756cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000758no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759no_recursion=
760prefix=NONE
761program_prefix=NONE
762program_suffix=NONE
763program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000765site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000768x_includes=NONE
769x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000770
771# Installation directory options.
772# These are left unexpanded so users can "make install exec_prefix=/foo"
773# and all the variables that are supposed to be based on exec_prefix
774# by default will actually change.
775# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000776# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000777bindir='${exec_prefix}/bin'
778sbindir='${exec_prefix}/sbin'
779libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000780datarootdir='${prefix}/share'
781datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782sysconfdir='${prefix}/etc'
783sharedstatedir='${prefix}/com'
784localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000785includedir='${prefix}/include'
786oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000787docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
788infodir='${datarootdir}/info'
789htmldir='${docdir}'
790dvidir='${docdir}'
791pdfdir='${docdir}'
792psdir='${docdir}'
793libdir='${exec_prefix}/lib'
794localedir='${datarootdir}/locale'
795mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000800do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801 # If the previous option needs an argument, assign it.
802 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000803 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804 ac_prev=
805 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000808 case $ac_option in
809 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
810 *) ac_optarg=yes ;;
811 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813 # Accept the important Cygnus configure options, so we can diagnose typos.
814
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815 case $ac_dashdash$ac_option in
816 --)
817 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819 -bindir | --bindir | --bindi | --bind | --bin | --bi)
820 ac_prev=bindir ;;
821 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000822 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823
824 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000826 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829 -cache-file | --cache-file | --cache-fil | --cache-fi \
830 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
831 ac_prev=cache_file ;;
832 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
833 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000834 cache_file=$ac_optarg ;;
835
836 --config-cache | -C)
837 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000842 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
845 | --dataroo | --dataro | --datar)
846 ac_prev=datarootdir ;;
847 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
848 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
849 datarootdir=$ac_optarg ;;
850
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851 -disable-* | --disable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000852 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000854 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
855 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000857 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
858 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
860 -docdir | --docdir | --docdi | --doc | --do)
861 ac_prev=docdir ;;
862 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
863 docdir=$ac_optarg ;;
864
865 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
866 ac_prev=dvidir ;;
867 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
868 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869
870 -enable-* | --enable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000871 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000873 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
874 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000875 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000876 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
877 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
880 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
881 | --exec | --exe | --ex)
882 ac_prev=exec_prefix ;;
883 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
884 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
885 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000886 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
888 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Obsolete; use --with-gas.
890 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 -help | --help | --hel | --he | -h)
893 ac_init_help=long ;;
894 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
895 ac_init_help=recursive ;;
896 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
897 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
899 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
905 ac_prev=htmldir ;;
906 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
907 | --ht=*)
908 htmldir=$ac_optarg ;;
909
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910 -includedir | --includedir | --includedi | --included | --include \
911 | --includ | --inclu | --incl | --inc)
912 ac_prev=includedir ;;
913 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
914 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916
917 -infodir | --infodir | --infodi | --infod | --info | --inf)
918 ac_prev=infodir ;;
919 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921
922 -libdir | --libdir | --libdi | --libd)
923 ac_prev=libdir ;;
924 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
927 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
928 | --libexe | --libex | --libe)
929 ac_prev=libexecdir ;;
930 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
931 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 -localedir | --localedir | --localedi | --localed | --locale)
935 ac_prev=localedir ;;
936 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
937 localedir=$ac_optarg ;;
938
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000940 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 ac_prev=localstatedir ;;
942 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945
946 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
947 ac_prev=mandir ;;
948 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 # Obsolete; use --without-fp.
953 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
955 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 no_create=yes ;;
958
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
960 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
961 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
964 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
965 | --oldin | --oldi | --old | --ol | --o)
966 ac_prev=oldincludedir ;;
967 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
968 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
969 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
973 ac_prev=prefix ;;
974 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976
977 -program-prefix | --program-prefix | --program-prefi | --program-pref \
978 | --program-pre | --program-pr | --program-p)
979 ac_prev=program_prefix ;;
980 -program-prefix=* | --program-prefix=* | --program-prefi=* \
981 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
984 -program-suffix | --program-suffix | --program-suffi | --program-suff \
985 | --program-suf | --program-su | --program-s)
986 ac_prev=program_suffix ;;
987 -program-suffix=* | --program-suffix=* | --program-suffi=* \
988 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -program-transform-name | --program-transform-name \
992 | --program-transform-nam | --program-transform-na \
993 | --program-transform-n | --program-transform- \
994 | --program-transform | --program-transfor \
995 | --program-transfo | --program-transf \
996 | --program-trans | --program-tran \
997 | --progr-tra | --program-tr | --program-t)
998 ac_prev=program_transform_name ;;
999 -program-transform-name=* | --program-transform-name=* \
1000 | --program-transform-nam=* | --program-transform-na=* \
1001 | --program-transform-n=* | --program-transform-=* \
1002 | --program-transform=* | --program-transfor=* \
1003 | --program-transfo=* | --program-transf=* \
1004 | --program-trans=* | --program-tran=* \
1005 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001008 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1009 ac_prev=pdfdir ;;
1010 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1011 pdfdir=$ac_optarg ;;
1012
1013 -psdir | --psdir | --psdi | --psd | --ps)
1014 ac_prev=psdir ;;
1015 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1016 psdir=$ac_optarg ;;
1017
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1019 | -silent | --silent | --silen | --sile | --sil)
1020 silent=yes ;;
1021
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1023 ac_prev=sbindir ;;
1024 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1025 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
1028 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1029 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1030 | --sharedst | --shareds | --shared | --share | --shar \
1031 | --sha | --sh)
1032 ac_prev=sharedstatedir ;;
1033 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1034 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1035 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1036 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039 -site | --site | --sit)
1040 ac_prev=site ;;
1041 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1045 ac_prev=srcdir ;;
1046 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1050 | --syscon | --sysco | --sysc | --sys | --sy)
1051 ac_prev=sysconfdir ;;
1052 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1053 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1062 verbose=yes ;;
1063
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 -version | --version | --versio | --versi | --vers | -V)
1065 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
1067 -with-* | --with-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001068 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001070 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1071 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001073 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1074 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -without-* | --without-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001077 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001079 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1080 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001082 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1083 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085 --x)
1086 # Obsolete; use --with-x.
1087 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
1089 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1090 | --x-incl | --x-inc | --x-in | --x-i)
1091 ac_prev=x_includes ;;
1092 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1093 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1097 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1098 ac_prev=x_libraries ;;
1099 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1100 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001103 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001104Try \`$0 --help' for more information." >&2
1105 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 ;;
1107
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 *=*)
1109 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1110 # Reject names that are not valid shell variable names.
1111 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001112 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001114 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 export $ac_envvar ;;
1116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001119 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001121 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 ;;
1124
1125 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001126done
1127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001130 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132fi
1133
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001134# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1136 datadir sysconfdir sharedstatedir localstatedir includedir \
1137 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1138 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001142 [\\/$]* | ?:[\\/]* ) continue;;
1143 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001145 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001146 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001147done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001148
Martin v. Löwis11437992002-04-12 09:54:03 +00001149# There might be people who depend on the old broken behavior: `$host'
1150# used to hold the argument of --host etc.
1151# FIXME: To remove some day.
1152build=$build_alias
1153host=$host_alias
1154target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001155
Martin v. Löwis11437992002-04-12 09:54:03 +00001156# FIXME: To remove some day.
1157if test "x$host_alias" != x; then
1158 if test "x$build_alias" = x; then
1159 cross_compiling=maybe
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001160 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 If a cross compiler is detected then cross compile mode will be used." >&2
1162 elif test "x$build_alias" != "x$host_alias"; then
1163 cross_compiling=yes
1164 fi
1165fi
1166
1167ac_tool_prefix=
1168test -n "$host_alias" && ac_tool_prefix=$host_alias-
1169
1170test "$silent" = yes && exec 6>/dev/null
1171
Guido van Rossum627b2d71993-12-24 10:39:16 +00001172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001173ac_pwd=`pwd` && test -n "$ac_pwd" &&
1174ac_ls_di=`ls -di .` &&
1175ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001176 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001177 { (exit 1); exit 1; }; }
1178test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001179 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001180 { (exit 1); exit 1; }; }
1181
1182
Guido van Rossum627b2d71993-12-24 10:39:16 +00001183# Find the source files, if location was not specified.
1184if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001186 # Try the directory containing this script, then the parent directory.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001187 ac_confdir=`$as_dirname -- "$0" ||
1188$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1189 X"$0" : 'X\(//\)[^/]' \| \
1190 X"$0" : 'X\(//\)$' \| \
1191 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1192echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)[^/].*/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\/\)$/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\).*/{
1206 s//\1/
1207 q
1208 }
1209 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212 srcdir=..
1213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214else
1215 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001217if test ! -r "$srcdir/$ac_unique_file"; then
1218 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001219 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001222ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1223ac_abs_confdir=`(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001224 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001225 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001226 pwd)`
1227# When building in place, set srcdir=.
1228if test "$ac_abs_confdir" = "$ac_pwd"; then
1229 srcdir=.
1230fi
1231# Remove unnecessary trailing slashes from srcdir.
1232# Double slashes in file names in object file debugging info
1233# mess up M-x gdb in Emacs.
1234case $srcdir in
1235*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1236esac
1237for ac_var in $ac_precious_vars; do
1238 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_env_${ac_var}_value=\$${ac_var}
1240 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1242done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243
Martin v. Löwis11437992002-04-12 09:54:03 +00001244#
1245# Report the --help message.
1246#
1247if test "$ac_init_help" = "long"; then
1248 # Omit some internal or obsolete options to make the list less imposing.
1249 # This message is too long to be a string in the A/UX 3.1 sh.
1250 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001251\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001252
1253Usage: $0 [OPTION]... [VAR=VALUE]...
1254
1255To assign environment variables (e.g., CC, CFLAGS...), specify them as
1256VAR=VALUE. See below for descriptions of some of the useful variables.
1257
1258Defaults for the options are specified in brackets.
1259
1260Configuration:
1261 -h, --help display this help and exit
1262 --help=short display options specific to this package
1263 --help=recursive display the short help of all the included packages
1264 -V, --version display version information and exit
1265 -q, --quiet, --silent do not print \`checking...' messages
1266 --cache-file=FILE cache test results in FILE [disabled]
1267 -C, --config-cache alias for \`--cache-file=config.cache'
1268 -n, --no-create do not create output files
1269 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271Installation directories:
1272 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001273 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001275 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001276
1277By default, \`make install' will install all the files in
1278\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1279an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1280for instance \`--prefix=\$HOME'.
1281
1282For better control, use the options below.
1283
1284Fine tuning of the installation directories:
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001285 --bindir=DIR user executables [EPREFIX/bin]
1286 --sbindir=DIR system admin executables [EPREFIX/sbin]
1287 --libexecdir=DIR program executables [EPREFIX/libexec]
1288 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1289 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1290 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1291 --libdir=DIR object code libraries [EPREFIX/lib]
1292 --includedir=DIR C header files [PREFIX/include]
1293 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1294 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1295 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1296 --infodir=DIR info documentation [DATAROOTDIR/info]
1297 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1298 --mandir=DIR man documentation [DATAROOTDIR/man]
1299 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1300 --htmldir=DIR html documentation [DOCDIR]
1301 --dvidir=DIR dvi documentation [DOCDIR]
1302 --pdfdir=DIR pdf documentation [DOCDIR]
1303 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001304_ACEOF
1305
1306 cat <<\_ACEOF
1307_ACEOF
1308fi
1309
1310if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001312 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001313 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 cat <<\_ACEOF
1315
1316Optional Features:
1317 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1318 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001319 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001320 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-framework[=INSTALLDIR]
1322 Build (MacOSX|Darwin) framework
1323 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001324 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001325 --enable-ipv6 Enable ipv6 (with ipv4) support
1326 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001327 --enable-big-digits[=BITS]
1328 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001329
1330Optional Packages:
1331 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1332 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001333 --with-universal-archs=ARCH
1334 select architectures for universal build ("32-bit",
Ronald Oussoren856624d2009-09-08 07:13:53 +00001335 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001336 --with-framework-name=FRAMEWORK
1337 specify an alternate name of the framework built
1338 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001339 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001340 --with-cxx-main=<compiler>
1341 compile main() and link python executable with C++
1342 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --with-suffix=.exe set executable suffix
1344 --with-pydebug build with Py_DEBUG defined
1345 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001346 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001347 --with-dbmliborder=db1:db2:...
1348 order to check db backends for dbm. Valid value is a
1349 colon separated string with the backend names
1350 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001351 --with-signal-module disable/enable signal module
1352 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1353 --with(out)-threads[=DIRECTORY]
1354 disable/enable thread support
1355 --with(out)-thread[=DIRECTORY]
1356 deprecated; use --with(out)-threads
1357 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001359 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-pymalloc disable/enable specialized mallocs
1361 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with-fpectl enable SIGFPE catching
1363 --with-libm=STRING math library
1364 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001365 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001366 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1367 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001368
1369Some influential environment variables:
1370 CC C compiler command
1371 CFLAGS C compiler flags
1372 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1373 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 LIBS libraries to pass to the linker, e.g. -l<library>
1375 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1376 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 CPP C preprocessor
1378
1379Use these variables to override the choices made by `configure' or to help
1380it to find libraries and programs with nonstandard names/locations.
1381
Georg Brandle2e15612009-05-20 18:25:10 +00001382Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001383_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001385fi
1386
1387if test "$ac_init_help" = "recursive"; then
1388 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001390 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 ac_builddir=.
1392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001393case "$ac_dir" in
1394.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1395*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001396 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001398 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001399 case $ac_top_builddir_sub in
1400 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1401 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1402 esac ;;
1403esac
1404ac_abs_top_builddir=$ac_pwd
1405ac_abs_builddir=$ac_pwd$ac_dir_suffix
1406# for backward compatibility:
1407ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
1409case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001412 ac_top_srcdir=$ac_top_builddir_sub
1413 ac_abs_top_srcdir=$ac_pwd ;;
1414 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001416 ac_top_srcdir=$srcdir
1417 ac_abs_top_srcdir=$srcdir ;;
1418 *) # Relative name.
1419 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1420 ac_top_srcdir=$ac_top_build_prefix$srcdir
1421 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001422esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001425 cd "$ac_dir" || { ac_status=$?; continue; }
1426 # Check for guested configure.
1427 if test -f "$ac_srcdir/configure.gnu"; then
1428 echo &&
1429 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1430 elif test -f "$ac_srcdir/configure"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001434 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001435 fi || ac_status=$?
1436 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001437 done
1438fi
1439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001440test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001441if $ac_init_version; then
1442 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001443python configure 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001444generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001446Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014472002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448This configure script is free software; the Free Software Foundation
1449gives unlimited permission to copy, distribute and modify it.
1450_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001454This file contains any messages produced by compilers while
1455running configure, to aid debugging if configure makes a mistake.
1456
Christian Heimes70e5cab2008-12-03 18:18:23 +00001457It was created by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001458generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001459
1460 $ $0 $@
1461
1462_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001464{
1465cat <<_ASUNAME
1466## --------- ##
1467## Platform. ##
1468## --------- ##
1469
1470hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1471uname -m = `(uname -m) 2>/dev/null || echo unknown`
1472uname -r = `(uname -r) 2>/dev/null || echo unknown`
1473uname -s = `(uname -s) 2>/dev/null || echo unknown`
1474uname -v = `(uname -v) 2>/dev/null || echo unknown`
1475
1476/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1477/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1478
1479/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1480/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1481/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001483/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1484/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1485/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1486
1487_ASUNAME
1488
1489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1490for as_dir in $PATH
1491do
1492 IFS=$as_save_IFS
1493 test -z "$as_dir" && as_dir=.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001494 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001495done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
1498} >&5
1499
1500cat >&5 <<_ACEOF
1501
1502
1503## ----------- ##
1504## Core tests. ##
1505## ----------- ##
1506
1507_ACEOF
1508
1509
1510# Keep a trace of the command line.
1511# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001514# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_configure_args0=
1517ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001518ac_must_keep_next=false
1519for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001520do
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 for ac_arg
1522 do
1523 case $ac_arg in
1524 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1526 | -silent | --silent | --silen | --sile | --sil)
1527 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 *\'*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001529 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001530 esac
1531 case $ac_pass in
1532 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1533 2)
1534 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1535 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001537 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001538 case $ac_arg in
1539 *=* | --config-cache | -C | -disable-* | --disable-* \
1540 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1541 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1542 | -with-* | --with-* | -without-* | --without-* | --x)
1543 case "$ac_configure_args0 " in
1544 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1545 esac
1546 ;;
1547 -* ) ac_must_keep_next=true ;;
1548 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001551 ;;
1552 esac
1553 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001554done
Skip Montanaro6dead952003-09-25 14:50:04 +00001555$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1556$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558# When interrupted or exit'd, cleanup temporary files, and complete
1559# config.log. We remove comments because anyway the quotes in there
1560# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561# WARNING: Use '\'' to represent an apostrophe within the trap.
1562# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001563trap 'exit_status=$?
1564 # Save into config.log some information that might help in debugging.
1565 {
1566 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001567
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 cat <<\_ASBOX
1569## ---------------- ##
1570## Cache variables. ##
1571## ---------------- ##
1572_ASBOX
1573 echo
1574 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575(
1576 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1577 eval ac_val=\$$ac_var
1578 case $ac_val in #(
1579 *${as_nl}*)
1580 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001581 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1582echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 esac
1584 case $ac_var in #(
1585 _ | IFS | as_nl) ;; #(
1586 *) $as_unset $ac_var ;;
1587 esac ;;
1588 esac
1589 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1592 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 "s/'\''/'\''\\\\'\'''\''/g;
1595 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1596 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001599 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 esac |
1601 sort
1602)
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001604
1605 cat <<\_ASBOX
1606## ----------------- ##
1607## Output variables. ##
1608## ----------------- ##
1609_ASBOX
1610 echo
1611 for ac_var in $ac_subst_vars
1612 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 eval ac_val=\$$ac_var
1614 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001615 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001617 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001618 done | sort
1619 echo
1620
1621 if test -n "$ac_subst_files"; then
1622 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623## ------------------- ##
1624## File substitutions. ##
1625## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001626_ASBOX
1627 echo
1628 for ac_var in $ac_subst_files
1629 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 eval ac_val=\$$ac_var
1631 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001632 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001634 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001635 done | sort
1636 echo
1637 fi
1638
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 if test -s confdefs.h; then
1640 cat <<\_ASBOX
1641## ----------- ##
1642## confdefs.h. ##
1643## ----------- ##
1644_ASBOX
1645 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 echo
1648 fi
1649 test "$ac_signal" != 0 &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001650 echo "$as_me: caught signal $ac_signal"
1651 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653 rm -f core *.core core.conftest.* &&
1654 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001657for ac_signal in 1 2 13 15; do
1658 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1659done
1660ac_signal=0
1661
1662# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001663rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001664
1665# Predefined preprocessor variables.
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_NAME "$PACKAGE_NAME"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_VERSION "$PACKAGE_VERSION"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_STRING "$PACKAGE_STRING"
1684_ACEOF
1685
1686
1687cat >>confdefs.h <<_ACEOF
1688#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1689_ACEOF
1690
1691
1692# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001693# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694if test -n "$CONFIG_SITE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001695 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696elif test "x$prefix" != xNONE; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001697 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001698else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001699 set x "$ac_default_prefix/share/config.site" \
1700 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001702shift
1703for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001704do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705 if test -r "$ac_site_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001706 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1707echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001708 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709 . "$ac_site_file"
1710 fi
1711done
1712
1713if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001714 # Some versions of bash will fail to source /dev/null (special
1715 # files actually), so we avoid doing that.
1716 if test -f "$cache_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001717 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1718echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001719 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001720 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1721 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 esac
1723 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001725 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1726echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 >$cache_file
1728fi
1729
1730# Check that the precious variables saved in the cache have kept the same
1731# value.
1732ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001733for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001734 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1735 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1737 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001738 case $ac_old_set,$ac_new_set in
1739 set,)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001740 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1741echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 ac_cache_corrupted=: ;;
1743 ,set)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001744 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1745echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001746 ac_cache_corrupted=: ;;
1747 ,);;
1748 *)
1749 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001750 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1751echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1752 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1753echo "$as_me: former value: $ac_old_val" >&2;}
1754 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1755echo "$as_me: current value: $ac_new_val" >&2;}
1756 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001757 fi;;
1758 esac
1759 # Pass precious variables to config.status.
1760 if test "$ac_new_set" = set; then
1761 case $ac_new_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001762 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001763 *) ac_arg=$ac_var=$ac_new_val ;;
1764 esac
1765 case " $ac_configure_args " in
1766 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1767 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1768 esac
1769 fi
1770done
1771if $ac_cache_corrupted; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001772 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1773echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1774 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1775echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001776 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001777fi
1778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
Guido van Rossum7f43da71994-08-01 12:15:30 +00001803ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1807ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808
Guido van Rossum627b2d71993-12-24 10:39:16 +00001809
Michael W. Hudson54241132001-12-07 15:38:26 +00001810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001811ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
1813
Martin v. Löwis11437992002-04-12 09:54:03 +00001814
Benjamin Petersond23f8222009-04-05 19:13:16 +00001815if test "$prefix" != "/"; then
1816 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1817fi
1818
1819
Martin v. Löwis11437992002-04-12 09:54:03 +00001820
1821
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001822
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001823
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001824# We don't use PACKAGE_ variables, and they cause conflicts
1825# with other autoconf-based packages that include Python.h
1826grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1827rm confdefs.h
1828mv confdefs.h.new confdefs.h
1829
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001830
Christian Heimes70e5cab2008-12-03 18:18:23 +00001831VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001832
Martin v. Löwis1142de32002-03-29 16:28:31 +00001833
1834SOVERSION=1.0
1835
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001836# The later defininition of _XOPEN_SOURCE disables certain features
1837# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1838
1839cat >>confdefs.h <<\_ACEOF
1840#define _GNU_SOURCE 1
1841_ACEOF
1842
1843
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001844# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1845# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1846# them.
1847
1848cat >>confdefs.h <<\_ACEOF
1849#define _NETBSD_SOURCE 1
1850_ACEOF
1851
1852
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001853# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1854# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1855# them.
1856
1857cat >>confdefs.h <<\_ACEOF
1858#define __BSD_VISIBLE 1
1859_ACEOF
1860
1861
Martin v. Löwisd6320502004-08-12 13:45:08 +00001862# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1863# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1864
1865cat >>confdefs.h <<\_ACEOF
1866#define _BSD_TYPES 1
1867_ACEOF
1868
1869
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001870# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1871# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1872# them.
1873
1874cat >>confdefs.h <<\_ACEOF
1875#define _DARWIN_C_SOURCE 1
1876_ACEOF
1877
1878
1879
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001880define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001881
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001882# Arguments passed to configure.
1883
1884CONFIG_ARGS="$ac_configure_args"
1885
Ronald Oussorend5736812010-02-07 12:04:41 +00001886{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1887echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001888# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001889if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001890 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001891 case $enableval in
1892 yes)
1893 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussorend5736812010-02-07 12:04:41 +00001894 if test ! -d "${enableval}"
1895 then
1896 enableval=/
1897 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001898 ;;
1899 esac
1900 case $enableval in
1901 no)
1902 UNIVERSALSDK=
1903 enable_universalsdk=
1904 ;;
1905 *)
1906 UNIVERSALSDK=$enableval
Ronald Oussorend5736812010-02-07 12:04:41 +00001907 if test ! -d "${UNIVERSALSDK}"
1908 then
1909 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1910echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1911 { (exit 1); exit 1; }; }
1912 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001913 ;;
1914 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001915
Ronald Oussorend5736812010-02-07 12:04:41 +00001916
Thomas Wouters477c8d52006-05-27 19:21:47 +00001917else
1918
1919 UNIVERSALSDK=
1920 enable_universalsdk=
1921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001922fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001923
Ronald Oussorend5736812010-02-07 12:04:41 +00001924if test -n "${UNIVERSALSDK}"
1925then
1926 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1927echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1928else
1929 { echo "$as_me:$LINENO: result: no" >&5
1930echo "${ECHO_T}no" >&6; }
1931fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001933
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001934
1935
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001936UNIVERSAL_ARCHS="32-bit"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00001937
1938
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001939{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1940echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001941
1942# Check whether --with-universal-archs was given.
1943if test "${with_universal_archs+set}" = set; then
1944 withval=$with_universal_archs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001945 { echo "$as_me:$LINENO: result: $withval" >&5
1946echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001947 UNIVERSAL_ARCHS="$withval"
1948
1949else
1950
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001951 { echo "$as_me:$LINENO: result: 32-bit" >&5
1952echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001953
1954fi
1955
1956
1957
1958
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001959
1960# Check whether --with-framework-name was given.
1961if test "${with_framework_name+set}" = set; then
1962 withval=$with_framework_name;
1963 PYTHONFRAMEWORK=${withval}
1964 PYTHONFRAMEWORKDIR=${withval}.framework
1965 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1966
1967else
1968
1969 PYTHONFRAMEWORK=Python
1970 PYTHONFRAMEWORKDIR=Python.framework
1971 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1972
1973fi
1974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001975# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001976if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001977 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001978 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001979 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001980 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001981 esac
1982 case $enableval in
1983 no)
1984 PYTHONFRAMEWORK=
1985 PYTHONFRAMEWORKDIR=no-framework
1986 PYTHONFRAMEWORKPREFIX=
1987 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001988 FRAMEWORKINSTALLFIRST=
1989 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001990 FRAMEWORKALTINSTALLFIRST=
1991 FRAMEWORKALTINSTALLLAST=
1992 if test "x${prefix}" = "xNONE"; then
1993 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1994 else
1995 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1996 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001998 ;;
1999 *)
2000 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002001 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002002 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002003 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002004 case "${UNIVERSAL_ARCHS}" in
2005 all|3-way|intel)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002006 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002007 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002008 ;;
2009 *)
Ronald Oussorene3918352009-03-30 18:00:28 +00002010 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002011 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002012 ;;
2013 esac
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002014
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 if test "x${prefix}" = "xNONE" ; then
2016 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2017 else
2018 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2019 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002020 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002023 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002024 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002026 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002027
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002028 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2029
2030 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2031
Jack Jansene578a632001-08-15 01:27:14 +00002032 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002033
Guido van Rossum563e7081996-09-10 18:20:48 +00002034else
Martin v. Löwis11437992002-04-12 09:54:03 +00002035
Jack Jansene578a632001-08-15 01:27:14 +00002036 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002037 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002038 PYTHONFRAMEWORKPREFIX=
2039 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002040 FRAMEWORKINSTALLFIRST=
2041 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002042 FRAMEWORKALTINSTALLFIRST=
2043 FRAMEWORKALTINSTALLLAST=
2044 if test "x${prefix}" = "xNONE" ; then
2045 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2046 else
2047 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2048 fi
Jack Jansene578a632001-08-15 01:27:14 +00002049 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002051 if test "$UNIVERSAL_ARCHS" = "all"
2052 then
2053 FRAMEWORKINSTALLLAST=update4wayuniversal
2054 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2055 fi
2056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002057fi
2058
Thomas Wouters477c8d52006-05-27 19:21:47 +00002059
2060
Michael W. Hudson54241132001-12-07 15:38:26 +00002061
2062
2063
2064
Jack Jansene578a632001-08-15 01:27:14 +00002065
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002066
2067
2068
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002069
Jack Jansene578a632001-08-15 01:27:14 +00002070##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002071## AC_HELP_STRING(--with-dyld,
2072## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002073##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002074# Set name for machine-dependent library files
2075
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002076{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2077echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078if test -z "$MACHDEP"
2079then
Guido van Rossum563e7081996-09-10 18:20:48 +00002080 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002081 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002082 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002083 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002084 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002085 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002086 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002087 ac_md_system=`echo $ac_sys_system |
2088 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2089 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002090 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002091 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002092
Guido van Rossum07397971997-04-29 21:49:50 +00002093 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002094 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002095 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002096 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002097 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002098 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002099 esac
2100fi
Guido van Rossum91922671997-10-09 20:24:13 +00002101
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002102# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2103# disable features if it is defined, without any means to access these
2104# features as extensions. For these systems, we skip the definition of
2105# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2106# some feature, make sure there is no alternative way to access this
2107# feature. Also, when using wildcards, make sure you have verified the
2108# need for not defining _XOPEN_SOURCE on all systems matching the
2109# wildcard, and that the wildcard does not include future systems
2110# (which may remove their limitations).
2111case $ac_sys_system/$ac_sys_release in
2112 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2113 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002114 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002115 # In addition, Stefan Krah confirms that issue #1244610 exists through
2116 # OpenBSD 4.6, but is fixed in 4.7.
2117 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002118 define_xopen_source=no
2119 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2120 # also defined. This can be overridden by defining _BSD_SOURCE
2121 # As this has a different meaning on Linux, only define it on OpenBSD
2122
2123cat >>confdefs.h <<\_ACEOF
2124#define _BSD_SOURCE 1
2125_ACEOF
2126
2127 ;;
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002128 OpenBSD/4.[789])
Martin v. Löwisf6594222010-02-15 08:37:47 +00002129 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2130 # also defined. This can be overridden by defining _BSD_SOURCE
2131 # As this has a different meaning on Linux, only define it on OpenBSD
2132
2133cat >>confdefs.h <<\_ACEOF
2134#define _BSD_SOURCE 1
2135_ACEOF
2136
2137 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002138 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2139 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2140 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002141 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002142 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002143 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2144 # of union __?sigval. Reported by Stuart Bishop.
2145 SunOS/5.6)
2146 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002147 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2148 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002149 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002150 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002151 define_xopen_source=no;;
2152 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002153 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002154 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002155 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002156 # On FreeBSD 4, the math functions C89 does not cover are never defined
2157 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2158 FreeBSD/4.*)
2159 define_xopen_source=no;;
2160 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2161 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2162 # identifies itself as Darwin/7.*
2163 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2164 # disables platform specific features beyond repair.
2165 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2166 # has no effect, don't bother defining them
2167 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002168 define_xopen_source=no;;
Ronald Oussorend4be7a22010-03-09 06:41:58 +00002169 Darwin/1[0-9].*)
Ronald Oussoren095d2822010-03-08 07:03:14 +00002170 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002171 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2172 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2173 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002174 AIX/4)
2175 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002176 AIX/5)
2177 if test `uname -r` -eq 1; then
2178 define_xopen_source=no
2179 fi
2180 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002181 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2182 # defining NI_NUMERICHOST.
2183 QNX/6.3.2)
2184 define_xopen_source=no
2185 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002186
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002187esac
2188
2189if test $define_xopen_source = yes
2190then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002191 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2192 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002193 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2194 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002195 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002196 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002197
2198cat >>confdefs.h <<\_ACEOF
2199#define _XOPEN_SOURCE 500
2200_ACEOF
2201
2202 ;;
2203 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002204
2205cat >>confdefs.h <<\_ACEOF
2206#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002207_ACEOF
2208
Skip Montanarof0d5f792004-08-15 14:08:23 +00002209 ;;
2210 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002211
2212 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2213 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2214 # several APIs are not declared. Since this is also needed in some
2215 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002216 # except for Solaris 10, where it must not be defined,
2217 # as it implies XPG4.2
2218 case $ac_sys_system/$ac_sys_release in
2219 SunOS/5.10)
2220 ;;
2221 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002222
2223cat >>confdefs.h <<\_ACEOF
2224#define _XOPEN_SOURCE_EXTENDED 1
2225_ACEOF
2226
Martin v. Löwis7dece662005-11-26 11:38:24 +00002227 ;;
2228 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002229
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002230
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002231cat >>confdefs.h <<\_ACEOF
2232#define _POSIX_C_SOURCE 200112L
2233_ACEOF
2234
2235
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002236fi
2237
Guido van Rossum91922671997-10-09 20:24:13 +00002238#
2239# SGI compilers allow the specification of the both the ABI and the
2240# ISA on the command line. Depending on the values of these switches,
2241# different and often incompatable code will be generated.
2242#
2243# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2244# thus supply support for various ABI/ISA combinations. The MACHDEP
2245# variable is also adjusted.
2246#
2247
2248if test ! -z "$SGI_ABI"
2249then
2250 CC="cc $SGI_ABI"
2251 LDFLAGS="$SGI_ABI $LDFLAGS"
2252 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2253fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002254{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2255echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002256
Jack Jansen6b08a402004-06-03 12:41:45 +00002257# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2258# it may influence the way we can build extensions, so distutils
2259# needs to check it
2260
Thomas Wouters477c8d52006-05-27 19:21:47 +00002261
Jack Jansen6b08a402004-06-03 12:41:45 +00002262CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002263EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002264
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002265{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2266echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002267ac_sys_machine=`uname -m`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002268{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2269echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002270
Guido van Rossum627b2d71993-12-24 10:39:16 +00002271# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002272
2273# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2274# for debug/optimization stuff. BASECFLAGS is for flags that are required
2275# just to get things to compile and link. Users are free to override OPT
2276# when running configure or make. The build should not break if they do.
2277# BASECFLAGS should generally not be messed with, however.
2278
2279# XXX shouldn't some/most/all of this code be merged with the stuff later
2280# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002281{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2282echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002284# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002285if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002286 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002287 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002288 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002289 without_gcc=yes;;
2290 yes) CC=gcc
2291 without_gcc=no;;
2292 *) CC=$withval
2293 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002294 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002295else
Martin v. Löwis11437992002-04-12 09:54:03 +00002296
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002297 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002298 AIX*) CC=cc_r
2299 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002300 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002301 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002302fi
2303
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002304{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2305echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002306
Guido van Rossum8b131c51995-03-09 14:10:13 +00002307# If the user switches compilers, we can't believe the cache
2308if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2309then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002310 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002311(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002312echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002313(it is also a good idea to do 'make clean' before compiling)" >&2;}
2314 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002315fi
2316
Martin v. Löwis11437992002-04-12 09:54:03 +00002317ac_ext=c
2318ac_cpp='$CPP $CPPFLAGS'
2319ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2320ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2321ac_compiler_gnu=$ac_cv_c_compiler_gnu
2322if test -n "$ac_tool_prefix"; then
2323 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2324set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002325{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002327if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002329else
2330 if test -n "$CC"; then
2331 ac_cv_prog_CC="$CC" # Let the user override the test.
2332else
Martin v. Löwis11437992002-04-12 09:54:03 +00002333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2334for as_dir in $PATH
2335do
2336 IFS=$as_save_IFS
2337 test -z "$as_dir" && as_dir=.
2338 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002340 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002342 break 2
2343 fi
2344done
2345done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002347
Jack Jansendd19cf82001-12-06 22:36:17 +00002348fi
2349fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002350CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002351if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002352 { echo "$as_me:$LINENO: result: $CC" >&5
2353echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002354else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002355 { echo "$as_me:$LINENO: result: no" >&5
2356echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002357fi
2358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359
Martin v. Löwis11437992002-04-12 09:54:03 +00002360fi
2361if test -z "$ac_cv_prog_CC"; then
2362 ac_ct_CC=$CC
2363 # Extract the first word of "gcc", so it can be a program name with args.
2364set dummy gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002365{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2366echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002367if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002368 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002369else
2370 if test -n "$ac_ct_CC"; then
2371 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2372else
2373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2374for as_dir in $PATH
2375do
2376 IFS=$as_save_IFS
2377 test -z "$as_dir" && as_dir=.
2378 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002380 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002381 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002382 break 2
2383 fi
2384done
2385done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002386IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002387
2388fi
2389fi
2390ac_ct_CC=$ac_cv_prog_ac_ct_CC
2391if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002392 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2393echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002394else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002395 { echo "$as_me:$LINENO: result: no" >&5
2396echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002397fi
2398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399 if test "x$ac_ct_CC" = x; then
2400 CC=""
2401 else
2402 case $cross_compiling:$ac_tool_warned in
2403yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002404{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2405whose name does not start with the host triplet. If you think this
2406configuration is useful to you, please write to autoconf@gnu.org." >&5
2407echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2408whose name does not start with the host triplet. If you think this
2409configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410ac_tool_warned=yes ;;
2411esac
2412 CC=$ac_ct_CC
2413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002414else
2415 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002416fi
2417
Jack Jansendd19cf82001-12-06 22:36:17 +00002418if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002419 if test -n "$ac_tool_prefix"; then
2420 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002421set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002422{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2423echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002424if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002425 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002426else
2427 if test -n "$CC"; then
2428 ac_cv_prog_CC="$CC" # Let the user override the test.
2429else
Martin v. Löwis11437992002-04-12 09:54:03 +00002430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2431for as_dir in $PATH
2432do
2433 IFS=$as_save_IFS
2434 test -z "$as_dir" && as_dir=.
2435 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002438 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002439 break 2
2440 fi
2441done
2442done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445fi
2446fi
2447CC=$ac_cv_prog_CC
2448if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002449 { echo "$as_me:$LINENO: result: $CC" >&5
2450echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002451else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002452 { echo "$as_me:$LINENO: result: no" >&5
2453echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002454fi
2455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002458fi
2459if test -z "$CC"; then
2460 # Extract the first word of "cc", so it can be a program name with args.
2461set dummy cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002462{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2463echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002464if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002466else
2467 if test -n "$CC"; then
2468 ac_cv_prog_CC="$CC" # Let the user override the test.
2469else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002470 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2472for as_dir in $PATH
2473do
2474 IFS=$as_save_IFS
2475 test -z "$as_dir" && as_dir=.
2476 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2479 ac_prog_rejected=yes
2480 continue
2481 fi
2482 ac_cv_prog_CC="cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002483 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 break 2
2485 fi
2486done
2487done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002489
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002490if test $ac_prog_rejected = yes; then
2491 # We found a bogon in the path, so make sure we never use it.
2492 set dummy $ac_cv_prog_CC
2493 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002495 # We chose a different compiler from the bogus one.
2496 # However, it has the same basename, so the bogon will be chosen
2497 # first if we set CC to just the basename; use the full file name.
2498 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002500 fi
2501fi
2502fi
2503fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002504CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002505if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002506 { echo "$as_me:$LINENO: result: $CC" >&5
2507echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002508else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002509 { echo "$as_me:$LINENO: result: no" >&5
2510echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002511fi
2512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513
Martin v. Löwis11437992002-04-12 09:54:03 +00002514fi
2515if test -z "$CC"; then
2516 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 do
2519 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2520set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002521{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2522echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002523if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002524 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002525else
2526 if test -n "$CC"; then
2527 ac_cv_prog_CC="$CC" # Let the user override the test.
2528else
Martin v. Löwis11437992002-04-12 09:54:03 +00002529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2530for as_dir in $PATH
2531do
2532 IFS=$as_save_IFS
2533 test -z "$as_dir" && as_dir=.
2534 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002537 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002539 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002540done
2541done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
2544fi
2545fi
2546CC=$ac_cv_prog_CC
2547if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002548 { echo "$as_me:$LINENO: result: $CC" >&5
2549echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002550else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002551 { echo "$as_me:$LINENO: result: no" >&5
2552echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002553fi
2554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 test -n "$CC" && break
2557 done
2558fi
2559if test -z "$CC"; then
2560 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002562do
2563 # Extract the first word of "$ac_prog", so it can be a program name with args.
2564set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002565{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2566echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002567if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002568 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002569else
2570 if test -n "$ac_ct_CC"; then
2571 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2572else
2573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2574for as_dir in $PATH
2575do
2576 IFS=$as_save_IFS
2577 test -z "$as_dir" && as_dir=.
2578 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002581 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 break 2
2583 fi
2584done
2585done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588fi
2589fi
2590ac_ct_CC=$ac_cv_prog_ac_ct_CC
2591if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002592 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2593echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002594else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002595 { echo "$as_me:$LINENO: result: no" >&5
2596echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002597fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 test -n "$ac_ct_CC" && break
2601done
Michael W. Hudson54241132001-12-07 15:38:26 +00002602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 if test "x$ac_ct_CC" = x; then
2604 CC=""
2605 else
2606 case $cross_compiling:$ac_tool_warned in
2607yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002608{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2609whose name does not start with the host triplet. If you think this
2610configuration is useful to you, please write to autoconf@gnu.org." >&5
2611echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2612whose name does not start with the host triplet. If you think this
2613configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614ac_tool_warned=yes ;;
2615esac
2616 CC=$ac_ct_CC
2617 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002618fi
2619
2620fi
2621
2622
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002623test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002624See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002625echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002626See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002627 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002628
2629# Provide some information about the compiler.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002630echo "$as_me:$LINENO: checking for C compiler version" >&5
2631ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632{ (ac_try="$ac_compiler --version >&5"
2633case "(($ac_try" in
2634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2635 *) ac_try_echo=$ac_try;;
2636esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642{ (ac_try="$ac_compiler -v >&5"
2643case "(($ac_try" in
2644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2645 *) ac_try_echo=$ac_try;;
2646esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652{ (ac_try="$ac_compiler -V >&5"
2653case "(($ac_try" in
2654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2655 *) ac_try_echo=$ac_try;;
2656esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 (exit $ac_status); }
2662
2663cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002664/* confdefs.h. */
2665_ACEOF
2666cat confdefs.h >>conftest.$ac_ext
2667cat >>conftest.$ac_ext <<_ACEOF
2668/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002669
Martin v. Löwis11437992002-04-12 09:54:03 +00002670int
2671main ()
2672{
2673
2674 ;
2675 return 0;
2676}
2677_ACEOF
2678ac_clean_files_save=$ac_clean_files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002679ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002680# Try to create an executable without -o first, disregard a.out.
2681# It will help us diagnose broken compilers, and finding out an intuition
2682# of exeext.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002683{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2684echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2685ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2686#
2687# List of possible output files, starting from the most likely.
2688# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2689# only as a last resort. b.out is created by i960 compilers.
2690ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2691#
2692# The IRIX 6 linker writes into existing files which may not be
2693# executable, retaining their permissions. Remove them first so a
2694# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695ac_rmfiles=
2696for ac_file in $ac_files
2697do
2698 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002699 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2701 esac
2702done
2703rm -f $ac_rmfiles
2704
2705if { (ac_try="$ac_link_default"
2706case "(($ac_try" in
2707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2708 *) ac_try_echo=$ac_try;;
2709esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002711 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002715 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2716# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2717# in a Makefile. We should not override ac_cv_exeext if it was cached,
2718# so that the user can short-circuit this test for compilers unknown to
2719# Autoconf.
2720for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002721do
2722 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002724 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002725 ;;
2726 [ab].out )
2727 # We found the default executable, but exeext='' is most
2728 # certainly right.
2729 break;;
2730 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002731 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2732 then :; else
2733 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2734 fi
2735 # We set ac_cv_exeext here because the later test for it is not
2736 # safe: cross compilers may not add the suffix if given an `-o'
2737 # argument, so we may need to know it at that point already.
2738 # Even if this section looks crufty: it has the advantage of
2739 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002740 break;;
2741 * )
2742 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 esac
2744done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745test "$ac_cv_exeext" = no && ac_cv_exeext=
2746
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002747else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748 ac_file=''
2749fi
2750
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002751{ echo "$as_me:$LINENO: result: $ac_file" >&5
2752echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753if test -z "$ac_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002755sed 's/^/| /' conftest.$ac_ext >&5
2756
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002757{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002758See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002759echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002760See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002761 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002762fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002763
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002764ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002767# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002768{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2769echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002770# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2771# If not cross compiling, check that we can run a simple program.
2772if test "$cross_compiling" != yes; then
2773 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774 { (case "(($ac_try" in
2775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2776 *) ac_try_echo=$ac_try;;
2777esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002779 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 (exit $ac_status); }; }; then
2783 cross_compiling=no
2784 else
2785 if test "$cross_compiling" = maybe; then
2786 cross_compiling=yes
2787 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002788 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002789If you meant to cross compile, use \`--host'.
2790See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002791echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002792If you meant to cross compile, use \`--host'.
2793See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002794 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002795 fi
2796 fi
2797fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002798{ echo "$as_me:$LINENO: result: yes" >&5
2799echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002800
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002801rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002802ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002803# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002805{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2806echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2807{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2808echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002809
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002810{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2811echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002812if { (ac_try="$ac_link"
2813case "(($ac_try" in
2814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2815 *) ac_try_echo=$ac_try;;
2816esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002818 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002819 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002821 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002822 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2823# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2824# work properly (i.e., refer to `conftest.exe'), while it won't with
2825# `rm'.
2826for ac_file in conftest.exe conftest conftest.*; do
2827 test -f "$ac_file" || continue
2828 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002829 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002830 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2831 break;;
2832 * ) break;;
2833 esac
2834done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002835else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002836 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002837See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002838echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002839See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002840 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002841fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002842
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002843rm -f conftest$ac_cv_exeext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002844{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2845echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002846
2847rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002848EXEEXT=$ac_cv_exeext
2849ac_exeext=$EXEEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002850{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2851echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002852if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002853 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002854else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002855 cat >conftest.$ac_ext <<_ACEOF
2856/* confdefs.h. */
2857_ACEOF
2858cat confdefs.h >>conftest.$ac_ext
2859cat >>conftest.$ac_ext <<_ACEOF
2860/* end confdefs.h. */
2861
2862int
2863main ()
2864{
2865
2866 ;
2867 return 0;
2868}
2869_ACEOF
2870rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002871if { (ac_try="$ac_compile"
2872case "(($ac_try" in
2873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2874 *) ac_try_echo=$ac_try;;
2875esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002877 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002881 for ac_file in conftest.o conftest.obj conftest.*; do
2882 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002884 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002885 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2886 break;;
2887 esac
2888done
2889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002891sed 's/^/| /' conftest.$ac_ext >&5
2892
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002893{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002894See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002895echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002896See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002897 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002898fi
2899
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002900rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002901fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002902{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2903echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002904OBJEXT=$ac_cv_objext
2905ac_objext=$OBJEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002906{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2907echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002908if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002909 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002910else
2911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002912/* confdefs.h. */
2913_ACEOF
2914cat confdefs.h >>conftest.$ac_ext
2915cat >>conftest.$ac_ext <<_ACEOF
2916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Martin v. Löwis11437992002-04-12 09:54:03 +00002918int
2919main ()
2920{
2921#ifndef __GNUC__
2922 choke me
2923#endif
2924
2925 ;
2926 return 0;
2927}
2928_ACEOF
2929rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002930if { (ac_try="$ac_compile"
2931case "(($ac_try" in
2932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2933 *) ac_try_echo=$ac_try;;
2934esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002938 grep -v '^ *+' conftest.er1 >conftest.err
2939 rm -f conftest.er1
2940 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942 (exit $ac_status); } && {
2943 test -z "$ac_c_werror_flag" ||
2944 test ! -s conftest.err
2945 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002946 ac_compiler_gnu=yes
2947else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002949sed 's/^/| /' conftest.$ac_ext >&5
2950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002951 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002953
2954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002955ac_cv_c_compiler_gnu=$ac_compiler_gnu
2956
2957fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002958{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2959echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2960GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002961ac_test_CFLAGS=${CFLAGS+set}
2962ac_save_CFLAGS=$CFLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002963{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2964echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002965if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002966 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002967else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968 ac_save_c_werror_flag=$ac_c_werror_flag
2969 ac_c_werror_flag=yes
2970 ac_cv_prog_cc_g=no
2971 CFLAGS="-g"
2972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002973/* confdefs.h. */
2974_ACEOF
2975cat confdefs.h >>conftest.$ac_ext
2976cat >>conftest.$ac_ext <<_ACEOF
2977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
Martin v. Löwis11437992002-04-12 09:54:03 +00002979int
2980main ()
2981{
2982
2983 ;
2984 return 0;
2985}
2986_ACEOF
2987rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988if { (ac_try="$ac_compile"
2989case "(($ac_try" in
2990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2991 *) ac_try_echo=$ac_try;;
2992esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002996 grep -v '^ *+' conftest.er1 >conftest.err
2997 rm -f conftest.er1
2998 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000 (exit $ac_status); } && {
3001 test -z "$ac_c_werror_flag" ||
3002 test ! -s conftest.err
3003 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003004 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003005else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003007sed 's/^/| /' conftest.$ac_ext >&5
3008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009 CFLAGS=""
3010 cat >conftest.$ac_ext <<_ACEOF
3011/* confdefs.h. */
3012_ACEOF
3013cat confdefs.h >>conftest.$ac_ext
3014cat >>conftest.$ac_ext <<_ACEOF
3015/* end confdefs.h. */
3016
3017int
3018main ()
3019{
3020
3021 ;
3022 return 0;
3023}
3024_ACEOF
3025rm -f conftest.$ac_objext
3026if { (ac_try="$ac_compile"
3027case "(($ac_try" in
3028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3029 *) ac_try_echo=$ac_try;;
3030esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003032 (eval "$ac_compile") 2>conftest.er1
3033 ac_status=$?
3034 grep -v '^ *+' conftest.er1 >conftest.err
3035 rm -f conftest.er1
3036 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038 (exit $ac_status); } && {
3039 test -z "$ac_c_werror_flag" ||
3040 test ! -s conftest.err
3041 } && test -s conftest.$ac_objext; then
3042 :
3043else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003044 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045sed 's/^/| /' conftest.$ac_ext >&5
3046
3047 ac_c_werror_flag=$ac_save_c_werror_flag
3048 CFLAGS="-g"
3049 cat >conftest.$ac_ext <<_ACEOF
3050/* confdefs.h. */
3051_ACEOF
3052cat confdefs.h >>conftest.$ac_ext
3053cat >>conftest.$ac_ext <<_ACEOF
3054/* end confdefs.h. */
3055
3056int
3057main ()
3058{
3059
3060 ;
3061 return 0;
3062}
3063_ACEOF
3064rm -f conftest.$ac_objext
3065if { (ac_try="$ac_compile"
3066case "(($ac_try" in
3067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3068 *) ac_try_echo=$ac_try;;
3069esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071 (eval "$ac_compile") 2>conftest.er1
3072 ac_status=$?
3073 grep -v '^ *+' conftest.er1 >conftest.err
3074 rm -f conftest.er1
3075 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003077 (exit $ac_status); } && {
3078 test -z "$ac_c_werror_flag" ||
3079 test ! -s conftest.err
3080 } && test -s conftest.$ac_objext; then
3081 ac_cv_prog_cc_g=yes
3082else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003083 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003084sed 's/^/| /' conftest.$ac_ext >&5
3085
3086
Guido van Rossum627b2d71993-12-24 10:39:16 +00003087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003088
3089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091
3092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3093fi
3094
3095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3096 ac_c_werror_flag=$ac_save_c_werror_flag
3097fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003098{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3099echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003100if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003101 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003102elif test $ac_cv_prog_cc_g = yes; then
3103 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003104 CFLAGS="-g -O2"
3105 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003106 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003107 fi
3108else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003109 if test "$GCC" = yes; then
3110 CFLAGS="-O2"
3111 else
3112 CFLAGS=
3113 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003114fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003115{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3116echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003118 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003119else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003120 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003121ac_save_CC=$CC
3122cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003123/* confdefs.h. */
3124_ACEOF
3125cat confdefs.h >>conftest.$ac_ext
3126cat >>conftest.$ac_ext <<_ACEOF
3127/* end confdefs.h. */
3128#include <stdarg.h>
3129#include <stdio.h>
3130#include <sys/types.h>
3131#include <sys/stat.h>
3132/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3133struct buf { int x; };
3134FILE * (*rcsopen) (struct buf *, struct stat *, int);
3135static char *e (p, i)
3136 char **p;
3137 int i;
3138{
3139 return p[i];
3140}
3141static char *f (char * (*g) (char **, int), char **p, ...)
3142{
3143 char *s;
3144 va_list v;
3145 va_start (v,p);
3146 s = g (p, va_arg (v,int));
3147 va_end (v);
3148 return s;
3149}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003150
3151/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3152 function prototypes and stuff, but not '\xHH' hex character constants.
3153 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003155 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3156 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003157 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003158int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003160/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3161 inside strings and character constants. */
3162#define FOO(x) 'x'
3163int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3164
Skip Montanaro6dead952003-09-25 14:50:04 +00003165int test (int i, double x);
3166struct s1 {int (*f) (int a);};
3167struct s2 {int (*f) (double a);};
3168int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3169int argc;
3170char **argv;
3171int
3172main ()
3173{
3174return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3175 ;
3176 return 0;
3177}
3178_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3180 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003181do
3182 CC="$ac_save_CC $ac_arg"
3183 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184if { (ac_try="$ac_compile"
3185case "(($ac_try" in
3186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3187 *) ac_try_echo=$ac_try;;
3188esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003192 grep -v '^ *+' conftest.er1 >conftest.err
3193 rm -f conftest.er1
3194 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 (exit $ac_status); } && {
3197 test -z "$ac_c_werror_flag" ||
3198 test ! -s conftest.err
3199 } && test -s conftest.$ac_objext; then
3200 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003201else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003203sed 's/^/| /' conftest.$ac_ext >&5
3204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205
Skip Montanaro6dead952003-09-25 14:50:04 +00003206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207
3208rm -f core conftest.err conftest.$ac_objext
3209 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003210done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003212CC=$ac_save_CC
3213
3214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215# AC_CACHE_VAL
3216case "x$ac_cv_prog_cc_c89" in
3217 x)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003218 { echo "$as_me:$LINENO: result: none needed" >&5
3219echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220 xno)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003221 { echo "$as_me:$LINENO: result: unsupported" >&5
3222echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003223 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003225 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3226echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003227esac
3228
Skip Montanaro6dead952003-09-25 14:50:04 +00003229
Martin v. Löwis11437992002-04-12 09:54:03 +00003230ac_ext=c
3231ac_cpp='$CPP $CPPFLAGS'
3232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3234ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003236
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003237
3238
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003239{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3240echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003242# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003243if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003245
3246 case $withval in
3247 no) with_cxx_main=no
3248 MAINCC='$(CC)';;
3249 yes) with_cxx_main=yes
3250 MAINCC='$(CXX)';;
3251 *) with_cxx_main=yes
3252 MAINCC=$withval
3253 if test -z "$CXX"
3254 then
3255 CXX=$withval
3256 fi;;
3257 esac
3258else
3259
3260 with_cxx_main=no
3261 MAINCC='$(CC)'
3262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003263fi
3264
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003265{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3266echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003267
3268preset_cxx="$CXX"
3269if test -z "$CXX"
3270then
3271 case "$CC" in
3272 gcc) # Extract the first word of "g++", so it can be a program name with args.
3273set dummy g++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003274{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003277 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003278else
3279 case $CXX in
3280 [\\/]* | ?:[\\/]*)
3281 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3282 ;;
3283 *)
3284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3285for as_dir in notfound
3286do
3287 IFS=$as_save_IFS
3288 test -z "$as_dir" && as_dir=.
3289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003291 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003293 break 2
3294 fi
3295done
3296done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003298
3299 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3300 ;;
3301esac
3302fi
3303CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003304if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003305 { echo "$as_me:$LINENO: result: $CXX" >&5
3306echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003307else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003308 { echo "$as_me:$LINENO: result: no" >&5
3309echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003312 ;;
3313 cc) # Extract the first word of "c++", so it can be a program name with args.
3314set dummy c++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003315{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003317if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003318 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003319else
3320 case $CXX in
3321 [\\/]* | ?:[\\/]*)
3322 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3323 ;;
3324 *)
3325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3326for as_dir in notfound
3327do
3328 IFS=$as_save_IFS
3329 test -z "$as_dir" && as_dir=.
3330 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003332 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003333 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003334 break 2
3335 fi
3336done
3337done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003339
3340 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3341 ;;
3342esac
3343fi
3344CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003345if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003346 { echo "$as_me:$LINENO: result: $CXX" >&5
3347echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003348else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003349 { echo "$as_me:$LINENO: result: no" >&5
3350echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003352
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003353 ;;
3354 esac
3355 if test "$CXX" = "notfound"
3356 then
3357 CXX=""
3358 fi
3359fi
3360if test -z "$CXX"
3361then
3362 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3363do
3364 # Extract the first word of "$ac_prog", so it can be a program name with args.
3365set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003366{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003368if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003369 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003370else
3371 if test -n "$CXX"; then
3372 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3373else
3374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3375for as_dir in $PATH
3376do
3377 IFS=$as_save_IFS
3378 test -z "$as_dir" && as_dir=.
3379 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003380 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003381 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003382 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003383 break 2
3384 fi
3385done
3386done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003387IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003388
3389fi
3390fi
3391CXX=$ac_cv_prog_CXX
3392if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003393 { echo "$as_me:$LINENO: result: $CXX" >&5
3394echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003395else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003396 { echo "$as_me:$LINENO: result: no" >&5
3397echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003398fi
3399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003400
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003401 test -n "$CXX" && break
3402done
3403test -n "$CXX" || CXX="notfound"
3404
3405 if test "$CXX" = "notfound"
3406 then
3407 CXX=""
3408 fi
3409fi
3410if test "$preset_cxx" != "$CXX"
3411then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003412 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003413
3414 By default, distutils will build C++ extension modules with \"$CXX\".
3415 If this is not intended, then set CXX on the configure command line.
3416 " >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003417echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003418
3419 By default, distutils will build C++ extension modules with \"$CXX\".
3420 If this is not intended, then set CXX on the configure command line.
3421 " >&2;}
3422fi
3423
3424
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003425# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003426
3427ac_ext=c
3428ac_cpp='$CPP $CPPFLAGS'
3429ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3430ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3431ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003432{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3433echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003434# On Suns, sometimes $CPP names a directory.
3435if test -n "$CPP" && test -d "$CPP"; then
3436 CPP=
3437fi
3438if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003440 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003441else
Martin v. Löwis11437992002-04-12 09:54:03 +00003442 # Double quotes because CPP needs to be expanded
3443 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3444 do
3445 ac_preproc_ok=false
3446for ac_c_preproc_warn_flag in '' yes
3447do
3448 # Use a header file that comes with gcc, so configuring glibc
3449 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003450 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3451 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003452 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 # not just through cpp. "Syntax error" is here to catch this case.
3454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003455/* confdefs.h. */
3456_ACEOF
3457cat confdefs.h >>conftest.$ac_ext
3458cat >>conftest.$ac_ext <<_ACEOF
3459/* end confdefs.h. */
3460#ifdef __STDC__
3461# include <limits.h>
3462#else
3463# include <assert.h>
3464#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003465 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003466_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467if { (ac_try="$ac_cpp conftest.$ac_ext"
3468case "(($ac_try" in
3469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3470 *) ac_try_echo=$ac_try;;
3471esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003475 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 rm -f conftest.er1
3477 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479 (exit $ac_status); } >/dev/null && {
3480 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3481 test ! -s conftest.err
3482 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003483 :
3484else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003486sed 's/^/| /' conftest.$ac_ext >&5
3487
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 # Broken: fails on valid input.
3489continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491
Martin v. Löwis11437992002-04-12 09:54:03 +00003492rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 # can be detected and how.
3496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003497/* confdefs.h. */
3498_ACEOF
3499cat confdefs.h >>conftest.$ac_ext
3500cat >>conftest.$ac_ext <<_ACEOF
3501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003502#include <ac_nonexistent.h>
3503_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504if { (ac_try="$ac_cpp conftest.$ac_ext"
3505case "(($ac_try" in
3506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3507 *) ac_try_echo=$ac_try;;
3508esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003510 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003512 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 rm -f conftest.er1
3514 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003516 (exit $ac_status); } >/dev/null && {
3517 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3518 test ! -s conftest.err
3519 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 # Broken: success on invalid input.
3521continue
3522else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003524sed 's/^/| /' conftest.$ac_ext >&5
3525
Martin v. Löwis11437992002-04-12 09:54:03 +00003526 # Passes both tests.
3527ac_preproc_ok=:
3528break
3529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530
Martin v. Löwis11437992002-04-12 09:54:03 +00003531rm -f conftest.err conftest.$ac_ext
3532
3533done
3534# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3535rm -f conftest.err conftest.$ac_ext
3536if $ac_preproc_ok; then
3537 break
3538fi
3539
3540 done
3541 ac_cv_prog_CPP=$CPP
3542
3543fi
3544 CPP=$ac_cv_prog_CPP
3545else
3546 ac_cv_prog_CPP=$CPP
3547fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003548{ echo "$as_me:$LINENO: result: $CPP" >&5
3549echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003550ac_preproc_ok=false
3551for ac_c_preproc_warn_flag in '' yes
3552do
3553 # Use a header file that comes with gcc, so configuring glibc
3554 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003555 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3556 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 # On the NeXT, cc -E runs the code through the compiler's parser,
3558 # not just through cpp. "Syntax error" is here to catch this case.
3559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003560/* confdefs.h. */
3561_ACEOF
3562cat confdefs.h >>conftest.$ac_ext
3563cat >>conftest.$ac_ext <<_ACEOF
3564/* end confdefs.h. */
3565#ifdef __STDC__
3566# include <limits.h>
3567#else
3568# include <assert.h>
3569#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003570 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572if { (ac_try="$ac_cpp conftest.$ac_ext"
3573case "(($ac_try" in
3574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3575 *) ac_try_echo=$ac_try;;
3576esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003580 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 rm -f conftest.er1
3582 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584 (exit $ac_status); } >/dev/null && {
3585 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3586 test ! -s conftest.err
3587 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 :
3589else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003591sed 's/^/| /' conftest.$ac_ext >&5
3592
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 # Broken: fails on valid input.
3594continue
3595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596
Martin v. Löwis11437992002-04-12 09:54:03 +00003597rm -f conftest.err conftest.$ac_ext
3598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003600 # can be detected and how.
3601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003602/* confdefs.h. */
3603_ACEOF
3604cat confdefs.h >>conftest.$ac_ext
3605cat >>conftest.$ac_ext <<_ACEOF
3606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003607#include <ac_nonexistent.h>
3608_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609if { (ac_try="$ac_cpp conftest.$ac_ext"
3610case "(($ac_try" in
3611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3612 *) ac_try_echo=$ac_try;;
3613esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003617 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 rm -f conftest.er1
3619 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621 (exit $ac_status); } >/dev/null && {
3622 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3623 test ! -s conftest.err
3624 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 # Broken: success on invalid input.
3626continue
3627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003629sed 's/^/| /' conftest.$ac_ext >&5
3630
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 # Passes both tests.
3632ac_preproc_ok=:
3633break
3634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635
Martin v. Löwis11437992002-04-12 09:54:03 +00003636rm -f conftest.err conftest.$ac_ext
3637
3638done
3639# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3640rm -f conftest.err conftest.$ac_ext
3641if $ac_preproc_ok; then
3642 :
3643else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003644 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003645See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003646echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003647See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003648 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650
3651ac_ext=c
3652ac_cpp='$CPP $CPPFLAGS'
3653ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3654ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3655ac_compiler_gnu=$ac_cv_c_compiler_gnu
3656
3657
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003658{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3659echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003661 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003662else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003663 # Extract the first word of "grep ggrep" to use in msg output
3664if test -z "$GREP"; then
3665set dummy grep ggrep; ac_prog_name=$2
3666if test "${ac_cv_path_GREP+set}" = set; then
3667 echo $ECHO_N "(cached) $ECHO_C" >&6
3668else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 ac_path_GREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003670# Loop through the user's path and test for each of PROGNAME-LIST
3671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
3676 for ac_prog in grep ggrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003677 for ac_exec_ext in '' $ac_executable_extensions; do
3678 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3679 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3680 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681 # Check for GNU $ac_path_GREP
3682case `"$ac_path_GREP" --version 2>&1` in
3683*GNU*)
3684 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3685*)
3686 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003687 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 while :
3689 do
3690 cat "conftest.in" "conftest.in" >"conftest.tmp"
3691 mv "conftest.tmp" "conftest.in"
3692 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003693 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3695 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3696 ac_count=`expr $ac_count + 1`
3697 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3698 # Best one so far, save it but keep looking for a better one
3699 ac_cv_path_GREP="$ac_path_GREP"
3700 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003701 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702 # 10*(2^10) chars as input seems more than enough
3703 test $ac_count -gt 10 && break
3704 done
3705 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3706esac
3707
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003708
3709 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710 done
3711done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003712
3713done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003715
3716
3717fi
3718
3719GREP="$ac_cv_path_GREP"
3720if test -z "$GREP"; then
3721 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3722echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003724fi
3725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726else
3727 ac_cv_path_GREP=$GREP
3728fi
3729
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003732{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3733echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734 GREP="$ac_cv_path_GREP"
3735
3736
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003737{ echo "$as_me:$LINENO: checking for egrep" >&5
3738echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003740 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741else
3742 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3743 then ac_cv_path_EGREP="$GREP -E"
3744 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003745 # Extract the first word of "egrep" to use in msg output
3746if test -z "$EGREP"; then
3747set dummy egrep; ac_prog_name=$2
3748if test "${ac_cv_path_EGREP+set}" = set; then
3749 echo $ECHO_N "(cached) $ECHO_C" >&6
3750else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 ac_path_EGREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003752# Loop through the user's path and test for each of PROGNAME-LIST
3753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
3758 for ac_prog in egrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
3760 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3761 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3762 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763 # Check for GNU $ac_path_EGREP
3764case `"$ac_path_EGREP" --version 2>&1` in
3765*GNU*)
3766 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3767*)
3768 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003769 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 while :
3771 do
3772 cat "conftest.in" "conftest.in" >"conftest.tmp"
3773 mv "conftest.tmp" "conftest.in"
3774 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003775 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3777 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3778 ac_count=`expr $ac_count + 1`
3779 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3780 # Best one so far, save it but keep looking for a better one
3781 ac_cv_path_EGREP="$ac_path_EGREP"
3782 ac_path_EGREP_max=$ac_count
3783 fi
3784 # 10*(2^10) chars as input seems more than enough
3785 test $ac_count -gt 10 && break
3786 done
3787 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3788esac
3789
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003790
3791 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792 done
3793done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003794
3795done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003797
3798
3799fi
3800
3801EGREP="$ac_cv_path_EGREP"
3802if test -z "$EGREP"; then
3803 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3804echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003806fi
3807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808else
3809 ac_cv_path_EGREP=$EGREP
3810fi
3811
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 fi
3814fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003815{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3816echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003818
3819
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003820
3821{ echo "$as_me:$LINENO: checking for AIX" >&5
3822echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3823cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00003824/* confdefs.h. */
3825_ACEOF
3826cat confdefs.h >>conftest.$ac_ext
3827cat >>conftest.$ac_ext <<_ACEOF
3828/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003829#ifdef _AIX
3830 yes
Benjamin Petersona8332062009-09-11 22:36:27 +00003831#endif
3832
Benjamin Petersona8332062009-09-11 22:36:27 +00003833_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3835 $EGREP "yes" >/dev/null 2>&1; then
3836 { echo "$as_me:$LINENO: result: yes" >&5
3837echo "${ECHO_T}yes" >&6; }
Benjamin Petersona8332062009-09-11 22:36:27 +00003838cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003839#define _ALL_SOURCE 1
3840_ACEOF
3841
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003842else
3843 { echo "$as_me:$LINENO: result: no" >&5
3844echo "${ECHO_T}no" >&6; }
3845fi
Ronald Oussoren79a93512010-04-18 19:08:47 +00003846rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00003847
3848
3849
3850# Check for unsupported systems
3851case $ac_sys_system/$ac_sys_release in
3852atheos*|Linux*/1*)
3853 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3854 echo See README for details.
3855 exit 1;;
3856esac
3857
3858
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003859{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3860echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003861
3862# Check whether --with-suffix was given.
3863if test "${with_suffix+set}" = set; then
3864 withval=$with_suffix;
3865 case $withval in
3866 no) EXEEXT=;;
3867 yes) EXEEXT=.exe;;
3868 *) EXEEXT=$withval;;
3869 esac
3870fi
3871
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003872{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3873echo "${ECHO_T}$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003874
3875# Test whether we're running on a non-case-sensitive system, in which
3876# case we give a warning if no ext is given
3877
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003878{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3879echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003880if test ! -d CaseSensitiveTestDir; then
3881mkdir CaseSensitiveTestDir
3882fi
3883
3884if test -d casesensitivetestdir
3885then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003886 { echo "$as_me:$LINENO: result: yes" >&5
3887echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003888 BUILDEXEEXT=.exe
3889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003890 { echo "$as_me:$LINENO: result: no" >&5
3891echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003892 BUILDEXEEXT=$EXEEXT
3893fi
3894rmdir CaseSensitiveTestDir
3895
3896case $MACHDEP in
3897bsdos*)
3898 case $CC in
3899 gcc) CC="$CC -D_HAVE_BSDI";;
3900 esac;;
3901esac
3902
3903case $ac_sys_system in
3904hp*|HP*)
3905 case $CC in
3906 cc|*/cc) CC="$CC -Ae";;
3907 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00003908SunOS*)
3909 # Some functions have a prototype only with that define, e.g. confstr
3910
3911cat >>confdefs.h <<\_ACEOF
3912#define __EXTENSIONS__ 1
3913_ACEOF
3914
3915 ;;
3916esac
3917
3918
3919
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003920{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3921echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003922if test -z "$LIBRARY"
3923then
3924 LIBRARY='libpython$(VERSION).a'
3925fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003926{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3927echo "${ECHO_T}$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003928
3929# LDLIBRARY is the name of the library to link against (as opposed to the
3930# name of the library into which to insert object files). BLDLIBRARY is also
3931# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3932# is blank as the main program is not linked directly against LDLIBRARY.
3933# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3934# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3935# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3936# DLLLIBRARY is the shared (i.e., DLL) library.
3937#
3938# RUNSHARED is used to run shared python without installed libraries
3939#
3940# INSTSONAME is the name of the shared library that will be use to install
3941# on the system - some systems like version suffix, others don't
3942
3943
3944
3945
3946
3947
3948LDLIBRARY="$LIBRARY"
3949BLDLIBRARY='$(LDLIBRARY)'
3950INSTSONAME='$(LDLIBRARY)'
3951DLLLIBRARY=''
3952LDLIBRARYDIR=''
3953RUNSHARED=''
3954
3955# LINKCC is the command that links the python executable -- default is $(CC).
3956# If CXX is set, and if it is needed to link a main function that was
3957# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3958# python might then depend on the C++ runtime
3959# This is altered for AIX in order to build the export list before
3960# linking.
3961
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003962{ echo "$as_me:$LINENO: checking LINKCC" >&5
3963echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003964if test -z "$LINKCC"
3965then
3966 LINKCC='$(PURIFY) $(MAINCC)'
3967 case $ac_sys_system in
3968 AIX*)
3969 exp_extra="\"\""
3970 if test $ac_sys_release -ge 5 -o \
3971 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3972 exp_extra="."
3973 fi
3974 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00003975 QNX*)
3976 # qcc must be used because the other compilers do not
3977 # support -N.
3978 LINKCC=qcc;;
3979 esac
3980fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003981{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3982echo "${ECHO_T}$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003983
3984# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3985# make sure we default having it set to "no": this is used by
3986# distutils.unixccompiler to know if it should add --enable-new-dtags
3987# to linker command lines, and failing to detect GNU ld simply results
3988# in the same bahaviour as before.
3989
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003990{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3991echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003992ac_prog=ld
3993if test "$GCC" = yes; then
3994 ac_prog=`$CC -print-prog-name=ld`
3995fi
3996case `"$ac_prog" -V 2>&1 < /dev/null` in
3997 *GNU*)
3998 GNULD=yes;;
3999 *)
4000 GNULD=no;;
4001esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004002{ echo "$as_me:$LINENO: result: $GNULD" >&5
4003echo "${ECHO_T}$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004004
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004005{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4006echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004007# Check whether --enable-shared was given.
4008if test "${enable_shared+set}" = set; then
4009 enableval=$enable_shared;
4010fi
4011
4012
4013if test -z "$enable_shared"
4014then
4015 case $ac_sys_system in
4016 CYGWIN* | atheos*)
4017 enable_shared="yes";;
4018 *)
4019 enable_shared="no";;
4020 esac
4021fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004022{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4023echo "${ECHO_T}$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004024
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004025{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4026echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004027# Check whether --enable-profiling was given.
4028if test "${enable_profiling+set}" = set; then
4029 enableval=$enable_profiling; ac_save_cc="$CC"
4030 CC="$CC -pg"
4031 if test "$cross_compiling" = yes; then
4032 ac_enable_profiling="no"
4033else
4034 cat >conftest.$ac_ext <<_ACEOF
4035/* confdefs.h. */
4036_ACEOF
4037cat confdefs.h >>conftest.$ac_ext
4038cat >>conftest.$ac_ext <<_ACEOF
4039/* end confdefs.h. */
4040int main() { return 0; }
4041_ACEOF
4042rm -f conftest$ac_exeext
4043if { (ac_try="$ac_link"
4044case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004049 (eval "$ac_link") 2>&5
4050 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4053 { (case "(($ac_try" in
4054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4055 *) ac_try_echo=$ac_try;;
4056esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004058 (eval "$ac_try") 2>&5
4059 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004061 (exit $ac_status); }; }; then
4062 ac_enable_profiling="yes"
4063else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004064 echo "$as_me: program exited with status $ac_status" >&5
4065echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004066sed 's/^/| /' conftest.$ac_ext >&5
4067
4068( exit $ac_status )
4069ac_enable_profiling="no"
4070fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4072fi
4073
4074
4075 CC="$ac_save_cc"
4076fi
4077
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004078{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4079echo "${ECHO_T}$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004080
4081case "$ac_enable_profiling" in
4082 "yes")
4083 BASECFLAGS="-pg $BASECFLAGS"
4084 LDFLAGS="-pg $LDFLAGS"
4085 ;;
4086esac
4087
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004088{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4089echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004090
4091# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4092# library that we build, but we do not want to link against it (we
4093# will find it with a -framework option). For this reason there is an
4094# extra variable BLDLIBRARY against which Python and the extension
4095# modules are linked, BLDLIBRARY. This is normally the same as
4096# LDLIBRARY, but empty for MacOSX framework builds.
4097if test "$enable_framework"
4098then
4099 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4100 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4101 BLDLIBRARY=''
4102else
4103 BLDLIBRARY='$(LDLIBRARY)'
4104fi
4105
4106# Other platforms follow
4107if test $enable_shared = "yes"; then
4108
4109cat >>confdefs.h <<\_ACEOF
4110#define Py_ENABLE_SHARED 1
4111_ACEOF
4112
4113 case $ac_sys_system in
4114 CYGWIN*)
4115 LDLIBRARY='libpython$(VERSION).dll.a'
4116 DLLLIBRARY='libpython$(VERSION).dll'
4117 ;;
4118 SunOS*)
4119 LDLIBRARY='libpython$(VERSION).so'
4120 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4121 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4122 INSTSONAME="$LDLIBRARY".$SOVERSION
4123 ;;
4124 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4125 LDLIBRARY='libpython$(VERSION).so'
4126 BLDLIBRARY='-L. -lpython$(VERSION)'
4127 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4128 case $ac_sys_system in
4129 FreeBSD*)
4130 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4131 ;;
4132 esac
4133 INSTSONAME="$LDLIBRARY".$SOVERSION
4134 ;;
4135 hp*|HP*)
4136 case `uname -m` in
4137 ia64)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 ;;
4140 *)
4141 LDLIBRARY='libpython$(VERSION).sl'
4142 ;;
4143 esac
4144 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4145 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4146 ;;
4147 OSF*)
4148 LDLIBRARY='libpython$(VERSION).so'
4149 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4150 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4151 ;;
4152 atheos*)
4153 LDLIBRARY='libpython$(VERSION).so'
4154 BLDLIBRARY='-L. -lpython$(VERSION)'
4155 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4156 ;;
4157 Darwin*)
4158 LDLIBRARY='libpython$(VERSION).dylib'
4159 BLDLIBRARY='-L. -lpython$(VERSION)'
4160 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4161 ;;
4162
4163 esac
4164else # shared is disabled
4165 case $ac_sys_system in
4166 CYGWIN*)
4167 BLDLIBRARY='$(LIBRARY)'
4168 LDLIBRARY='libpython$(VERSION).dll.a'
4169 ;;
4170 esac
4171fi
4172
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004173{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4174echo "${ECHO_T}$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004175
4176if test -n "$ac_tool_prefix"; then
4177 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4178set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004179{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4180echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004181if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004182 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004183else
4184 if test -n "$RANLIB"; then
4185 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4186else
4187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4188for as_dir in $PATH
4189do
4190 IFS=$as_save_IFS
4191 test -z "$as_dir" && as_dir=.
4192 for ac_exec_ext in '' $ac_executable_extensions; do
4193 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4194 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004195 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004196 break 2
4197 fi
4198done
4199done
4200IFS=$as_save_IFS
4201
4202fi
4203fi
4204RANLIB=$ac_cv_prog_RANLIB
4205if test -n "$RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004206 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4207echo "${ECHO_T}$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004208else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004209 { echo "$as_me:$LINENO: result: no" >&5
4210echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004211fi
4212
4213
4214fi
4215if test -z "$ac_cv_prog_RANLIB"; then
4216 ac_ct_RANLIB=$RANLIB
4217 # Extract the first word of "ranlib", so it can be a program name with args.
4218set dummy ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004219{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4220echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004221if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004222 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004223else
4224 if test -n "$ac_ct_RANLIB"; then
4225 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4226else
4227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4228for as_dir in $PATH
4229do
4230 IFS=$as_save_IFS
4231 test -z "$as_dir" && as_dir=.
4232 for ac_exec_ext in '' $ac_executable_extensions; do
4233 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4234 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004235 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004236 break 2
4237 fi
4238done
4239done
4240IFS=$as_save_IFS
4241
4242fi
4243fi
4244ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4245if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004246 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4247echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004248else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004249 { echo "$as_me:$LINENO: result: no" >&5
4250echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004251fi
4252
4253 if test "x$ac_ct_RANLIB" = x; then
4254 RANLIB=":"
4255 else
4256 case $cross_compiling:$ac_tool_warned in
4257yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004258{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4259whose name does not start with the host triplet. If you think this
4260configuration is useful to you, please write to autoconf@gnu.org." >&5
4261echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4262whose name does not start with the host triplet. If you think this
4263configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004264ac_tool_warned=yes ;;
4265esac
4266 RANLIB=$ac_ct_RANLIB
4267 fi
4268else
4269 RANLIB="$ac_cv_prog_RANLIB"
4270fi
4271
4272
4273for ac_prog in ar aal
4274do
4275 # Extract the first word of "$ac_prog", so it can be a program name with args.
4276set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004279if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004280 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004281else
4282 if test -n "$AR"; then
4283 ac_cv_prog_AR="$AR" # Let the user override the test.
4284else
4285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4286for as_dir in $PATH
4287do
4288 IFS=$as_save_IFS
4289 test -z "$as_dir" && as_dir=.
4290 for ac_exec_ext in '' $ac_executable_extensions; do
4291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4292 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004294 break 2
4295 fi
4296done
4297done
4298IFS=$as_save_IFS
4299
4300fi
4301fi
4302AR=$ac_cv_prog_AR
4303if test -n "$AR"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004304 { echo "$as_me:$LINENO: result: $AR" >&5
4305echo "${ECHO_T}$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004306else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004307 { echo "$as_me:$LINENO: result: no" >&5
4308echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004309fi
4310
4311
4312 test -n "$AR" && break
4313done
4314test -n "$AR" || AR="ar"
4315
4316
4317# tweak ARFLAGS only if the user didn't set it on the command line
4318
4319if test -z "$ARFLAGS"
4320then
4321 ARFLAGS="rc"
4322fi
4323
4324
4325# Extract the first word of "svnversion", so it can be a program name with args.
4326set dummy svnversion; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004327{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4328echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004329if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004330 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004331else
4332 if test -n "$SVNVERSION"; then
4333 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4334else
4335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4336for as_dir in $PATH
4337do
4338 IFS=$as_save_IFS
4339 test -z "$as_dir" && as_dir=.
4340 for ac_exec_ext in '' $ac_executable_extensions; do
4341 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4342 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004343 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004344 break 2
4345 fi
4346done
4347done
4348IFS=$as_save_IFS
4349
4350 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4351fi
4352fi
4353SVNVERSION=$ac_cv_prog_SVNVERSION
4354if test -n "$SVNVERSION"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004355 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4356echo "${ECHO_T}$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004357else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004358 { echo "$as_me:$LINENO: result: no" >&5
4359echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004360fi
4361
4362
4363if test $SVNVERSION = found
4364then
4365 SVNVERSION="svnversion \$(srcdir)"
4366else
4367 SVNVERSION="echo Unversioned directory"
4368fi
4369
4370case $MACHDEP in
4371bsdos*|hp*|HP*)
4372 # install -d does not work on BSDI or HP-UX
4373 if test -z "$INSTALL"
4374 then
4375 INSTALL="${srcdir}/install-sh -c"
4376 fi
4377esac
4378ac_aux_dir=
4379for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4380 if test -f "$ac_dir/install-sh"; then
4381 ac_aux_dir=$ac_dir
4382 ac_install_sh="$ac_aux_dir/install-sh -c"
4383 break
4384 elif test -f "$ac_dir/install.sh"; then
4385 ac_aux_dir=$ac_dir
4386 ac_install_sh="$ac_aux_dir/install.sh -c"
4387 break
4388 elif test -f "$ac_dir/shtool"; then
4389 ac_aux_dir=$ac_dir
4390 ac_install_sh="$ac_aux_dir/shtool install -c"
4391 break
4392 fi
4393done
4394if test -z "$ac_aux_dir"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004395 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4396echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004397 { (exit 1); exit 1; }; }
4398fi
4399
4400# These three variables are undocumented and unsupported,
4401# and are intended to be withdrawn in a future Autoconf release.
4402# They can cause serious problems if a builder's source tree is in a directory
4403# whose full name contains unusual characters.
4404ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4405ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4406ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4407
4408
4409# Find a good install program. We prefer a C program (faster),
4410# so one script is as good as another. But avoid the broken or
4411# incompatible versions:
4412# SysV /etc/install, /usr/sbin/install
4413# SunOS /usr/etc/install
4414# IRIX /sbin/install
4415# AIX /bin/install
4416# AmigaOS /C/install, which installs bootblocks on floppy discs
4417# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4418# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4419# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4420# OS/2's system install, which has a completely different semantic
4421# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004422{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4423echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004424if test -z "$INSTALL"; then
4425if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004426 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004427else
4428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4429for as_dir in $PATH
4430do
4431 IFS=$as_save_IFS
4432 test -z "$as_dir" && as_dir=.
4433 # Account for people who put trailing slashes in PATH elements.
4434case $as_dir/ in
4435 ./ | .// | /cC/* | \
4436 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4437 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4438 /usr/ucb/* ) ;;
4439 *)
4440 # OSF1 and SCO ODT 3.0 have their own names for install.
4441 # Don't use installbsd from OSF since it installs stuff as root
4442 # by default.
4443 for ac_prog in ginstall scoinst install; do
4444 for ac_exec_ext in '' $ac_executable_extensions; do
4445 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4446 if test $ac_prog = install &&
4447 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4448 # AIX install. It has an incompatible calling convention.
4449 :
4450 elif test $ac_prog = install &&
4451 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4452 # program-specific install script used by HP pwplus--don't use.
4453 :
4454 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004455 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4456 break 3
Antoine Pitrou20327222009-05-24 20:39:11 +00004457 fi
4458 fi
4459 done
4460 done
4461 ;;
4462esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004463done
4464IFS=$as_save_IFS
4465
Antoine Pitrou20327222009-05-24 20:39:11 +00004466
4467fi
4468 if test "${ac_cv_path_install+set}" = set; then
4469 INSTALL=$ac_cv_path_install
4470 else
4471 # As a last resort, use the slow shell script. Don't cache a
4472 # value for INSTALL within a source directory, because that will
4473 # break other packages using the cache if that directory is
4474 # removed, or if the value is a relative name.
4475 INSTALL=$ac_install_sh
4476 fi
4477fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004478{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4479echo "${ECHO_T}$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004480
4481# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4482# It thinks the first close brace ends the variable substitution.
4483test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4484
4485test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4486
4487test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4488
4489
4490# Not every filesystem supports hard links
4491
4492if test -z "$LN" ; then
4493 case $ac_sys_system in
4494 CYGWIN*) LN="ln -s";;
4495 atheos*) LN="ln -s";;
4496 *) LN=ln;;
4497 esac
4498fi
4499
4500# Check for --with-pydebug
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004501{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4502echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004503
4504# Check whether --with-pydebug was given.
4505if test "${with_pydebug+set}" = set; then
4506 withval=$with_pydebug;
4507if test "$withval" != no
4508then
4509
4510cat >>confdefs.h <<\_ACEOF
4511#define Py_DEBUG 1
4512_ACEOF
4513
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004514 { echo "$as_me:$LINENO: result: yes" >&5
4515echo "${ECHO_T}yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00004516 Py_DEBUG='true'
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004517else { echo "$as_me:$LINENO: result: no" >&5
4518echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00004519fi
4520else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004521 { echo "$as_me:$LINENO: result: no" >&5
4522echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004523fi
4524
4525
4526# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4527# merged with this chunk of code?
4528
4529# Optimizer/debugger flags
4530# ------------------------
4531# (The following bit of code is complicated enough - please keep things
4532# indented properly. Just pretend you're editing Python code. ;-)
4533
4534# There are two parallel sets of case statements below, one that checks to
4535# see if OPT was set and one that does BASECFLAGS setting based upon
4536# compiler and platform. BASECFLAGS tweaks need to be made even if the
4537# user set OPT.
4538
4539# tweak OPT based on compiler and platform, only if the user didn't set
4540# it on the command line
4541
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004542if test "${OPT-unset}" = "unset"
Antoine Pitrou20327222009-05-24 20:39:11 +00004543then
4544 case $GCC in
4545 yes)
4546 if test "$CC" != 'g++' ; then
4547 STRICT_PROTO="-Wstrict-prototypes"
4548 fi
4549 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4550 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4551 WRAP="-fwrapv"
4552 fi
4553 case $ac_cv_prog_cc_g in
4554 yes)
4555 if test "$Py_DEBUG" = 'true' ; then
4556 # Optimization messes up debuggers, so turn it off for
4557 # debug builds.
4558 OPT="-g -Wall $STRICT_PROTO"
4559 else
4560 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4561 fi
4562 ;;
4563 *)
4564 OPT="-O3 -Wall $STRICT_PROTO"
4565 ;;
4566 esac
4567 case $ac_sys_system in
4568 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4569 ;;
4570 esac
4571 ;;
4572
4573 *)
4574 OPT="-O"
4575 ;;
4576 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004577fi
4578
4579
4580
4581# The -arch flags for universal builds on OSX
4582UNIVERSAL_ARCH_FLAGS=
4583
4584
4585# tweak BASECFLAGS based on compiler and platform
4586case $GCC in
4587yes)
4588 # Python violates C99 rules, by casting between incompatible
4589 # pointer types. GCC may generate bad code as a result of that,
4590 # so use -fno-strict-aliasing if supported.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004591 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4592echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004593 ac_save_cc="$CC"
4594 CC="$CC -fno-strict-aliasing"
4595 if test "$cross_compiling" = yes; then
4596 ac_cv_no_strict_aliasing_ok=no
4597else
4598 cat >conftest.$ac_ext <<_ACEOF
4599/* confdefs.h. */
4600_ACEOF
4601cat confdefs.h >>conftest.$ac_ext
4602cat >>conftest.$ac_ext <<_ACEOF
4603/* end confdefs.h. */
4604int main() { return 0; }
4605_ACEOF
4606rm -f conftest$ac_exeext
4607if { (ac_try="$ac_link"
4608case "(($ac_try" in
4609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4610 *) ac_try_echo=$ac_try;;
4611esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004613 (eval "$ac_link") 2>&5
4614 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004616 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4617 { (case "(($ac_try" in
4618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4619 *) ac_try_echo=$ac_try;;
4620esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004622 (eval "$ac_try") 2>&5
4623 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004625 (exit $ac_status); }; }; then
4626 ac_cv_no_strict_aliasing_ok=yes
4627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004628 echo "$as_me: program exited with status $ac_status" >&5
4629echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004630sed 's/^/| /' conftest.$ac_ext >&5
4631
4632( exit $ac_status )
4633ac_cv_no_strict_aliasing_ok=no
4634fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4636fi
4637
4638
4639 CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004640 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4641echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004642 if test $ac_cv_no_strict_aliasing_ok = yes
4643 then
4644 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4645 fi
4646
4647 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4648 # support. Without this, treatment of subnormals doesn't follow
4649 # the standard.
4650 case $ac_sys_machine in
4651 alpha*)
4652 BASECFLAGS="$BASECFLAGS -mieee"
4653 ;;
4654 esac
4655
4656 case $ac_sys_system in
4657 SCO_SV*)
4658 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4659 ;;
4660 # is there any other compiler on Darwin besides gcc?
4661 Darwin*)
4662 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4663 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren79a93512010-04-18 19:08:47 +00004664 if test "${CC}" = gcc
4665 then
4666 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4667echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4668 case "${UNIVERSALSDK}" in
4669 */MacOSX10.4u.sdk)
4670 # Build using 10.4 SDK, force usage of gcc when the
4671 # compiler is gcc, otherwise the user will get very
4672 # confusing error messages when building on OSX 10.6
4673 CC=gcc-4.0
4674 CPP=cpp-4.0
4675 ;;
4676 esac
4677 { echo "$as_me:$LINENO: result: $CC" >&5
4678echo "${ECHO_T}$CC" >&6; }
4679 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004680
4681
4682 if test "${enable_universalsdk}"; then
4683 UNIVERSAL_ARCH_FLAGS=""
4684 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
Antoine Pitrou20327222009-05-24 20:39:11 +00004685 ARCH_RUN_32BIT=""
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004686 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Antoine Pitrou20327222009-05-24 20:39:11 +00004687
4688 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004689 ARCH_RUN_32BIT="true"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004690 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Antoine Pitrou20327222009-05-24 20:39:11 +00004691
4692 elif test "$UNIVERSAL_ARCHS" = "all" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004693 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004694 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4695 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
4696 LIPO_64BIT_FLAGS="-extract x86_64 -extract ppc64"
Antoine Pitrou20327222009-05-24 20:39:11 +00004697
Ronald Oussoren856624d2009-09-08 07:13:53 +00004698 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004699 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004700 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4701 LIPO_32BIT_FLAGS="-extract i386"
4702 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004703
4704 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004705 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004706 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4707 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
4708 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004709
Antoine Pitrou20327222009-05-24 20:39:11 +00004710 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004711 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4712echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004713 { (exit 1); exit 1; }; }
4714
4715 fi
4716
4717
Ronald Oussoren79a93512010-04-18 19:08:47 +00004718 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4719 if test "${UNIVERSALSDK}" != "/"
4720 then
4721 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
4722 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
4723 CPPFLAGSFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Antoine Pitrou20327222009-05-24 20:39:11 +00004724 fi
4725 fi
4726
4727 # Calculate the right deployment target for this build.
4728 #
4729 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4730 if test ${cur_target} '>' 10.2; then
4731 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004732 if test ${enable_universalsdk}; then
4733 if test "${UNIVERSAL_ARCHS}" = "all"; then
4734 # Ensure that the default platform for a
4735 # 4-way universal build is OSX 10.5,
4736 # that's the first OS release where
4737 # 4-way builds make sense.
4738 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00004739
4740 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4741 cur_target='10.5'
4742
4743 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4744 cur_target='10.5'
4745
4746 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4747 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004748 fi
4749 else
Ronald Oussoren175a8842010-02-11 13:40:06 +00004750 if test `/usr/bin/arch` = "i386"; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004751 # On Intel macs default to a deployment
4752 # target of 10.4, that's the first OSX
4753 # release with Intel support.
4754 cur_target="10.4"
4755 fi
4756 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004757 fi
4758 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4759
4760 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4761 # environment with a value that is the same as what we'll use
4762 # in the Makefile to ensure that we'll get the same compiler
4763 # environment during configure and build time.
4764 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4765 export MACOSX_DEPLOYMENT_TARGET
4766 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4767
4768 ;;
4769 OSF*)
4770 BASECFLAGS="$BASECFLAGS -mieee"
4771 ;;
4772 esac
4773 ;;
4774
4775*)
4776 case $ac_sys_system in
4777 OpenUNIX*|UnixWare*)
4778 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4779 ;;
4780 OSF*)
4781 BASECFLAGS="$BASECFLAGS -ieee -std"
4782 ;;
4783 SCO_SV*)
4784 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4785 ;;
4786 esac
4787 ;;
4788esac
4789
4790if test "$Py_DEBUG" = 'true'; then
4791 :
4792else
4793 OPT="-DNDEBUG $OPT"
4794fi
4795
4796if test "$ac_arch_flags"
4797then
4798 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4799fi
4800
4801# disable check for icc since it seems to pass, but generates a warning
4802if test "$CC" = icc
4803then
4804 ac_cv_opt_olimit_ok=no
4805fi
4806
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004807{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4808echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004809if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004810 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004811else
4812 ac_save_cc="$CC"
4813CC="$CC -OPT:Olimit=0"
4814if test "$cross_compiling" = yes; then
4815 ac_cv_opt_olimit_ok=no
4816else
4817 cat >conftest.$ac_ext <<_ACEOF
4818/* confdefs.h. */
4819_ACEOF
4820cat confdefs.h >>conftest.$ac_ext
4821cat >>conftest.$ac_ext <<_ACEOF
4822/* end confdefs.h. */
4823int main() { return 0; }
4824_ACEOF
4825rm -f conftest$ac_exeext
4826if { (ac_try="$ac_link"
4827case "(($ac_try" in
4828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4829 *) ac_try_echo=$ac_try;;
4830esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004832 (eval "$ac_link") 2>&5
4833 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4836 { (case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4839esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004841 (eval "$ac_try") 2>&5
4842 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004844 (exit $ac_status); }; }; then
4845 ac_cv_opt_olimit_ok=yes
4846else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004847 echo "$as_me: program exited with status $ac_status" >&5
4848echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004849sed 's/^/| /' conftest.$ac_ext >&5
4850
4851( exit $ac_status )
4852ac_cv_opt_olimit_ok=no
4853fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4855fi
4856
4857
4858CC="$ac_save_cc"
4859fi
4860
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004861{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4862echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004863if test $ac_cv_opt_olimit_ok = yes; then
4864 case $ac_sys_system in
4865 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4866 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4867 # environment?
4868 Darwin*)
4869 ;;
4870 *)
4871 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4872 ;;
4873 esac
4874else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004875 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4876echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004877 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004878 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004879else
4880 ac_save_cc="$CC"
4881 CC="$CC -Olimit 1500"
4882 if test "$cross_compiling" = yes; then
4883 ac_cv_olimit_ok=no
4884else
4885 cat >conftest.$ac_ext <<_ACEOF
4886/* confdefs.h. */
4887_ACEOF
4888cat confdefs.h >>conftest.$ac_ext
4889cat >>conftest.$ac_ext <<_ACEOF
4890/* end confdefs.h. */
4891int main() { return 0; }
4892_ACEOF
4893rm -f conftest$ac_exeext
4894if { (ac_try="$ac_link"
4895case "(($ac_try" in
4896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4897 *) ac_try_echo=$ac_try;;
4898esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004900 (eval "$ac_link") 2>&5
4901 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004903 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4904 { (case "(($ac_try" in
4905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4906 *) ac_try_echo=$ac_try;;
4907esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004909 (eval "$ac_try") 2>&5
4910 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004912 (exit $ac_status); }; }; then
4913 ac_cv_olimit_ok=yes
4914else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004915 echo "$as_me: program exited with status $ac_status" >&5
4916echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004917sed 's/^/| /' conftest.$ac_ext >&5
4918
4919( exit $ac_status )
4920ac_cv_olimit_ok=no
4921fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4923fi
4924
4925
4926 CC="$ac_save_cc"
4927fi
4928
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004929 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4930echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004931 if test $ac_cv_olimit_ok = yes; then
4932 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4933 fi
4934fi
4935
4936# Check whether GCC supports PyArg_ParseTuple format
4937if test "$GCC" = "yes"
4938then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004939 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4940echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004941 save_CFLAGS=$CFLAGS
4942 CFLAGS="$CFLAGS -Werror"
4943 cat >conftest.$ac_ext <<_ACEOF
4944/* confdefs.h. */
4945_ACEOF
4946cat confdefs.h >>conftest.$ac_ext
4947cat >>conftest.$ac_ext <<_ACEOF
4948/* end confdefs.h. */
4949
4950 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4951
4952int
4953main ()
4954{
4955
4956 ;
4957 return 0;
4958}
4959_ACEOF
4960rm -f conftest.$ac_objext
4961if { (ac_try="$ac_compile"
4962case "(($ac_try" in
4963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4964 *) ac_try_echo=$ac_try;;
4965esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004967 (eval "$ac_compile") 2>conftest.er1
4968 ac_status=$?
4969 grep -v '^ *+' conftest.er1 >conftest.err
4970 rm -f conftest.er1
4971 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004973 (exit $ac_status); } && {
4974 test -z "$ac_c_werror_flag" ||
4975 test ! -s conftest.err
4976 } && test -s conftest.$ac_objext; then
4977
4978cat >>confdefs.h <<\_ACEOF
4979#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4980_ACEOF
4981
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004982 { echo "$as_me:$LINENO: result: yes" >&5
4983echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004984else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004985 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004986sed 's/^/| /' conftest.$ac_ext >&5
4987
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004988 { echo "$as_me:$LINENO: result: no" >&5
4989echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004990
4991fi
4992
4993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4994 CFLAGS=$save_CFLAGS
4995fi
4996
4997# On some compilers, pthreads are available without further options
4998# (e.g. MacOS X). On some of these systems, the compiler will not
4999# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5000# So we have to see first whether pthreads are available without
5001# options before we can check whether -Kpthread improves anything.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005002{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5003echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005004if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005005 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005006else
5007 if test "$cross_compiling" = yes; then
5008 ac_cv_pthread_is_default=no
5009else
5010 cat >conftest.$ac_ext <<_ACEOF
5011/* confdefs.h. */
5012_ACEOF
5013cat confdefs.h >>conftest.$ac_ext
5014cat >>conftest.$ac_ext <<_ACEOF
5015/* end confdefs.h. */
5016
5017#include <pthread.h>
5018
5019void* routine(void* p){return NULL;}
5020
5021int main(){
5022 pthread_t p;
5023 if(pthread_create(&p,NULL,routine,NULL)!=0)
5024 return 1;
5025 (void)pthread_detach(p);
5026 return 0;
5027}
5028
5029_ACEOF
5030rm -f conftest$ac_exeext
5031if { (ac_try="$ac_link"
5032case "(($ac_try" in
5033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5034 *) ac_try_echo=$ac_try;;
5035esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005037 (eval "$ac_link") 2>&5
5038 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5041 { (case "(($ac_try" in
5042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5043 *) ac_try_echo=$ac_try;;
5044esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005046 (eval "$ac_try") 2>&5
5047 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005049 (exit $ac_status); }; }; then
5050
5051 ac_cv_pthread_is_default=yes
5052 ac_cv_kthread=no
5053 ac_cv_pthread=no
5054
5055else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005056 echo "$as_me: program exited with status $ac_status" >&5
5057echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005058sed 's/^/| /' conftest.$ac_ext >&5
5059
5060( exit $ac_status )
5061ac_cv_pthread_is_default=no
5062fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5064fi
5065
5066
5067
5068fi
5069
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005070{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5071echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005072
5073
5074if test $ac_cv_pthread_is_default = yes
5075then
5076 ac_cv_kpthread=no
5077else
5078# -Kpthread, if available, provides the right #defines
5079# and linker options to make pthread_create available
5080# Some compilers won't report that they do not support -Kpthread,
5081# so we need to run a program to see whether it really made the
5082# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005083{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5084echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005085if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005086 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005087else
5088 ac_save_cc="$CC"
5089CC="$CC -Kpthread"
5090if test "$cross_compiling" = yes; then
5091 ac_cv_kpthread=no
5092else
5093 cat >conftest.$ac_ext <<_ACEOF
5094/* confdefs.h. */
5095_ACEOF
5096cat confdefs.h >>conftest.$ac_ext
5097cat >>conftest.$ac_ext <<_ACEOF
5098/* end confdefs.h. */
5099
5100#include <pthread.h>
5101
5102void* routine(void* p){return NULL;}
5103
5104int main(){
5105 pthread_t p;
5106 if(pthread_create(&p,NULL,routine,NULL)!=0)
5107 return 1;
5108 (void)pthread_detach(p);
5109 return 0;
5110}
5111
5112_ACEOF
5113rm -f conftest$ac_exeext
5114if { (ac_try="$ac_link"
5115case "(($ac_try" in
5116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5117 *) ac_try_echo=$ac_try;;
5118esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005120 (eval "$ac_link") 2>&5
5121 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5124 { (case "(($ac_try" in
5125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5126 *) ac_try_echo=$ac_try;;
5127esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005129 (eval "$ac_try") 2>&5
5130 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005132 (exit $ac_status); }; }; then
5133 ac_cv_kpthread=yes
5134else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005135 echo "$as_me: program exited with status $ac_status" >&5
5136echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005137sed 's/^/| /' conftest.$ac_ext >&5
5138
5139( exit $ac_status )
5140ac_cv_kpthread=no
5141fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5143fi
5144
5145
5146CC="$ac_save_cc"
5147fi
5148
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005149{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5150echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005151fi
5152
5153if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5154then
5155# -Kthread, if available, provides the right #defines
5156# and linker options to make pthread_create available
5157# Some compilers won't report that they do not support -Kthread,
5158# so we need to run a program to see whether it really made the
5159# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005160{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5161echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005162if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005163 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005164else
5165 ac_save_cc="$CC"
5166CC="$CC -Kthread"
5167if test "$cross_compiling" = yes; then
5168 ac_cv_kthread=no
5169else
5170 cat >conftest.$ac_ext <<_ACEOF
5171/* confdefs.h. */
5172_ACEOF
5173cat confdefs.h >>conftest.$ac_ext
5174cat >>conftest.$ac_ext <<_ACEOF
5175/* end confdefs.h. */
5176
5177#include <pthread.h>
5178
5179void* routine(void* p){return NULL;}
5180
5181int main(){
5182 pthread_t p;
5183 if(pthread_create(&p,NULL,routine,NULL)!=0)
5184 return 1;
5185 (void)pthread_detach(p);
5186 return 0;
5187}
5188
5189_ACEOF
5190rm -f conftest$ac_exeext
5191if { (ac_try="$ac_link"
5192case "(($ac_try" in
5193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5194 *) ac_try_echo=$ac_try;;
5195esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005197 (eval "$ac_link") 2>&5
5198 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005200 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5201 { (case "(($ac_try" in
5202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5203 *) ac_try_echo=$ac_try;;
5204esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005206 (eval "$ac_try") 2>&5
5207 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005209 (exit $ac_status); }; }; then
5210 ac_cv_kthread=yes
5211else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005212 echo "$as_me: program exited with status $ac_status" >&5
5213echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005214sed 's/^/| /' conftest.$ac_ext >&5
5215
5216( exit $ac_status )
5217ac_cv_kthread=no
5218fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5220fi
5221
5222
5223CC="$ac_save_cc"
5224fi
5225
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005226{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5227echo "${ECHO_T}$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005228fi
5229
5230if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5231then
5232# -pthread, if available, provides the right #defines
5233# and linker options to make pthread_create available
5234# Some compilers won't report that they do not support -pthread,
5235# so we need to run a program to see whether it really made the
5236# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005237{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5238echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005239if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005240 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005241else
5242 ac_save_cc="$CC"
5243CC="$CC -pthread"
5244if test "$cross_compiling" = yes; then
5245 ac_cv_pthread=no
5246else
5247 cat >conftest.$ac_ext <<_ACEOF
5248/* confdefs.h. */
5249_ACEOF
5250cat confdefs.h >>conftest.$ac_ext
5251cat >>conftest.$ac_ext <<_ACEOF
5252/* end confdefs.h. */
5253
5254#include <pthread.h>
5255
5256void* routine(void* p){return NULL;}
5257
5258int main(){
5259 pthread_t p;
5260 if(pthread_create(&p,NULL,routine,NULL)!=0)
5261 return 1;
5262 (void)pthread_detach(p);
5263 return 0;
5264}
5265
5266_ACEOF
5267rm -f conftest$ac_exeext
5268if { (ac_try="$ac_link"
5269case "(($ac_try" in
5270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5271 *) ac_try_echo=$ac_try;;
5272esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005274 (eval "$ac_link") 2>&5
5275 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005277 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5278 { (case "(($ac_try" in
5279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5280 *) ac_try_echo=$ac_try;;
5281esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005283 (eval "$ac_try") 2>&5
5284 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005286 (exit $ac_status); }; }; then
5287 ac_cv_pthread=yes
5288else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005289 echo "$as_me: program exited with status $ac_status" >&5
5290echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005291sed 's/^/| /' conftest.$ac_ext >&5
5292
5293( exit $ac_status )
5294ac_cv_pthread=no
5295fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5297fi
5298
5299
5300CC="$ac_save_cc"
5301fi
5302
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005303{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5304echo "${ECHO_T}$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005305fi
5306
5307# If we have set a CC compiler flag for thread support then
5308# check if it works for CXX, too.
5309ac_cv_cxx_thread=no
5310if test ! -z "$CXX"
5311then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005312{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5313echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005314ac_save_cxx="$CXX"
5315
5316if test "$ac_cv_kpthread" = "yes"
5317then
5318 CXX="$CXX -Kpthread"
5319 ac_cv_cxx_thread=yes
5320elif test "$ac_cv_kthread" = "yes"
5321then
5322 CXX="$CXX -Kthread"
5323 ac_cv_cxx_thread=yes
5324elif test "$ac_cv_pthread" = "yes"
5325then
5326 CXX="$CXX -pthread"
5327 ac_cv_cxx_thread=yes
5328fi
5329
5330if test $ac_cv_cxx_thread = yes
5331then
5332 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5333 $CXX -c conftest.$ac_ext 2>&5
5334 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5335 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5336 then
5337 ac_cv_cxx_thread=yes
5338 else
5339 ac_cv_cxx_thread=no
5340 fi
5341 rm -fr conftest*
5342fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005343{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5344echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005345fi
5346CXX="$ac_save_cxx"
5347
5348
5349# checks for header files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005350{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5351echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005352if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005353 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005354else
5355 cat >conftest.$ac_ext <<_ACEOF
5356/* confdefs.h. */
5357_ACEOF
5358cat confdefs.h >>conftest.$ac_ext
5359cat >>conftest.$ac_ext <<_ACEOF
5360/* end confdefs.h. */
5361#include <stdlib.h>
5362#include <stdarg.h>
5363#include <string.h>
5364#include <float.h>
5365
5366int
5367main ()
5368{
5369
5370 ;
5371 return 0;
5372}
5373_ACEOF
5374rm -f conftest.$ac_objext
5375if { (ac_try="$ac_compile"
5376case "(($ac_try" in
5377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5378 *) ac_try_echo=$ac_try;;
5379esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005381 (eval "$ac_compile") 2>conftest.er1
5382 ac_status=$?
5383 grep -v '^ *+' conftest.er1 >conftest.err
5384 rm -f conftest.er1
5385 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005387 (exit $ac_status); } && {
5388 test -z "$ac_c_werror_flag" ||
5389 test ! -s conftest.err
5390 } && test -s conftest.$ac_objext; then
5391 ac_cv_header_stdc=yes
5392else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005393 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005394sed 's/^/| /' conftest.$ac_ext >&5
5395
5396 ac_cv_header_stdc=no
5397fi
5398
5399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5400
5401if test $ac_cv_header_stdc = yes; then
5402 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5403 cat >conftest.$ac_ext <<_ACEOF
5404/* confdefs.h. */
5405_ACEOF
5406cat confdefs.h >>conftest.$ac_ext
5407cat >>conftest.$ac_ext <<_ACEOF
5408/* end confdefs.h. */
5409#include <string.h>
5410
5411_ACEOF
5412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5413 $EGREP "memchr" >/dev/null 2>&1; then
5414 :
5415else
5416 ac_cv_header_stdc=no
5417fi
Ronald Oussoren79a93512010-04-18 19:08:47 +00005418rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005419
5420fi
5421
5422if test $ac_cv_header_stdc = yes; then
5423 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5424 cat >conftest.$ac_ext <<_ACEOF
5425/* confdefs.h. */
5426_ACEOF
5427cat confdefs.h >>conftest.$ac_ext
5428cat >>conftest.$ac_ext <<_ACEOF
5429/* end confdefs.h. */
5430#include <stdlib.h>
5431
5432_ACEOF
5433if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5434 $EGREP "free" >/dev/null 2>&1; then
5435 :
5436else
5437 ac_cv_header_stdc=no
5438fi
Ronald Oussoren79a93512010-04-18 19:08:47 +00005439rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005440
5441fi
5442
5443if test $ac_cv_header_stdc = yes; then
5444 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5445 if test "$cross_compiling" = yes; then
5446 :
5447else
5448 cat >conftest.$ac_ext <<_ACEOF
5449/* confdefs.h. */
5450_ACEOF
5451cat confdefs.h >>conftest.$ac_ext
5452cat >>conftest.$ac_ext <<_ACEOF
5453/* end confdefs.h. */
5454#include <ctype.h>
5455#include <stdlib.h>
5456#if ((' ' & 0x0FF) == 0x020)
5457# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5458# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5459#else
5460# define ISLOWER(c) \
5461 (('a' <= (c) && (c) <= 'i') \
5462 || ('j' <= (c) && (c) <= 'r') \
5463 || ('s' <= (c) && (c) <= 'z'))
5464# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5465#endif
5466
5467#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5468int
5469main ()
5470{
5471 int i;
5472 for (i = 0; i < 256; i++)
5473 if (XOR (islower (i), ISLOWER (i))
5474 || toupper (i) != TOUPPER (i))
5475 return 2;
5476 return 0;
5477}
5478_ACEOF
5479rm -f conftest$ac_exeext
5480if { (ac_try="$ac_link"
5481case "(($ac_try" in
5482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5483 *) ac_try_echo=$ac_try;;
5484esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005486 (eval "$ac_link") 2>&5
5487 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005489 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5490 { (case "(($ac_try" in
5491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5492 *) ac_try_echo=$ac_try;;
5493esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005495 (eval "$ac_try") 2>&5
5496 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005498 (exit $ac_status); }; }; then
5499 :
5500else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005501 echo "$as_me: program exited with status $ac_status" >&5
5502echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005503sed 's/^/| /' conftest.$ac_ext >&5
5504
5505( exit $ac_status )
5506ac_cv_header_stdc=no
5507fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5509fi
5510
5511
5512fi
5513fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005514{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5515echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005516if test $ac_cv_header_stdc = yes; then
5517
5518cat >>confdefs.h <<\_ACEOF
5519#define STDC_HEADERS 1
5520_ACEOF
5521
5522fi
5523
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005524# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5535 inttypes.h stdint.h unistd.h
5536do
5537as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5538{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5539echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5540if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5541 echo $ECHO_N "(cached) $ECHO_C" >&6
5542else
5543 cat >conftest.$ac_ext <<_ACEOF
5544/* confdefs.h. */
5545_ACEOF
5546cat confdefs.h >>conftest.$ac_ext
5547cat >>conftest.$ac_ext <<_ACEOF
5548/* end confdefs.h. */
5549$ac_includes_default
5550
5551#include <$ac_header>
5552_ACEOF
5553rm -f conftest.$ac_objext
5554if { (ac_try="$ac_compile"
5555case "(($ac_try" in
5556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5557 *) ac_try_echo=$ac_try;;
5558esac
5559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5560 (eval "$ac_compile") 2>conftest.er1
5561 ac_status=$?
5562 grep -v '^ *+' conftest.er1 >conftest.err
5563 rm -f conftest.er1
5564 cat conftest.err >&5
5565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5566 (exit $ac_status); } && {
5567 test -z "$ac_c_werror_flag" ||
5568 test ! -s conftest.err
5569 } && test -s conftest.$ac_objext; then
5570 eval "$as_ac_Header=yes"
5571else
5572 echo "$as_me: failed program was:" >&5
5573sed 's/^/| /' conftest.$ac_ext >&5
5574
5575 eval "$as_ac_Header=no"
5576fi
5577
5578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5579fi
5580ac_res=`eval echo '${'$as_ac_Header'}'`
5581 { echo "$as_me:$LINENO: result: $ac_res" >&5
5582echo "${ECHO_T}$ac_res" >&6; }
5583if test `eval echo '${'$as_ac_Header'}'` = yes; then
5584 cat >>confdefs.h <<_ACEOF
5585#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5586_ACEOF
5587
5588fi
5589
5590done
5591
5592
Antoine Pitrou20327222009-05-24 20:39:11 +00005593
Martin v. Löwis11437992002-04-12 09:54:03 +00005594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
Anthony Baxter8a560de2004-10-13 15:30:56 +00005629
Martin v. Löwisc3001752005-01-23 09:27:24 +00005630
Martin v. Löwis11017b12006-01-14 18:12:57 +00005631
Thomas Wouters477c8d52006-05-27 19:21:47 +00005632
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005633
5634
5635
5636
5637
5638
5639
5640
Thomas Wouters89f507f2006-12-13 04:49:30 +00005641
Christian Heimes043d6f62008-01-07 17:19:16 +00005642
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005643
5644
Christian Heimesbbe741d2008-03-28 10:53:29 +00005645
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005646
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005647for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5648fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005649ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005650shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005651unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005652sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5653sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005654sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005655sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005656sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005657sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005658bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005659do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005660as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005661if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005662 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5663echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005664if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005665 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005666fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005667ac_res=`eval echo '${'$as_ac_Header'}'`
5668 { echo "$as_me:$LINENO: result: $ac_res" >&5
5669echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005670else
Martin v. Löwis11437992002-04-12 09:54:03 +00005671 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005672{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5673echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005674cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005675/* confdefs.h. */
5676_ACEOF
5677cat confdefs.h >>conftest.$ac_ext
5678cat >>conftest.$ac_ext <<_ACEOF
5679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005680$ac_includes_default
5681#include <$ac_header>
5682_ACEOF
5683rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005684if { (ac_try="$ac_compile"
5685case "(($ac_try" in
5686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5687 *) ac_try_echo=$ac_try;;
5688esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005692 grep -v '^ *+' conftest.er1 >conftest.err
5693 rm -f conftest.er1
5694 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005696 (exit $ac_status); } && {
5697 test -z "$ac_c_werror_flag" ||
5698 test ! -s conftest.err
5699 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005700 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005701else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005703sed 's/^/| /' conftest.$ac_ext >&5
5704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005705 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005707
5708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005709{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5710echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005711
5712# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005713{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5714echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005715cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005716/* confdefs.h. */
5717_ACEOF
5718cat confdefs.h >>conftest.$ac_ext
5719cat >>conftest.$ac_ext <<_ACEOF
5720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005721#include <$ac_header>
5722_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005723if { (ac_try="$ac_cpp conftest.$ac_ext"
5724case "(($ac_try" in
5725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5726 *) ac_try_echo=$ac_try;;
5727esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005729 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005730 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005731 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005732 rm -f conftest.er1
5733 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005735 (exit $ac_status); } >/dev/null && {
5736 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5737 test ! -s conftest.err
5738 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 ac_header_preproc=yes
5740else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005742sed 's/^/| /' conftest.$ac_ext >&5
5743
Martin v. Löwis11437992002-04-12 09:54:03 +00005744 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005746
Martin v. Löwis11437992002-04-12 09:54:03 +00005747rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005748{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5749echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005750
5751# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005752case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5753 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005754 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5755echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5756 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5757echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005758 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005759 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005760 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005761 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5762echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5763 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5764echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5765 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5766echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5767 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5768echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5769 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5770echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5771 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5772echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005773 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005774## -------------------------------------- ##
5775## Report this to http://bugs.python.org/ ##
5776## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005777_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005778 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005779 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005780esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005781{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5782echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005783if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005784 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005785else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005786 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005787fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005788ac_res=`eval echo '${'$as_ac_Header'}'`
5789 { echo "$as_me:$LINENO: result: $ac_res" >&5
5790echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005791
5792fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005793if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005794 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005795#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005796_ACEOF
5797
5798fi
5799
Guido van Rossum627b2d71993-12-24 10:39:16 +00005800done
5801
Martin v. Löwis11437992002-04-12 09:54:03 +00005802
5803
5804
5805
5806
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005807ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005808for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005809 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5810{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5811echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005812if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005813 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005814else
Martin v. Löwis11437992002-04-12 09:54:03 +00005815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005816/* confdefs.h. */
5817_ACEOF
5818cat confdefs.h >>conftest.$ac_ext
5819cat >>conftest.$ac_ext <<_ACEOF
5820/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005821#include <sys/types.h>
5822#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005823
Martin v. Löwis11437992002-04-12 09:54:03 +00005824int
5825main ()
5826{
5827if ((DIR *) 0)
5828return 0;
5829 ;
5830 return 0;
5831}
5832_ACEOF
5833rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005834if { (ac_try="$ac_compile"
5835case "(($ac_try" in
5836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5837 *) ac_try_echo=$ac_try;;
5838esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005842 grep -v '^ *+' conftest.er1 >conftest.err
5843 rm -f conftest.er1
5844 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005846 (exit $ac_status); } && {
5847 test -z "$ac_c_werror_flag" ||
5848 test ! -s conftest.err
5849 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005850 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005851else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005853sed 's/^/| /' conftest.$ac_ext >&5
5854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005855 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005857
5858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005859fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005860ac_res=`eval echo '${'$as_ac_Header'}'`
5861 { echo "$as_me:$LINENO: result: $ac_res" >&5
5862echo "${ECHO_T}$ac_res" >&6; }
5863if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005864 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005865#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005866_ACEOF
5867
5868ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005869fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005870
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871done
5872# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5873if test $ac_header_dirent = dirent.h; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005874 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5875echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005876if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005877 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878else
Martin v. Löwis11437992002-04-12 09:54:03 +00005879 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005881/* confdefs.h. */
5882_ACEOF
5883cat confdefs.h >>conftest.$ac_ext
5884cat >>conftest.$ac_ext <<_ACEOF
5885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005887/* Override any GCC internal prototype to avoid an error.
5888 Use char because int might match the return type of a GCC
5889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005890#ifdef __cplusplus
5891extern "C"
5892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005893char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005894int
5895main ()
5896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005897return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005898 ;
5899 return 0;
5900}
5901_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005902for ac_lib in '' dir; do
5903 if test -z "$ac_lib"; then
5904 ac_res="none required"
5905 else
5906 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005907 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005908 fi
5909 rm -f conftest.$ac_objext conftest$ac_exeext
5910if { (ac_try="$ac_link"
5911case "(($ac_try" in
5912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5913 *) ac_try_echo=$ac_try;;
5914esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005917 ac_status=$?
5918 grep -v '^ *+' conftest.er1 >conftest.err
5919 rm -f conftest.er1
5920 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005922 (exit $ac_status); } && {
5923 test -z "$ac_c_werror_flag" ||
5924 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005925 } && test -s conftest$ac_exeext &&
5926 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005928else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005929 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005930sed 's/^/| /' conftest.$ac_ext >&5
5931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005932
Thomas Wouters477c8d52006-05-27 19:21:47 +00005933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005934
5935rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5936 conftest$ac_exeext
5937 if test "${ac_cv_search_opendir+set}" = set; then
5938 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005940done
5941if test "${ac_cv_search_opendir+set}" = set; then
5942 :
5943else
5944 ac_cv_search_opendir=no
5945fi
5946rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005947LIBS=$ac_func_search_save_LIBS
5948fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005949{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5950echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005951ac_res=$ac_cv_search_opendir
5952if test "$ac_res" != no; then
5953 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005954
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005956
Michael W. Hudson54241132001-12-07 15:38:26 +00005957else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005958 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5959echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005960if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005961 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005962else
5963 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005965/* confdefs.h. */
5966_ACEOF
5967cat confdefs.h >>conftest.$ac_ext
5968cat >>conftest.$ac_ext <<_ACEOF
5969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005971/* Override any GCC internal prototype to avoid an error.
5972 Use char because int might match the return type of a GCC
5973 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005974#ifdef __cplusplus
5975extern "C"
5976#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005977char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005978int
5979main ()
5980{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005981return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005982 ;
5983 return 0;
5984}
5985_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005986for ac_lib in '' x; do
5987 if test -z "$ac_lib"; then
5988 ac_res="none required"
5989 else
5990 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005991 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005992 fi
5993 rm -f conftest.$ac_objext conftest$ac_exeext
5994if { (ac_try="$ac_link"
5995case "(($ac_try" in
5996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5997 *) ac_try_echo=$ac_try;;
5998esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006000 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006001 ac_status=$?
6002 grep -v '^ *+' conftest.er1 >conftest.err
6003 rm -f conftest.er1
6004 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006006 (exit $ac_status); } && {
6007 test -z "$ac_c_werror_flag" ||
6008 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006009 } && test -s conftest$ac_exeext &&
6010 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006012else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006013 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006014sed 's/^/| /' conftest.$ac_ext >&5
6015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006016
Thomas Wouters477c8d52006-05-27 19:21:47 +00006017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006018
6019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6020 conftest$ac_exeext
6021 if test "${ac_cv_search_opendir+set}" = set; then
6022 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006024done
6025if test "${ac_cv_search_opendir+set}" = set; then
6026 :
6027else
6028 ac_cv_search_opendir=no
6029fi
6030rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006031LIBS=$ac_func_search_save_LIBS
6032fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006033{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6034echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006035ac_res=$ac_cv_search_opendir
6036if test "$ac_res" != no; then
6037 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006039fi
6040
6041fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006042
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006043{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6044echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006046 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047else
6048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006049/* confdefs.h. */
6050_ACEOF
6051cat confdefs.h >>conftest.$ac_ext
6052cat >>conftest.$ac_ext <<_ACEOF
6053/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006055int
6056main ()
6057{
6058return makedev(0, 0);
6059 ;
6060 return 0;
6061}
6062_ACEOF
6063rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064if { (ac_try="$ac_link"
6065case "(($ac_try" in
6066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6067 *) ac_try_echo=$ac_try;;
6068esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006070 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006072 grep -v '^ *+' conftest.er1 >conftest.err
6073 rm -f conftest.er1
6074 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006076 (exit $ac_status); } && {
6077 test -z "$ac_c_werror_flag" ||
6078 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006079 } && test -s conftest$ac_exeext &&
6080 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081 ac_cv_header_sys_types_h_makedev=yes
6082else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006084sed 's/^/| /' conftest.$ac_ext >&5
6085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006086 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006088
6089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091
6092fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006093{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6094echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095
6096if test $ac_cv_header_sys_types_h_makedev = no; then
6097if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006098 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6099echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006101 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006103{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6104echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105else
6106 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006107{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6108echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006110/* confdefs.h. */
6111_ACEOF
6112cat confdefs.h >>conftest.$ac_ext
6113cat >>conftest.$ac_ext <<_ACEOF
6114/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115$ac_includes_default
6116#include <sys/mkdev.h>
6117_ACEOF
6118rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006119if { (ac_try="$ac_compile"
6120case "(($ac_try" in
6121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6122 *) ac_try_echo=$ac_try;;
6123esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006125 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006127 grep -v '^ *+' conftest.er1 >conftest.err
6128 rm -f conftest.er1
6129 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131 (exit $ac_status); } && {
6132 test -z "$ac_c_werror_flag" ||
6133 test ! -s conftest.err
6134 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135 ac_header_compiler=yes
6136else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006138sed 's/^/| /' conftest.$ac_ext >&5
6139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006142
6143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006144{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6145echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146
6147# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006148{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6149echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006151/* confdefs.h. */
6152_ACEOF
6153cat confdefs.h >>conftest.$ac_ext
6154cat >>conftest.$ac_ext <<_ACEOF
6155/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156#include <sys/mkdev.h>
6157_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158if { (ac_try="$ac_cpp conftest.$ac_ext"
6159case "(($ac_try" in
6160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6161 *) ac_try_echo=$ac_try;;
6162esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006166 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167 rm -f conftest.er1
6168 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170 (exit $ac_status); } >/dev/null && {
6171 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6172 test ! -s conftest.err
6173 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174 ac_header_preproc=yes
6175else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006177sed 's/^/| /' conftest.$ac_ext >&5
6178
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179 ac_header_preproc=no
6180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006183{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6184echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185
6186# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006187case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6188 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6192echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006193 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006194 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006195 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006196 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6197echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6198 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6199echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6200 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6201echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6202 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6203echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6204 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6205echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6206 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6207echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006208 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006209## -------------------------------------- ##
6210## Report this to http://bugs.python.org/ ##
6211## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006212_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006213 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006214 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006216{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6217echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006219 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220else
6221 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6222fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006223{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6224echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225
6226fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006227if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228
6229cat >>confdefs.h <<\_ACEOF
6230#define MAJOR_IN_MKDEV 1
6231_ACEOF
6232
6233fi
6234
6235
6236
6237 if test $ac_cv_header_sys_mkdev_h = no; then
6238 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006239 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6240echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006242 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006244{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6245echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246else
6247 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006248{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6249echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006251/* confdefs.h. */
6252_ACEOF
6253cat confdefs.h >>conftest.$ac_ext
6254cat >>conftest.$ac_ext <<_ACEOF
6255/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256$ac_includes_default
6257#include <sys/sysmacros.h>
6258_ACEOF
6259rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260if { (ac_try="$ac_compile"
6261case "(($ac_try" in
6262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6263 *) ac_try_echo=$ac_try;;
6264esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006268 grep -v '^ *+' conftest.er1 >conftest.err
6269 rm -f conftest.er1
6270 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006272 (exit $ac_status); } && {
6273 test -z "$ac_c_werror_flag" ||
6274 test ! -s conftest.err
6275 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276 ac_header_compiler=yes
6277else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006279sed 's/^/| /' conftest.$ac_ext >&5
6280
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006281 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006283
6284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006285{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6286echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287
6288# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006289{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6290echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006292/* confdefs.h. */
6293_ACEOF
6294cat confdefs.h >>conftest.$ac_ext
6295cat >>conftest.$ac_ext <<_ACEOF
6296/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297#include <sys/sysmacros.h>
6298_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006299if { (ac_try="$ac_cpp conftest.$ac_ext"
6300case "(($ac_try" in
6301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6302 *) ac_try_echo=$ac_try;;
6303esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006305 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006306 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006307 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308 rm -f conftest.er1
6309 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006311 (exit $ac_status); } >/dev/null && {
6312 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6313 test ! -s conftest.err
6314 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315 ac_header_preproc=yes
6316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006318sed 's/^/| /' conftest.$ac_ext >&5
6319
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006320 ac_header_preproc=no
6321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006322
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006323rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006324{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6325echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006326
6327# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006328case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6329 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6333echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006334 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006335 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006336 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006337 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6338echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6339 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6340echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6341 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6342echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6343 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6344echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6345 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6346echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6347 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6348echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006349 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006350## -------------------------------------- ##
6351## Report this to http://bugs.python.org/ ##
6352## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006353_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006354 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006355 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006356esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006357{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6358echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006360 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006361else
6362 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6363fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006364{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6365echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366
6367fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006368if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006369
6370cat >>confdefs.h <<\_ACEOF
6371#define MAJOR_IN_SYSMACROS 1
6372_ACEOF
6373
6374fi
6375
6376
6377 fi
6378fi
6379
Michael W. Hudson54241132001-12-07 15:38:26 +00006380
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006381# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006382
6383for ac_header in term.h
6384do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006385as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6386{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6387echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006388if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006389 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006390else
6391 cat >conftest.$ac_ext <<_ACEOF
6392/* confdefs.h. */
6393_ACEOF
6394cat confdefs.h >>conftest.$ac_ext
6395cat >>conftest.$ac_ext <<_ACEOF
6396/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006398#ifdef HAVE_CURSES_H
6399#include <curses.h>
6400#endif
6401
6402
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006403#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006404_ACEOF
6405rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006406if { (ac_try="$ac_compile"
6407case "(($ac_try" in
6408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6409 *) ac_try_echo=$ac_try;;
6410esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006413 ac_status=$?
6414 grep -v '^ *+' conftest.er1 >conftest.err
6415 rm -f conftest.er1
6416 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418 (exit $ac_status); } && {
6419 test -z "$ac_c_werror_flag" ||
6420 test ! -s conftest.err
6421 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006422 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006423else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006424 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006425sed 's/^/| /' conftest.$ac_ext >&5
6426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006427 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006429
6430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006431fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006432ac_res=`eval echo '${'$as_ac_Header'}'`
6433 { echo "$as_me:$LINENO: result: $ac_res" >&5
6434echo "${ECHO_T}$ac_res" >&6; }
6435if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006436 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006437#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006438_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006439
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006440fi
6441
6442done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006443
6444
Martin v. Löwis11017b12006-01-14 18:12:57 +00006445# On Linux, netlink.h requires asm/types.h
6446
6447for ac_header in linux/netlink.h
6448do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006449as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6450{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6451echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006452if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006453 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006454else
6455 cat >conftest.$ac_ext <<_ACEOF
6456/* confdefs.h. */
6457_ACEOF
6458cat confdefs.h >>conftest.$ac_ext
6459cat >>conftest.$ac_ext <<_ACEOF
6460/* end confdefs.h. */
6461
6462#ifdef HAVE_ASM_TYPES_H
6463#include <asm/types.h>
6464#endif
6465#ifdef HAVE_SYS_SOCKET_H
6466#include <sys/socket.h>
6467#endif
6468
6469
6470#include <$ac_header>
6471_ACEOF
6472rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006473if { (ac_try="$ac_compile"
6474case "(($ac_try" in
6475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6476 *) ac_try_echo=$ac_try;;
6477esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006479 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006480 ac_status=$?
6481 grep -v '^ *+' conftest.er1 >conftest.err
6482 rm -f conftest.er1
6483 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006485 (exit $ac_status); } && {
6486 test -z "$ac_c_werror_flag" ||
6487 test ! -s conftest.err
6488 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006489 eval "$as_ac_Header=yes"
6490else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006491 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006492sed 's/^/| /' conftest.$ac_ext >&5
6493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006494 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006496
6497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006498fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006499ac_res=`eval echo '${'$as_ac_Header'}'`
6500 { echo "$as_me:$LINENO: result: $ac_res" >&5
6501echo "${ECHO_T}$ac_res" >&6; }
6502if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006503 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006504#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006505_ACEOF
6506
6507fi
6508
6509done
6510
6511
Guido van Rossum627b2d71993-12-24 10:39:16 +00006512# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006513was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006514{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6515echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006517/* confdefs.h. */
6518_ACEOF
6519cat confdefs.h >>conftest.$ac_ext
6520cat >>conftest.$ac_ext <<_ACEOF
6521/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006522#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006523
6524_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006526 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006527 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006528else
Martin v. Löwis11437992002-04-12 09:54:03 +00006529
6530
6531cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006532#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006533_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006534
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006535
Guido van Rossum627b2d71993-12-24 10:39:16 +00006536fi
Ronald Oussoren79a93512010-04-18 19:08:47 +00006537rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006538
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006539{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6540echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006541
Neal Norwitz11690112002-07-30 01:08:28 +00006542# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006543{ echo "$as_me:$LINENO: checking for makedev" >&5
6544echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006546/* confdefs.h. */
6547_ACEOF
6548cat confdefs.h >>conftest.$ac_ext
6549cat >>conftest.$ac_ext <<_ACEOF
6550/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006551#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006552int
6553main ()
6554{
6555 makedev(0, 0)
6556 ;
6557 return 0;
6558}
6559_ACEOF
6560rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006561if { (ac_try="$ac_link"
6562case "(($ac_try" in
6563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6564 *) ac_try_echo=$ac_try;;
6565esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006567 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006569 grep -v '^ *+' conftest.er1 >conftest.err
6570 rm -f conftest.er1
6571 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006573 (exit $ac_status); } && {
6574 test -z "$ac_c_werror_flag" ||
6575 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006576 } && test -s conftest$ac_exeext &&
6577 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006578 ac_cv_has_makedev=yes
6579else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006581sed 's/^/| /' conftest.$ac_ext >&5
6582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006583 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006585
6586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006587 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006588if test "$ac_cv_has_makedev" = "no"; then
6589 # we didn't link, try if _OSF_SOURCE will allow us to link
6590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006591/* confdefs.h. */
6592_ACEOF
6593cat confdefs.h >>conftest.$ac_ext
6594cat >>conftest.$ac_ext <<_ACEOF
6595/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006596
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006597#define _OSF_SOURCE 1
6598#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006599
Neal Norwitz11690112002-07-30 01:08:28 +00006600int
6601main ()
6602{
6603 makedev(0, 0)
6604 ;
6605 return 0;
6606}
6607_ACEOF
6608rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006609if { (ac_try="$ac_link"
6610case "(($ac_try" in
6611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6612 *) ac_try_echo=$ac_try;;
6613esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006615 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006617 grep -v '^ *+' conftest.er1 >conftest.err
6618 rm -f conftest.er1
6619 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006621 (exit $ac_status); } && {
6622 test -z "$ac_c_werror_flag" ||
6623 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006624 } && test -s conftest$ac_exeext &&
6625 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006626 ac_cv_has_makedev=yes
6627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006629sed 's/^/| /' conftest.$ac_ext >&5
6630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006631 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006633
6634rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006635 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006636 if test "$ac_cv_has_makedev" = "yes"; then
6637
6638cat >>confdefs.h <<\_ACEOF
6639#define _OSF_SOURCE 1
6640_ACEOF
6641
6642 fi
6643fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006644{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6645echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006646if test "$ac_cv_has_makedev" = "yes"; then
6647
6648cat >>confdefs.h <<\_ACEOF
6649#define HAVE_MAKEDEV 1
6650_ACEOF
6651
6652fi
6653
Martin v. Löwis399a6892002-10-04 10:22:02 +00006654# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6655# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6656# defined, but the compiler does not support pragma redefine_extname,
6657# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6658# structures (such as rlimit64) without declaring them. As a
6659# work-around, disable LFS on such configurations
6660
6661use_lfs=yes
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006662{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6663echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006664cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006665/* confdefs.h. */
6666_ACEOF
6667cat confdefs.h >>conftest.$ac_ext
6668cat >>conftest.$ac_ext <<_ACEOF
6669/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006670
6671#define _LARGEFILE_SOURCE 1
6672#define _FILE_OFFSET_BITS 64
6673#include <sys/resource.h>
6674
Martin v. Löwis399a6892002-10-04 10:22:02 +00006675int
6676main ()
6677{
6678struct rlimit foo;
6679 ;
6680 return 0;
6681}
6682_ACEOF
6683rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684if { (ac_try="$ac_compile"
6685case "(($ac_try" in
6686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6687 *) ac_try_echo=$ac_try;;
6688esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006692 grep -v '^ *+' conftest.er1 >conftest.err
6693 rm -f conftest.er1
6694 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696 (exit $ac_status); } && {
6697 test -z "$ac_c_werror_flag" ||
6698 test ! -s conftest.err
6699 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006700 sol_lfs_bug=no
6701else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006703sed 's/^/| /' conftest.$ac_ext >&5
6704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006705 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006707
6708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006709{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6710echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006711if test "$sol_lfs_bug" = "yes"; then
6712 use_lfs=no
6713fi
6714
6715if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006716# Two defines needed to enable largefile support on various platforms
6717# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719cat >>confdefs.h <<\_ACEOF
6720#define _LARGEFILE_SOURCE 1
6721_ACEOF
6722
6723
6724cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006725#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006726_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006727
Martin v. Löwis399a6892002-10-04 10:22:02 +00006728fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006729
Guido van Rossum84e7b241996-08-19 21:59:00 +00006730# Add some code to confdefs.h so that the test for off_t works on SCO
6731cat >> confdefs.h <<\EOF
6732#if defined(SCO_DS)
6733#undef _OFF_T
6734#endif
6735EOF
6736
Guido van Rossumef2255b2000-03-10 22:30:29 +00006737# Type availability checks
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006738{ echo "$as_me:$LINENO: checking for mode_t" >&5
6739echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006740if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006741 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006742else
Benjamin Petersona8332062009-09-11 22:36:27 +00006743 cat >conftest.$ac_ext <<_ACEOF
6744/* confdefs.h. */
6745_ACEOF
6746cat confdefs.h >>conftest.$ac_ext
6747cat >>conftest.$ac_ext <<_ACEOF
6748/* end confdefs.h. */
6749$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006750typedef mode_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006751int
6752main ()
6753{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006754if ((ac__type_new_ *) 0)
6755 return 0;
6756if (sizeof (ac__type_new_))
6757 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006758 ;
6759 return 0;
6760}
6761_ACEOF
6762rm -f conftest.$ac_objext
6763if { (ac_try="$ac_compile"
6764case "(($ac_try" in
6765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6766 *) ac_try_echo=$ac_try;;
6767esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006769 (eval "$ac_compile") 2>conftest.er1
6770 ac_status=$?
6771 grep -v '^ *+' conftest.er1 >conftest.err
6772 rm -f conftest.er1
6773 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006775 (exit $ac_status); } && {
6776 test -z "$ac_c_werror_flag" ||
6777 test ! -s conftest.err
6778 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006779 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006780else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006782sed 's/^/| /' conftest.$ac_ext >&5
6783
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006784 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786
6787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006788fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006789{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6790echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6791if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006792 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006793else
Martin v. Löwis11437992002-04-12 09:54:03 +00006794
6795cat >>confdefs.h <<_ACEOF
6796#define mode_t int
6797_ACEOF
6798
6799fi
6800
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006801{ echo "$as_me:$LINENO: checking for off_t" >&5
6802echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006803if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006804 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006805else
Benjamin Petersona8332062009-09-11 22:36:27 +00006806 cat >conftest.$ac_ext <<_ACEOF
6807/* confdefs.h. */
6808_ACEOF
6809cat confdefs.h >>conftest.$ac_ext
6810cat >>conftest.$ac_ext <<_ACEOF
6811/* end confdefs.h. */
6812$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006813typedef off_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006814int
6815main ()
6816{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006817if ((ac__type_new_ *) 0)
6818 return 0;
6819if (sizeof (ac__type_new_))
6820 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006821 ;
6822 return 0;
6823}
6824_ACEOF
6825rm -f conftest.$ac_objext
6826if { (ac_try="$ac_compile"
6827case "(($ac_try" in
6828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6829 *) ac_try_echo=$ac_try;;
6830esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006832 (eval "$ac_compile") 2>conftest.er1
6833 ac_status=$?
6834 grep -v '^ *+' conftest.er1 >conftest.err
6835 rm -f conftest.er1
6836 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006838 (exit $ac_status); } && {
6839 test -z "$ac_c_werror_flag" ||
6840 test ! -s conftest.err
6841 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006842 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006843else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006845sed 's/^/| /' conftest.$ac_ext >&5
6846
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006847 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849
6850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006851fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006852{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6853echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6854if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006855 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006856else
Martin v. Löwis11437992002-04-12 09:54:03 +00006857
6858cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006859#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006860_ACEOF
6861
6862fi
6863
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006864{ echo "$as_me:$LINENO: checking for pid_t" >&5
6865echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006866if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006867 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006868else
Benjamin Petersona8332062009-09-11 22:36:27 +00006869 cat >conftest.$ac_ext <<_ACEOF
6870/* confdefs.h. */
6871_ACEOF
6872cat confdefs.h >>conftest.$ac_ext
6873cat >>conftest.$ac_ext <<_ACEOF
6874/* end confdefs.h. */
6875$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006876typedef pid_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006877int
6878main ()
6879{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006880if ((ac__type_new_ *) 0)
6881 return 0;
6882if (sizeof (ac__type_new_))
6883 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006884 ;
6885 return 0;
6886}
6887_ACEOF
6888rm -f conftest.$ac_objext
6889if { (ac_try="$ac_compile"
6890case "(($ac_try" in
6891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6892 *) ac_try_echo=$ac_try;;
6893esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006895 (eval "$ac_compile") 2>conftest.er1
6896 ac_status=$?
6897 grep -v '^ *+' conftest.er1 >conftest.err
6898 rm -f conftest.er1
6899 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006901 (exit $ac_status); } && {
6902 test -z "$ac_c_werror_flag" ||
6903 test ! -s conftest.err
6904 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006905 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006906else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006908sed 's/^/| /' conftest.$ac_ext >&5
6909
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006910 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006912
6913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006914fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006915{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6916echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6917if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006918 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006919else
Martin v. Löwis11437992002-04-12 09:54:03 +00006920
6921cat >>confdefs.h <<_ACEOF
6922#define pid_t int
6923_ACEOF
6924
6925fi
6926
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006927{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6928echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006929if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006930 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006931else
6932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006933/* confdefs.h. */
6934_ACEOF
6935cat confdefs.h >>conftest.$ac_ext
6936cat >>conftest.$ac_ext <<_ACEOF
6937/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006938#include <sys/types.h>
6939#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006940
Martin v. Löwis11437992002-04-12 09:54:03 +00006941int
6942main ()
6943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006944return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006945 ;
6946 return 0;
6947}
6948_ACEOF
6949rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006950if { (ac_try="$ac_compile"
6951case "(($ac_try" in
6952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6953 *) ac_try_echo=$ac_try;;
6954esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006958 grep -v '^ *+' conftest.er1 >conftest.err
6959 rm -f conftest.er1
6960 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006962 (exit $ac_status); } && {
6963 test -z "$ac_c_werror_flag" ||
6964 test ! -s conftest.err
6965 } && test -s conftest.$ac_objext; then
6966 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006967else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006969sed 's/^/| /' conftest.$ac_ext >&5
6970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006971 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006973
6974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006975fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006976{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6977echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006978
Martin v. Löwis11437992002-04-12 09:54:03 +00006979cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006980#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006981_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006982
Michael W. Hudson54241132001-12-07 15:38:26 +00006983
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006984{ echo "$as_me:$LINENO: checking for size_t" >&5
6985echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006986if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006988else
Benjamin Petersona8332062009-09-11 22:36:27 +00006989 cat >conftest.$ac_ext <<_ACEOF
6990/* confdefs.h. */
6991_ACEOF
6992cat confdefs.h >>conftest.$ac_ext
6993cat >>conftest.$ac_ext <<_ACEOF
6994/* end confdefs.h. */
6995$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006996typedef size_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006997int
6998main ()
6999{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007000if ((ac__type_new_ *) 0)
7001 return 0;
7002if (sizeof (ac__type_new_))
7003 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007004 ;
7005 return 0;
7006}
7007_ACEOF
7008rm -f conftest.$ac_objext
7009if { (ac_try="$ac_compile"
7010case "(($ac_try" in
7011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7012 *) ac_try_echo=$ac_try;;
7013esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007015 (eval "$ac_compile") 2>conftest.er1
7016 ac_status=$?
7017 grep -v '^ *+' conftest.er1 >conftest.err
7018 rm -f conftest.er1
7019 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007021 (exit $ac_status); } && {
7022 test -z "$ac_c_werror_flag" ||
7023 test ! -s conftest.err
7024 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007025 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007026else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007028sed 's/^/| /' conftest.$ac_ext >&5
7029
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007030 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007032
7033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007034fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007035{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7036echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7037if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007038 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007039else
Martin v. Löwis11437992002-04-12 09:54:03 +00007040
7041cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007042#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007043_ACEOF
7044
7045fi
7046
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007047{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7048echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007049if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007050 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007051else
7052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007053/* confdefs.h. */
7054_ACEOF
7055cat confdefs.h >>conftest.$ac_ext
7056cat >>conftest.$ac_ext <<_ACEOF
7057/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007059
7060_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007062 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007063 ac_cv_type_uid_t=yes
7064else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007065 ac_cv_type_uid_t=no
7066fi
Ronald Oussoren79a93512010-04-18 19:08:47 +00007067rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007068
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007069fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007070{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7071echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007072if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007073
Martin v. Löwis11437992002-04-12 09:54:03 +00007074cat >>confdefs.h <<\_ACEOF
7075#define uid_t int
7076_ACEOF
7077
7078
7079cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007080#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007081_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007082
7083fi
7084
Mark Dickinsonbd792642009-03-18 20:06:12 +00007085
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007086 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7087echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007088if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007089 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007090else
7091 ac_cv_c_uint32_t=no
7092 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7093 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7094 cat >conftest.$ac_ext <<_ACEOF
7095/* confdefs.h. */
7096_ACEOF
7097cat confdefs.h >>conftest.$ac_ext
7098cat >>conftest.$ac_ext <<_ACEOF
7099/* end confdefs.h. */
7100$ac_includes_default
7101int
7102main ()
7103{
7104static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7105test_array [0] = 0
7106
7107 ;
7108 return 0;
7109}
7110_ACEOF
7111rm -f conftest.$ac_objext
7112if { (ac_try="$ac_compile"
7113case "(($ac_try" in
7114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7115 *) ac_try_echo=$ac_try;;
7116esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007118 (eval "$ac_compile") 2>conftest.er1
7119 ac_status=$?
7120 grep -v '^ *+' conftest.er1 >conftest.err
7121 rm -f conftest.er1
7122 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007124 (exit $ac_status); } && {
7125 test -z "$ac_c_werror_flag" ||
7126 test ! -s conftest.err
7127 } && test -s conftest.$ac_objext; then
7128 case $ac_type in
7129 uint32_t) ac_cv_c_uint32_t=yes ;;
7130 *) ac_cv_c_uint32_t=$ac_type ;;
7131esac
7132
7133else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007134 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007135sed 's/^/| /' conftest.$ac_ext >&5
7136
7137
7138fi
7139
7140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141 test "$ac_cv_c_uint32_t" != no && break
7142 done
7143fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007144{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7145echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007146 case $ac_cv_c_uint32_t in #(
7147 no|yes) ;; #(
7148 *)
7149
7150cat >>confdefs.h <<\_ACEOF
7151#define _UINT32_T 1
7152_ACEOF
7153
7154
7155cat >>confdefs.h <<_ACEOF
7156#define uint32_t $ac_cv_c_uint32_t
7157_ACEOF
7158;;
7159 esac
7160
7161
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007162 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7163echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007164if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007165 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007166else
7167 ac_cv_c_uint64_t=no
7168 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7169 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7170 cat >conftest.$ac_ext <<_ACEOF
7171/* confdefs.h. */
7172_ACEOF
7173cat confdefs.h >>conftest.$ac_ext
7174cat >>conftest.$ac_ext <<_ACEOF
7175/* end confdefs.h. */
7176$ac_includes_default
7177int
7178main ()
7179{
7180static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7181test_array [0] = 0
7182
7183 ;
7184 return 0;
7185}
7186_ACEOF
7187rm -f conftest.$ac_objext
7188if { (ac_try="$ac_compile"
7189case "(($ac_try" in
7190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7191 *) ac_try_echo=$ac_try;;
7192esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007194 (eval "$ac_compile") 2>conftest.er1
7195 ac_status=$?
7196 grep -v '^ *+' conftest.er1 >conftest.err
7197 rm -f conftest.er1
7198 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007200 (exit $ac_status); } && {
7201 test -z "$ac_c_werror_flag" ||
7202 test ! -s conftest.err
7203 } && test -s conftest.$ac_objext; then
7204 case $ac_type in
7205 uint64_t) ac_cv_c_uint64_t=yes ;;
7206 *) ac_cv_c_uint64_t=$ac_type ;;
7207esac
7208
7209else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007210 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007211sed 's/^/| /' conftest.$ac_ext >&5
7212
7213
7214fi
7215
7216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7217 test "$ac_cv_c_uint64_t" != no && break
7218 done
7219fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007220{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7221echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007222 case $ac_cv_c_uint64_t in #(
7223 no|yes) ;; #(
7224 *)
7225
7226cat >>confdefs.h <<\_ACEOF
7227#define _UINT64_T 1
7228_ACEOF
7229
7230
7231cat >>confdefs.h <<_ACEOF
7232#define uint64_t $ac_cv_c_uint64_t
7233_ACEOF
7234;;
7235 esac
7236
7237
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007238 { echo "$as_me:$LINENO: checking for int32_t" >&5
7239echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007240if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007241 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007242else
7243 ac_cv_c_int32_t=no
7244 for ac_type in 'int32_t' 'int' 'long int' \
7245 'long long int' 'short int' 'signed char'; do
7246 cat >conftest.$ac_ext <<_ACEOF
7247/* confdefs.h. */
7248_ACEOF
7249cat confdefs.h >>conftest.$ac_ext
7250cat >>conftest.$ac_ext <<_ACEOF
7251/* end confdefs.h. */
7252$ac_includes_default
7253int
7254main ()
7255{
7256static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7257test_array [0] = 0
7258
7259 ;
7260 return 0;
7261}
7262_ACEOF
7263rm -f conftest.$ac_objext
7264if { (ac_try="$ac_compile"
7265case "(($ac_try" in
7266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7267 *) ac_try_echo=$ac_try;;
7268esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007270 (eval "$ac_compile") 2>conftest.er1
7271 ac_status=$?
7272 grep -v '^ *+' conftest.er1 >conftest.err
7273 rm -f conftest.er1
7274 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007276 (exit $ac_status); } && {
7277 test -z "$ac_c_werror_flag" ||
7278 test ! -s conftest.err
7279 } && test -s conftest.$ac_objext; then
7280 cat >conftest.$ac_ext <<_ACEOF
7281/* confdefs.h. */
7282_ACEOF
7283cat confdefs.h >>conftest.$ac_ext
7284cat >>conftest.$ac_ext <<_ACEOF
7285/* end confdefs.h. */
7286$ac_includes_default
7287int
7288main ()
7289{
7290static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007291 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007292test_array [0] = 0
7293
7294 ;
7295 return 0;
7296}
7297_ACEOF
7298rm -f conftest.$ac_objext
7299if { (ac_try="$ac_compile"
7300case "(($ac_try" in
7301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7302 *) ac_try_echo=$ac_try;;
7303esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007305 (eval "$ac_compile") 2>conftest.er1
7306 ac_status=$?
7307 grep -v '^ *+' conftest.er1 >conftest.err
7308 rm -f conftest.er1
7309 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007311 (exit $ac_status); } && {
7312 test -z "$ac_c_werror_flag" ||
7313 test ! -s conftest.err
7314 } && test -s conftest.$ac_objext; then
7315 :
7316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007317 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007318sed 's/^/| /' conftest.$ac_ext >&5
7319
7320 case $ac_type in
7321 int32_t) ac_cv_c_int32_t=yes ;;
7322 *) ac_cv_c_int32_t=$ac_type ;;
7323esac
7324
7325fi
7326
7327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7328else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007329 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007330sed 's/^/| /' conftest.$ac_ext >&5
7331
7332
7333fi
7334
7335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7336 test "$ac_cv_c_int32_t" != no && break
7337 done
7338fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007339{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7340echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007341 case $ac_cv_c_int32_t in #(
7342 no|yes) ;; #(
7343 *)
7344
7345cat >>confdefs.h <<_ACEOF
7346#define int32_t $ac_cv_c_int32_t
7347_ACEOF
7348;;
7349 esac
7350
7351
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007352 { echo "$as_me:$LINENO: checking for int64_t" >&5
7353echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007354if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007355 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007356else
7357 ac_cv_c_int64_t=no
7358 for ac_type in 'int64_t' 'int' 'long int' \
7359 'long long int' 'short int' 'signed char'; do
7360 cat >conftest.$ac_ext <<_ACEOF
7361/* confdefs.h. */
7362_ACEOF
7363cat confdefs.h >>conftest.$ac_ext
7364cat >>conftest.$ac_ext <<_ACEOF
7365/* end confdefs.h. */
7366$ac_includes_default
7367int
7368main ()
7369{
7370static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7371test_array [0] = 0
7372
7373 ;
7374 return 0;
7375}
7376_ACEOF
7377rm -f conftest.$ac_objext
7378if { (ac_try="$ac_compile"
7379case "(($ac_try" in
7380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7381 *) ac_try_echo=$ac_try;;
7382esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007384 (eval "$ac_compile") 2>conftest.er1
7385 ac_status=$?
7386 grep -v '^ *+' conftest.er1 >conftest.err
7387 rm -f conftest.er1
7388 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007390 (exit $ac_status); } && {
7391 test -z "$ac_c_werror_flag" ||
7392 test ! -s conftest.err
7393 } && test -s conftest.$ac_objext; then
7394 cat >conftest.$ac_ext <<_ACEOF
7395/* confdefs.h. */
7396_ACEOF
7397cat confdefs.h >>conftest.$ac_ext
7398cat >>conftest.$ac_ext <<_ACEOF
7399/* end confdefs.h. */
7400$ac_includes_default
7401int
7402main ()
7403{
7404static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007405 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007406test_array [0] = 0
7407
7408 ;
7409 return 0;
7410}
7411_ACEOF
7412rm -f conftest.$ac_objext
7413if { (ac_try="$ac_compile"
7414case "(($ac_try" in
7415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7416 *) ac_try_echo=$ac_try;;
7417esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007419 (eval "$ac_compile") 2>conftest.er1
7420 ac_status=$?
7421 grep -v '^ *+' conftest.er1 >conftest.err
7422 rm -f conftest.er1
7423 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007425 (exit $ac_status); } && {
7426 test -z "$ac_c_werror_flag" ||
7427 test ! -s conftest.err
7428 } && test -s conftest.$ac_objext; then
7429 :
7430else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007431 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007432sed 's/^/| /' conftest.$ac_ext >&5
7433
7434 case $ac_type in
7435 int64_t) ac_cv_c_int64_t=yes ;;
7436 *) ac_cv_c_int64_t=$ac_type ;;
7437esac
7438
7439fi
7440
7441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7442else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007443 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007444sed 's/^/| /' conftest.$ac_ext >&5
7445
7446
7447fi
7448
7449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7450 test "$ac_cv_c_int64_t" != no && break
7451 done
7452fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007453{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7454echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007455 case $ac_cv_c_int64_t in #(
7456 no|yes) ;; #(
7457 *)
7458
7459cat >>confdefs.h <<_ACEOF
7460#define int64_t $ac_cv_c_int64_t
7461_ACEOF
7462;;
7463 esac
7464
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007465{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7466echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007467if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007468 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007469else
Benjamin Petersona8332062009-09-11 22:36:27 +00007470 cat >conftest.$ac_ext <<_ACEOF
7471/* confdefs.h. */
7472_ACEOF
7473cat confdefs.h >>conftest.$ac_ext
7474cat >>conftest.$ac_ext <<_ACEOF
7475/* end confdefs.h. */
7476$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007477typedef ssize_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007478int
7479main ()
7480{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007481if ((ac__type_new_ *) 0)
7482 return 0;
7483if (sizeof (ac__type_new_))
7484 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007485 ;
7486 return 0;
7487}
7488_ACEOF
7489rm -f conftest.$ac_objext
7490if { (ac_try="$ac_compile"
7491case "(($ac_try" in
7492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7493 *) ac_try_echo=$ac_try;;
7494esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007496 (eval "$ac_compile") 2>conftest.er1
7497 ac_status=$?
7498 grep -v '^ *+' conftest.er1 >conftest.err
7499 rm -f conftest.er1
7500 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007502 (exit $ac_status); } && {
7503 test -z "$ac_c_werror_flag" ||
7504 test ! -s conftest.err
7505 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007506 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007507else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007508 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007509sed 's/^/| /' conftest.$ac_ext >&5
7510
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007511 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007513
7514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007515fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007516{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7517echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7518if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007519
7520cat >>confdefs.h <<\_ACEOF
7521#define HAVE_SSIZE_T 1
7522_ACEOF
7523
7524fi
7525
Jack Jansendd19cf82001-12-06 22:36:17 +00007526
Michael W. Hudson54241132001-12-07 15:38:26 +00007527# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007528# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007529{ echo "$as_me:$LINENO: checking for int" >&5
7530echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7531if test "${ac_cv_type_int+set}" = set; then
7532 echo $ECHO_N "(cached) $ECHO_C" >&6
7533else
7534 cat >conftest.$ac_ext <<_ACEOF
7535/* confdefs.h. */
7536_ACEOF
7537cat confdefs.h >>conftest.$ac_ext
7538cat >>conftest.$ac_ext <<_ACEOF
7539/* end confdefs.h. */
7540$ac_includes_default
7541typedef int ac__type_new_;
7542int
7543main ()
7544{
7545if ((ac__type_new_ *) 0)
7546 return 0;
7547if (sizeof (ac__type_new_))
7548 return 0;
7549 ;
7550 return 0;
7551}
7552_ACEOF
7553rm -f conftest.$ac_objext
7554if { (ac_try="$ac_compile"
7555case "(($ac_try" in
7556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7557 *) ac_try_echo=$ac_try;;
7558esac
7559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7560 (eval "$ac_compile") 2>conftest.er1
7561 ac_status=$?
7562 grep -v '^ *+' conftest.er1 >conftest.err
7563 rm -f conftest.er1
7564 cat conftest.err >&5
7565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7566 (exit $ac_status); } && {
7567 test -z "$ac_c_werror_flag" ||
7568 test ! -s conftest.err
7569 } && test -s conftest.$ac_objext; then
7570 ac_cv_type_int=yes
7571else
7572 echo "$as_me: failed program was:" >&5
7573sed 's/^/| /' conftest.$ac_ext >&5
7574
7575 ac_cv_type_int=no
7576fi
7577
7578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7579fi
7580{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7581echo "${ECHO_T}$ac_cv_type_int" >&6; }
7582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007583# The cast to long int works around a bug in the HP C Compiler
7584# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7585# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7586# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007587{ echo "$as_me:$LINENO: checking size of int" >&5
7588echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007589if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007590 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007591else
Martin v. Löwis11437992002-04-12 09:54:03 +00007592 if test "$cross_compiling" = yes; then
7593 # Depending upon the size, compute the lo and hi bounds.
7594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007595/* confdefs.h. */
7596_ACEOF
7597cat confdefs.h >>conftest.$ac_ext
7598cat >>conftest.$ac_ext <<_ACEOF
7599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007600$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007601 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007602int
7603main ()
7604{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007605static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007606test_array [0] = 0
7607
7608 ;
7609 return 0;
7610}
7611_ACEOF
7612rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613if { (ac_try="$ac_compile"
7614case "(($ac_try" in
7615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7616 *) ac_try_echo=$ac_try;;
7617esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007621 grep -v '^ *+' conftest.er1 >conftest.err
7622 rm -f conftest.er1
7623 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007625 (exit $ac_status); } && {
7626 test -z "$ac_c_werror_flag" ||
7627 test ! -s conftest.err
7628 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 ac_lo=0 ac_mid=0
7630 while :; do
7631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007632/* confdefs.h. */
7633_ACEOF
7634cat confdefs.h >>conftest.$ac_ext
7635cat >>conftest.$ac_ext <<_ACEOF
7636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007637$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007638 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007639int
7640main ()
7641{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007642static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007643test_array [0] = 0
7644
7645 ;
7646 return 0;
7647}
7648_ACEOF
7649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007650if { (ac_try="$ac_compile"
7651case "(($ac_try" in
7652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7653 *) ac_try_echo=$ac_try;;
7654esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007658 grep -v '^ *+' conftest.er1 >conftest.err
7659 rm -f conftest.er1
7660 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662 (exit $ac_status); } && {
7663 test -z "$ac_c_werror_flag" ||
7664 test ! -s conftest.err
7665 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007666 ac_hi=$ac_mid; break
7667else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007669sed 's/^/| /' conftest.$ac_ext >&5
7670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671 ac_lo=`expr $ac_mid + 1`
7672 if test $ac_lo -le $ac_mid; then
7673 ac_lo= ac_hi=
7674 break
7675 fi
7676 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678
7679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007680 done
7681else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007683sed 's/^/| /' conftest.$ac_ext >&5
7684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007686/* confdefs.h. */
7687_ACEOF
7688cat confdefs.h >>conftest.$ac_ext
7689cat >>conftest.$ac_ext <<_ACEOF
7690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007691$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007692 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007693int
7694main ()
7695{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007696static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007697test_array [0] = 0
7698
7699 ;
7700 return 0;
7701}
7702_ACEOF
7703rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704if { (ac_try="$ac_compile"
7705case "(($ac_try" in
7706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7707 *) ac_try_echo=$ac_try;;
7708esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007712 grep -v '^ *+' conftest.er1 >conftest.err
7713 rm -f conftest.er1
7714 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716 (exit $ac_status); } && {
7717 test -z "$ac_c_werror_flag" ||
7718 test ! -s conftest.err
7719 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 ac_hi=-1 ac_mid=-1
7721 while :; do
7722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007723/* confdefs.h. */
7724_ACEOF
7725cat confdefs.h >>conftest.$ac_ext
7726cat >>conftest.$ac_ext <<_ACEOF
7727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007728$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007729 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007730int
7731main ()
7732{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007733static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007734test_array [0] = 0
7735
7736 ;
7737 return 0;
7738}
7739_ACEOF
7740rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007741if { (ac_try="$ac_compile"
7742case "(($ac_try" in
7743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7744 *) ac_try_echo=$ac_try;;
7745esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007749 grep -v '^ *+' conftest.er1 >conftest.err
7750 rm -f conftest.er1
7751 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007753 (exit $ac_status); } && {
7754 test -z "$ac_c_werror_flag" ||
7755 test ! -s conftest.err
7756 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 ac_lo=$ac_mid; break
7758else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007760sed 's/^/| /' conftest.$ac_ext >&5
7761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762 ac_hi=`expr '(' $ac_mid ')' - 1`
7763 if test $ac_mid -le $ac_hi; then
7764 ac_lo= ac_hi=
7765 break
7766 fi
7767 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769
7770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007771 done
7772else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007774sed 's/^/| /' conftest.$ac_ext >&5
7775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778
7779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781
7782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007783# Binary search between lo and hi bounds.
7784while test "x$ac_lo" != "x$ac_hi"; do
7785 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7786 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007787/* confdefs.h. */
7788_ACEOF
7789cat confdefs.h >>conftest.$ac_ext
7790cat >>conftest.$ac_ext <<_ACEOF
7791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007792$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007793 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007794int
7795main ()
7796{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007797static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007798test_array [0] = 0
7799
7800 ;
7801 return 0;
7802}
7803_ACEOF
7804rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805if { (ac_try="$ac_compile"
7806case "(($ac_try" in
7807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7808 *) ac_try_echo=$ac_try;;
7809esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007813 grep -v '^ *+' conftest.er1 >conftest.err
7814 rm -f conftest.er1
7815 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 (exit $ac_status); } && {
7818 test -z "$ac_c_werror_flag" ||
7819 test ! -s conftest.err
7820 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 ac_hi=$ac_mid
7822else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007824sed 's/^/| /' conftest.$ac_ext >&5
7825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007826 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828
7829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007830done
7831case $ac_lo in
7832?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007834 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007835See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007836echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007837See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007838 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839 else
7840 ac_cv_sizeof_int=0
7841 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007842esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007843else
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007845/* confdefs.h. */
7846_ACEOF
7847cat confdefs.h >>conftest.$ac_ext
7848cat >>conftest.$ac_ext <<_ACEOF
7849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007850$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007851 typedef int ac__type_sizeof_;
7852static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7853static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007854#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007855#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007856int
7857main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007858{
Martin v. Löwis11437992002-04-12 09:54:03 +00007859
7860 FILE *f = fopen ("conftest.val", "w");
7861 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007863 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007866 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007868 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 }
7870 else
7871 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007873 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007875 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007878
7879 ;
7880 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007881}
Martin v. Löwis11437992002-04-12 09:54:03 +00007882_ACEOF
7883rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884if { (ac_try="$ac_link"
7885case "(($ac_try" in
7886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7887 *) ac_try_echo=$ac_try;;
7888esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 { (case "(($ac_try" in
7895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7896 *) ac_try_echo=$ac_try;;
7897esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 (exit $ac_status); }; }; then
7903 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007904else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007905 echo "$as_me: program exited with status $ac_status" >&5
7906echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007907sed 's/^/| /' conftest.$ac_ext >&5
7908
Martin v. Löwis11437992002-04-12 09:54:03 +00007909( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007911 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007912See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007913echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007914See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007915 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916 else
7917 ac_cv_sizeof_int=0
7918 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920rm -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 +00007921fi
7922rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007923fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007924{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7925echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007926
7927
7928
Martin v. Löwis11437992002-04-12 09:54:03 +00007929cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007930#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007931_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007932
7933
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007934{ echo "$as_me:$LINENO: checking for long" >&5
7935echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7936if test "${ac_cv_type_long+set}" = set; then
7937 echo $ECHO_N "(cached) $ECHO_C" >&6
7938else
7939 cat >conftest.$ac_ext <<_ACEOF
7940/* confdefs.h. */
7941_ACEOF
7942cat confdefs.h >>conftest.$ac_ext
7943cat >>conftest.$ac_ext <<_ACEOF
7944/* end confdefs.h. */
7945$ac_includes_default
7946typedef long ac__type_new_;
7947int
7948main ()
7949{
7950if ((ac__type_new_ *) 0)
7951 return 0;
7952if (sizeof (ac__type_new_))
7953 return 0;
7954 ;
7955 return 0;
7956}
7957_ACEOF
7958rm -f conftest.$ac_objext
7959if { (ac_try="$ac_compile"
7960case "(($ac_try" in
7961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7962 *) ac_try_echo=$ac_try;;
7963esac
7964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7965 (eval "$ac_compile") 2>conftest.er1
7966 ac_status=$?
7967 grep -v '^ *+' conftest.er1 >conftest.err
7968 rm -f conftest.er1
7969 cat conftest.err >&5
7970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7971 (exit $ac_status); } && {
7972 test -z "$ac_c_werror_flag" ||
7973 test ! -s conftest.err
7974 } && test -s conftest.$ac_objext; then
7975 ac_cv_type_long=yes
7976else
7977 echo "$as_me: failed program was:" >&5
7978sed 's/^/| /' conftest.$ac_ext >&5
7979
7980 ac_cv_type_long=no
7981fi
7982
7983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7984fi
7985{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7986echo "${ECHO_T}$ac_cv_type_long" >&6; }
7987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988# The cast to long int works around a bug in the HP C Compiler
7989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7991# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007992{ echo "$as_me:$LINENO: checking size of long" >&5
7993echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007994if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007995 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007996else
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 if test "$cross_compiling" = yes; then
7998 # Depending upon the size, compute the lo and hi bounds.
7999cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008000/* confdefs.h. */
8001_ACEOF
8002cat confdefs.h >>conftest.$ac_ext
8003cat >>conftest.$ac_ext <<_ACEOF
8004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008005$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008006 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008007int
8008main ()
8009{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008010static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008011test_array [0] = 0
8012
8013 ;
8014 return 0;
8015}
8016_ACEOF
8017rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018if { (ac_try="$ac_compile"
8019case "(($ac_try" in
8020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8021 *) ac_try_echo=$ac_try;;
8022esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008026 grep -v '^ *+' conftest.er1 >conftest.err
8027 rm -f conftest.er1
8028 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030 (exit $ac_status); } && {
8031 test -z "$ac_c_werror_flag" ||
8032 test ! -s conftest.err
8033 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008034 ac_lo=0 ac_mid=0
8035 while :; do
8036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008037/* confdefs.h. */
8038_ACEOF
8039cat confdefs.h >>conftest.$ac_ext
8040cat >>conftest.$ac_ext <<_ACEOF
8041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008042$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008043 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008044int
8045main ()
8046{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008047static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008048test_array [0] = 0
8049
8050 ;
8051 return 0;
8052}
8053_ACEOF
8054rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055if { (ac_try="$ac_compile"
8056case "(($ac_try" in
8057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8058 *) ac_try_echo=$ac_try;;
8059esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008063 grep -v '^ *+' conftest.er1 >conftest.err
8064 rm -f conftest.er1
8065 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067 (exit $ac_status); } && {
8068 test -z "$ac_c_werror_flag" ||
8069 test ! -s conftest.err
8070 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 ac_hi=$ac_mid; break
8072else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008074sed 's/^/| /' conftest.$ac_ext >&5
8075
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076 ac_lo=`expr $ac_mid + 1`
8077 if test $ac_lo -le $ac_mid; then
8078 ac_lo= ac_hi=
8079 break
8080 fi
8081 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083
8084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008085 done
8086else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008088sed 's/^/| /' conftest.$ac_ext >&5
8089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008091/* confdefs.h. */
8092_ACEOF
8093cat confdefs.h >>conftest.$ac_ext
8094cat >>conftest.$ac_ext <<_ACEOF
8095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008096$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008097 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008098int
8099main ()
8100{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008101static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008102test_array [0] = 0
8103
8104 ;
8105 return 0;
8106}
8107_ACEOF
8108rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109if { (ac_try="$ac_compile"
8110case "(($ac_try" in
8111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8112 *) ac_try_echo=$ac_try;;
8113esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008117 grep -v '^ *+' conftest.er1 >conftest.err
8118 rm -f conftest.er1
8119 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121 (exit $ac_status); } && {
8122 test -z "$ac_c_werror_flag" ||
8123 test ! -s conftest.err
8124 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 ac_hi=-1 ac_mid=-1
8126 while :; do
8127 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008128/* confdefs.h. */
8129_ACEOF
8130cat confdefs.h >>conftest.$ac_ext
8131cat >>conftest.$ac_ext <<_ACEOF
8132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008133$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008134 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008135int
8136main ()
8137{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008138static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008139test_array [0] = 0
8140
8141 ;
8142 return 0;
8143}
8144_ACEOF
8145rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146if { (ac_try="$ac_compile"
8147case "(($ac_try" in
8148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8149 *) ac_try_echo=$ac_try;;
8150esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008154 grep -v '^ *+' conftest.er1 >conftest.err
8155 rm -f conftest.er1
8156 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158 (exit $ac_status); } && {
8159 test -z "$ac_c_werror_flag" ||
8160 test ! -s conftest.err
8161 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008162 ac_lo=$ac_mid; break
8163else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008165sed 's/^/| /' conftest.$ac_ext >&5
8166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167 ac_hi=`expr '(' $ac_mid ')' - 1`
8168 if test $ac_mid -le $ac_hi; then
8169 ac_lo= ac_hi=
8170 break
8171 fi
8172 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174
8175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008176 done
8177else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008179sed 's/^/| /' conftest.$ac_ext >&5
8180
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008181 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008183
8184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186
8187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008188# Binary search between lo and hi bounds.
8189while test "x$ac_lo" != "x$ac_hi"; do
8190 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008192/* confdefs.h. */
8193_ACEOF
8194cat confdefs.h >>conftest.$ac_ext
8195cat >>conftest.$ac_ext <<_ACEOF
8196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008197$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008198 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008199int
8200main ()
8201{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008202static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008203test_array [0] = 0
8204
8205 ;
8206 return 0;
8207}
8208_ACEOF
8209rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210if { (ac_try="$ac_compile"
8211case "(($ac_try" in
8212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8213 *) ac_try_echo=$ac_try;;
8214esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008218 grep -v '^ *+' conftest.er1 >conftest.err
8219 rm -f conftest.er1
8220 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 (exit $ac_status); } && {
8223 test -z "$ac_c_werror_flag" ||
8224 test ! -s conftest.err
8225 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008226 ac_hi=$ac_mid
8227else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008229sed 's/^/| /' conftest.$ac_ext >&5
8230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008231 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233
8234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008235done
8236case $ac_lo in
8237?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008239 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008240See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008241echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008242See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008243 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 else
8245 ac_cv_sizeof_long=0
8246 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008247esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008248else
Martin v. Löwis11437992002-04-12 09:54:03 +00008249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008250/* confdefs.h. */
8251_ACEOF
8252cat confdefs.h >>conftest.$ac_ext
8253cat >>conftest.$ac_ext <<_ACEOF
8254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008255$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008256 typedef long ac__type_sizeof_;
8257static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8258static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008259#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008260#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008261int
8262main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008263{
Martin v. Löwis11437992002-04-12 09:54:03 +00008264
8265 FILE *f = fopen ("conftest.val", "w");
8266 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008267 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008268 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008269 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008271 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008273 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 }
8275 else
8276 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008278 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008280 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008281 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008282 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008283
8284 ;
8285 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008286}
Martin v. Löwis11437992002-04-12 09:54:03 +00008287_ACEOF
8288rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008289if { (ac_try="$ac_link"
8290case "(($ac_try" in
8291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8292 *) ac_try_echo=$ac_try;;
8293esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008299 { (case "(($ac_try" in
8300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8301 *) ac_try_echo=$ac_try;;
8302esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008307 (exit $ac_status); }; }; then
8308 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008309else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008310 echo "$as_me: program exited with status $ac_status" >&5
8311echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008312sed 's/^/| /' conftest.$ac_ext >&5
8313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008315if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008316 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008317See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008318echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008319See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008320 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008321 else
8322 ac_cv_sizeof_long=0
8323 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008325rm -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 +00008326fi
8327rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008328fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008329{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8330echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331
8332
8333
Martin v. Löwis11437992002-04-12 09:54:03 +00008334cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008335#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008336_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008337
8338
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008339{ echo "$as_me:$LINENO: checking for void *" >&5
8340echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8341if test "${ac_cv_type_void_p+set}" = set; then
8342 echo $ECHO_N "(cached) $ECHO_C" >&6
8343else
8344 cat >conftest.$ac_ext <<_ACEOF
8345/* confdefs.h. */
8346_ACEOF
8347cat confdefs.h >>conftest.$ac_ext
8348cat >>conftest.$ac_ext <<_ACEOF
8349/* end confdefs.h. */
8350$ac_includes_default
8351typedef void * ac__type_new_;
8352int
8353main ()
8354{
8355if ((ac__type_new_ *) 0)
8356 return 0;
8357if (sizeof (ac__type_new_))
8358 return 0;
8359 ;
8360 return 0;
8361}
8362_ACEOF
8363rm -f conftest.$ac_objext
8364if { (ac_try="$ac_compile"
8365case "(($ac_try" in
8366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8367 *) ac_try_echo=$ac_try;;
8368esac
8369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8370 (eval "$ac_compile") 2>conftest.er1
8371 ac_status=$?
8372 grep -v '^ *+' conftest.er1 >conftest.err
8373 rm -f conftest.er1
8374 cat conftest.err >&5
8375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8376 (exit $ac_status); } && {
8377 test -z "$ac_c_werror_flag" ||
8378 test ! -s conftest.err
8379 } && test -s conftest.$ac_objext; then
8380 ac_cv_type_void_p=yes
8381else
8382 echo "$as_me: failed program was:" >&5
8383sed 's/^/| /' conftest.$ac_ext >&5
8384
8385 ac_cv_type_void_p=no
8386fi
8387
8388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8389fi
8390{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8391echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008393# The cast to long int works around a bug in the HP C Compiler
8394# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8395# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8396# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008397{ echo "$as_me:$LINENO: checking size of void *" >&5
8398echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008399if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008400 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008401else
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 if test "$cross_compiling" = yes; then
8403 # Depending upon the size, compute the lo and hi bounds.
8404cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008405/* confdefs.h. */
8406_ACEOF
8407cat confdefs.h >>conftest.$ac_ext
8408cat >>conftest.$ac_ext <<_ACEOF
8409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008410$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008411 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008412int
8413main ()
8414{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008416test_array [0] = 0
8417
8418 ;
8419 return 0;
8420}
8421_ACEOF
8422rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423if { (ac_try="$ac_compile"
8424case "(($ac_try" in
8425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8426 *) ac_try_echo=$ac_try;;
8427esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008431 grep -v '^ *+' conftest.er1 >conftest.err
8432 rm -f conftest.er1
8433 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435 (exit $ac_status); } && {
8436 test -z "$ac_c_werror_flag" ||
8437 test ! -s conftest.err
8438 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008439 ac_lo=0 ac_mid=0
8440 while :; do
8441 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008442/* confdefs.h. */
8443_ACEOF
8444cat confdefs.h >>conftest.$ac_ext
8445cat >>conftest.$ac_ext <<_ACEOF
8446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008447$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008448 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008449int
8450main ()
8451{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008452static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008453test_array [0] = 0
8454
8455 ;
8456 return 0;
8457}
8458_ACEOF
8459rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460if { (ac_try="$ac_compile"
8461case "(($ac_try" in
8462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8463 *) ac_try_echo=$ac_try;;
8464esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008468 grep -v '^ *+' conftest.er1 >conftest.err
8469 rm -f conftest.er1
8470 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472 (exit $ac_status); } && {
8473 test -z "$ac_c_werror_flag" ||
8474 test ! -s conftest.err
8475 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 ac_hi=$ac_mid; break
8477else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008479sed 's/^/| /' conftest.$ac_ext >&5
8480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481 ac_lo=`expr $ac_mid + 1`
8482 if test $ac_lo -le $ac_mid; then
8483 ac_lo= ac_hi=
8484 break
8485 fi
8486 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488
8489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 done
8491else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008493sed 's/^/| /' conftest.$ac_ext >&5
8494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008496/* confdefs.h. */
8497_ACEOF
8498cat confdefs.h >>conftest.$ac_ext
8499cat >>conftest.$ac_ext <<_ACEOF
8500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008501$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008502 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008503int
8504main ()
8505{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008506static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008507test_array [0] = 0
8508
8509 ;
8510 return 0;
8511}
8512_ACEOF
8513rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514if { (ac_try="$ac_compile"
8515case "(($ac_try" in
8516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8517 *) ac_try_echo=$ac_try;;
8518esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008522 grep -v '^ *+' conftest.er1 >conftest.err
8523 rm -f conftest.er1
8524 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526 (exit $ac_status); } && {
8527 test -z "$ac_c_werror_flag" ||
8528 test ! -s conftest.err
8529 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ac_hi=-1 ac_mid=-1
8531 while :; do
8532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008533/* confdefs.h. */
8534_ACEOF
8535cat confdefs.h >>conftest.$ac_ext
8536cat >>conftest.$ac_ext <<_ACEOF
8537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008538$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008539 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008540int
8541main ()
8542{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008543static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008544test_array [0] = 0
8545
8546 ;
8547 return 0;
8548}
8549_ACEOF
8550rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551if { (ac_try="$ac_compile"
8552case "(($ac_try" in
8553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8554 *) ac_try_echo=$ac_try;;
8555esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008559 grep -v '^ *+' conftest.er1 >conftest.err
8560 rm -f conftest.er1
8561 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563 (exit $ac_status); } && {
8564 test -z "$ac_c_werror_flag" ||
8565 test ! -s conftest.err
8566 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ac_lo=$ac_mid; break
8568else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008570sed 's/^/| /' conftest.$ac_ext >&5
8571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572 ac_hi=`expr '(' $ac_mid ')' - 1`
8573 if test $ac_mid -le $ac_hi; then
8574 ac_lo= ac_hi=
8575 break
8576 fi
8577 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579
8580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008581 done
8582else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008584sed 's/^/| /' conftest.$ac_ext >&5
8585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588
8589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591
8592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008593# Binary search between lo and hi bounds.
8594while test "x$ac_lo" != "x$ac_hi"; do
8595 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008597/* confdefs.h. */
8598_ACEOF
8599cat confdefs.h >>conftest.$ac_ext
8600cat >>conftest.$ac_ext <<_ACEOF
8601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008602$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008603 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008604int
8605main ()
8606{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008607static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008608test_array [0] = 0
8609
8610 ;
8611 return 0;
8612}
8613_ACEOF
8614rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615if { (ac_try="$ac_compile"
8616case "(($ac_try" in
8617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8618 *) ac_try_echo=$ac_try;;
8619esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008623 grep -v '^ *+' conftest.er1 >conftest.err
8624 rm -f conftest.er1
8625 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 (exit $ac_status); } && {
8628 test -z "$ac_c_werror_flag" ||
8629 test ! -s conftest.err
8630 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 ac_hi=$ac_mid
8632else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008634sed 's/^/| /' conftest.$ac_ext >&5
8635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638
8639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008640done
8641case $ac_lo in
8642?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008644 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008645See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008646echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008647See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008648 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649 else
8650 ac_cv_sizeof_void_p=0
8651 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008652esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008653else
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008655/* confdefs.h. */
8656_ACEOF
8657cat confdefs.h >>conftest.$ac_ext
8658cat >>conftest.$ac_ext <<_ACEOF
8659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008660$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008661 typedef void * ac__type_sizeof_;
8662static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8663static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008664#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008665#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008666int
8667main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008668{
Martin v. Löwis11437992002-04-12 09:54:03 +00008669
8670 FILE *f = fopen ("conftest.val", "w");
8671 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008672 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008673 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008676 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008678 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 }
8680 else
8681 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008683 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008685 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008688
8689 ;
8690 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008691}
Martin v. Löwis11437992002-04-12 09:54:03 +00008692_ACEOF
8693rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694if { (ac_try="$ac_link"
8695case "(($ac_try" in
8696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8697 *) ac_try_echo=$ac_try;;
8698esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704 { (case "(($ac_try" in
8705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8706 *) ac_try_echo=$ac_try;;
8707esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008712 (exit $ac_status); }; }; then
8713 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008714else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008715 echo "$as_me: program exited with status $ac_status" >&5
8716echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008717sed 's/^/| /' conftest.$ac_ext >&5
8718
Martin v. Löwis11437992002-04-12 09:54:03 +00008719( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008721 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008722See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008723echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008724See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008725 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008726 else
8727 ac_cv_sizeof_void_p=0
8728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008730rm -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 +00008731fi
8732rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008733fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008734{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8735echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736
8737
8738
Martin v. Löwis11437992002-04-12 09:54:03 +00008739cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008740#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008741_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008742
8743
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008744{ echo "$as_me:$LINENO: checking for short" >&5
8745echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8746if test "${ac_cv_type_short+set}" = set; then
8747 echo $ECHO_N "(cached) $ECHO_C" >&6
8748else
8749 cat >conftest.$ac_ext <<_ACEOF
8750/* confdefs.h. */
8751_ACEOF
8752cat confdefs.h >>conftest.$ac_ext
8753cat >>conftest.$ac_ext <<_ACEOF
8754/* end confdefs.h. */
8755$ac_includes_default
8756typedef short ac__type_new_;
8757int
8758main ()
8759{
8760if ((ac__type_new_ *) 0)
8761 return 0;
8762if (sizeof (ac__type_new_))
8763 return 0;
8764 ;
8765 return 0;
8766}
8767_ACEOF
8768rm -f conftest.$ac_objext
8769if { (ac_try="$ac_compile"
8770case "(($ac_try" in
8771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8772 *) ac_try_echo=$ac_try;;
8773esac
8774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8775 (eval "$ac_compile") 2>conftest.er1
8776 ac_status=$?
8777 grep -v '^ *+' conftest.er1 >conftest.err
8778 rm -f conftest.er1
8779 cat conftest.err >&5
8780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8781 (exit $ac_status); } && {
8782 test -z "$ac_c_werror_flag" ||
8783 test ! -s conftest.err
8784 } && test -s conftest.$ac_objext; then
8785 ac_cv_type_short=yes
8786else
8787 echo "$as_me: failed program was:" >&5
8788sed 's/^/| /' conftest.$ac_ext >&5
8789
8790 ac_cv_type_short=no
8791fi
8792
8793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8794fi
8795{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8796echo "${ECHO_T}$ac_cv_type_short" >&6; }
8797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798# The cast to long int works around a bug in the HP C Compiler
8799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8801# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008802{ echo "$as_me:$LINENO: checking size of short" >&5
8803echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008804if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008805 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008806else
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 if test "$cross_compiling" = yes; then
8808 # Depending upon the size, compute the lo and hi bounds.
8809cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008810/* confdefs.h. */
8811_ACEOF
8812cat confdefs.h >>conftest.$ac_ext
8813cat >>conftest.$ac_ext <<_ACEOF
8814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008815$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008816 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008817int
8818main ()
8819{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008821test_array [0] = 0
8822
8823 ;
8824 return 0;
8825}
8826_ACEOF
8827rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828if { (ac_try="$ac_compile"
8829case "(($ac_try" in
8830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8831 *) ac_try_echo=$ac_try;;
8832esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008836 grep -v '^ *+' conftest.er1 >conftest.err
8837 rm -f conftest.er1
8838 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840 (exit $ac_status); } && {
8841 test -z "$ac_c_werror_flag" ||
8842 test ! -s conftest.err
8843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 ac_lo=0 ac_mid=0
8845 while :; do
8846 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008847/* confdefs.h. */
8848_ACEOF
8849cat confdefs.h >>conftest.$ac_ext
8850cat >>conftest.$ac_ext <<_ACEOF
8851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008852$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008853 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008854int
8855main ()
8856{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008857static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008858test_array [0] = 0
8859
8860 ;
8861 return 0;
8862}
8863_ACEOF
8864rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008865if { (ac_try="$ac_compile"
8866case "(($ac_try" in
8867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8868 *) ac_try_echo=$ac_try;;
8869esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008873 grep -v '^ *+' conftest.er1 >conftest.err
8874 rm -f conftest.er1
8875 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877 (exit $ac_status); } && {
8878 test -z "$ac_c_werror_flag" ||
8879 test ! -s conftest.err
8880 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008881 ac_hi=$ac_mid; break
8882else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008884sed 's/^/| /' conftest.$ac_ext >&5
8885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886 ac_lo=`expr $ac_mid + 1`
8887 if test $ac_lo -le $ac_mid; then
8888 ac_lo= ac_hi=
8889 break
8890 fi
8891 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893
8894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 done
8896else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008898sed 's/^/| /' conftest.$ac_ext >&5
8899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008901/* confdefs.h. */
8902_ACEOF
8903cat confdefs.h >>conftest.$ac_ext
8904cat >>conftest.$ac_ext <<_ACEOF
8905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008906$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008907 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008908int
8909main ()
8910{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008912test_array [0] = 0
8913
8914 ;
8915 return 0;
8916}
8917_ACEOF
8918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919if { (ac_try="$ac_compile"
8920case "(($ac_try" in
8921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8922 *) ac_try_echo=$ac_try;;
8923esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008927 grep -v '^ *+' conftest.er1 >conftest.err
8928 rm -f conftest.er1
8929 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931 (exit $ac_status); } && {
8932 test -z "$ac_c_werror_flag" ||
8933 test ! -s conftest.err
8934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 ac_hi=-1 ac_mid=-1
8936 while :; do
8937 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008938/* confdefs.h. */
8939_ACEOF
8940cat confdefs.h >>conftest.$ac_ext
8941cat >>conftest.$ac_ext <<_ACEOF
8942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008943$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008944 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008945int
8946main ()
8947{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008948static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008949test_array [0] = 0
8950
8951 ;
8952 return 0;
8953}
8954_ACEOF
8955rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956if { (ac_try="$ac_compile"
8957case "(($ac_try" in
8958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8959 *) ac_try_echo=$ac_try;;
8960esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008962 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008964 grep -v '^ *+' conftest.er1 >conftest.err
8965 rm -f conftest.er1
8966 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008968 (exit $ac_status); } && {
8969 test -z "$ac_c_werror_flag" ||
8970 test ! -s conftest.err
8971 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 ac_lo=$ac_mid; break
8973else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008975sed 's/^/| /' conftest.$ac_ext >&5
8976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977 ac_hi=`expr '(' $ac_mid ')' - 1`
8978 if test $ac_mid -le $ac_hi; then
8979 ac_lo= ac_hi=
8980 break
8981 fi
8982 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984
8985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 done
8987else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008989sed 's/^/| /' conftest.$ac_ext >&5
8990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008991 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008993
8994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996
8997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008998# Binary search between lo and hi bounds.
8999while test "x$ac_lo" != "x$ac_hi"; do
9000 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009002/* confdefs.h. */
9003_ACEOF
9004cat confdefs.h >>conftest.$ac_ext
9005cat >>conftest.$ac_ext <<_ACEOF
9006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009007$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009008 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009009int
9010main ()
9011{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009012static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009013test_array [0] = 0
9014
9015 ;
9016 return 0;
9017}
9018_ACEOF
9019rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009020if { (ac_try="$ac_compile"
9021case "(($ac_try" in
9022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9023 *) ac_try_echo=$ac_try;;
9024esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009028 grep -v '^ *+' conftest.er1 >conftest.err
9029 rm -f conftest.er1
9030 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032 (exit $ac_status); } && {
9033 test -z "$ac_c_werror_flag" ||
9034 test ! -s conftest.err
9035 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 ac_hi=$ac_mid
9037else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009039sed 's/^/| /' conftest.$ac_ext >&5
9040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009041 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009043
9044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009045done
9046case $ac_lo in
9047?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009048'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009049 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009050See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009051echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009052See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009053 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009054 else
9055 ac_cv_sizeof_short=0
9056 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009057esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009058else
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009060/* confdefs.h. */
9061_ACEOF
9062cat confdefs.h >>conftest.$ac_ext
9063cat >>conftest.$ac_ext <<_ACEOF
9064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009065$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009066 typedef short ac__type_sizeof_;
9067static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9068static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009069#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009070#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009071int
9072main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009073{
Martin v. Löwis11437992002-04-12 09:54:03 +00009074
9075 FILE *f = fopen ("conftest.val", "w");
9076 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009077 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009078 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009080 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009081 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009083 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 }
9085 else
9086 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009087 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009088 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009090 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009091 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009092 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009093
9094 ;
9095 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009096}
Martin v. Löwis11437992002-04-12 09:54:03 +00009097_ACEOF
9098rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009099if { (ac_try="$ac_link"
9100case "(($ac_try" in
9101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9102 *) ac_try_echo=$ac_try;;
9103esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009105 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009109 { (case "(($ac_try" in
9110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9111 *) ac_try_echo=$ac_try;;
9112esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009114 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 (exit $ac_status); }; }; then
9118 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009119else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009120 echo "$as_me: program exited with status $ac_status" >&5
9121echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009122sed 's/^/| /' conftest.$ac_ext >&5
9123
Martin v. Löwis11437992002-04-12 09:54:03 +00009124( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009125if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009126 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009127See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009128echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009129See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009130 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009131 else
9132 ac_cv_sizeof_short=0
9133 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009135rm -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 +00009136fi
9137rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009138fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009139{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9140echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009141
9142
9143
Martin v. Löwis11437992002-04-12 09:54:03 +00009144cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009145#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009146_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009147
9148
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009149{ echo "$as_me:$LINENO: checking for float" >&5
9150echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9151if test "${ac_cv_type_float+set}" = set; then
9152 echo $ECHO_N "(cached) $ECHO_C" >&6
9153else
9154 cat >conftest.$ac_ext <<_ACEOF
9155/* confdefs.h. */
9156_ACEOF
9157cat confdefs.h >>conftest.$ac_ext
9158cat >>conftest.$ac_ext <<_ACEOF
9159/* end confdefs.h. */
9160$ac_includes_default
9161typedef float ac__type_new_;
9162int
9163main ()
9164{
9165if ((ac__type_new_ *) 0)
9166 return 0;
9167if (sizeof (ac__type_new_))
9168 return 0;
9169 ;
9170 return 0;
9171}
9172_ACEOF
9173rm -f conftest.$ac_objext
9174if { (ac_try="$ac_compile"
9175case "(($ac_try" in
9176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9177 *) ac_try_echo=$ac_try;;
9178esac
9179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9180 (eval "$ac_compile") 2>conftest.er1
9181 ac_status=$?
9182 grep -v '^ *+' conftest.er1 >conftest.err
9183 rm -f conftest.er1
9184 cat conftest.err >&5
9185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9186 (exit $ac_status); } && {
9187 test -z "$ac_c_werror_flag" ||
9188 test ! -s conftest.err
9189 } && test -s conftest.$ac_objext; then
9190 ac_cv_type_float=yes
9191else
9192 echo "$as_me: failed program was:" >&5
9193sed 's/^/| /' conftest.$ac_ext >&5
9194
9195 ac_cv_type_float=no
9196fi
9197
9198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9199fi
9200{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9201echo "${ECHO_T}$ac_cv_type_float" >&6; }
9202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203# The cast to long int works around a bug in the HP C Compiler
9204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9206# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009207{ echo "$as_me:$LINENO: checking size of float" >&5
9208echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009209if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009210 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009211else
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 if test "$cross_compiling" = yes; then
9213 # Depending upon the size, compute the lo and hi bounds.
9214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009215/* confdefs.h. */
9216_ACEOF
9217cat confdefs.h >>conftest.$ac_ext
9218cat >>conftest.$ac_ext <<_ACEOF
9219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009220$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009221 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009222int
9223main ()
9224{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009226test_array [0] = 0
9227
9228 ;
9229 return 0;
9230}
9231_ACEOF
9232rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009233if { (ac_try="$ac_compile"
9234case "(($ac_try" in
9235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9236 *) ac_try_echo=$ac_try;;
9237esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009241 grep -v '^ *+' conftest.er1 >conftest.err
9242 rm -f conftest.er1
9243 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009245 (exit $ac_status); } && {
9246 test -z "$ac_c_werror_flag" ||
9247 test ! -s conftest.err
9248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 ac_lo=0 ac_mid=0
9250 while :; do
9251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009252/* confdefs.h. */
9253_ACEOF
9254cat confdefs.h >>conftest.$ac_ext
9255cat >>conftest.$ac_ext <<_ACEOF
9256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009257$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009258 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009259int
9260main ()
9261{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009262static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009263test_array [0] = 0
9264
9265 ;
9266 return 0;
9267}
9268_ACEOF
9269rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270if { (ac_try="$ac_compile"
9271case "(($ac_try" in
9272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9273 *) ac_try_echo=$ac_try;;
9274esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009278 grep -v '^ *+' conftest.er1 >conftest.err
9279 rm -f conftest.er1
9280 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009282 (exit $ac_status); } && {
9283 test -z "$ac_c_werror_flag" ||
9284 test ! -s conftest.err
9285 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009286 ac_hi=$ac_mid; break
9287else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009289sed 's/^/| /' conftest.$ac_ext >&5
9290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009291 ac_lo=`expr $ac_mid + 1`
9292 if test $ac_lo -le $ac_mid; then
9293 ac_lo= ac_hi=
9294 break
9295 fi
9296 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298
9299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 done
9301else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009303sed 's/^/| /' conftest.$ac_ext >&5
9304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009306/* confdefs.h. */
9307_ACEOF
9308cat confdefs.h >>conftest.$ac_ext
9309cat >>conftest.$ac_ext <<_ACEOF
9310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009311$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009312 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009313int
9314main ()
9315{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009317test_array [0] = 0
9318
9319 ;
9320 return 0;
9321}
9322_ACEOF
9323rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324if { (ac_try="$ac_compile"
9325case "(($ac_try" in
9326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9327 *) ac_try_echo=$ac_try;;
9328esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009332 grep -v '^ *+' conftest.er1 >conftest.err
9333 rm -f conftest.er1
9334 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009336 (exit $ac_status); } && {
9337 test -z "$ac_c_werror_flag" ||
9338 test ! -s conftest.err
9339 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 ac_hi=-1 ac_mid=-1
9341 while :; do
9342 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009343/* confdefs.h. */
9344_ACEOF
9345cat confdefs.h >>conftest.$ac_ext
9346cat >>conftest.$ac_ext <<_ACEOF
9347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009348$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009349 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009350int
9351main ()
9352{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009354test_array [0] = 0
9355
9356 ;
9357 return 0;
9358}
9359_ACEOF
9360rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009361if { (ac_try="$ac_compile"
9362case "(($ac_try" in
9363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9364 *) ac_try_echo=$ac_try;;
9365esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009369 grep -v '^ *+' conftest.er1 >conftest.err
9370 rm -f conftest.er1
9371 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009373 (exit $ac_status); } && {
9374 test -z "$ac_c_werror_flag" ||
9375 test ! -s conftest.err
9376 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 ac_lo=$ac_mid; break
9378else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009380sed 's/^/| /' conftest.$ac_ext >&5
9381
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009382 ac_hi=`expr '(' $ac_mid ')' - 1`
9383 if test $ac_mid -le $ac_hi; then
9384 ac_lo= ac_hi=
9385 break
9386 fi
9387 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389
9390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 done
9392else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009394sed 's/^/| /' conftest.$ac_ext >&5
9395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009396 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009398
9399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401
9402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009403# Binary search between lo and hi bounds.
9404while test "x$ac_lo" != "x$ac_hi"; do
9405 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9406 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009407/* confdefs.h. */
9408_ACEOF
9409cat confdefs.h >>conftest.$ac_ext
9410cat >>conftest.$ac_ext <<_ACEOF
9411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009412$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009413 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009414int
9415main ()
9416{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009417static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009418test_array [0] = 0
9419
9420 ;
9421 return 0;
9422}
9423_ACEOF
9424rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425if { (ac_try="$ac_compile"
9426case "(($ac_try" in
9427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9428 *) ac_try_echo=$ac_try;;
9429esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009433 grep -v '^ *+' conftest.er1 >conftest.err
9434 rm -f conftest.er1
9435 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437 (exit $ac_status); } && {
9438 test -z "$ac_c_werror_flag" ||
9439 test ! -s conftest.err
9440 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 ac_hi=$ac_mid
9442else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009444sed 's/^/| /' conftest.$ac_ext >&5
9445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448
9449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009450done
9451case $ac_lo in
9452?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009455See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009456echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009457See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009458 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459 else
9460 ac_cv_sizeof_float=0
9461 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009462esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009463else
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009465/* confdefs.h. */
9466_ACEOF
9467cat confdefs.h >>conftest.$ac_ext
9468cat >>conftest.$ac_ext <<_ACEOF
9469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009470$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009471 typedef float ac__type_sizeof_;
9472static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9473static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009474#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009475#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009476int
9477main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009478{
Martin v. Löwis11437992002-04-12 09:54:03 +00009479
9480 FILE *f = fopen ("conftest.val", "w");
9481 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009483 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009488 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 }
9490 else
9491 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009493 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009494 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009495 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009497 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009498
9499 ;
9500 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009501}
Martin v. Löwis11437992002-04-12 09:54:03 +00009502_ACEOF
9503rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009504if { (ac_try="$ac_link"
9505case "(($ac_try" in
9506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9507 *) ac_try_echo=$ac_try;;
9508esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514 { (case "(($ac_try" in
9515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9516 *) ac_try_echo=$ac_try;;
9517esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 (exit $ac_status); }; }; then
9523 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009524else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009525 echo "$as_me: program exited with status $ac_status" >&5
9526echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009527sed 's/^/| /' conftest.$ac_ext >&5
9528
Martin v. Löwis11437992002-04-12 09:54:03 +00009529( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009531 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009532See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009533echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009534See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009535 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536 else
9537 ac_cv_sizeof_float=0
9538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540rm -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 +00009541fi
9542rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009543fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009544{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9545echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009546
9547
9548
Martin v. Löwis11437992002-04-12 09:54:03 +00009549cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009550#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009551_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009552
9553
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009554{ echo "$as_me:$LINENO: checking for double" >&5
9555echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9556if test "${ac_cv_type_double+set}" = set; then
9557 echo $ECHO_N "(cached) $ECHO_C" >&6
9558else
9559 cat >conftest.$ac_ext <<_ACEOF
9560/* confdefs.h. */
9561_ACEOF
9562cat confdefs.h >>conftest.$ac_ext
9563cat >>conftest.$ac_ext <<_ACEOF
9564/* end confdefs.h. */
9565$ac_includes_default
9566typedef double ac__type_new_;
9567int
9568main ()
9569{
9570if ((ac__type_new_ *) 0)
9571 return 0;
9572if (sizeof (ac__type_new_))
9573 return 0;
9574 ;
9575 return 0;
9576}
9577_ACEOF
9578rm -f conftest.$ac_objext
9579if { (ac_try="$ac_compile"
9580case "(($ac_try" in
9581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9582 *) ac_try_echo=$ac_try;;
9583esac
9584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9585 (eval "$ac_compile") 2>conftest.er1
9586 ac_status=$?
9587 grep -v '^ *+' conftest.er1 >conftest.err
9588 rm -f conftest.er1
9589 cat conftest.err >&5
9590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9591 (exit $ac_status); } && {
9592 test -z "$ac_c_werror_flag" ||
9593 test ! -s conftest.err
9594 } && test -s conftest.$ac_objext; then
9595 ac_cv_type_double=yes
9596else
9597 echo "$as_me: failed program was:" >&5
9598sed 's/^/| /' conftest.$ac_ext >&5
9599
9600 ac_cv_type_double=no
9601fi
9602
9603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9604fi
9605{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9606echo "${ECHO_T}$ac_cv_type_double" >&6; }
9607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608# The cast to long int works around a bug in the HP C Compiler
9609# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9610# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9611# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009612{ echo "$as_me:$LINENO: checking size of double" >&5
9613echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009614if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009615 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009616else
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 if test "$cross_compiling" = yes; then
9618 # Depending upon the size, compute the lo and hi bounds.
9619cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009620/* confdefs.h. */
9621_ACEOF
9622cat confdefs.h >>conftest.$ac_ext
9623cat >>conftest.$ac_ext <<_ACEOF
9624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009625$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009626 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009627int
9628main ()
9629{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009630static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009631test_array [0] = 0
9632
9633 ;
9634 return 0;
9635}
9636_ACEOF
9637rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638if { (ac_try="$ac_compile"
9639case "(($ac_try" in
9640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9641 *) ac_try_echo=$ac_try;;
9642esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009646 grep -v '^ *+' conftest.er1 >conftest.err
9647 rm -f conftest.er1
9648 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009650 (exit $ac_status); } && {
9651 test -z "$ac_c_werror_flag" ||
9652 test ! -s conftest.err
9653 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 ac_lo=0 ac_mid=0
9655 while :; do
9656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009657/* confdefs.h. */
9658_ACEOF
9659cat confdefs.h >>conftest.$ac_ext
9660cat >>conftest.$ac_ext <<_ACEOF
9661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009662$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009663 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009664int
9665main ()
9666{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009667static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009668test_array [0] = 0
9669
9670 ;
9671 return 0;
9672}
9673_ACEOF
9674rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675if { (ac_try="$ac_compile"
9676case "(($ac_try" in
9677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9678 *) ac_try_echo=$ac_try;;
9679esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009683 grep -v '^ *+' conftest.er1 >conftest.err
9684 rm -f conftest.er1
9685 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687 (exit $ac_status); } && {
9688 test -z "$ac_c_werror_flag" ||
9689 test ! -s conftest.err
9690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ac_hi=$ac_mid; break
9692else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009694sed 's/^/| /' conftest.$ac_ext >&5
9695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696 ac_lo=`expr $ac_mid + 1`
9697 if test $ac_lo -le $ac_mid; then
9698 ac_lo= ac_hi=
9699 break
9700 fi
9701 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703
9704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 done
9706else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009708sed 's/^/| /' conftest.$ac_ext >&5
9709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009711/* confdefs.h. */
9712_ACEOF
9713cat confdefs.h >>conftest.$ac_ext
9714cat >>conftest.$ac_ext <<_ACEOF
9715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009717 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009718int
9719main ()
9720{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009721static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009722test_array [0] = 0
9723
9724 ;
9725 return 0;
9726}
9727_ACEOF
9728rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729if { (ac_try="$ac_compile"
9730case "(($ac_try" in
9731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9732 *) ac_try_echo=$ac_try;;
9733esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009737 grep -v '^ *+' conftest.er1 >conftest.err
9738 rm -f conftest.er1
9739 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741 (exit $ac_status); } && {
9742 test -z "$ac_c_werror_flag" ||
9743 test ! -s conftest.err
9744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 ac_hi=-1 ac_mid=-1
9746 while :; do
9747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009748/* confdefs.h. */
9749_ACEOF
9750cat confdefs.h >>conftest.$ac_ext
9751cat >>conftest.$ac_ext <<_ACEOF
9752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009753$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009754 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009755int
9756main ()
9757{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009758static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009759test_array [0] = 0
9760
9761 ;
9762 return 0;
9763}
9764_ACEOF
9765rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009766if { (ac_try="$ac_compile"
9767case "(($ac_try" in
9768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9769 *) ac_try_echo=$ac_try;;
9770esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009774 grep -v '^ *+' conftest.er1 >conftest.err
9775 rm -f conftest.er1
9776 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778 (exit $ac_status); } && {
9779 test -z "$ac_c_werror_flag" ||
9780 test ! -s conftest.err
9781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ac_lo=$ac_mid; break
9783else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009785sed 's/^/| /' conftest.$ac_ext >&5
9786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787 ac_hi=`expr '(' $ac_mid ')' - 1`
9788 if test $ac_mid -le $ac_hi; then
9789 ac_lo= ac_hi=
9790 break
9791 fi
9792 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794
9795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 done
9797else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009799sed 's/^/| /' conftest.$ac_ext >&5
9800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009803
9804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806
9807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009808# Binary search between lo and hi bounds.
9809while test "x$ac_lo" != "x$ac_hi"; do
9810 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009812/* confdefs.h. */
9813_ACEOF
9814cat confdefs.h >>conftest.$ac_ext
9815cat >>conftest.$ac_ext <<_ACEOF
9816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009817$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009818 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009819int
9820main ()
9821{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009823test_array [0] = 0
9824
9825 ;
9826 return 0;
9827}
9828_ACEOF
9829rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830if { (ac_try="$ac_compile"
9831case "(($ac_try" in
9832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9833 *) ac_try_echo=$ac_try;;
9834esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009838 grep -v '^ *+' conftest.er1 >conftest.err
9839 rm -f conftest.er1
9840 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842 (exit $ac_status); } && {
9843 test -z "$ac_c_werror_flag" ||
9844 test ! -s conftest.err
9845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 ac_hi=$ac_mid
9847else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009849sed 's/^/| /' conftest.$ac_ext >&5
9850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009851 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853
9854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009855done
9856case $ac_lo in
9857?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009859 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009860See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009861echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009862See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009863 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864 else
9865 ac_cv_sizeof_double=0
9866 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009867esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009868else
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009870/* confdefs.h. */
9871_ACEOF
9872cat confdefs.h >>conftest.$ac_ext
9873cat >>conftest.$ac_ext <<_ACEOF
9874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009875$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009876 typedef double ac__type_sizeof_;
9877static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9878static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009879#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009880#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009881int
9882main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009883{
Martin v. Löwis11437992002-04-12 09:54:03 +00009884
9885 FILE *f = fopen ("conftest.val", "w");
9886 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009888 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009891 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009893 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 }
9895 else
9896 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009898 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009899 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009900 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009903
9904 ;
9905 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009906}
Martin v. Löwis11437992002-04-12 09:54:03 +00009907_ACEOF
9908rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909if { (ac_try="$ac_link"
9910case "(($ac_try" in
9911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9912 *) ac_try_echo=$ac_try;;
9913esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009918 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919 { (case "(($ac_try" in
9920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9921 *) ac_try_echo=$ac_try;;
9922esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 (exit $ac_status); }; }; then
9928 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009929else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009930 echo "$as_me: program exited with status $ac_status" >&5
9931echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009932sed 's/^/| /' conftest.$ac_ext >&5
9933
Martin v. Löwis11437992002-04-12 09:54:03 +00009934( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009936 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009937See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009938echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009939See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009940 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009941 else
9942 ac_cv_sizeof_double=0
9943 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009945rm -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 +00009946fi
9947rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009948fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009949{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9950echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009951
9952
9953
Martin v. Löwis11437992002-04-12 09:54:03 +00009954cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009955#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009956_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009957
9958
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009959{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9960echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9961if test "${ac_cv_type_fpos_t+set}" = set; then
9962 echo $ECHO_N "(cached) $ECHO_C" >&6
9963else
9964 cat >conftest.$ac_ext <<_ACEOF
9965/* confdefs.h. */
9966_ACEOF
9967cat confdefs.h >>conftest.$ac_ext
9968cat >>conftest.$ac_ext <<_ACEOF
9969/* end confdefs.h. */
9970$ac_includes_default
9971typedef fpos_t ac__type_new_;
9972int
9973main ()
9974{
9975if ((ac__type_new_ *) 0)
9976 return 0;
9977if (sizeof (ac__type_new_))
9978 return 0;
9979 ;
9980 return 0;
9981}
9982_ACEOF
9983rm -f conftest.$ac_objext
9984if { (ac_try="$ac_compile"
9985case "(($ac_try" in
9986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9987 *) ac_try_echo=$ac_try;;
9988esac
9989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9990 (eval "$ac_compile") 2>conftest.er1
9991 ac_status=$?
9992 grep -v '^ *+' conftest.er1 >conftest.err
9993 rm -f conftest.er1
9994 cat conftest.err >&5
9995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9996 (exit $ac_status); } && {
9997 test -z "$ac_c_werror_flag" ||
9998 test ! -s conftest.err
9999 } && test -s conftest.$ac_objext; then
10000 ac_cv_type_fpos_t=yes
10001else
10002 echo "$as_me: failed program was:" >&5
10003sed 's/^/| /' conftest.$ac_ext >&5
10004
10005 ac_cv_type_fpos_t=no
10006fi
10007
10008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10009fi
10010{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10011echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013# The cast to long int works around a bug in the HP C Compiler
10014# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10015# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10016# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010017{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10018echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010019if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010020 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010021else
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 if test "$cross_compiling" = yes; then
10023 # Depending upon the size, compute the lo and hi bounds.
10024cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010025/* confdefs.h. */
10026_ACEOF
10027cat confdefs.h >>conftest.$ac_ext
10028cat >>conftest.$ac_ext <<_ACEOF
10029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010030$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010031 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010032int
10033main ()
10034{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010035static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010036test_array [0] = 0
10037
10038 ;
10039 return 0;
10040}
10041_ACEOF
10042rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010043if { (ac_try="$ac_compile"
10044case "(($ac_try" in
10045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10046 *) ac_try_echo=$ac_try;;
10047esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010051 grep -v '^ *+' conftest.er1 >conftest.err
10052 rm -f conftest.er1
10053 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055 (exit $ac_status); } && {
10056 test -z "$ac_c_werror_flag" ||
10057 test ! -s conftest.err
10058 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010059 ac_lo=0 ac_mid=0
10060 while :; do
10061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010062/* confdefs.h. */
10063_ACEOF
10064cat confdefs.h >>conftest.$ac_ext
10065cat >>conftest.$ac_ext <<_ACEOF
10066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010067$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010068 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010069int
10070main ()
10071{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010072static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010073test_array [0] = 0
10074
10075 ;
10076 return 0;
10077}
10078_ACEOF
10079rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010080if { (ac_try="$ac_compile"
10081case "(($ac_try" in
10082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10083 *) ac_try_echo=$ac_try;;
10084esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010086 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010088 grep -v '^ *+' conftest.er1 >conftest.err
10089 rm -f conftest.er1
10090 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092 (exit $ac_status); } && {
10093 test -z "$ac_c_werror_flag" ||
10094 test ! -s conftest.err
10095 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010096 ac_hi=$ac_mid; break
10097else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010099sed 's/^/| /' conftest.$ac_ext >&5
10100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101 ac_lo=`expr $ac_mid + 1`
10102 if test $ac_lo -le $ac_mid; then
10103 ac_lo= ac_hi=
10104 break
10105 fi
10106 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108
10109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 done
10111else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010113sed 's/^/| /' conftest.$ac_ext >&5
10114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010116/* confdefs.h. */
10117_ACEOF
10118cat confdefs.h >>conftest.$ac_ext
10119cat >>conftest.$ac_ext <<_ACEOF
10120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010121$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010122 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010123int
10124main ()
10125{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010127test_array [0] = 0
10128
10129 ;
10130 return 0;
10131}
10132_ACEOF
10133rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134if { (ac_try="$ac_compile"
10135case "(($ac_try" in
10136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10137 *) ac_try_echo=$ac_try;;
10138esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010142 grep -v '^ *+' conftest.er1 >conftest.err
10143 rm -f conftest.er1
10144 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146 (exit $ac_status); } && {
10147 test -z "$ac_c_werror_flag" ||
10148 test ! -s conftest.err
10149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 ac_hi=-1 ac_mid=-1
10151 while :; do
10152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010153/* confdefs.h. */
10154_ACEOF
10155cat confdefs.h >>conftest.$ac_ext
10156cat >>conftest.$ac_ext <<_ACEOF
10157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010158$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010159 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010160int
10161main ()
10162{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010163static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010164test_array [0] = 0
10165
10166 ;
10167 return 0;
10168}
10169_ACEOF
10170rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171if { (ac_try="$ac_compile"
10172case "(($ac_try" in
10173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10174 *) ac_try_echo=$ac_try;;
10175esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010179 grep -v '^ *+' conftest.er1 >conftest.err
10180 rm -f conftest.er1
10181 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010183 (exit $ac_status); } && {
10184 test -z "$ac_c_werror_flag" ||
10185 test ! -s conftest.err
10186 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ac_lo=$ac_mid; break
10188else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010190sed 's/^/| /' conftest.$ac_ext >&5
10191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192 ac_hi=`expr '(' $ac_mid ')' - 1`
10193 if test $ac_mid -le $ac_hi; then
10194 ac_lo= ac_hi=
10195 break
10196 fi
10197 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199
10200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 done
10202else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010204sed 's/^/| /' conftest.$ac_ext >&5
10205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208
10209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010211
10212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010213# Binary search between lo and hi bounds.
10214while test "x$ac_lo" != "x$ac_hi"; do
10215 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10216 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* confdefs.h. */
10218_ACEOF
10219cat confdefs.h >>conftest.$ac_ext
10220cat >>conftest.$ac_ext <<_ACEOF
10221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010222$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010223 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010224int
10225main ()
10226{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010227static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010228test_array [0] = 0
10229
10230 ;
10231 return 0;
10232}
10233_ACEOF
10234rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010235if { (ac_try="$ac_compile"
10236case "(($ac_try" in
10237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10238 *) ac_try_echo=$ac_try;;
10239esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010243 grep -v '^ *+' conftest.er1 >conftest.err
10244 rm -f conftest.er1
10245 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247 (exit $ac_status); } && {
10248 test -z "$ac_c_werror_flag" ||
10249 test ! -s conftest.err
10250 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 ac_hi=$ac_mid
10252else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010254sed 's/^/| /' conftest.$ac_ext >&5
10255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258
10259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010260done
10261case $ac_lo in
10262?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010264 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010265See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010266echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010267See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010268 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269 else
10270 ac_cv_sizeof_fpos_t=0
10271 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010272esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010273else
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010275/* confdefs.h. */
10276_ACEOF
10277cat confdefs.h >>conftest.$ac_ext
10278cat >>conftest.$ac_ext <<_ACEOF
10279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010280$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010281 typedef fpos_t ac__type_sizeof_;
10282static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10283static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010284#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010285#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010286int
10287main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010288{
Martin v. Löwis11437992002-04-12 09:54:03 +000010289
10290 FILE *f = fopen ("conftest.val", "w");
10291 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010292 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010293 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010294 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010296 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010298 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 }
10300 else
10301 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010303 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010305 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010308
10309 ;
10310 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010311}
Martin v. Löwis11437992002-04-12 09:54:03 +000010312_ACEOF
10313rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010314if { (ac_try="$ac_link"
10315case "(($ac_try" in
10316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10317 *) ac_try_echo=$ac_try;;
10318esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324 { (case "(($ac_try" in
10325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10326 *) ac_try_echo=$ac_try;;
10327esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 (exit $ac_status); }; }; then
10333 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010334else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010335 echo "$as_me: program exited with status $ac_status" >&5
10336echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010337sed 's/^/| /' conftest.$ac_ext >&5
10338
Martin v. Löwis11437992002-04-12 09:54:03 +000010339( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010341 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010342See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010343echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010344See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010345 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346 else
10347 ac_cv_sizeof_fpos_t=0
10348 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350rm -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 +000010351fi
10352rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010353fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010354{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10355echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010356
10357
10358
Martin v. Löwis11437992002-04-12 09:54:03 +000010359cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010360#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010361_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010362
Michael W. Hudson54241132001-12-07 15:38:26 +000010363
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010364{ echo "$as_me:$LINENO: checking for size_t" >&5
10365echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10366if test "${ac_cv_type_size_t+set}" = set; then
10367 echo $ECHO_N "(cached) $ECHO_C" >&6
10368else
10369 cat >conftest.$ac_ext <<_ACEOF
10370/* confdefs.h. */
10371_ACEOF
10372cat confdefs.h >>conftest.$ac_ext
10373cat >>conftest.$ac_ext <<_ACEOF
10374/* end confdefs.h. */
10375$ac_includes_default
10376typedef size_t ac__type_new_;
10377int
10378main ()
10379{
10380if ((ac__type_new_ *) 0)
10381 return 0;
10382if (sizeof (ac__type_new_))
10383 return 0;
10384 ;
10385 return 0;
10386}
10387_ACEOF
10388rm -f conftest.$ac_objext
10389if { (ac_try="$ac_compile"
10390case "(($ac_try" in
10391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10392 *) ac_try_echo=$ac_try;;
10393esac
10394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10395 (eval "$ac_compile") 2>conftest.er1
10396 ac_status=$?
10397 grep -v '^ *+' conftest.er1 >conftest.err
10398 rm -f conftest.er1
10399 cat conftest.err >&5
10400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10401 (exit $ac_status); } && {
10402 test -z "$ac_c_werror_flag" ||
10403 test ! -s conftest.err
10404 } && test -s conftest.$ac_objext; then
10405 ac_cv_type_size_t=yes
10406else
10407 echo "$as_me: failed program was:" >&5
10408sed 's/^/| /' conftest.$ac_ext >&5
10409
10410 ac_cv_type_size_t=no
10411fi
10412
10413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10414fi
10415{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10416echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418# The cast to long int works around a bug in the HP C Compiler
10419# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10420# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10421# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010422{ echo "$as_me:$LINENO: checking size of size_t" >&5
10423echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010425 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010426else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010427 if test "$cross_compiling" = yes; then
10428 # Depending upon the size, compute the lo and hi bounds.
10429cat >conftest.$ac_ext <<_ACEOF
10430/* confdefs.h. */
10431_ACEOF
10432cat confdefs.h >>conftest.$ac_ext
10433cat >>conftest.$ac_ext <<_ACEOF
10434/* end confdefs.h. */
10435$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010436 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010437int
10438main ()
10439{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010440static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010441test_array [0] = 0
10442
10443 ;
10444 return 0;
10445}
10446_ACEOF
10447rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448if { (ac_try="$ac_compile"
10449case "(($ac_try" in
10450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10451 *) ac_try_echo=$ac_try;;
10452esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010455 ac_status=$?
10456 grep -v '^ *+' conftest.er1 >conftest.err
10457 rm -f conftest.er1
10458 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010460 (exit $ac_status); } && {
10461 test -z "$ac_c_werror_flag" ||
10462 test ! -s conftest.err
10463 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010464 ac_lo=0 ac_mid=0
10465 while :; do
10466 cat >conftest.$ac_ext <<_ACEOF
10467/* confdefs.h. */
10468_ACEOF
10469cat confdefs.h >>conftest.$ac_ext
10470cat >>conftest.$ac_ext <<_ACEOF
10471/* end confdefs.h. */
10472$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010473 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010474int
10475main ()
10476{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010477static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010478test_array [0] = 0
10479
10480 ;
10481 return 0;
10482}
10483_ACEOF
10484rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010485if { (ac_try="$ac_compile"
10486case "(($ac_try" in
10487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10488 *) ac_try_echo=$ac_try;;
10489esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010491 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010492 ac_status=$?
10493 grep -v '^ *+' conftest.er1 >conftest.err
10494 rm -f conftest.er1
10495 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010497 (exit $ac_status); } && {
10498 test -z "$ac_c_werror_flag" ||
10499 test ! -s conftest.err
10500 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010501 ac_hi=$ac_mid; break
10502else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010503 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010504sed 's/^/| /' conftest.$ac_ext >&5
10505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506 ac_lo=`expr $ac_mid + 1`
10507 if test $ac_lo -le $ac_mid; then
10508 ac_lo= ac_hi=
10509 break
10510 fi
10511 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010513
10514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010515 done
10516else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010517 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518sed 's/^/| /' conftest.$ac_ext >&5
10519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521/* confdefs.h. */
10522_ACEOF
10523cat confdefs.h >>conftest.$ac_ext
10524cat >>conftest.$ac_ext <<_ACEOF
10525/* end confdefs.h. */
10526$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010527 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528int
10529main ()
10530{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010531static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532test_array [0] = 0
10533
10534 ;
10535 return 0;
10536}
10537_ACEOF
10538rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539if { (ac_try="$ac_compile"
10540case "(($ac_try" in
10541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10542 *) ac_try_echo=$ac_try;;
10543esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010546 ac_status=$?
10547 grep -v '^ *+' conftest.er1 >conftest.err
10548 rm -f conftest.er1
10549 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010551 (exit $ac_status); } && {
10552 test -z "$ac_c_werror_flag" ||
10553 test ! -s conftest.err
10554 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010555 ac_hi=-1 ac_mid=-1
10556 while :; do
10557 cat >conftest.$ac_ext <<_ACEOF
10558/* confdefs.h. */
10559_ACEOF
10560cat confdefs.h >>conftest.$ac_ext
10561cat >>conftest.$ac_ext <<_ACEOF
10562/* end confdefs.h. */
10563$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010564 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010565int
10566main ()
10567{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010568static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569test_array [0] = 0
10570
10571 ;
10572 return 0;
10573}
10574_ACEOF
10575rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576if { (ac_try="$ac_compile"
10577case "(($ac_try" in
10578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10579 *) ac_try_echo=$ac_try;;
10580esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010583 ac_status=$?
10584 grep -v '^ *+' conftest.er1 >conftest.err
10585 rm -f conftest.er1
10586 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010588 (exit $ac_status); } && {
10589 test -z "$ac_c_werror_flag" ||
10590 test ! -s conftest.err
10591 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592 ac_lo=$ac_mid; break
10593else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010594 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010595sed 's/^/| /' conftest.$ac_ext >&5
10596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597 ac_hi=`expr '(' $ac_mid ')' - 1`
10598 if test $ac_mid -le $ac_hi; then
10599 ac_lo= ac_hi=
10600 break
10601 fi
10602 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010604
10605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010606 done
10607else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010608 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010609sed 's/^/| /' conftest.$ac_ext >&5
10610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010611 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010613
10614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616
10617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010618# Binary search between lo and hi bounds.
10619while test "x$ac_lo" != "x$ac_hi"; do
10620 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10621 cat >conftest.$ac_ext <<_ACEOF
10622/* confdefs.h. */
10623_ACEOF
10624cat confdefs.h >>conftest.$ac_ext
10625cat >>conftest.$ac_ext <<_ACEOF
10626/* end confdefs.h. */
10627$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010628 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010629int
10630main ()
10631{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010632static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010633test_array [0] = 0
10634
10635 ;
10636 return 0;
10637}
10638_ACEOF
10639rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640if { (ac_try="$ac_compile"
10641case "(($ac_try" in
10642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10643 *) ac_try_echo=$ac_try;;
10644esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010647 ac_status=$?
10648 grep -v '^ *+' conftest.er1 >conftest.err
10649 rm -f conftest.er1
10650 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652 (exit $ac_status); } && {
10653 test -z "$ac_c_werror_flag" ||
10654 test ! -s conftest.err
10655 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010656 ac_hi=$ac_mid
10657else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010658 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659sed 's/^/| /' conftest.$ac_ext >&5
10660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663
10664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665done
10666case $ac_lo in
10667?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010669 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010671echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010673 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674 else
10675 ac_cv_sizeof_size_t=0
10676 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677esac
10678else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010679 cat >conftest.$ac_ext <<_ACEOF
10680/* confdefs.h. */
10681_ACEOF
10682cat confdefs.h >>conftest.$ac_ext
10683cat >>conftest.$ac_ext <<_ACEOF
10684/* end confdefs.h. */
10685$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010686 typedef size_t ac__type_sizeof_;
10687static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10688static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010689#include <stdio.h>
10690#include <stdlib.h>
10691int
10692main ()
10693{
10694
10695 FILE *f = fopen ("conftest.val", "w");
10696 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010697 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010698 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010701 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010703 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704 }
10705 else
10706 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010708 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010710 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010711 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010713
10714 ;
10715 return 0;
10716}
10717_ACEOF
10718rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719if { (ac_try="$ac_link"
10720case "(($ac_try" in
10721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10722 *) ac_try_echo=$ac_try;;
10723esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010725 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010726 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010728 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729 { (case "(($ac_try" in
10730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10731 *) ac_try_echo=$ac_try;;
10732esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010737 (exit $ac_status); }; }; then
10738 ac_cv_sizeof_size_t=`cat conftest.val`
10739else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010740 echo "$as_me: program exited with status $ac_status" >&5
10741echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742sed 's/^/| /' conftest.$ac_ext >&5
10743
10744( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010746 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010748echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010749See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010750 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010751 else
10752 ac_cv_sizeof_size_t=0
10753 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010755rm -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 +000010756fi
10757rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010758fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010759{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10760echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010761
10762
10763
Martin v. Löwis18e16552006-02-15 17:27:45 +000010764cat >>confdefs.h <<_ACEOF
10765#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10766_ACEOF
10767
10768
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010769{ echo "$as_me:$LINENO: checking for pid_t" >&5
10770echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10771if test "${ac_cv_type_pid_t+set}" = set; then
10772 echo $ECHO_N "(cached) $ECHO_C" >&6
10773else
10774 cat >conftest.$ac_ext <<_ACEOF
10775/* confdefs.h. */
10776_ACEOF
10777cat confdefs.h >>conftest.$ac_ext
10778cat >>conftest.$ac_ext <<_ACEOF
10779/* end confdefs.h. */
10780$ac_includes_default
10781typedef pid_t ac__type_new_;
10782int
10783main ()
10784{
10785if ((ac__type_new_ *) 0)
10786 return 0;
10787if (sizeof (ac__type_new_))
10788 return 0;
10789 ;
10790 return 0;
10791}
10792_ACEOF
10793rm -f conftest.$ac_objext
10794if { (ac_try="$ac_compile"
10795case "(($ac_try" in
10796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10797 *) ac_try_echo=$ac_try;;
10798esac
10799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10800 (eval "$ac_compile") 2>conftest.er1
10801 ac_status=$?
10802 grep -v '^ *+' conftest.er1 >conftest.err
10803 rm -f conftest.er1
10804 cat conftest.err >&5
10805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10806 (exit $ac_status); } && {
10807 test -z "$ac_c_werror_flag" ||
10808 test ! -s conftest.err
10809 } && test -s conftest.$ac_objext; then
10810 ac_cv_type_pid_t=yes
10811else
10812 echo "$as_me: failed program was:" >&5
10813sed 's/^/| /' conftest.$ac_ext >&5
10814
10815 ac_cv_type_pid_t=no
10816fi
10817
10818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10819fi
10820{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10821echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10822
Christian Heimes400adb02008-02-01 08:12:03 +000010823# The cast to long int works around a bug in the HP C Compiler
10824# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10825# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10826# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010827{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10828echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010829if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010830 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010831else
10832 if test "$cross_compiling" = yes; then
10833 # Depending upon the size, compute the lo and hi bounds.
10834cat >conftest.$ac_ext <<_ACEOF
10835/* confdefs.h. */
10836_ACEOF
10837cat confdefs.h >>conftest.$ac_ext
10838cat >>conftest.$ac_ext <<_ACEOF
10839/* end confdefs.h. */
10840$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010841 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010842int
10843main ()
10844{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010845static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010846test_array [0] = 0
10847
10848 ;
10849 return 0;
10850}
10851_ACEOF
10852rm -f conftest.$ac_objext
10853if { (ac_try="$ac_compile"
10854case "(($ac_try" in
10855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10856 *) ac_try_echo=$ac_try;;
10857esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010859 (eval "$ac_compile") 2>conftest.er1
10860 ac_status=$?
10861 grep -v '^ *+' conftest.er1 >conftest.err
10862 rm -f conftest.er1
10863 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010865 (exit $ac_status); } && {
10866 test -z "$ac_c_werror_flag" ||
10867 test ! -s conftest.err
10868 } && test -s conftest.$ac_objext; then
10869 ac_lo=0 ac_mid=0
10870 while :; do
10871 cat >conftest.$ac_ext <<_ACEOF
10872/* confdefs.h. */
10873_ACEOF
10874cat confdefs.h >>conftest.$ac_ext
10875cat >>conftest.$ac_ext <<_ACEOF
10876/* end confdefs.h. */
10877$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010878 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010879int
10880main ()
10881{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010882static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010883test_array [0] = 0
10884
10885 ;
10886 return 0;
10887}
10888_ACEOF
10889rm -f conftest.$ac_objext
10890if { (ac_try="$ac_compile"
10891case "(($ac_try" in
10892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10893 *) ac_try_echo=$ac_try;;
10894esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010896 (eval "$ac_compile") 2>conftest.er1
10897 ac_status=$?
10898 grep -v '^ *+' conftest.er1 >conftest.err
10899 rm -f conftest.er1
10900 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010902 (exit $ac_status); } && {
10903 test -z "$ac_c_werror_flag" ||
10904 test ! -s conftest.err
10905 } && test -s conftest.$ac_objext; then
10906 ac_hi=$ac_mid; break
10907else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010908 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010909sed 's/^/| /' conftest.$ac_ext >&5
10910
10911 ac_lo=`expr $ac_mid + 1`
10912 if test $ac_lo -le $ac_mid; then
10913 ac_lo= ac_hi=
10914 break
10915 fi
10916 ac_mid=`expr 2 '*' $ac_mid + 1`
10917fi
10918
10919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10920 done
10921else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010922 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010923sed 's/^/| /' conftest.$ac_ext >&5
10924
10925 cat >conftest.$ac_ext <<_ACEOF
10926/* confdefs.h. */
10927_ACEOF
10928cat confdefs.h >>conftest.$ac_ext
10929cat >>conftest.$ac_ext <<_ACEOF
10930/* end confdefs.h. */
10931$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010932 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010933int
10934main ()
10935{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010936static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010937test_array [0] = 0
10938
10939 ;
10940 return 0;
10941}
10942_ACEOF
10943rm -f conftest.$ac_objext
10944if { (ac_try="$ac_compile"
10945case "(($ac_try" in
10946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10947 *) ac_try_echo=$ac_try;;
10948esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010950 (eval "$ac_compile") 2>conftest.er1
10951 ac_status=$?
10952 grep -v '^ *+' conftest.er1 >conftest.err
10953 rm -f conftest.er1
10954 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010956 (exit $ac_status); } && {
10957 test -z "$ac_c_werror_flag" ||
10958 test ! -s conftest.err
10959 } && test -s conftest.$ac_objext; then
10960 ac_hi=-1 ac_mid=-1
10961 while :; do
10962 cat >conftest.$ac_ext <<_ACEOF
10963/* confdefs.h. */
10964_ACEOF
10965cat confdefs.h >>conftest.$ac_ext
10966cat >>conftest.$ac_ext <<_ACEOF
10967/* end confdefs.h. */
10968$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010969 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010970int
10971main ()
10972{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010973static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010974test_array [0] = 0
10975
10976 ;
10977 return 0;
10978}
10979_ACEOF
10980rm -f conftest.$ac_objext
10981if { (ac_try="$ac_compile"
10982case "(($ac_try" in
10983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10984 *) ac_try_echo=$ac_try;;
10985esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010987 (eval "$ac_compile") 2>conftest.er1
10988 ac_status=$?
10989 grep -v '^ *+' conftest.er1 >conftest.err
10990 rm -f conftest.er1
10991 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010993 (exit $ac_status); } && {
10994 test -z "$ac_c_werror_flag" ||
10995 test ! -s conftest.err
10996 } && test -s conftest.$ac_objext; then
10997 ac_lo=$ac_mid; break
10998else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010999 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011000sed 's/^/| /' conftest.$ac_ext >&5
11001
11002 ac_hi=`expr '(' $ac_mid ')' - 1`
11003 if test $ac_mid -le $ac_hi; then
11004 ac_lo= ac_hi=
11005 break
11006 fi
11007 ac_mid=`expr 2 '*' $ac_mid`
11008fi
11009
11010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011 done
11012else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011013 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011014sed 's/^/| /' conftest.$ac_ext >&5
11015
11016 ac_lo= ac_hi=
11017fi
11018
11019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11020fi
11021
11022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11023# Binary search between lo and hi bounds.
11024while test "x$ac_lo" != "x$ac_hi"; do
11025 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11026 cat >conftest.$ac_ext <<_ACEOF
11027/* confdefs.h. */
11028_ACEOF
11029cat confdefs.h >>conftest.$ac_ext
11030cat >>conftest.$ac_ext <<_ACEOF
11031/* end confdefs.h. */
11032$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011033 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011034int
11035main ()
11036{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011037static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011038test_array [0] = 0
11039
11040 ;
11041 return 0;
11042}
11043_ACEOF
11044rm -f conftest.$ac_objext
11045if { (ac_try="$ac_compile"
11046case "(($ac_try" in
11047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11048 *) ac_try_echo=$ac_try;;
11049esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011051 (eval "$ac_compile") 2>conftest.er1
11052 ac_status=$?
11053 grep -v '^ *+' conftest.er1 >conftest.err
11054 rm -f conftest.er1
11055 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011057 (exit $ac_status); } && {
11058 test -z "$ac_c_werror_flag" ||
11059 test ! -s conftest.err
11060 } && test -s conftest.$ac_objext; then
11061 ac_hi=$ac_mid
11062else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011063 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011064sed 's/^/| /' conftest.$ac_ext >&5
11065
11066 ac_lo=`expr '(' $ac_mid ')' + 1`
11067fi
11068
11069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11070done
11071case $ac_lo in
11072?*) ac_cv_sizeof_pid_t=$ac_lo;;
11073'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011074 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011075See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011076echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011077See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011078 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011079 else
11080 ac_cv_sizeof_pid_t=0
11081 fi ;;
11082esac
11083else
11084 cat >conftest.$ac_ext <<_ACEOF
11085/* confdefs.h. */
11086_ACEOF
11087cat confdefs.h >>conftest.$ac_ext
11088cat >>conftest.$ac_ext <<_ACEOF
11089/* end confdefs.h. */
11090$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011091 typedef pid_t ac__type_sizeof_;
11092static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11093static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011094#include <stdio.h>
11095#include <stdlib.h>
11096int
11097main ()
11098{
11099
11100 FILE *f = fopen ("conftest.val", "w");
11101 if (! f)
11102 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011103 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011104 {
11105 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011106 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011107 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011108 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011109 }
11110 else
11111 {
11112 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011113 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011114 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011115 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011116 }
11117 return ferror (f) || fclose (f) != 0;
11118
11119 ;
11120 return 0;
11121}
11122_ACEOF
11123rm -f conftest$ac_exeext
11124if { (ac_try="$ac_link"
11125case "(($ac_try" in
11126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11127 *) ac_try_echo=$ac_try;;
11128esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011130 (eval "$ac_link") 2>&5
11131 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011133 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11134 { (case "(($ac_try" in
11135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11136 *) ac_try_echo=$ac_try;;
11137esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011139 (eval "$ac_try") 2>&5
11140 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011142 (exit $ac_status); }; }; then
11143 ac_cv_sizeof_pid_t=`cat conftest.val`
11144else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011145 echo "$as_me: program exited with status $ac_status" >&5
11146echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011147sed 's/^/| /' conftest.$ac_ext >&5
11148
11149( exit $ac_status )
11150if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011151 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011152See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011153echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011154See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011155 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011156 else
11157 ac_cv_sizeof_pid_t=0
11158 fi
11159fi
11160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11161fi
11162rm -f conftest.val
11163fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011164{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11165echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011166
11167
11168
11169cat >>confdefs.h <<_ACEOF
11170#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11171_ACEOF
11172
11173
Michael W. Hudson54241132001-12-07 15:38:26 +000011174
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011175{ echo "$as_me:$LINENO: checking for long long support" >&5
11176echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011177have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011178cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011179/* confdefs.h. */
11180_ACEOF
11181cat confdefs.h >>conftest.$ac_ext
11182cat >>conftest.$ac_ext <<_ACEOF
11183/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011184
Martin v. Löwis11437992002-04-12 09:54:03 +000011185int
11186main ()
11187{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011188long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011189 ;
11190 return 0;
11191}
11192_ACEOF
11193rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194if { (ac_try="$ac_compile"
11195case "(($ac_try" in
11196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11197 *) ac_try_echo=$ac_try;;
11198esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011202 grep -v '^ *+' conftest.er1 >conftest.err
11203 rm -f conftest.er1
11204 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206 (exit $ac_status); } && {
11207 test -z "$ac_c_werror_flag" ||
11208 test ! -s conftest.err
11209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011210
11211
11212cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011213#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011214_ACEOF
11215
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011216 have_long_long=yes
11217
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011218else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011220sed 's/^/| /' conftest.$ac_ext >&5
11221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011222
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011224
11225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011226{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11227echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011228if test "$have_long_long" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011229{ echo "$as_me:$LINENO: checking for long long" >&5
11230echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11231if test "${ac_cv_type_long_long+set}" = set; then
11232 echo $ECHO_N "(cached) $ECHO_C" >&6
11233else
11234 cat >conftest.$ac_ext <<_ACEOF
11235/* confdefs.h. */
11236_ACEOF
11237cat confdefs.h >>conftest.$ac_ext
11238cat >>conftest.$ac_ext <<_ACEOF
11239/* end confdefs.h. */
11240$ac_includes_default
11241typedef long long ac__type_new_;
11242int
11243main ()
11244{
11245if ((ac__type_new_ *) 0)
11246 return 0;
11247if (sizeof (ac__type_new_))
11248 return 0;
11249 ;
11250 return 0;
11251}
11252_ACEOF
11253rm -f conftest.$ac_objext
11254if { (ac_try="$ac_compile"
11255case "(($ac_try" in
11256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11257 *) ac_try_echo=$ac_try;;
11258esac
11259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11260 (eval "$ac_compile") 2>conftest.er1
11261 ac_status=$?
11262 grep -v '^ *+' conftest.er1 >conftest.err
11263 rm -f conftest.er1
11264 cat conftest.err >&5
11265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11266 (exit $ac_status); } && {
11267 test -z "$ac_c_werror_flag" ||
11268 test ! -s conftest.err
11269 } && test -s conftest.$ac_objext; then
11270 ac_cv_type_long_long=yes
11271else
11272 echo "$as_me: failed program was:" >&5
11273sed 's/^/| /' conftest.$ac_ext >&5
11274
11275 ac_cv_type_long_long=no
11276fi
11277
11278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11279fi
11280{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11281echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011283# The cast to long int works around a bug in the HP C Compiler
11284# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11285# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11286# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011287{ echo "$as_me:$LINENO: checking size of long long" >&5
11288echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011289if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011290 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011291else
Martin v. Löwis11437992002-04-12 09:54:03 +000011292 if test "$cross_compiling" = yes; then
11293 # Depending upon the size, compute the lo and hi bounds.
11294cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011295/* confdefs.h. */
11296_ACEOF
11297cat confdefs.h >>conftest.$ac_ext
11298cat >>conftest.$ac_ext <<_ACEOF
11299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011300$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011301 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011302int
11303main ()
11304{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011306test_array [0] = 0
11307
11308 ;
11309 return 0;
11310}
11311_ACEOF
11312rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313if { (ac_try="$ac_compile"
11314case "(($ac_try" in
11315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11316 *) ac_try_echo=$ac_try;;
11317esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011321 grep -v '^ *+' conftest.er1 >conftest.err
11322 rm -f conftest.er1
11323 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011325 (exit $ac_status); } && {
11326 test -z "$ac_c_werror_flag" ||
11327 test ! -s conftest.err
11328 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011329 ac_lo=0 ac_mid=0
11330 while :; do
11331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011332/* confdefs.h. */
11333_ACEOF
11334cat confdefs.h >>conftest.$ac_ext
11335cat >>conftest.$ac_ext <<_ACEOF
11336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011337$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011338 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011339int
11340main ()
11341{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011343test_array [0] = 0
11344
11345 ;
11346 return 0;
11347}
11348_ACEOF
11349rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350if { (ac_try="$ac_compile"
11351case "(($ac_try" in
11352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11353 *) ac_try_echo=$ac_try;;
11354esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011358 grep -v '^ *+' conftest.er1 >conftest.err
11359 rm -f conftest.er1
11360 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011362 (exit $ac_status); } && {
11363 test -z "$ac_c_werror_flag" ||
11364 test ! -s conftest.err
11365 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 ac_hi=$ac_mid; break
11367else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011369sed 's/^/| /' conftest.$ac_ext >&5
11370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371 ac_lo=`expr $ac_mid + 1`
11372 if test $ac_lo -le $ac_mid; then
11373 ac_lo= ac_hi=
11374 break
11375 fi
11376 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378
11379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 done
11381else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011383sed 's/^/| /' conftest.$ac_ext >&5
11384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011386/* confdefs.h. */
11387_ACEOF
11388cat confdefs.h >>conftest.$ac_ext
11389cat >>conftest.$ac_ext <<_ACEOF
11390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011391$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011392 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011393int
11394main ()
11395{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011397test_array [0] = 0
11398
11399 ;
11400 return 0;
11401}
11402_ACEOF
11403rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404if { (ac_try="$ac_compile"
11405case "(($ac_try" in
11406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11407 *) ac_try_echo=$ac_try;;
11408esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011412 grep -v '^ *+' conftest.er1 >conftest.err
11413 rm -f conftest.er1
11414 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416 (exit $ac_status); } && {
11417 test -z "$ac_c_werror_flag" ||
11418 test ! -s conftest.err
11419 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 ac_hi=-1 ac_mid=-1
11421 while :; do
11422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011423/* confdefs.h. */
11424_ACEOF
11425cat confdefs.h >>conftest.$ac_ext
11426cat >>conftest.$ac_ext <<_ACEOF
11427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011428$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011429 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011430int
11431main ()
11432{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011433static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011434test_array [0] = 0
11435
11436 ;
11437 return 0;
11438}
11439_ACEOF
11440rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441if { (ac_try="$ac_compile"
11442case "(($ac_try" in
11443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11444 *) ac_try_echo=$ac_try;;
11445esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011449 grep -v '^ *+' conftest.er1 >conftest.err
11450 rm -f conftest.er1
11451 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011453 (exit $ac_status); } && {
11454 test -z "$ac_c_werror_flag" ||
11455 test ! -s conftest.err
11456 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 ac_lo=$ac_mid; break
11458else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011460sed 's/^/| /' conftest.$ac_ext >&5
11461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011462 ac_hi=`expr '(' $ac_mid ')' - 1`
11463 if test $ac_mid -le $ac_hi; then
11464 ac_lo= ac_hi=
11465 break
11466 fi
11467 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469
11470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 done
11472else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011474sed 's/^/| /' conftest.$ac_ext >&5
11475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011476 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011478
11479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011481
11482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011483# Binary search between lo and hi bounds.
11484while test "x$ac_lo" != "x$ac_hi"; do
11485 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011487/* confdefs.h. */
11488_ACEOF
11489cat confdefs.h >>conftest.$ac_ext
11490cat >>conftest.$ac_ext <<_ACEOF
11491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011492$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011493 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011494int
11495main ()
11496{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011497static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011498test_array [0] = 0
11499
11500 ;
11501 return 0;
11502}
11503_ACEOF
11504rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505if { (ac_try="$ac_compile"
11506case "(($ac_try" in
11507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11508 *) ac_try_echo=$ac_try;;
11509esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011513 grep -v '^ *+' conftest.er1 >conftest.err
11514 rm -f conftest.er1
11515 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517 (exit $ac_status); } && {
11518 test -z "$ac_c_werror_flag" ||
11519 test ! -s conftest.err
11520 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 ac_hi=$ac_mid
11522else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011524sed 's/^/| /' conftest.$ac_ext >&5
11525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528
11529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011530done
11531case $ac_lo in
11532?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011534 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011535See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011536echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011537See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011538 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539 else
11540 ac_cv_sizeof_long_long=0
11541 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011542esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011543else
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011545/* confdefs.h. */
11546_ACEOF
11547cat confdefs.h >>conftest.$ac_ext
11548cat >>conftest.$ac_ext <<_ACEOF
11549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011550$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011551 typedef long long ac__type_sizeof_;
11552static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11553static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011554#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011555#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011556int
11557main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011558{
Martin v. Löwis11437992002-04-12 09:54:03 +000011559
11560 FILE *f = fopen ("conftest.val", "w");
11561 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011563 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011564 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011566 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011568 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 }
11570 else
11571 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011573 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011575 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011578
11579 ;
11580 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011581}
Martin v. Löwis11437992002-04-12 09:54:03 +000011582_ACEOF
11583rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011584if { (ac_try="$ac_link"
11585case "(($ac_try" in
11586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11587 *) ac_try_echo=$ac_try;;
11588esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594 { (case "(($ac_try" in
11595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11596 *) ac_try_echo=$ac_try;;
11597esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011599 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011602 (exit $ac_status); }; }; then
11603 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011604else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011605 echo "$as_me: program exited with status $ac_status" >&5
11606echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011607sed 's/^/| /' conftest.$ac_ext >&5
11608
Martin v. Löwis11437992002-04-12 09:54:03 +000011609( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011610if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011611 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011612See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011613echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011614See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011615 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011616 else
11617 ac_cv_sizeof_long_long=0
11618 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011620rm -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 +000011621fi
11622rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011623fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011624{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11625echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011626
11627
11628
Martin v. Löwis11437992002-04-12 09:54:03 +000011629cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011630#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011631_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011632
Michael W. Hudson54241132001-12-07 15:38:26 +000011633
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011634fi
11635
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011636{ echo "$as_me:$LINENO: checking for long double support" >&5
11637echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011638have_long_double=no
11639cat >conftest.$ac_ext <<_ACEOF
11640/* confdefs.h. */
11641_ACEOF
11642cat confdefs.h >>conftest.$ac_ext
11643cat >>conftest.$ac_ext <<_ACEOF
11644/* end confdefs.h. */
11645
11646int
11647main ()
11648{
11649long double x; x = (long double)0;
11650 ;
11651 return 0;
11652}
11653_ACEOF
11654rm -f conftest.$ac_objext
11655if { (ac_try="$ac_compile"
11656case "(($ac_try" in
11657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11658 *) ac_try_echo=$ac_try;;
11659esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011661 (eval "$ac_compile") 2>conftest.er1
11662 ac_status=$?
11663 grep -v '^ *+' conftest.er1 >conftest.err
11664 rm -f conftest.er1
11665 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011667 (exit $ac_status); } && {
11668 test -z "$ac_c_werror_flag" ||
11669 test ! -s conftest.err
11670 } && test -s conftest.$ac_objext; then
11671
11672
11673cat >>confdefs.h <<\_ACEOF
11674#define HAVE_LONG_DOUBLE 1
11675_ACEOF
11676
11677 have_long_double=yes
11678
11679else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011680 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011681sed 's/^/| /' conftest.$ac_ext >&5
11682
11683
11684fi
11685
11686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011687{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11688echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011689if test "$have_long_double" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011690{ echo "$as_me:$LINENO: checking for long double" >&5
11691echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11692if test "${ac_cv_type_long_double+set}" = set; then
11693 echo $ECHO_N "(cached) $ECHO_C" >&6
11694else
11695 cat >conftest.$ac_ext <<_ACEOF
11696/* confdefs.h. */
11697_ACEOF
11698cat confdefs.h >>conftest.$ac_ext
11699cat >>conftest.$ac_ext <<_ACEOF
11700/* end confdefs.h. */
11701$ac_includes_default
11702typedef long double ac__type_new_;
11703int
11704main ()
11705{
11706if ((ac__type_new_ *) 0)
11707 return 0;
11708if (sizeof (ac__type_new_))
11709 return 0;
11710 ;
11711 return 0;
11712}
11713_ACEOF
11714rm -f conftest.$ac_objext
11715if { (ac_try="$ac_compile"
11716case "(($ac_try" in
11717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11718 *) ac_try_echo=$ac_try;;
11719esac
11720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11721 (eval "$ac_compile") 2>conftest.er1
11722 ac_status=$?
11723 grep -v '^ *+' conftest.er1 >conftest.err
11724 rm -f conftest.er1
11725 cat conftest.err >&5
11726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11727 (exit $ac_status); } && {
11728 test -z "$ac_c_werror_flag" ||
11729 test ! -s conftest.err
11730 } && test -s conftest.$ac_objext; then
11731 ac_cv_type_long_double=yes
11732else
11733 echo "$as_me: failed program was:" >&5
11734sed 's/^/| /' conftest.$ac_ext >&5
11735
11736 ac_cv_type_long_double=no
11737fi
11738
11739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11740fi
11741{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11742echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11743
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011744# The cast to long int works around a bug in the HP C Compiler
11745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11747# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011748{ echo "$as_me:$LINENO: checking size of long double" >&5
11749echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011750if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011751 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011752else
11753 if test "$cross_compiling" = yes; then
11754 # Depending upon the size, compute the lo and hi bounds.
11755cat >conftest.$ac_ext <<_ACEOF
11756/* confdefs.h. */
11757_ACEOF
11758cat confdefs.h >>conftest.$ac_ext
11759cat >>conftest.$ac_ext <<_ACEOF
11760/* end confdefs.h. */
11761$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011762 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011763int
11764main ()
11765{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011766static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011767test_array [0] = 0
11768
11769 ;
11770 return 0;
11771}
11772_ACEOF
11773rm -f conftest.$ac_objext
11774if { (ac_try="$ac_compile"
11775case "(($ac_try" in
11776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11777 *) ac_try_echo=$ac_try;;
11778esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011780 (eval "$ac_compile") 2>conftest.er1
11781 ac_status=$?
11782 grep -v '^ *+' conftest.er1 >conftest.err
11783 rm -f conftest.er1
11784 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011786 (exit $ac_status); } && {
11787 test -z "$ac_c_werror_flag" ||
11788 test ! -s conftest.err
11789 } && test -s conftest.$ac_objext; then
11790 ac_lo=0 ac_mid=0
11791 while :; do
11792 cat >conftest.$ac_ext <<_ACEOF
11793/* confdefs.h. */
11794_ACEOF
11795cat confdefs.h >>conftest.$ac_ext
11796cat >>conftest.$ac_ext <<_ACEOF
11797/* end confdefs.h. */
11798$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011799 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011800int
11801main ()
11802{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011803static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011804test_array [0] = 0
11805
11806 ;
11807 return 0;
11808}
11809_ACEOF
11810rm -f conftest.$ac_objext
11811if { (ac_try="$ac_compile"
11812case "(($ac_try" in
11813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11814 *) ac_try_echo=$ac_try;;
11815esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011817 (eval "$ac_compile") 2>conftest.er1
11818 ac_status=$?
11819 grep -v '^ *+' conftest.er1 >conftest.err
11820 rm -f conftest.er1
11821 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011823 (exit $ac_status); } && {
11824 test -z "$ac_c_werror_flag" ||
11825 test ! -s conftest.err
11826 } && test -s conftest.$ac_objext; then
11827 ac_hi=$ac_mid; break
11828else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011829 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011830sed 's/^/| /' conftest.$ac_ext >&5
11831
11832 ac_lo=`expr $ac_mid + 1`
11833 if test $ac_lo -le $ac_mid; then
11834 ac_lo= ac_hi=
11835 break
11836 fi
11837 ac_mid=`expr 2 '*' $ac_mid + 1`
11838fi
11839
11840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11841 done
11842else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011843 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011844sed 's/^/| /' conftest.$ac_ext >&5
11845
11846 cat >conftest.$ac_ext <<_ACEOF
11847/* confdefs.h. */
11848_ACEOF
11849cat confdefs.h >>conftest.$ac_ext
11850cat >>conftest.$ac_ext <<_ACEOF
11851/* end confdefs.h. */
11852$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011853 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011854int
11855main ()
11856{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011857static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011858test_array [0] = 0
11859
11860 ;
11861 return 0;
11862}
11863_ACEOF
11864rm -f conftest.$ac_objext
11865if { (ac_try="$ac_compile"
11866case "(($ac_try" in
11867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11868 *) ac_try_echo=$ac_try;;
11869esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011871 (eval "$ac_compile") 2>conftest.er1
11872 ac_status=$?
11873 grep -v '^ *+' conftest.er1 >conftest.err
11874 rm -f conftest.er1
11875 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011877 (exit $ac_status); } && {
11878 test -z "$ac_c_werror_flag" ||
11879 test ! -s conftest.err
11880 } && test -s conftest.$ac_objext; then
11881 ac_hi=-1 ac_mid=-1
11882 while :; do
11883 cat >conftest.$ac_ext <<_ACEOF
11884/* confdefs.h. */
11885_ACEOF
11886cat confdefs.h >>conftest.$ac_ext
11887cat >>conftest.$ac_ext <<_ACEOF
11888/* end confdefs.h. */
11889$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011890 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011891int
11892main ()
11893{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011894static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011895test_array [0] = 0
11896
11897 ;
11898 return 0;
11899}
11900_ACEOF
11901rm -f conftest.$ac_objext
11902if { (ac_try="$ac_compile"
11903case "(($ac_try" in
11904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11905 *) ac_try_echo=$ac_try;;
11906esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011908 (eval "$ac_compile") 2>conftest.er1
11909 ac_status=$?
11910 grep -v '^ *+' conftest.er1 >conftest.err
11911 rm -f conftest.er1
11912 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011914 (exit $ac_status); } && {
11915 test -z "$ac_c_werror_flag" ||
11916 test ! -s conftest.err
11917 } && test -s conftest.$ac_objext; then
11918 ac_lo=$ac_mid; break
11919else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011920 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011921sed 's/^/| /' conftest.$ac_ext >&5
11922
11923 ac_hi=`expr '(' $ac_mid ')' - 1`
11924 if test $ac_mid -le $ac_hi; then
11925 ac_lo= ac_hi=
11926 break
11927 fi
11928 ac_mid=`expr 2 '*' $ac_mid`
11929fi
11930
11931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11932 done
11933else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011934 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011935sed 's/^/| /' conftest.$ac_ext >&5
11936
11937 ac_lo= ac_hi=
11938fi
11939
11940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11941fi
11942
11943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11944# Binary search between lo and hi bounds.
11945while test "x$ac_lo" != "x$ac_hi"; do
11946 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11947 cat >conftest.$ac_ext <<_ACEOF
11948/* confdefs.h. */
11949_ACEOF
11950cat confdefs.h >>conftest.$ac_ext
11951cat >>conftest.$ac_ext <<_ACEOF
11952/* end confdefs.h. */
11953$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011954 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011955int
11956main ()
11957{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011958static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011959test_array [0] = 0
11960
11961 ;
11962 return 0;
11963}
11964_ACEOF
11965rm -f conftest.$ac_objext
11966if { (ac_try="$ac_compile"
11967case "(($ac_try" in
11968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11969 *) ac_try_echo=$ac_try;;
11970esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011972 (eval "$ac_compile") 2>conftest.er1
11973 ac_status=$?
11974 grep -v '^ *+' conftest.er1 >conftest.err
11975 rm -f conftest.er1
11976 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011978 (exit $ac_status); } && {
11979 test -z "$ac_c_werror_flag" ||
11980 test ! -s conftest.err
11981 } && test -s conftest.$ac_objext; then
11982 ac_hi=$ac_mid
11983else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011984 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011985sed 's/^/| /' conftest.$ac_ext >&5
11986
11987 ac_lo=`expr '(' $ac_mid ')' + 1`
11988fi
11989
11990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11991done
11992case $ac_lo in
11993?*) ac_cv_sizeof_long_double=$ac_lo;;
11994'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011995 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011996See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011997echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011998See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011999 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012000 else
12001 ac_cv_sizeof_long_double=0
12002 fi ;;
12003esac
12004else
12005 cat >conftest.$ac_ext <<_ACEOF
12006/* confdefs.h. */
12007_ACEOF
12008cat confdefs.h >>conftest.$ac_ext
12009cat >>conftest.$ac_ext <<_ACEOF
12010/* end confdefs.h. */
12011$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012012 typedef long double ac__type_sizeof_;
12013static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12014static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012015#include <stdio.h>
12016#include <stdlib.h>
12017int
12018main ()
12019{
12020
12021 FILE *f = fopen ("conftest.val", "w");
12022 if (! f)
12023 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012024 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012025 {
12026 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012027 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012028 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012029 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012030 }
12031 else
12032 {
12033 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012034 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012035 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012036 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012037 }
12038 return ferror (f) || fclose (f) != 0;
12039
12040 ;
12041 return 0;
12042}
12043_ACEOF
12044rm -f conftest$ac_exeext
12045if { (ac_try="$ac_link"
12046case "(($ac_try" in
12047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12048 *) ac_try_echo=$ac_try;;
12049esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012051 (eval "$ac_link") 2>&5
12052 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012054 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12055 { (case "(($ac_try" in
12056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12057 *) ac_try_echo=$ac_try;;
12058esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012060 (eval "$ac_try") 2>&5
12061 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012063 (exit $ac_status); }; }; then
12064 ac_cv_sizeof_long_double=`cat conftest.val`
12065else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012066 echo "$as_me: program exited with status $ac_status" >&5
12067echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012068sed 's/^/| /' conftest.$ac_ext >&5
12069
12070( exit $ac_status )
12071if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012072 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012073See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012074echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012075See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012076 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012077 else
12078 ac_cv_sizeof_long_double=0
12079 fi
12080fi
12081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12082fi
12083rm -f conftest.val
12084fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012085{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12086echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012087
12088
12089
12090cat >>confdefs.h <<_ACEOF
12091#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12092_ACEOF
12093
12094
12095fi
12096
12097
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012098{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12099echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012100have_c99_bool=no
12101cat >conftest.$ac_ext <<_ACEOF
12102/* confdefs.h. */
12103_ACEOF
12104cat confdefs.h >>conftest.$ac_ext
12105cat >>conftest.$ac_ext <<_ACEOF
12106/* end confdefs.h. */
12107
12108int
12109main ()
12110{
12111_Bool x; x = (_Bool)0;
12112 ;
12113 return 0;
12114}
12115_ACEOF
12116rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117if { (ac_try="$ac_compile"
12118case "(($ac_try" in
12119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12120 *) ac_try_echo=$ac_try;;
12121esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012123 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012124 ac_status=$?
12125 grep -v '^ *+' conftest.er1 >conftest.err
12126 rm -f conftest.er1
12127 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129 (exit $ac_status); } && {
12130 test -z "$ac_c_werror_flag" ||
12131 test ! -s conftest.err
12132 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012133
12134
12135cat >>confdefs.h <<\_ACEOF
12136#define HAVE_C99_BOOL 1
12137_ACEOF
12138
12139 have_c99_bool=yes
12140
12141else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012142 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012143sed 's/^/| /' conftest.$ac_ext >&5
12144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012145
Thomas Woutersb2137042007-02-01 18:02:27 +000012146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012147
12148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012149{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12150echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012151if test "$have_c99_bool" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012152{ echo "$as_me:$LINENO: checking for _Bool" >&5
12153echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12154if test "${ac_cv_type__Bool+set}" = set; then
12155 echo $ECHO_N "(cached) $ECHO_C" >&6
12156else
12157 cat >conftest.$ac_ext <<_ACEOF
12158/* confdefs.h. */
12159_ACEOF
12160cat confdefs.h >>conftest.$ac_ext
12161cat >>conftest.$ac_ext <<_ACEOF
12162/* end confdefs.h. */
12163$ac_includes_default
12164typedef _Bool ac__type_new_;
12165int
12166main ()
12167{
12168if ((ac__type_new_ *) 0)
12169 return 0;
12170if (sizeof (ac__type_new_))
12171 return 0;
12172 ;
12173 return 0;
12174}
12175_ACEOF
12176rm -f conftest.$ac_objext
12177if { (ac_try="$ac_compile"
12178case "(($ac_try" in
12179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12180 *) ac_try_echo=$ac_try;;
12181esac
12182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12183 (eval "$ac_compile") 2>conftest.er1
12184 ac_status=$?
12185 grep -v '^ *+' conftest.er1 >conftest.err
12186 rm -f conftest.er1
12187 cat conftest.err >&5
12188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12189 (exit $ac_status); } && {
12190 test -z "$ac_c_werror_flag" ||
12191 test ! -s conftest.err
12192 } && test -s conftest.$ac_objext; then
12193 ac_cv_type__Bool=yes
12194else
12195 echo "$as_me: failed program was:" >&5
12196sed 's/^/| /' conftest.$ac_ext >&5
12197
12198 ac_cv_type__Bool=no
12199fi
12200
12201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12202fi
12203{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12204echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206# The cast to long int works around a bug in the HP C Compiler
12207# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12208# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12209# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012210{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12211echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012212if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012213 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012214else
12215 if test "$cross_compiling" = yes; then
12216 # Depending upon the size, compute the lo and hi bounds.
12217cat >conftest.$ac_ext <<_ACEOF
12218/* confdefs.h. */
12219_ACEOF
12220cat confdefs.h >>conftest.$ac_ext
12221cat >>conftest.$ac_ext <<_ACEOF
12222/* end confdefs.h. */
12223$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012224 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012225int
12226main ()
12227{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012229test_array [0] = 0
12230
12231 ;
12232 return 0;
12233}
12234_ACEOF
12235rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236if { (ac_try="$ac_compile"
12237case "(($ac_try" in
12238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12239 *) ac_try_echo=$ac_try;;
12240esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012242 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012243 ac_status=$?
12244 grep -v '^ *+' conftest.er1 >conftest.err
12245 rm -f conftest.er1
12246 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012248 (exit $ac_status); } && {
12249 test -z "$ac_c_werror_flag" ||
12250 test ! -s conftest.err
12251 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012252 ac_lo=0 ac_mid=0
12253 while :; do
12254 cat >conftest.$ac_ext <<_ACEOF
12255/* confdefs.h. */
12256_ACEOF
12257cat confdefs.h >>conftest.$ac_ext
12258cat >>conftest.$ac_ext <<_ACEOF
12259/* end confdefs.h. */
12260$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012261 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012262int
12263main ()
12264{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012265static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012266test_array [0] = 0
12267
12268 ;
12269 return 0;
12270}
12271_ACEOF
12272rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273if { (ac_try="$ac_compile"
12274case "(($ac_try" in
12275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12276 *) ac_try_echo=$ac_try;;
12277esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012279 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012280 ac_status=$?
12281 grep -v '^ *+' conftest.er1 >conftest.err
12282 rm -f conftest.er1
12283 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285 (exit $ac_status); } && {
12286 test -z "$ac_c_werror_flag" ||
12287 test ! -s conftest.err
12288 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012289 ac_hi=$ac_mid; break
12290else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012291 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012292sed 's/^/| /' conftest.$ac_ext >&5
12293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012294 ac_lo=`expr $ac_mid + 1`
12295 if test $ac_lo -le $ac_mid; then
12296 ac_lo= ac_hi=
12297 break
12298 fi
12299 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301
12302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012303 done
12304else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012305 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012306sed 's/^/| /' conftest.$ac_ext >&5
12307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012309/* confdefs.h. */
12310_ACEOF
12311cat confdefs.h >>conftest.$ac_ext
12312cat >>conftest.$ac_ext <<_ACEOF
12313/* end confdefs.h. */
12314$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012315 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012316int
12317main ()
12318{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012320test_array [0] = 0
12321
12322 ;
12323 return 0;
12324}
12325_ACEOF
12326rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327if { (ac_try="$ac_compile"
12328case "(($ac_try" in
12329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12330 *) ac_try_echo=$ac_try;;
12331esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012334 ac_status=$?
12335 grep -v '^ *+' conftest.er1 >conftest.err
12336 rm -f conftest.er1
12337 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339 (exit $ac_status); } && {
12340 test -z "$ac_c_werror_flag" ||
12341 test ! -s conftest.err
12342 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012343 ac_hi=-1 ac_mid=-1
12344 while :; do
12345 cat >conftest.$ac_ext <<_ACEOF
12346/* confdefs.h. */
12347_ACEOF
12348cat confdefs.h >>conftest.$ac_ext
12349cat >>conftest.$ac_ext <<_ACEOF
12350/* end confdefs.h. */
12351$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012352 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012353int
12354main ()
12355{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012356static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012357test_array [0] = 0
12358
12359 ;
12360 return 0;
12361}
12362_ACEOF
12363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364if { (ac_try="$ac_compile"
12365case "(($ac_try" in
12366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12367 *) ac_try_echo=$ac_try;;
12368esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012371 ac_status=$?
12372 grep -v '^ *+' conftest.er1 >conftest.err
12373 rm -f conftest.er1
12374 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376 (exit $ac_status); } && {
12377 test -z "$ac_c_werror_flag" ||
12378 test ! -s conftest.err
12379 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012380 ac_lo=$ac_mid; break
12381else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012382 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012383sed 's/^/| /' conftest.$ac_ext >&5
12384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385 ac_hi=`expr '(' $ac_mid ')' - 1`
12386 if test $ac_mid -le $ac_hi; then
12387 ac_lo= ac_hi=
12388 break
12389 fi
12390 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392
12393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012394 done
12395else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012396 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012397sed 's/^/| /' conftest.$ac_ext >&5
12398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012401
12402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012404
12405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012406# Binary search between lo and hi bounds.
12407while test "x$ac_lo" != "x$ac_hi"; do
12408 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12409 cat >conftest.$ac_ext <<_ACEOF
12410/* confdefs.h. */
12411_ACEOF
12412cat confdefs.h >>conftest.$ac_ext
12413cat >>conftest.$ac_ext <<_ACEOF
12414/* end confdefs.h. */
12415$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012416 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012417int
12418main ()
12419{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012420static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012421test_array [0] = 0
12422
12423 ;
12424 return 0;
12425}
12426_ACEOF
12427rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428if { (ac_try="$ac_compile"
12429case "(($ac_try" in
12430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12431 *) ac_try_echo=$ac_try;;
12432esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012434 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012435 ac_status=$?
12436 grep -v '^ *+' conftest.er1 >conftest.err
12437 rm -f conftest.er1
12438 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440 (exit $ac_status); } && {
12441 test -z "$ac_c_werror_flag" ||
12442 test ! -s conftest.err
12443 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012444 ac_hi=$ac_mid
12445else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012446 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012447sed 's/^/| /' conftest.$ac_ext >&5
12448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451
12452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012453done
12454case $ac_lo in
12455?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012457 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012458See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012459echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012460See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012461 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462 else
12463 ac_cv_sizeof__Bool=0
12464 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012465esac
12466else
12467 cat >conftest.$ac_ext <<_ACEOF
12468/* confdefs.h. */
12469_ACEOF
12470cat confdefs.h >>conftest.$ac_ext
12471cat >>conftest.$ac_ext <<_ACEOF
12472/* end confdefs.h. */
12473$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012474 typedef _Bool ac__type_sizeof_;
12475static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12476static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012477#include <stdio.h>
12478#include <stdlib.h>
12479int
12480main ()
12481{
12482
12483 FILE *f = fopen ("conftest.val", "w");
12484 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012485 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012486 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012487 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012489 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012491 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012492 }
12493 else
12494 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012495 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012496 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012497 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012498 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012499 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012501
12502 ;
12503 return 0;
12504}
12505_ACEOF
12506rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507if { (ac_try="$ac_link"
12508case "(($ac_try" in
12509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12510 *) ac_try_echo=$ac_try;;
12511esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012513 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012514 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012516 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012517 { (case "(($ac_try" in
12518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12519 *) ac_try_echo=$ac_try;;
12520esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012523 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012525 (exit $ac_status); }; }; then
12526 ac_cv_sizeof__Bool=`cat conftest.val`
12527else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012528 echo "$as_me: program exited with status $ac_status" >&5
12529echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012530sed 's/^/| /' conftest.$ac_ext >&5
12531
12532( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012534 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012535See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012536echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012537See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012538 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539 else
12540 ac_cv_sizeof__Bool=0
12541 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543rm -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 +000012544fi
12545rm -f conftest.val
12546fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012547{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12548echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549
12550
12551
Thomas Woutersb2137042007-02-01 18:02:27 +000012552cat >>confdefs.h <<_ACEOF
12553#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12554_ACEOF
12555
12556
12557fi
12558
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012559{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12560echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012561if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012562 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012563else
12564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012565/* confdefs.h. */
12566_ACEOF
12567cat confdefs.h >>conftest.$ac_ext
12568cat >>conftest.$ac_ext <<_ACEOF
12569/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012570#ifdef HAVE_STDINT_H
12571 #include <stdint.h>
12572 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012573
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012574typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012575int
12576main ()
12577{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012578if ((ac__type_new_ *) 0)
12579 return 0;
12580if (sizeof (ac__type_new_))
12581 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012582 ;
12583 return 0;
12584}
12585_ACEOF
12586rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012587if { (ac_try="$ac_compile"
12588case "(($ac_try" in
12589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12590 *) ac_try_echo=$ac_try;;
12591esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012595 grep -v '^ *+' conftest.er1 >conftest.err
12596 rm -f conftest.er1
12597 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599 (exit $ac_status); } && {
12600 test -z "$ac_c_werror_flag" ||
12601 test ! -s conftest.err
12602 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012603 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012604else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012606sed 's/^/| /' conftest.$ac_ext >&5
12607
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012608 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012610
12611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012612fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012613{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12614echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12615if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012616
12617cat >>confdefs.h <<_ACEOF
12618#define HAVE_UINTPTR_T 1
12619_ACEOF
12620
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012621{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12622echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12623if test "${ac_cv_type_uintptr_t+set}" = set; then
12624 echo $ECHO_N "(cached) $ECHO_C" >&6
12625else
12626 cat >conftest.$ac_ext <<_ACEOF
12627/* confdefs.h. */
12628_ACEOF
12629cat confdefs.h >>conftest.$ac_ext
12630cat >>conftest.$ac_ext <<_ACEOF
12631/* end confdefs.h. */
12632$ac_includes_default
12633typedef uintptr_t ac__type_new_;
12634int
12635main ()
12636{
12637if ((ac__type_new_ *) 0)
12638 return 0;
12639if (sizeof (ac__type_new_))
12640 return 0;
12641 ;
12642 return 0;
12643}
12644_ACEOF
12645rm -f conftest.$ac_objext
12646if { (ac_try="$ac_compile"
12647case "(($ac_try" in
12648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12649 *) ac_try_echo=$ac_try;;
12650esac
12651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12652 (eval "$ac_compile") 2>conftest.er1
12653 ac_status=$?
12654 grep -v '^ *+' conftest.er1 >conftest.err
12655 rm -f conftest.er1
12656 cat conftest.err >&5
12657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12658 (exit $ac_status); } && {
12659 test -z "$ac_c_werror_flag" ||
12660 test ! -s conftest.err
12661 } && test -s conftest.$ac_objext; then
12662 ac_cv_type_uintptr_t=yes
12663else
12664 echo "$as_me: failed program was:" >&5
12665sed 's/^/| /' conftest.$ac_ext >&5
12666
12667 ac_cv_type_uintptr_t=no
12668fi
12669
12670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12671fi
12672{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12673echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675# The cast to long int works around a bug in the HP C Compiler
12676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12678# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012679{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12680echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012681if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012682 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012683else
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 if test "$cross_compiling" = yes; then
12685 # Depending upon the size, compute the lo and hi bounds.
12686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012687/* confdefs.h. */
12688_ACEOF
12689cat confdefs.h >>conftest.$ac_ext
12690cat >>conftest.$ac_ext <<_ACEOF
12691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012692$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012693 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012694int
12695main ()
12696{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012697static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012698test_array [0] = 0
12699
12700 ;
12701 return 0;
12702}
12703_ACEOF
12704rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705if { (ac_try="$ac_compile"
12706case "(($ac_try" in
12707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12708 *) ac_try_echo=$ac_try;;
12709esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012713 grep -v '^ *+' conftest.er1 >conftest.err
12714 rm -f conftest.er1
12715 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012717 (exit $ac_status); } && {
12718 test -z "$ac_c_werror_flag" ||
12719 test ! -s conftest.err
12720 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012721 ac_lo=0 ac_mid=0
12722 while :; do
12723 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012724/* confdefs.h. */
12725_ACEOF
12726cat confdefs.h >>conftest.$ac_ext
12727cat >>conftest.$ac_ext <<_ACEOF
12728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012729$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012730 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012731int
12732main ()
12733{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012734static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012735test_array [0] = 0
12736
12737 ;
12738 return 0;
12739}
12740_ACEOF
12741rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742if { (ac_try="$ac_compile"
12743case "(($ac_try" in
12744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12745 *) ac_try_echo=$ac_try;;
12746esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012750 grep -v '^ *+' conftest.er1 >conftest.err
12751 rm -f conftest.er1
12752 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012754 (exit $ac_status); } && {
12755 test -z "$ac_c_werror_flag" ||
12756 test ! -s conftest.err
12757 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012758 ac_hi=$ac_mid; break
12759else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012761sed 's/^/| /' conftest.$ac_ext >&5
12762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012763 ac_lo=`expr $ac_mid + 1`
12764 if test $ac_lo -le $ac_mid; then
12765 ac_lo= ac_hi=
12766 break
12767 fi
12768 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770
12771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012772 done
12773else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012775sed 's/^/| /' conftest.$ac_ext >&5
12776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012778/* confdefs.h. */
12779_ACEOF
12780cat confdefs.h >>conftest.$ac_ext
12781cat >>conftest.$ac_ext <<_ACEOF
12782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012783$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012784 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012785int
12786main ()
12787{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012788static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012789test_array [0] = 0
12790
12791 ;
12792 return 0;
12793}
12794_ACEOF
12795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796if { (ac_try="$ac_compile"
12797case "(($ac_try" in
12798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12799 *) ac_try_echo=$ac_try;;
12800esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012804 grep -v '^ *+' conftest.er1 >conftest.err
12805 rm -f conftest.er1
12806 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012808 (exit $ac_status); } && {
12809 test -z "$ac_c_werror_flag" ||
12810 test ! -s conftest.err
12811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ac_hi=-1 ac_mid=-1
12813 while :; do
12814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012815/* confdefs.h. */
12816_ACEOF
12817cat confdefs.h >>conftest.$ac_ext
12818cat >>conftest.$ac_ext <<_ACEOF
12819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012820$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012821 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012822int
12823main ()
12824{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012825static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012826test_array [0] = 0
12827
12828 ;
12829 return 0;
12830}
12831_ACEOF
12832rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012833if { (ac_try="$ac_compile"
12834case "(($ac_try" in
12835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12836 *) ac_try_echo=$ac_try;;
12837esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012839 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012841 grep -v '^ *+' conftest.er1 >conftest.err
12842 rm -f conftest.er1
12843 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012845 (exit $ac_status); } && {
12846 test -z "$ac_c_werror_flag" ||
12847 test ! -s conftest.err
12848 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012849 ac_lo=$ac_mid; break
12850else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012852sed 's/^/| /' conftest.$ac_ext >&5
12853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854 ac_hi=`expr '(' $ac_mid ')' - 1`
12855 if test $ac_mid -le $ac_hi; then
12856 ac_lo= ac_hi=
12857 break
12858 fi
12859 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861
12862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 done
12864else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012866sed 's/^/| /' conftest.$ac_ext >&5
12867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012870
12871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012873
12874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012875# Binary search between lo and hi bounds.
12876while test "x$ac_lo" != "x$ac_hi"; do
12877 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012879/* confdefs.h. */
12880_ACEOF
12881cat confdefs.h >>conftest.$ac_ext
12882cat >>conftest.$ac_ext <<_ACEOF
12883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012884$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012885 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012886int
12887main ()
12888{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012889static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012890test_array [0] = 0
12891
12892 ;
12893 return 0;
12894}
12895_ACEOF
12896rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897if { (ac_try="$ac_compile"
12898case "(($ac_try" in
12899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12900 *) ac_try_echo=$ac_try;;
12901esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012905 grep -v '^ *+' conftest.er1 >conftest.err
12906 rm -f conftest.er1
12907 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909 (exit $ac_status); } && {
12910 test -z "$ac_c_werror_flag" ||
12911 test ! -s conftest.err
12912 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 ac_hi=$ac_mid
12914else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012916sed 's/^/| /' conftest.$ac_ext >&5
12917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920
12921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012922done
12923case $ac_lo in
12924?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012926 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012927See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012928echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012929See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012930 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931 else
12932 ac_cv_sizeof_uintptr_t=0
12933 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012934esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012935else
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012937/* confdefs.h. */
12938_ACEOF
12939cat confdefs.h >>conftest.$ac_ext
12940cat >>conftest.$ac_ext <<_ACEOF
12941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012942$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012943 typedef uintptr_t ac__type_sizeof_;
12944static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12945static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012946#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012947#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012948int
12949main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012950{
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
12952 FILE *f = fopen ("conftest.val", "w");
12953 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012954 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012955 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012956 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012958 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012960 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 }
12962 else
12963 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012965 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012967 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012968 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012969 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012970
12971 ;
12972 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012973}
Martin v. Löwis11437992002-04-12 09:54:03 +000012974_ACEOF
12975rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976if { (ac_try="$ac_link"
12977case "(($ac_try" in
12978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12979 *) ac_try_echo=$ac_try;;
12980esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986 { (case "(($ac_try" in
12987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12988 *) ac_try_echo=$ac_try;;
12989esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012991 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012994 (exit $ac_status); }; }; then
12995 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012996else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012997 echo "$as_me: program exited with status $ac_status" >&5
12998echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012999sed 's/^/| /' conftest.$ac_ext >&5
13000
Martin v. Löwis11437992002-04-12 09:54:03 +000013001( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013002if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013003 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013004See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013005echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013006See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013007 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008 else
13009 ac_cv_sizeof_uintptr_t=0
13010 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012rm -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 +000013013fi
13014rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013015fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013016{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13017echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018
13019
13020
Martin v. Löwis11437992002-04-12 09:54:03 +000013021cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013022#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013023_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013024
Michael W. Hudson54241132001-12-07 15:38:26 +000013025
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013026fi
13027
Thomas Wouters89f507f2006-12-13 04:49:30 +000013028
13029
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013030# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013031{ echo "$as_me:$LINENO: checking size of off_t" >&5
13032echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013033if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013034 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013035else
13036 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013037 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013038else
Martin v. Löwis11437992002-04-12 09:54:03 +000013039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013040/* confdefs.h. */
13041_ACEOF
13042cat confdefs.h >>conftest.$ac_ext
13043cat >>conftest.$ac_ext <<_ACEOF
13044/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013045#include <stdio.h>
13046#include <sys/types.h>
13047main()
13048{
13049 FILE *f=fopen("conftestval", "w");
13050 if (!f) exit(1);
13051 fprintf(f, "%d\n", sizeof(off_t));
13052 exit(0);
13053}
Martin v. Löwis11437992002-04-12 09:54:03 +000013054_ACEOF
13055rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056if { (ac_try="$ac_link"
13057case "(($ac_try" in
13058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13059 *) ac_try_echo=$ac_try;;
13060esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013063 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013066 { (case "(($ac_try" in
13067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13068 *) ac_try_echo=$ac_try;;
13069esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013072 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013074 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013075 ac_cv_sizeof_off_t=`cat conftestval`
13076else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013077 echo "$as_me: program exited with status $ac_status" >&5
13078echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013079sed 's/^/| /' conftest.$ac_ext >&5
13080
Martin v. Löwis11437992002-04-12 09:54:03 +000013081( exit $ac_status )
13082ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013084rm -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 +000013085fi
13086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087
13088
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013089fi
13090
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013091{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13092echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013093
13094cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013095#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013096_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013097
Michael W. Hudson54241132001-12-07 15:38:26 +000013098
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013099{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13100echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013101if test "$have_long_long" = yes
13102then
13103if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013104 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013105
Martin v. Löwis11437992002-04-12 09:54:03 +000013106cat >>confdefs.h <<\_ACEOF
13107#define HAVE_LARGEFILE_SUPPORT 1
13108_ACEOF
13109
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013110 { echo "$as_me:$LINENO: result: yes" >&5
13111echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013112else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013113 { echo "$as_me:$LINENO: result: no" >&5
13114echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013115fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013116else
13117 { echo "$as_me:$LINENO: result: no" >&5
13118echo "${ECHO_T}no" >&6; }
13119fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013120
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013121# AC_CHECK_SIZEOF() doesn't include <time.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013122{ echo "$as_me:$LINENO: checking size of time_t" >&5
13123echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013124if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013125 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013126else
13127 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013128 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013129else
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013131/* confdefs.h. */
13132_ACEOF
13133cat confdefs.h >>conftest.$ac_ext
13134cat >>conftest.$ac_ext <<_ACEOF
13135/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013136#include <stdio.h>
13137#include <time.h>
13138main()
13139{
13140 FILE *f=fopen("conftestval", "w");
13141 if (!f) exit(1);
13142 fprintf(f, "%d\n", sizeof(time_t));
13143 exit(0);
13144}
Martin v. Löwis11437992002-04-12 09:54:03 +000013145_ACEOF
13146rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147if { (ac_try="$ac_link"
13148case "(($ac_try" in
13149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13150 *) ac_try_echo=$ac_try;;
13151esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013153 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013157 { (case "(($ac_try" in
13158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13159 *) ac_try_echo=$ac_try;;
13160esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013162 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013163 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013165 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013166 ac_cv_sizeof_time_t=`cat conftestval`
13167else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013168 echo "$as_me: program exited with status $ac_status" >&5
13169echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013170sed 's/^/| /' conftest.$ac_ext >&5
13171
Martin v. Löwis11437992002-04-12 09:54:03 +000013172( exit $ac_status )
13173ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175rm -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 +000013176fi
13177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013178
13179
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013180fi
13181
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013182{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13183echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
13185cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013186#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013187_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013188
Michael W. Hudson54241132001-12-07 15:38:26 +000013189
13190
Trent Mick635f6fb2000-08-23 21:33:05 +000013191# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013192ac_save_cc="$CC"
13193if test "$ac_cv_kpthread" = "yes"
13194then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013195elif test "$ac_cv_kthread" = "yes"
13196then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013197elif test "$ac_cv_pthread" = "yes"
13198then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013199fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013200{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13201echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013202have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013204/* confdefs.h. */
13205_ACEOF
13206cat confdefs.h >>conftest.$ac_ext
13207cat >>conftest.$ac_ext <<_ACEOF
13208/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013209#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013210int
13211main ()
13212{
Guido van Rossum12580492000-09-24 16:47:19 +000013213pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 ;
13215 return 0;
13216}
13217_ACEOF
13218rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013219if { (ac_try="$ac_compile"
13220case "(($ac_try" in
13221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13222 *) ac_try_echo=$ac_try;;
13223esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013227 grep -v '^ *+' conftest.er1 >conftest.err
13228 rm -f conftest.er1
13229 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013231 (exit $ac_status); } && {
13232 test -z "$ac_c_werror_flag" ||
13233 test ! -s conftest.err
13234 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013235 have_pthread_t=yes
13236else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013238sed 's/^/| /' conftest.$ac_ext >&5
13239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013240
Trent Mick635f6fb2000-08-23 21:33:05 +000013241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013242
13243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013244{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13245echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013246if test "$have_pthread_t" = yes ; then
13247 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013248 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13249echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013250 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013251 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013252else
13253 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013254 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013255else
Martin v. Löwis11437992002-04-12 09:54:03 +000013256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013257/* confdefs.h. */
13258_ACEOF
13259cat confdefs.h >>conftest.$ac_ext
13260cat >>conftest.$ac_ext <<_ACEOF
13261/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013262#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013263#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013264 main()
13265 {
13266 FILE *f=fopen("conftestval", "w");
13267 if (!f) exit(1);
13268 fprintf(f, "%d\n", sizeof(pthread_t));
13269 exit(0);
13270 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013271_ACEOF
13272rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013273if { (ac_try="$ac_link"
13274case "(($ac_try" in
13275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13276 *) ac_try_echo=$ac_try;;
13277esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013279 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013283 { (case "(($ac_try" in
13284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13285 *) ac_try_echo=$ac_try;;
13286esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013288 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013292 ac_cv_sizeof_pthread_t=`cat conftestval`
13293else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013294 echo "$as_me: program exited with status $ac_status" >&5
13295echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013296sed 's/^/| /' conftest.$ac_ext >&5
13297
Martin v. Löwis11437992002-04-12 09:54:03 +000013298( exit $ac_status )
13299ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301rm -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 +000013302fi
13303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013304
13305
Trent Mick635f6fb2000-08-23 21:33:05 +000013306fi
13307
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013308 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13309echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013310
13311cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013312#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013313_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013314
13315fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013316CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013317
Michael W. Hudson54241132001-12-07 15:38:26 +000013318
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013319
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013320
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013321case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013322 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013323 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13324 ;;
13325 Darwin/*)
13326 OTHER_LIBTOOL_OPT=""
13327 ;;
13328esac
13329
13330
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013331ARCH_RUN_32BIT=""
13332
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013333case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013334 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013335 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13336 if test "${enable_universalsdk}"; then
13337 :
13338 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013339 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013340 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013341 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013342 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013343 Darwin/*)
Ronald Oussoren652f4de2010-02-07 11:54:03 +000013344 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013345 if test ${gcc_version} '<' 4.0
13346 then
13347 LIBTOOL_CRUFT="-lcc_dynamic"
13348 else
13349 LIBTOOL_CRUFT=""
13350 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013351 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013352 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013353else
13354 cat >conftest.$ac_ext <<_ACEOF
13355/* confdefs.h. */
13356_ACEOF
13357cat confdefs.h >>conftest.$ac_ext
13358cat >>conftest.$ac_ext <<_ACEOF
13359/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013360
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013361 #include <unistd.h>
13362 int main(int argc, char*argv[])
13363 {
13364 if (sizeof(long) == 4) {
13365 return 0;
13366 } else {
13367 return 1;
13368 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013369 }
13370
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013371_ACEOF
13372rm -f conftest$ac_exeext
13373if { (ac_try="$ac_link"
13374case "(($ac_try" in
13375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13376 *) ac_try_echo=$ac_try;;
13377esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013379 (eval "$ac_link") 2>&5
13380 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13383 { (case "(($ac_try" in
13384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13385 *) ac_try_echo=$ac_try;;
13386esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013388 (eval "$ac_try") 2>&5
13389 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013391 (exit $ac_status); }; }; then
13392 ac_osx_32bit=yes
13393else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013394 echo "$as_me: program exited with status $ac_status" >&5
13395echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013396sed 's/^/| /' conftest.$ac_ext >&5
13397
13398( exit $ac_status )
13399ac_osx_32bit=no
13400fi
13401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13402fi
13403
13404
13405
13406 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussoren175a8842010-02-11 13:40:06 +000013407 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013408 i386)
13409 MACOSX_DEFAULT_ARCH="i386"
13410 ;;
13411 ppc)
13412 MACOSX_DEFAULT_ARCH="ppc"
13413 ;;
13414 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013415 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13416echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013417 { (exit 1); exit 1; }; }
13418 ;;
13419 esac
13420 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013421 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013422 i386)
13423 MACOSX_DEFAULT_ARCH="x86_64"
13424 ;;
13425 ppc)
13426 MACOSX_DEFAULT_ARCH="ppc64"
13427 ;;
13428 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013429 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13430echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013431 { (exit 1); exit 1; }; }
13432 ;;
13433 esac
13434
13435 #ARCH_RUN_32BIT="true"
13436 fi
13437
13438 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013439 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013440 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013441esac
13442
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013443{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13444echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013445if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013446then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013447 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013448 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013449 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013450
Martin v. Löwis11437992002-04-12 09:54:03 +000013451cat >>confdefs.h <<\_ACEOF
13452#define WITH_NEXT_FRAMEWORK 1
13453_ACEOF
13454
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013455 { echo "$as_me:$LINENO: result: yes" >&5
13456echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013457 if test $enable_shared = "yes"
13458 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013459 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13460echo "$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 +000013461 { (exit 1); exit 1; }; }
13462 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013463else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013464 { echo "$as_me:$LINENO: result: no" >&5
13465echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013466fi
13467
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013468{ echo "$as_me:$LINENO: checking for dyld" >&5
13469echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013470case $ac_sys_system/$ac_sys_release in
13471 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473cat >>confdefs.h <<\_ACEOF
13474#define WITH_DYLD 1
13475_ACEOF
13476
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013477 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13478echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013479 ;;
13480 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013481 { echo "$as_me:$LINENO: result: no" >&5
13482echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013483 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013484esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013485
Guido van Rossum0a516c91994-09-12 10:58:40 +000013486# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013487
Michael W. Hudson54241132001-12-07 15:38:26 +000013488
13489
13490
13491
Guido van Rossum0a516c91994-09-12 10:58:40 +000013492# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013493# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013494{ echo "$as_me:$LINENO: checking SO" >&5
13495echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013496if test -z "$SO"
13497then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013498 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013499 hp*|HP*)
13500 case `uname -m` in
13501 ia64) SO=.so;;
13502 *) SO=.sl;;
13503 esac
13504 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013505 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013506 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013507 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013508else
13509 # this might also be a termcap variable, see #610332
13510 echo
13511 echo '====================================================================='
13512 echo '+ +'
13513 echo '+ WARNING: You have set SO in your environment. +'
13514 echo '+ Do you really mean to change the extension for shared libraries? +'
13515 echo '+ Continuing in 10 seconds to let you to ponder. +'
13516 echo '+ +'
13517 echo '====================================================================='
13518 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013519fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013520{ echo "$as_me:$LINENO: result: $SO" >&5
13521echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013522
Georg Brandlb1441c72009-01-03 22:33:39 +000013523
Thomas Wouters477c8d52006-05-27 19:21:47 +000013524cat >>confdefs.h <<_ACEOF
13525#define SHLIB_EXT "$SO"
13526_ACEOF
13527
Guido van Rossum0a516c91994-09-12 10:58:40 +000013528# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013529# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013530# (Shared libraries in this instance are shared modules to be loaded into
13531# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013532{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13533echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013534if test -z "$LDSHARED"
13535then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013537 AIX*)
13538 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013539 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013540 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013541 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013542 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013543 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013544 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013545 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013546 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013547 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013548 hp*|HP*)
13549 if test "$GCC" = "yes"
13550 then LDSHARED='$(CC) -shared'
13551 else LDSHARED='ld -b';
13552 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013553 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013554 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013555 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13556 if test "$enable_framework" ; then
13557 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013558 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13559 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013560 else
13561 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013562 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013563 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013564 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013565 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13566 if test "$enable_framework" ; then
13567 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013568 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13569 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013570 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013571 # No framework, use the Python app as bundle-loader
13572 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013573 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013574 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013575 Darwin/*)
13576 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13577 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013578
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013579 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013580 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013581 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013582 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013583 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013584 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13585 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013586 else
13587 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13588 if test "$enable_framework" ; then
13589 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013590 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13591 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013592 else
13593 # No framework, use the Python app as bundle-loader
13594 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13595 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13596 fi
13597 fi
13598 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013599 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013600 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013601 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013602 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013603 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013604 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013605 else
13606 LDSHARED="ld -Bshareable ${LDFLAGS}"
13607 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013608 OpenBSD*)
13609 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13610 then
13611 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13612 else
13613 case `uname -r` in
13614 [01].* | 2.[0-7] | 2.[0-7].*)
13615 LDSHARED="ld -Bshareable ${LDFLAGS}"
13616 ;;
13617 *)
13618 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13619 ;;
13620 esac
13621 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013622 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013623 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013624 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013625 then LDSHARED='$(CC) -shared'
13626 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013627 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013628 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013629 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013630 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013631 *) LDSHARED="ld";;
13632 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013633fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013634{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13635echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013636BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013637# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013638# library (module) -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013639{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13640echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013641if test -z "$CCSHARED"
13642then
Guido van Rossum07397971997-04-29 21:49:50 +000013643 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013644 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013645 then CCSHARED="-fPIC";
13646 elif test `uname -p` = sparc;
13647 then CCSHARED="-xcode=pic32";
13648 else CCSHARED="-Kpic";
13649 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013650 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013651 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013652 else CCSHARED="+z";
13653 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013654 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013655 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013656 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013657 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013658 if test "$GCC" = "yes"
13659 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013660 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013661 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013662 SCO_SV*)
13663 if test "$GCC" = "yes"
13664 then CCSHARED="-fPIC"
13665 else CCSHARED="-Kpic -belf"
13666 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013667 IRIX*/6*) case $CC in
13668 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013669 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013670 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013671 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013672 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013673fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013674{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13675echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013676# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013677# the python executable -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013678{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13679echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013680if test -z "$LINKFORSHARED"
13681then
Guido van Rossum07397971997-04-29 21:49:50 +000013682 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013683 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013684 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013685 LINKFORSHARED="-Wl,-E -Wl,+s";;
13686# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013687 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013688 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013689 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013690 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013691 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013692 if test "$enable_framework"
13693 then
Jack Jansenda49e192005-01-07 13:08:22 +000013694 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013695 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013696 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013697 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013698 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013699 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013700 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013701 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13702 then
13703 LINKFORSHARED="-Wl,--export-dynamic"
13704 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013705 SunOS/5*) case $CC in
13706 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013707 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013708 then
13709 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013710 fi;;
13711 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013712 CYGWIN*)
13713 if test $enable_shared = "no"
13714 then
13715 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13716 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013717 QNX*)
13718 # -Wl,-E causes the symbols to be added to the dynamic
13719 # symbol table so that they can be found when a module
13720 # is loaded. -N 2048K causes the stack size to be set
13721 # to 2048 kilobytes so that the stack doesn't overflow
13722 # when running test_compile.py.
13723 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013724 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013725fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013726{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13727echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013728
Michael W. Hudson54241132001-12-07 15:38:26 +000013729
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013730
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013731{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13732echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013733if test ! "$LIBRARY" = "$LDLIBRARY"
13734then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013735 case $ac_sys_system in
13736 CYGWIN*)
13737 # Cygwin needs CCSHARED when building extension DLLs
13738 # but not when building the interpreter DLL.
13739 CFLAGSFORSHARED='';;
13740 *)
13741 CFLAGSFORSHARED='$(CCSHARED)'
13742 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013743fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013744{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13745echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013746
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013747# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13748# library (with --enable-shared).
13749# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013750# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13751# if it is not required, since it creates a dependency of the shared library
13752# to LIBS. This, in turn, means that applications linking the shared libpython
13753# don't need to link LIBS explicitly. The default should be only changed
13754# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013755
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013756{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13757echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013758case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013759 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013760 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013761esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013762{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13763echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013764
13765
Guido van Rossum627b2d71993-12-24 10:39:16 +000013766# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013767
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013768{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13769echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013770if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013771 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013772else
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013774LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013775cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013776/* confdefs.h. */
13777_ACEOF
13778cat confdefs.h >>conftest.$ac_ext
13779cat >>conftest.$ac_ext <<_ACEOF
13780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013782/* Override any GCC internal prototype to avoid an error.
13783 Use char because int might match the return type of a GCC
13784 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013785#ifdef __cplusplus
13786extern "C"
13787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013788char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013789int
13790main ()
13791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 ;
13794 return 0;
13795}
13796_ACEOF
13797rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798if { (ac_try="$ac_link"
13799case "(($ac_try" in
13800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13801 *) ac_try_echo=$ac_try;;
13802esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013806 grep -v '^ *+' conftest.er1 >conftest.err
13807 rm -f conftest.er1
13808 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810 (exit $ac_status); } && {
13811 test -z "$ac_c_werror_flag" ||
13812 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013813 } && test -s conftest$ac_exeext &&
13814 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013816else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013818sed 's/^/| /' conftest.$ac_ext >&5
13819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013820 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822
13823rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013825LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013826fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013827{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13828echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13829if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 cat >>confdefs.h <<_ACEOF
13831#define HAVE_LIBDL 1
13832_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013833
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013834 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013835
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013836fi
13837 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013838
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013839{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13840echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013841if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013843else
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013845LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013846cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013847/* confdefs.h. */
13848_ACEOF
13849cat confdefs.h >>conftest.$ac_ext
13850cat >>conftest.$ac_ext <<_ACEOF
13851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853/* Override any GCC internal prototype to avoid an error.
13854 Use char because int might match the return type of a GCC
13855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013856#ifdef __cplusplus
13857extern "C"
13858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013859char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013860int
13861main ()
13862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 ;
13865 return 0;
13866}
13867_ACEOF
13868rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869if { (ac_try="$ac_link"
13870case "(($ac_try" in
13871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13872 *) ac_try_echo=$ac_try;;
13873esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013877 grep -v '^ *+' conftest.er1 >conftest.err
13878 rm -f conftest.er1
13879 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881 (exit $ac_status); } && {
13882 test -z "$ac_c_werror_flag" ||
13883 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013884 } && test -s conftest$ac_exeext &&
13885 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013886 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013887else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013889sed 's/^/| /' conftest.$ac_ext >&5
13890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013891 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893
13894rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013896LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013897fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013898{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13899echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13900if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 cat >>confdefs.h <<_ACEOF
13902#define HAVE_LIBDLD 1
13903_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013904
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013905 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013906
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013907fi
13908 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013909
Georg Brandlb1441c72009-01-03 22:33:39 +000013910# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013911if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013912 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13913echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013914if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013915 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013916else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013917 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013918cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013919/* confdefs.h. */
13920_ACEOF
13921cat confdefs.h >>conftest.$ac_ext
13922cat >>conftest.$ac_ext <<_ACEOF
13923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925/* Override any GCC internal prototype to avoid an error.
13926 Use char because int might match the return type of a GCC
13927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013928#ifdef __cplusplus
13929extern "C"
13930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013931char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013932int
13933main ()
13934{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 ;
13937 return 0;
13938}
13939_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940for ac_lib in '' pthread rt posix4; do
13941 if test -z "$ac_lib"; then
13942 ac_res="none required"
13943 else
13944 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013945 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946 fi
13947 rm -f conftest.$ac_objext conftest$ac_exeext
13948if { (ac_try="$ac_link"
13949case "(($ac_try" in
13950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13951 *) ac_try_echo=$ac_try;;
13952esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013955 ac_status=$?
13956 grep -v '^ *+' conftest.er1 >conftest.err
13957 rm -f conftest.er1
13958 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960 (exit $ac_status); } && {
13961 test -z "$ac_c_werror_flag" ||
13962 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013963 } && test -s conftest$ac_exeext &&
13964 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013966else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013967 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013968sed 's/^/| /' conftest.$ac_ext >&5
13969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970
Thomas Wouters477c8d52006-05-27 19:21:47 +000013971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013972
13973rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13974 conftest$ac_exeext
13975 if test "${ac_cv_search_sem_init+set}" = set; then
13976 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978done
13979if test "${ac_cv_search_sem_init+set}" = set; then
13980 :
13981else
13982 ac_cv_search_sem_init=no
13983fi
13984rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013985LIBS=$ac_func_search_save_LIBS
13986fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013987{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13988echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989ac_res=$ac_cv_search_sem_init
13990if test "$ac_res" != no; then
13991 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013992
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013993fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013994 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013995 # posix4 on Solaris 2.6
13996 # pthread (first!) on Linux
13997fi
13998
Martin v. Löwis19d17342003-06-14 21:03:05 +000013999# check if we need libintl for locale functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014000{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
14001echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000014002if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014003 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000014004else
14005 ac_check_lib_save_LIBS=$LIBS
14006LIBS="-lintl $LIBS"
14007cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014/* Override any GCC internal prototype to avoid an error.
14015 Use char because int might match the return type of a GCC
14016 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014017#ifdef __cplusplus
14018extern "C"
14019#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000014020char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014021int
14022main ()
14023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014024return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014025 ;
14026 return 0;
14027}
14028_ACEOF
14029rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014030if { (ac_try="$ac_link"
14031case "(($ac_try" in
14032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14033 *) ac_try_echo=$ac_try;;
14034esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014036 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000014037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014038 grep -v '^ *+' conftest.er1 >conftest.err
14039 rm -f conftest.er1
14040 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014042 (exit $ac_status); } && {
14043 test -z "$ac_c_werror_flag" ||
14044 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014045 } && test -s conftest$ac_exeext &&
14046 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014047 ac_cv_lib_intl_textdomain=yes
14048else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014050sed 's/^/| /' conftest.$ac_ext >&5
14051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054
14055rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014057LIBS=$ac_check_lib_save_LIBS
14058fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014059{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14060echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
14061if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014062
14063cat >>confdefs.h <<\_ACEOF
14064#define WITH_LIBINTL 1
14065_ACEOF
14066
Brett Cannonc6d936e2009-06-07 20:09:53 +000014067 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014068fi
14069
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014070
14071# checks for system dependent C++ extensions support
14072case "$ac_sys_system" in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014073 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14074echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014076/* confdefs.h. */
14077_ACEOF
14078cat confdefs.h >>conftest.$ac_ext
14079cat >>conftest.$ac_ext <<_ACEOF
14080/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014081#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014082int
14083main ()
14084{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014085loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 ;
14087 return 0;
14088}
14089_ACEOF
14090rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091if { (ac_try="$ac_link"
14092case "(($ac_try" in
14093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14094 *) ac_try_echo=$ac_try;;
14095esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014099 grep -v '^ *+' conftest.er1 >conftest.err
14100 rm -f conftest.er1
14101 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103 (exit $ac_status); } && {
14104 test -z "$ac_c_werror_flag" ||
14105 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014106 } && test -s conftest$ac_exeext &&
14107 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014108
Martin v. Löwis11437992002-04-12 09:54:03 +000014109cat >>confdefs.h <<\_ACEOF
14110#define AIX_GENUINE_CPLUSPLUS 1
14111_ACEOF
14112
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014113 { echo "$as_me:$LINENO: result: yes" >&5
14114echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014115else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014117sed 's/^/| /' conftest.$ac_ext >&5
14118
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014119 { echo "$as_me:$LINENO: result: no" >&5
14120echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122
14123rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014124 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014125 *) ;;
14126esac
14127
Guido van Rossum70c7f481998-03-26 18:44:10 +000014128# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014129{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14130echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014131if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014133else
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014135LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014137/* confdefs.h. */
14138_ACEOF
14139cat confdefs.h >>conftest.$ac_ext
14140cat >>conftest.$ac_ext <<_ACEOF
14141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014143/* Override any GCC internal prototype to avoid an error.
14144 Use char because int might match the return type of a GCC
14145 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014146#ifdef __cplusplus
14147extern "C"
14148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014149char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014150int
14151main ()
14152{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 ;
14155 return 0;
14156}
14157_ACEOF
14158rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159if { (ac_try="$ac_link"
14160case "(($ac_try" in
14161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14162 *) ac_try_echo=$ac_try;;
14163esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014167 grep -v '^ *+' conftest.er1 >conftest.err
14168 rm -f conftest.er1
14169 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171 (exit $ac_status); } && {
14172 test -z "$ac_c_werror_flag" ||
14173 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014174 } && test -s conftest$ac_exeext &&
14175 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014176 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014177else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014179sed 's/^/| /' conftest.$ac_ext >&5
14180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014183
14184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014186LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014187fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014188{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14189echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14190if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014191 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014192fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014193 # SVR4
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014194{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14195echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014196if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014197 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014198else
Martin v. Löwis11437992002-04-12 09:54:03 +000014199 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014200LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014201cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014202/* confdefs.h. */
14203_ACEOF
14204cat confdefs.h >>conftest.$ac_ext
14205cat >>conftest.$ac_ext <<_ACEOF
14206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208/* Override any GCC internal prototype to avoid an error.
14209 Use char because int might match the return type of a GCC
14210 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014211#ifdef __cplusplus
14212extern "C"
14213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014214char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014215int
14216main ()
14217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 ;
14220 return 0;
14221}
14222_ACEOF
14223rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224if { (ac_try="$ac_link"
14225case "(($ac_try" in
14226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14227 *) ac_try_echo=$ac_try;;
14228esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014232 grep -v '^ *+' conftest.er1 >conftest.err
14233 rm -f conftest.er1
14234 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236 (exit $ac_status); } && {
14237 test -z "$ac_c_werror_flag" ||
14238 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014239 } && test -s conftest$ac_exeext &&
14240 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014242else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014244sed 's/^/| /' conftest.$ac_ext >&5
14245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248
14249rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014250 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014251LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014252fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014253{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14254echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14255if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014256 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014257fi
14258 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014259
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014260{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14261echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014264if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265 withval=$with_libs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014266{ echo "$as_me:$LINENO: result: $withval" >&5
14267echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014268LIBS="$withval $LIBS"
14269
14270else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014271 { echo "$as_me:$LINENO: result: no" >&5
14272echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273fi
14274
Guido van Rossum7f43da71994-08-01 12:15:30 +000014275
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014276# Check for use of the system libffi library
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014277{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14278echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014281if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282 withval=$with_system_ffi;
14283fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014284
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014285
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014286{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14287echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014288
Matthias Klose55708cc2009-04-30 08:06:49 +000014289# Check for --with-dbmliborder
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014290{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14291echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014292
14293# Check whether --with-dbmliborder was given.
14294if test "${with_dbmliborder+set}" = set; then
14295 withval=$with_dbmliborder;
14296if test x$with_dbmliborder = xyes
14297then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014298{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14299echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014300 { (exit 1); exit 1; }; }
14301else
14302 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14303 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14304 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014305 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14306echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014307 { (exit 1); exit 1; }; }
14308 fi
14309 done
14310fi
14311fi
14312
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014313{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14314echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014315
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014316# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014317
14318
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014319{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14320echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014323if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014324 withval=$with_signal_module;
14325fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014326
14327
14328if test -z "$with_signal_module"
14329then with_signal_module="yes"
14330fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014331{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14332echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014333
14334if test "${with_signal_module}" = "yes"; then
14335 USE_SIGNAL_MODULE=""
14336 SIGNAL_OBJS=""
14337else
14338 USE_SIGNAL_MODULE="#"
14339 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14340fi
14341
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014342# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014343
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014344USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014345
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014346{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14347echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014348
Guido van Rossumec2f0731997-01-22 20:54:01 +000014349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014350# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014351if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352 withval=$with_dec_threads;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014353{ echo "$as_me:$LINENO: result: $withval" >&5
14354echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014355LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014356if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014357 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014358fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014359else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014360 { echo "$as_me:$LINENO: result: no" >&5
14361echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014362fi
14363
Martin v. Löwis11437992002-04-12 09:54:03 +000014364
14365# Templates for things AC_DEFINEd more than once.
14366# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014367
14368
Martin v. Löwis11437992002-04-12 09:54:03 +000014369
14370
14371
14372
14373
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014374{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14375echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014377# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014378if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014379 withval=$with_threads;
14380fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014381
14382
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014383# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014385# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014386if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014387 withval=$with_thread; with_threads=$with_thread
14388fi
14389
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014390
14391if test -z "$with_threads"
14392then with_threads="yes"
14393fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014394{ echo "$as_me:$LINENO: result: $with_threads" >&5
14395echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014396
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014397
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014398if test "$with_threads" = "no"
14399then
14400 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014401elif test "$ac_cv_pthread_is_default" = yes
14402then
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014404#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014405_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014406
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014407 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014409#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014410_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014411
14412 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014414elif test "$ac_cv_kpthread" = "yes"
14415then
14416 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014417 if test "$ac_cv_cxx_thread" = "yes"; then
14418 CXX="$CXX -Kpthread"
14419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014421#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014422_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014423
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014424 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014425 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014426elif test "$ac_cv_kthread" = "yes"
14427then
14428 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014429 if test "$ac_cv_cxx_thread" = "yes"; then
14430 CXX="$CXX -Kthread"
14431 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014432 cat >>confdefs.h <<\_ACEOF
14433#define WITH_THREAD 1
14434_ACEOF
14435
14436 posix_threads=yes
14437 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014438elif test "$ac_cv_pthread" = "yes"
14439then
14440 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014441 if test "$ac_cv_cxx_thread" = "yes"; then
14442 CXX="$CXX -pthread"
14443 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014444 cat >>confdefs.h <<\_ACEOF
14445#define WITH_THREAD 1
14446_ACEOF
14447
14448 posix_threads=yes
14449 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014450else
14451 if test ! -z "$with_threads" -a -d "$with_threads"
14452 then LDFLAGS="$LDFLAGS -L$with_threads"
14453 fi
14454 if test ! -z "$withval" -a -d "$withval"
14455 then LDFLAGS="$LDFLAGS -L$withval"
14456 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014457
14458 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014459 # define _POSIX_THREADS in unistd.h. Some apparently don't
14460 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014461 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14462echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014464/* confdefs.h. */
14465_ACEOF
14466cat confdefs.h >>conftest.$ac_ext
14467cat >>conftest.$ac_ext <<_ACEOF
14468/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014469
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014470#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014471#ifdef _POSIX_THREADS
14472yes
14473#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014474
14475_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014477 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014478 unistd_defines_pthreads=yes
14479else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014480 unistd_defines_pthreads=no
14481fi
Ronald Oussoren79a93512010-04-18 19:08:47 +000014482rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014483
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014484 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14485echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014486
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014488#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014489_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014490
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014492 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14493echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014494if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014495 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014496fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014497{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14498echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014499else
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014501{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14502echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014503cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014504/* confdefs.h. */
14505_ACEOF
14506cat confdefs.h >>conftest.$ac_ext
14507cat >>conftest.$ac_ext <<_ACEOF
14508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014509$ac_includes_default
14510#include <cthreads.h>
14511_ACEOF
14512rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513if { (ac_try="$ac_compile"
14514case "(($ac_try" in
14515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14516 *) ac_try_echo=$ac_try;;
14517esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014521 grep -v '^ *+' conftest.er1 >conftest.err
14522 rm -f conftest.er1
14523 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525 (exit $ac_status); } && {
14526 test -z "$ac_c_werror_flag" ||
14527 test ! -s conftest.err
14528 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 ac_header_compiler=yes
14530else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014532sed 's/^/| /' conftest.$ac_ext >&5
14533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536
14537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014538{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14539echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014540
14541# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014542{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14543echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014544cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014545/* confdefs.h. */
14546_ACEOF
14547cat confdefs.h >>conftest.$ac_ext
14548cat >>conftest.$ac_ext <<_ACEOF
14549/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014550#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014551_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552if { (ac_try="$ac_cpp conftest.$ac_ext"
14553case "(($ac_try" in
14554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14555 *) ac_try_echo=$ac_try;;
14556esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014559 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014560 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 rm -f conftest.er1
14562 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564 (exit $ac_status); } >/dev/null && {
14565 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14566 test ! -s conftest.err
14567 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 ac_header_preproc=yes
14569else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014571sed 's/^/| /' conftest.$ac_ext >&5
14572
Martin v. Löwis11437992002-04-12 09:54:03 +000014573 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014577{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14578echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014579
14580# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014581case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14582 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014583 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14584echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14585 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14586echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014587 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014588 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014589 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014590 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14591echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14592 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14593echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14594 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14595echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14596 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14597echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14598 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14599echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14600 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14601echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014603## -------------------------------------- ##
14604## Report this to http://bugs.python.org/ ##
14605## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014606_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014608 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014609esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014610{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14611echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014612if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014613 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014614else
14615 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014616fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014617{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14618echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014619
14620fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014621if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014622 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014623#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014624_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014625
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014627#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014628_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
14631cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014632#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014633_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014634
14635 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014636 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014637else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014638
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014640 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14641echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014642if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014643 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014644fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014645{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14646echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014647else
Martin v. Löwis11437992002-04-12 09:54:03 +000014648 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014649{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14650echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014652/* confdefs.h. */
14653_ACEOF
14654cat confdefs.h >>conftest.$ac_ext
14655cat >>conftest.$ac_ext <<_ACEOF
14656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014657$ac_includes_default
14658#include <mach/cthreads.h>
14659_ACEOF
14660rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661if { (ac_try="$ac_compile"
14662case "(($ac_try" in
14663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14664 *) ac_try_echo=$ac_try;;
14665esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014669 grep -v '^ *+' conftest.er1 >conftest.err
14670 rm -f conftest.er1
14671 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673 (exit $ac_status); } && {
14674 test -z "$ac_c_werror_flag" ||
14675 test ! -s conftest.err
14676 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014677 ac_header_compiler=yes
14678else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014680sed 's/^/| /' conftest.$ac_ext >&5
14681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684
14685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014686{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14687echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014688
14689# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014690{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14691echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014692cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014693/* confdefs.h. */
14694_ACEOF
14695cat confdefs.h >>conftest.$ac_ext
14696cat >>conftest.$ac_ext <<_ACEOF
14697/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014698#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014699_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700if { (ac_try="$ac_cpp conftest.$ac_ext"
14701case "(($ac_try" in
14702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14703 *) ac_try_echo=$ac_try;;
14704esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014706 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014708 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014709 rm -f conftest.er1
14710 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014712 (exit $ac_status); } >/dev/null && {
14713 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14714 test ! -s conftest.err
14715 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014716 ac_header_preproc=yes
14717else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014719sed 's/^/| /' conftest.$ac_ext >&5
14720
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723
Martin v. Löwis11437992002-04-12 09:54:03 +000014724rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014725{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14726echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014727
14728# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014729case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14730 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014731 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14732echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14733 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14734echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014735 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014736 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014737 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014738 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14739echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14740 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14741echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14742 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14743echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14744 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14745echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14746 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14747echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14748 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14749echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014751## -------------------------------------- ##
14752## Report this to http://bugs.python.org/ ##
14753## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014754_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014756 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014757esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014758{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14759echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014760if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014761 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014762else
14763 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014764fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014765{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14766echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014767
14768fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014769if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014770 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014771#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014772_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014773
Martin v. Löwis11437992002-04-12 09:54:03 +000014774 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014775#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014776_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014777
Martin v. Löwis11437992002-04-12 09:54:03 +000014778
14779cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014780#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014781_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014782
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014783 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014784else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014785
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014786 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14787echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014789# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014790if test "${with_pth+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014791 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14792echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014793 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014794#define WITH_THREAD 1
14795_ACEOF
14796
14797
14798cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014799#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014800_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014801
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014802 LIBS="-lpth $LIBS"
14803 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014804else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014805 { echo "$as_me:$LINENO: result: no" >&5
14806echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014807
14808 # Just looking for pthread_create in libpthread is not enough:
14809 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14810 # So we really have to include pthread.h, and then link.
14811 _libs=$LIBS
14812 LIBS="$LIBS -lpthread"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014813 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14814echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014816/* confdefs.h. */
14817_ACEOF
14818cat confdefs.h >>conftest.$ac_ext
14819cat >>conftest.$ac_ext <<_ACEOF
14820/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014821#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014822
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014823void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014824int
14825main ()
14826{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014827
14828pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014829 ;
14830 return 0;
14831}
14832_ACEOF
14833rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834if { (ac_try="$ac_link"
14835case "(($ac_try" in
14836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14837 *) ac_try_echo=$ac_try;;
14838esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014840 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014842 grep -v '^ *+' conftest.er1 >conftest.err
14843 rm -f conftest.er1
14844 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014846 (exit $ac_status); } && {
14847 test -z "$ac_c_werror_flag" ||
14848 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014849 } && test -s conftest$ac_exeext &&
14850 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014851
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014852 { echo "$as_me:$LINENO: result: yes" >&5
14853echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014855#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014856_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014857
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014858 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014859 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014860else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014862sed 's/^/| /' conftest.$ac_ext >&5
14863
Martin v. Löwis11437992002-04-12 09:54:03 +000014864
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014865 LIBS=$_libs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014866 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14867echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014868if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014869 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014870else
Martin v. Löwis11437992002-04-12 09:54:03 +000014871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014872/* confdefs.h. */
14873_ACEOF
14874cat confdefs.h >>conftest.$ac_ext
14875cat >>conftest.$ac_ext <<_ACEOF
14876/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014877/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14878 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14879#define pthread_detach innocuous_pthread_detach
14880
Guido van Rossumad678af1998-10-02 14:42:15 +000014881/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014882 which can conflict with char pthread_detach (); below.
14883 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014884 <limits.h> exists even on freestanding compilers. */
14885
14886#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014887# include <limits.h>
14888#else
14889# include <assert.h>
14890#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014891
14892#undef pthread_detach
14893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894/* Override any GCC internal prototype to avoid an error.
14895 Use char because int might match the return type of a GCC
14896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014897#ifdef __cplusplus
14898extern "C"
14899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014900char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014901/* The GNU C library defines this for functions which it implements
14902 to always fail with ENOSYS. Some functions are actually named
14903 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014905choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014906#endif
14907
Skip Montanaro6dead952003-09-25 14:50:04 +000014908int
14909main ()
14910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014912 ;
14913 return 0;
14914}
14915_ACEOF
14916rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917if { (ac_try="$ac_link"
14918case "(($ac_try" in
14919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14920 *) ac_try_echo=$ac_try;;
14921esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014925 grep -v '^ *+' conftest.er1 >conftest.err
14926 rm -f conftest.er1
14927 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 (exit $ac_status); } && {
14930 test -z "$ac_c_werror_flag" ||
14931 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014932 } && test -s conftest$ac_exeext &&
14933 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014934 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014935else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014937sed 's/^/| /' conftest.$ac_ext >&5
14938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941
14942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014943 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014944fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014945{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14946echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14947if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014949#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014950_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014951
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014952 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014953 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014954else
Guido van Rossumad678af1998-10-02 14:42:15 +000014955
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014956 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014957 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14958echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014959if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014960 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014961fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014962{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14963echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014964else
14965 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014966{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14967echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014969/* confdefs.h. */
14970_ACEOF
14971cat confdefs.h >>conftest.$ac_ext
14972cat >>conftest.$ac_ext <<_ACEOF
14973/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014974$ac_includes_default
14975#include <atheos/threads.h>
14976_ACEOF
14977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978if { (ac_try="$ac_compile"
14979case "(($ac_try" in
14980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14981 *) ac_try_echo=$ac_try;;
14982esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014986 grep -v '^ *+' conftest.er1 >conftest.err
14987 rm -f conftest.er1
14988 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014990 (exit $ac_status); } && {
14991 test -z "$ac_c_werror_flag" ||
14992 test ! -s conftest.err
14993 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014994 ac_header_compiler=yes
14995else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014997sed 's/^/| /' conftest.$ac_ext >&5
14998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001
15002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015003{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15004echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015005
15006# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015007{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
15008echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015010/* confdefs.h. */
15011_ACEOF
15012cat confdefs.h >>conftest.$ac_ext
15013cat >>conftest.$ac_ext <<_ACEOF
15014/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015015#include <atheos/threads.h>
15016_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017if { (ac_try="$ac_cpp conftest.$ac_ext"
15018case "(($ac_try" in
15019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15020 *) ac_try_echo=$ac_try;;
15021esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015024 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015025 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015026 rm -f conftest.er1
15027 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029 (exit $ac_status); } >/dev/null && {
15030 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15031 test ! -s conftest.err
15032 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015033 ac_header_preproc=yes
15034else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015036sed 's/^/| /' conftest.$ac_ext >&5
15037
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015038 ac_header_preproc=no
15039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015041rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015042{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15043echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015044
15045# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015046case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15047 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015048 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15049echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15050 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15051echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015052 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015053 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015054 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015055 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15056echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15057 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15058echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15059 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15060echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15061 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15062echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15063 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15064echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15065 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15066echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015068## -------------------------------------- ##
15069## Report this to http://bugs.python.org/ ##
15070## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015071_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015072 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015073 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015074esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015075{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15076echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015077if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015078 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015079else
15080 ac_cv_header_atheos_threads_h=$ac_header_preproc
15081fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015082{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15083echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015084
15085fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015086if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015087 cat >>confdefs.h <<\_ACEOF
15088#define WITH_THREAD 1
15089_ACEOF
15090
15091
15092cat >>confdefs.h <<\_ACEOF
15093#define ATHEOS_THREADS 1
15094_ACEOF
15095
15096 THREADOBJ="Python/thread.o"
15097else
15098
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015099 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15100echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015101if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015103else
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015105LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015107/* confdefs.h. */
15108_ACEOF
15109cat confdefs.h >>conftest.$ac_ext
15110cat >>conftest.$ac_ext <<_ACEOF
15111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113/* Override any GCC internal prototype to avoid an error.
15114 Use char because int might match the return type of a GCC
15115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015116#ifdef __cplusplus
15117extern "C"
15118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015119char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015120int
15121main ()
15122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 ;
15125 return 0;
15126}
15127_ACEOF
15128rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129if { (ac_try="$ac_link"
15130case "(($ac_try" in
15131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15132 *) ac_try_echo=$ac_try;;
15133esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015137 grep -v '^ *+' conftest.er1 >conftest.err
15138 rm -f conftest.er1
15139 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141 (exit $ac_status); } && {
15142 test -z "$ac_c_werror_flag" ||
15143 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015144 } && test -s conftest$ac_exeext &&
15145 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015147else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015149sed 's/^/| /' conftest.$ac_ext >&5
15150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153
15154rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015155 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015156LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015157fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015158{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15159echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
15160if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015162#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015163_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015164
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015165 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015166 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015167 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015168else
Greg Steinadf63d62000-07-05 10:38:09 +000015169
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015170 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15171echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015172if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015173 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015174else
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015176LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015178/* confdefs.h. */
15179_ACEOF
15180cat confdefs.h >>conftest.$ac_ext
15181cat >>conftest.$ac_ext <<_ACEOF
15182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184/* Override any GCC internal prototype to avoid an error.
15185 Use char because int might match the return type of a GCC
15186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015187#ifdef __cplusplus
15188extern "C"
15189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015190char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015191int
15192main ()
15193{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 ;
15196 return 0;
15197}
15198_ACEOF
15199rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200if { (ac_try="$ac_link"
15201case "(($ac_try" in
15202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15203 *) ac_try_echo=$ac_try;;
15204esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015208 grep -v '^ *+' conftest.er1 >conftest.err
15209 rm -f conftest.er1
15210 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212 (exit $ac_status); } && {
15213 test -z "$ac_c_werror_flag" ||
15214 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015215 } && test -s conftest$ac_exeext &&
15216 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015218else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015220sed 's/^/| /' conftest.$ac_ext >&5
15221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224
15225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015227LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015228fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015229{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15230echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15231if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015232 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015233#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015234_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015235
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015236 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015237 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015238 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015239else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015240
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015241 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15242echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015243if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015245else
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015247LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015249/* confdefs.h. */
15250_ACEOF
15251cat confdefs.h >>conftest.$ac_ext
15252cat >>conftest.$ac_ext <<_ACEOF
15253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255/* Override any GCC internal prototype to avoid an error.
15256 Use char because int might match the return type of a GCC
15257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015258#ifdef __cplusplus
15259extern "C"
15260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015261char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015262int
15263main ()
15264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 ;
15267 return 0;
15268}
15269_ACEOF
15270rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271if { (ac_try="$ac_link"
15272case "(($ac_try" in
15273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15274 *) ac_try_echo=$ac_try;;
15275esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015279 grep -v '^ *+' conftest.er1 >conftest.err
15280 rm -f conftest.er1
15281 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283 (exit $ac_status); } && {
15284 test -z "$ac_c_werror_flag" ||
15285 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015286 } && test -s conftest$ac_exeext &&
15287 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015289else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015291sed 's/^/| /' conftest.$ac_ext >&5
15292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295
15296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015298LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015299fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015300{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15301echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15302if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015304#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015305_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015306
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015307 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015308 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015309 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015310else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015311
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015312 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15313echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015314if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015316else
Martin v. Löwis11437992002-04-12 09:54:03 +000015317 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015318LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015319cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015320/* confdefs.h. */
15321_ACEOF
15322cat confdefs.h >>conftest.$ac_ext
15323cat >>conftest.$ac_ext <<_ACEOF
15324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015326/* Override any GCC internal prototype to avoid an error.
15327 Use char because int might match the return type of a GCC
15328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015329#ifdef __cplusplus
15330extern "C"
15331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015332char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015333int
15334main ()
15335{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 ;
15338 return 0;
15339}
15340_ACEOF
15341rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015342if { (ac_try="$ac_link"
15343case "(($ac_try" in
15344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15345 *) ac_try_echo=$ac_try;;
15346esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015350 grep -v '^ *+' conftest.er1 >conftest.err
15351 rm -f conftest.er1
15352 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354 (exit $ac_status); } && {
15355 test -z "$ac_c_werror_flag" ||
15356 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015357 } && test -s conftest$ac_exeext &&
15358 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015360else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015362sed 's/^/| /' conftest.$ac_ext >&5
15363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015366
15367rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015368 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015369LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015370fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015371{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15372echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15373if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015374 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015375#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015376_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015377
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015378 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015379 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015380 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015381else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015382
Martin v. Löwis130fb172001-07-19 11:00:41 +000015383 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015384fi
15385
Guido van Rossum627b2d71993-12-24 10:39:16 +000015386
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015387fi
15388
Guido van Rossum0be3e491997-05-22 20:33:33 +000015389fi
15390
Guido van Rossum49545951997-12-02 19:28:29 +000015391fi
15392
Guido van Rossumb93a8621998-05-07 13:27:32 +000015393fi
15394
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015395
Michael W. Hudson54241132001-12-07 15:38:26 +000015396fi
15397
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015399
15400rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015401 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402fi
15403
Martin v. Löwis11437992002-04-12 09:54:03 +000015404fi
15405
15406
15407fi
15408
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015409
Michael W. Hudson54241132001-12-07 15:38:26 +000015410
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015411 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15412echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015413if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015414 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015415else
Martin v. Löwis11437992002-04-12 09:54:03 +000015416 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015417LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015418cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015419/* confdefs.h. */
15420_ACEOF
15421cat confdefs.h >>conftest.$ac_ext
15422cat >>conftest.$ac_ext <<_ACEOF
15423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015425/* Override any GCC internal prototype to avoid an error.
15426 Use char because int might match the return type of a GCC
15427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015428#ifdef __cplusplus
15429extern "C"
15430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015431char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015432int
15433main ()
15434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 ;
15437 return 0;
15438}
15439_ACEOF
15440rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015441if { (ac_try="$ac_link"
15442case "(($ac_try" in
15443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15444 *) ac_try_echo=$ac_try;;
15445esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015449 grep -v '^ *+' conftest.er1 >conftest.err
15450 rm -f conftest.er1
15451 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015453 (exit $ac_status); } && {
15454 test -z "$ac_c_werror_flag" ||
15455 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015456 } && test -s conftest$ac_exeext &&
15457 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015458 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015459else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015461sed 's/^/| /' conftest.$ac_ext >&5
15462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015463 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015465
15466rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015467 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015468LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015469fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015470{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15471echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15472if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015474#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015475_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015476
Martin v. Löwis130fb172001-07-19 11:00:41 +000015477 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015478 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015479 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015480fi
15481
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015482
Neal Norwitza978ab02002-11-02 16:58:05 +000015483 if test "$posix_threads" != "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015484 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15485echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015486if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015487 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015488else
Martin v. Löwis11437992002-04-12 09:54:03 +000015489 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015490LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015492/* confdefs.h. */
15493_ACEOF
15494cat confdefs.h >>conftest.$ac_ext
15495cat >>conftest.$ac_ext <<_ACEOF
15496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015498/* Override any GCC internal prototype to avoid an error.
15499 Use char because int might match the return type of a GCC
15500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015501#ifdef __cplusplus
15502extern "C"
15503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015504char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015505int
15506main ()
15507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 ;
15510 return 0;
15511}
15512_ACEOF
15513rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015514if { (ac_try="$ac_link"
15515case "(($ac_try" in
15516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15517 *) ac_try_echo=$ac_try;;
15518esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015522 grep -v '^ *+' conftest.er1 >conftest.err
15523 rm -f conftest.er1
15524 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526 (exit $ac_status); } && {
15527 test -z "$ac_c_werror_flag" ||
15528 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015529 } && test -s conftest$ac_exeext &&
15530 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015531 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015532else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015534sed 's/^/| /' conftest.$ac_ext >&5
15535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015536 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538
15539rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015540 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015541LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015542fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015543{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15544echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15545if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015546 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015547#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015549
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015550 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015551 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015552 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015553fi
15554
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015555 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015556
Martin v. Löwis130fb172001-07-19 11:00:41 +000015557 if test "$USE_THREAD_MODULE" != "#"
15558 then
15559 # If the above checks didn't disable threads, (at least) OSF1
15560 # needs this '-threads' argument during linking.
15561 case $ac_sys_system in
15562 OSF1) LDLAST=-threads;;
15563 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015564 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015565fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015566
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015567if test "$posix_threads" = "yes"; then
15568 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015569
15570cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015571#define _POSIX_THREADS 1
15572_ACEOF
15573
15574 fi
15575
15576 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15577 case $ac_sys_system/$ac_sys_release in
15578 SunOS/5.6)
15579cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015580#define HAVE_PTHREAD_DESTRUCTOR 1
15581_ACEOF
15582
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015583 ;;
15584 SunOS/5.8)
15585cat >>confdefs.h <<\_ACEOF
15586#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15587_ACEOF
15588
15589 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015590 AIX/5)
15591cat >>confdefs.h <<\_ACEOF
15592#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15593_ACEOF
15594
15595 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015596 esac
15597
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015598 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15599echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015600 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015601 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015602else
15603 if test "$cross_compiling" = yes; then
15604 ac_cv_pthread_system_supported=no
15605else
15606 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015607/* confdefs.h. */
15608_ACEOF
15609cat confdefs.h >>conftest.$ac_ext
15610cat >>conftest.$ac_ext <<_ACEOF
15611/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015612#include <pthread.h>
15613 void *foo(void *parm) {
15614 return NULL;
15615 }
15616 main() {
15617 pthread_attr_t attr;
15618 pthread_t id;
15619 if (pthread_attr_init(&attr)) exit(-1);
15620 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15621 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15622 exit(0);
15623 }
15624_ACEOF
15625rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015626if { (ac_try="$ac_link"
15627case "(($ac_try" in
15628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15629 *) ac_try_echo=$ac_try;;
15630esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015632 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015633 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015635 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636 { (case "(($ac_try" in
15637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15638 *) ac_try_echo=$ac_try;;
15639esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015641 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015642 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015644 (exit $ac_status); }; }; then
15645 ac_cv_pthread_system_supported=yes
15646else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015647 echo "$as_me: program exited with status $ac_status" >&5
15648echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015649sed 's/^/| /' conftest.$ac_ext >&5
15650
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015651( exit $ac_status )
15652ac_cv_pthread_system_supported=no
15653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015654rm -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 +000015655fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657
15658
Guido van Rossum627b2d71993-12-24 10:39:16 +000015659fi
15660
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015661 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15662echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015663 if test "$ac_cv_pthread_system_supported" = "yes"; then
15664
15665cat >>confdefs.h <<\_ACEOF
15666#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15667_ACEOF
15668
15669 fi
15670
15671for ac_func in pthread_sigmask
15672do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015673as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15674{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15675echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015676if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015677 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015678else
15679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015680/* confdefs.h. */
15681_ACEOF
15682cat confdefs.h >>conftest.$ac_ext
15683cat >>conftest.$ac_ext <<_ACEOF
15684/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015685/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15686 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15687#define $ac_func innocuous_$ac_func
15688
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015689/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015690 which can conflict with char $ac_func (); below.
15691 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015692 <limits.h> exists even on freestanding compilers. */
15693
15694#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015695# include <limits.h>
15696#else
15697# include <assert.h>
15698#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015699
15700#undef $ac_func
15701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015702/* Override any GCC internal prototype to avoid an error.
15703 Use char because int might match the return type of a GCC
15704 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015705#ifdef __cplusplus
15706extern "C"
15707#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015708char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015709/* The GNU C library defines this for functions which it implements
15710 to always fail with ENOSYS. Some functions are actually named
15711 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015713choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015714#endif
15715
Skip Montanaro6dead952003-09-25 14:50:04 +000015716int
15717main ()
15718{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015719return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015720 ;
15721 return 0;
15722}
15723_ACEOF
15724rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015725if { (ac_try="$ac_link"
15726case "(($ac_try" in
15727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15728 *) ac_try_echo=$ac_try;;
15729esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015733 grep -v '^ *+' conftest.er1 >conftest.err
15734 rm -f conftest.er1
15735 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015737 (exit $ac_status); } && {
15738 test -z "$ac_c_werror_flag" ||
15739 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015740 } && test -s conftest$ac_exeext &&
15741 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015742 eval "$as_ac_var=yes"
15743else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015745sed 's/^/| /' conftest.$ac_ext >&5
15746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015749
15750rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015752fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015753ac_res=`eval echo '${'$as_ac_var'}'`
15754 { echo "$as_me:$LINENO: result: $ac_res" >&5
15755echo "${ECHO_T}$ac_res" >&6; }
15756if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015757 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015758#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015759_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015760 case $ac_sys_system in
15761 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015762
Jason Tishlerfac083d2003-07-22 15:20:49 +000015763cat >>confdefs.h <<\_ACEOF
15764#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15765_ACEOF
15766
15767 ;;
15768 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015769fi
15770done
15771
15772fi
15773
15774
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015775# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015776
15777
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015778{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15779echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015781if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015782 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015783 no)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015784 { echo "$as_me:$LINENO: result: no" >&5
15785echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015786 ipv6=no
15787 ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015788 *) { echo "$as_me:$LINENO: result: yes" >&5
15789echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015790 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015791#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015792_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015793
15794 ipv6=yes
15795 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015796 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015797else
Martin v. Löwis11437992002-04-12 09:54:03 +000015798
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015799 if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015800 { echo "$as_me:$LINENO: result: no" >&5
15801echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015802 ipv6=no
15803
15804else
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015806/* confdefs.h. */
15807_ACEOF
15808cat confdefs.h >>conftest.$ac_ext
15809cat >>conftest.$ac_ext <<_ACEOF
15810/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015811 /* AF_INET6 available check */
15812#include <sys/types.h>
15813#include <sys/socket.h>
15814main()
15815{
15816 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15817 exit(1);
15818 else
15819 exit(0);
15820}
15821
Martin v. Löwis11437992002-04-12 09:54:03 +000015822_ACEOF
15823rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824if { (ac_try="$ac_link"
15825case "(($ac_try" in
15826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15827 *) ac_try_echo=$ac_try;;
15828esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015830 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015831 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015834 { (case "(($ac_try" in
15835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15836 *) ac_try_echo=$ac_try;;
15837esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015840 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015842 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015843 { echo "$as_me:$LINENO: result: yes" >&5
15844echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015845 ipv6=yes
15846else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015847 echo "$as_me: program exited with status $ac_status" >&5
15848echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015849sed 's/^/| /' conftest.$ac_ext >&5
15850
Martin v. Löwis11437992002-04-12 09:54:03 +000015851( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015852{ echo "$as_me:$LINENO: result: no" >&5
15853echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015854 ipv6=no
15855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856rm -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 +000015857fi
15858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859
15860
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015861if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015862 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15863echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015865/* confdefs.h. */
15866_ACEOF
15867cat confdefs.h >>conftest.$ac_ext
15868cat >>conftest.$ac_ext <<_ACEOF
15869/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015870#include <sys/types.h>
15871#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015872int
15873main ()
15874{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015875struct sockaddr_in6 x;
15876x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015877 ;
15878 return 0;
15879}
15880_ACEOF
15881rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882if { (ac_try="$ac_compile"
15883case "(($ac_try" in
15884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15885 *) ac_try_echo=$ac_try;;
15886esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015890 grep -v '^ *+' conftest.er1 >conftest.err
15891 rm -f conftest.er1
15892 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015894 (exit $ac_status); } && {
15895 test -z "$ac_c_werror_flag" ||
15896 test ! -s conftest.err
15897 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015898 { echo "$as_me:$LINENO: result: yes" >&5
15899echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015900 ipv6=yes
15901else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015903sed 's/^/| /' conftest.$ac_ext >&5
15904
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015905 { echo "$as_me:$LINENO: result: no" >&5
15906echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015907 ipv6=no
15908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909
15910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015911fi
15912
15913if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015914 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015915#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015916_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015917
15918fi
15919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015920fi
15921
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015922
15923ipv6type=unknown
15924ipv6lib=none
15925ipv6trylibc=no
15926
15927if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015928 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15929echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015930 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15931 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015932 case $i in
15933 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015935/* confdefs.h. */
15936_ACEOF
15937cat confdefs.h >>conftest.$ac_ext
15938cat >>conftest.$ac_ext <<_ACEOF
15939/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015940
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015941#include <netinet/in.h>
15942#ifdef IPV6_INRIA_VERSION
15943yes
15944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015945_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015947 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015948 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015949fi
Ronald Oussoren79a93512010-04-18 19:08:47 +000015950rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015951
15952 ;;
15953 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015955/* confdefs.h. */
15956_ACEOF
15957cat confdefs.h >>conftest.$ac_ext
15958cat >>conftest.$ac_ext <<_ACEOF
15959/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015961#include <netinet/in.h>
15962#ifdef __KAME__
15963yes
15964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015965_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015967 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015968 ipv6type=$i;
15969 ipv6lib=inet6
15970 ipv6libdir=/usr/local/v6/lib
15971 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015972fi
Ronald Oussoren79a93512010-04-18 19:08:47 +000015973rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015974
15975 ;;
15976 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015978/* confdefs.h. */
15979_ACEOF
15980cat confdefs.h >>conftest.$ac_ext
15981cat >>conftest.$ac_ext <<_ACEOF
15982/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015983
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015984#include <features.h>
15985#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15986yes
15987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015988_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015990 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015991 ipv6type=$i;
15992 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015993fi
Ronald Oussoren79a93512010-04-18 19:08:47 +000015994rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015995
15996 ;;
15997 linux-inet6)
15998 if test -d /usr/inet6; then
15999 ipv6type=$i
16000 ipv6lib=inet6
16001 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016002 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016003 fi
16004 ;;
16005 solaris)
16006 if test -f /etc/netconfig; then
16007 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16008 ipv6type=$i
16009 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016010 fi
16011 fi
16012 ;;
16013 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016015/* confdefs.h. */
16016_ACEOF
16017cat confdefs.h >>conftest.$ac_ext
16018cat >>conftest.$ac_ext <<_ACEOF
16019/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016020
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016021#include <sys/param.h>
16022#ifdef _TOSHIBA_INET6
16023yes
16024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016025_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016027 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016028 ipv6type=$i;
16029 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016030 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016031fi
Ronald Oussoren79a93512010-04-18 19:08:47 +000016032rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016033
16034 ;;
16035 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016037/* confdefs.h. */
16038_ACEOF
16039cat confdefs.h >>conftest.$ac_ext
16040cat >>conftest.$ac_ext <<_ACEOF
16041/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016042
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016043#include </usr/local/v6/include/sys/v6config.h>
16044#ifdef __V6D__
16045yes
16046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016047_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016049 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016050 ipv6type=$i;
16051 ipv6lib=v6;
16052 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016053 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016054fi
Ronald Oussoren79a93512010-04-18 19:08:47 +000016055rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016056
16057 ;;
16058 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016060/* confdefs.h. */
16061_ACEOF
16062cat confdefs.h >>conftest.$ac_ext
16063cat >>conftest.$ac_ext <<_ACEOF
16064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016066#include <sys/param.h>
16067#ifdef _ZETA_MINAMI_INET6
16068yes
16069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016072 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016073 ipv6type=$i;
16074 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016075 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016076fi
Ronald Oussoren79a93512010-04-18 19:08:47 +000016077rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016078
16079 ;;
16080 esac
16081 if test "$ipv6type" != "unknown"; then
16082 break
16083 fi
16084 done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016085 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16086echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016087fi
16088
16089if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16090 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16091 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16092 echo "using lib$ipv6lib"
16093 else
16094 if test $ipv6trylibc = "yes"; then
16095 echo "using libc"
16096 else
16097 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16098 echo "You need to fetch lib$ipv6lib.a from appropriate"
16099 echo 'ipv6 kit and compile beforehand.'
16100 exit 1
16101 fi
16102 fi
16103fi
16104
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016105{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16106echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016107cat >conftest.$ac_ext <<_ACEOF
16108/* confdefs.h. */
16109_ACEOF
16110cat confdefs.h >>conftest.$ac_ext
16111cat >>conftest.$ac_ext <<_ACEOF
16112/* end confdefs.h. */
16113#include <Carbon/Carbon.h>
16114int
16115main ()
16116{
16117FSIORefNum fRef = 0
16118 ;
16119 return 0;
16120}
16121_ACEOF
16122rm -f conftest.$ac_objext
16123if { (ac_try="$ac_compile"
16124case "(($ac_try" in
16125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16126 *) ac_try_echo=$ac_try;;
16127esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016129 (eval "$ac_compile") 2>conftest.er1
16130 ac_status=$?
16131 grep -v '^ *+' conftest.er1 >conftest.err
16132 rm -f conftest.er1
16133 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016135 (exit $ac_status); } && {
16136 test -z "$ac_c_werror_flag" ||
16137 test ! -s conftest.err
16138 } && test -s conftest.$ac_objext; then
16139
16140cat >>confdefs.h <<\_ACEOF
16141#define HAVE_OSX105_SDK 1
16142_ACEOF
16143
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016144 { echo "$as_me:$LINENO: result: yes" >&5
16145echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016146else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016147 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016148sed 's/^/| /' conftest.$ac_ext >&5
16149
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016150 { echo "$as_me:$LINENO: result: no" >&5
16151echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016152
16153fi
16154
16155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16156
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016157# Check for --with-doc-strings
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016158{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16159echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016161# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016162if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163 withval=$with_doc_strings;
16164fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016165
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016166
16167if test -z "$with_doc_strings"
16168then with_doc_strings="yes"
16169fi
16170if test "$with_doc_strings" != "no"
16171then
16172
16173cat >>confdefs.h <<\_ACEOF
16174#define WITH_DOC_STRINGS 1
16175_ACEOF
16176
16177fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016178{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16179echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016180
Neil Schemenauera35c6882001-02-27 04:45:05 +000016181# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016182{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16183echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016186if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016188if test "$withval" != no
16189then
16190
16191cat >>confdefs.h <<\_ACEOF
16192#define WITH_TSC 1
16193_ACEOF
16194
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016195 { echo "$as_me:$LINENO: result: yes" >&5
16196echo "${ECHO_T}yes" >&6; }
16197else { echo "$as_me:$LINENO: result: no" >&5
16198echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016199fi
16200else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016201 { echo "$as_me:$LINENO: result: no" >&5
16202echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016203fi
16204
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016205
16206# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016207{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16208echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016211if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212 withval=$with_pymalloc;
16213fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016214
Neil Schemenauera35c6882001-02-27 04:45:05 +000016215
Neil Schemenauer16c22972002-03-22 15:34:49 +000016216if test -z "$with_pymalloc"
16217then with_pymalloc="yes"
16218fi
16219if test "$with_pymalloc" != "no"
16220then
Martin v. Löwis11437992002-04-12 09:54:03 +000016221
16222cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016223#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016224_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016225
16226fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016227{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16228echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016229
Barry Warsawef82cd72000-06-30 16:21:01 +000016230# Check for --with-wctype-functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016231{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16232echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016235if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016237if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016238then
16239
16240cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016241#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016242_ACEOF
16243
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016244 { echo "$as_me:$LINENO: result: yes" >&5
16245echo "${ECHO_T}yes" >&6; }
16246else { echo "$as_me:$LINENO: result: no" >&5
16247echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016248fi
16249else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016250 { echo "$as_me:$LINENO: result: no" >&5
16251echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252fi
16253
Barry Warsawef82cd72000-06-30 16:21:01 +000016254
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016255# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016256
Guido van Rossum98935bf2001-09-05 19:13:16 +000016257DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016258
Guido van Rossume97ee181999-12-20 21:27:22 +000016259# the dlopen() function means we might want to use dynload_shlib.o. some
16260# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016261
Thomas Wouters3a584202000-08-05 23:28:51 +000016262for ac_func in dlopen
16263do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016264as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16265{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16266echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016268 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016269else
Martin v. Löwis11437992002-04-12 09:54:03 +000016270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016271/* confdefs.h. */
16272_ACEOF
16273cat confdefs.h >>conftest.$ac_ext
16274cat >>conftest.$ac_ext <<_ACEOF
16275/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016276/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16277 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16278#define $ac_func innocuous_$ac_func
16279
Guido van Rossume97ee181999-12-20 21:27:22 +000016280/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016281 which can conflict with char $ac_func (); below.
16282 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016283 <limits.h> exists even on freestanding compilers. */
16284
16285#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016286# include <limits.h>
16287#else
16288# include <assert.h>
16289#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016290
16291#undef $ac_func
16292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293/* Override any GCC internal prototype to avoid an error.
16294 Use char because int might match the return type of a GCC
16295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016296#ifdef __cplusplus
16297extern "C"
16298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016299char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016300/* The GNU C library defines this for functions which it implements
16301 to always fail with ENOSYS. Some functions are actually named
16302 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016303#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016304choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016305#endif
16306
Skip Montanaro6dead952003-09-25 14:50:04 +000016307int
16308main ()
16309{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016311 ;
16312 return 0;
16313}
16314_ACEOF
16315rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016316if { (ac_try="$ac_link"
16317case "(($ac_try" in
16318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16319 *) ac_try_echo=$ac_try;;
16320esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016324 grep -v '^ *+' conftest.er1 >conftest.err
16325 rm -f conftest.er1
16326 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328 (exit $ac_status); } && {
16329 test -z "$ac_c_werror_flag" ||
16330 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016331 } && test -s conftest$ac_exeext &&
16332 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016333 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016334else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016336sed 's/^/| /' conftest.$ac_ext >&5
16337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340
16341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016342 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016343fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016344ac_res=`eval echo '${'$as_ac_var'}'`
16345 { echo "$as_me:$LINENO: result: $ac_res" >&5
16346echo "${ECHO_T}$ac_res" >&6; }
16347if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016348 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016349#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016350_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016351
Guido van Rossume97ee181999-12-20 21:27:22 +000016352fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016353done
Guido van Rossume97ee181999-12-20 21:27:22 +000016354
Michael W. Hudson54241132001-12-07 15:38:26 +000016355
Guido van Rossume97ee181999-12-20 21:27:22 +000016356# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16357# loading of modules.
16358
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016359{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16360echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016361if test -z "$DYNLOADFILE"
16362then
16363 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016364 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16365 if test "$ac_cv_func_dlopen" = yes
16366 then DYNLOADFILE="dynload_shlib.o"
16367 else DYNLOADFILE="dynload_aix.o"
16368 fi
16369 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016370 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016371 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16372 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016373 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016374 *)
16375 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16376 # out any dynamic loading
16377 if test "$ac_cv_func_dlopen" = yes
16378 then DYNLOADFILE="dynload_shlib.o"
16379 else DYNLOADFILE="dynload_stub.o"
16380 fi
16381 ;;
16382 esac
16383fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016384{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16385echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016386if test "$DYNLOADFILE" != "dynload_stub.o"
16387then
Martin v. Löwis11437992002-04-12 09:54:03 +000016388
16389cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016390#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016391_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016392
16393fi
16394
Neil Schemenauer4e425612001-06-19 15:44:15 +000016395# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16396
Michael W. Hudson54241132001-12-07 15:38:26 +000016397
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016398{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16399echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016400if test -z "$MACHDEP_OBJS"
16401then
Jack Jansene578a632001-08-15 01:27:14 +000016402 MACHDEP_OBJS=$extra_machdep_objs
16403else
16404 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016405fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016406{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16407echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016408
Guido van Rossum627b2d71993-12-24 10:39:16 +000016409# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
Martin v. Löwisd6320502004-08-12 13:45:08 +000016481
Martin v. Löwisc3001752005-01-23 09:27:24 +000016482
16483
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016484
16485
Thomas Wouterscf297e42007-02-23 15:07:44 +000016486
16487
Gregory P. Smith25523d22007-09-03 16:44:55 +000016488
Christian Heimes4e30a842007-11-30 22:12:06 +000016489
Martin v. Löwis92fab752008-03-08 10:40:41 +000016490
Martin v. Löwis823725e2008-03-24 13:39:54 +000016491
16492
Benjamin Peterson965ce872009-04-05 21:24:58 +000016493
16494
16495
16496
Martin v. Löwis011e8422009-05-05 04:43:17 +000016497
Martin v. Löwis113a0852009-05-29 17:25:39 +000016498
Martin v. Löwis823725e2008-03-24 13:39:54 +000016499for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16500 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016501 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016502 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016503 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016504 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016505 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016506 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16507 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016508 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016509 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016510 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016511 truncate uname unsetenv utimes waitpid wait3 wait4 \
16512 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016513do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016514as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16515{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16516echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016517if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016519else
Martin v. Löwis11437992002-04-12 09:54:03 +000016520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016521/* confdefs.h. */
16522_ACEOF
16523cat confdefs.h >>conftest.$ac_ext
16524cat >>conftest.$ac_ext <<_ACEOF
16525/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016526/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16527 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16528#define $ac_func innocuous_$ac_func
16529
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016530/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016531 which can conflict with char $ac_func (); below.
16532 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016533 <limits.h> exists even on freestanding compilers. */
16534
16535#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016536# include <limits.h>
16537#else
16538# include <assert.h>
16539#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016540
16541#undef $ac_func
16542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543/* Override any GCC internal prototype to avoid an error.
16544 Use char because int might match the return type of a GCC
16545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016546#ifdef __cplusplus
16547extern "C"
16548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016549char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016550/* The GNU C library defines this for functions which it implements
16551 to always fail with ENOSYS. Some functions are actually named
16552 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016554choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016555#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016556
Skip Montanaro6dead952003-09-25 14:50:04 +000016557int
16558main ()
16559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016561 ;
16562 return 0;
16563}
16564_ACEOF
16565rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016566if { (ac_try="$ac_link"
16567case "(($ac_try" in
16568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16569 *) ac_try_echo=$ac_try;;
16570esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016572 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016574 grep -v '^ *+' conftest.er1 >conftest.err
16575 rm -f conftest.er1
16576 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578 (exit $ac_status); } && {
16579 test -z "$ac_c_werror_flag" ||
16580 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016581 } && test -s conftest$ac_exeext &&
16582 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016583 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016584else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016586sed 's/^/| /' conftest.$ac_ext >&5
16587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590
16591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016592 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016593fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016594ac_res=`eval echo '${'$as_ac_var'}'`
16595 { echo "$as_me:$LINENO: result: $ac_res" >&5
16596echo "${ECHO_T}$ac_res" >&6; }
16597if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016598 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016599#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016600_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016601
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016602fi
16603done
16604
Michael W. Hudson54241132001-12-07 15:38:26 +000016605
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016606# For some functions, having a definition is not sufficient, since
16607# we want to take their address.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016608{ echo "$as_me:$LINENO: checking for chroot" >&5
16609echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016611/* confdefs.h. */
16612_ACEOF
16613cat confdefs.h >>conftest.$ac_ext
16614cat >>conftest.$ac_ext <<_ACEOF
16615/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016616#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016617int
16618main ()
16619{
16620void *x=chroot
16621 ;
16622 return 0;
16623}
16624_ACEOF
16625rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626if { (ac_try="$ac_compile"
16627case "(($ac_try" in
16628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16629 *) ac_try_echo=$ac_try;;
16630esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016634 grep -v '^ *+' conftest.er1 >conftest.err
16635 rm -f conftest.er1
16636 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016638 (exit $ac_status); } && {
16639 test -z "$ac_c_werror_flag" ||
16640 test ! -s conftest.err
16641 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016642
16643cat >>confdefs.h <<\_ACEOF
16644#define HAVE_CHROOT 1
16645_ACEOF
16646
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016647 { echo "$as_me:$LINENO: result: yes" >&5
16648echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016649else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016651sed 's/^/| /' conftest.$ac_ext >&5
16652
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016653 { echo "$as_me:$LINENO: result: no" >&5
16654echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016655
16656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016657
16658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016659{ echo "$as_me:$LINENO: checking for link" >&5
16660echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016662/* confdefs.h. */
16663_ACEOF
16664cat confdefs.h >>conftest.$ac_ext
16665cat >>conftest.$ac_ext <<_ACEOF
16666/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016667#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016668int
16669main ()
16670{
16671void *x=link
16672 ;
16673 return 0;
16674}
16675_ACEOF
16676rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016677if { (ac_try="$ac_compile"
16678case "(($ac_try" in
16679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16680 *) ac_try_echo=$ac_try;;
16681esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016685 grep -v '^ *+' conftest.er1 >conftest.err
16686 rm -f conftest.er1
16687 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689 (exit $ac_status); } && {
16690 test -z "$ac_c_werror_flag" ||
16691 test ! -s conftest.err
16692 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016693
16694cat >>confdefs.h <<\_ACEOF
16695#define HAVE_LINK 1
16696_ACEOF
16697
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016698 { echo "$as_me:$LINENO: result: yes" >&5
16699echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016700else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016702sed 's/^/| /' conftest.$ac_ext >&5
16703
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016704 { echo "$as_me:$LINENO: result: no" >&5
16705echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016706
16707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016708
16709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016710{ echo "$as_me:$LINENO: checking for symlink" >&5
16711echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016713/* confdefs.h. */
16714_ACEOF
16715cat confdefs.h >>conftest.$ac_ext
16716cat >>conftest.$ac_ext <<_ACEOF
16717/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016718#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016719int
16720main ()
16721{
16722void *x=symlink
16723 ;
16724 return 0;
16725}
16726_ACEOF
16727rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728if { (ac_try="$ac_compile"
16729case "(($ac_try" in
16730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16731 *) ac_try_echo=$ac_try;;
16732esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016736 grep -v '^ *+' conftest.er1 >conftest.err
16737 rm -f conftest.er1
16738 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016740 (exit $ac_status); } && {
16741 test -z "$ac_c_werror_flag" ||
16742 test ! -s conftest.err
16743 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016744
16745cat >>confdefs.h <<\_ACEOF
16746#define HAVE_SYMLINK 1
16747_ACEOF
16748
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016749 { echo "$as_me:$LINENO: result: yes" >&5
16750echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016751else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016753sed 's/^/| /' conftest.$ac_ext >&5
16754
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016755 { echo "$as_me:$LINENO: result: no" >&5
16756echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016757
16758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759
16760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016761{ echo "$as_me:$LINENO: checking for fchdir" >&5
16762echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016764/* confdefs.h. */
16765_ACEOF
16766cat confdefs.h >>conftest.$ac_ext
16767cat >>conftest.$ac_ext <<_ACEOF
16768/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016769#include <unistd.h>
16770int
16771main ()
16772{
16773void *x=fchdir
16774 ;
16775 return 0;
16776}
16777_ACEOF
16778rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016779if { (ac_try="$ac_compile"
16780case "(($ac_try" in
16781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16782 *) ac_try_echo=$ac_try;;
16783esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016787 grep -v '^ *+' conftest.er1 >conftest.err
16788 rm -f conftest.er1
16789 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016791 (exit $ac_status); } && {
16792 test -z "$ac_c_werror_flag" ||
16793 test ! -s conftest.err
16794 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016795
16796cat >>confdefs.h <<\_ACEOF
16797#define HAVE_FCHDIR 1
16798_ACEOF
16799
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016800 { echo "$as_me:$LINENO: result: yes" >&5
16801echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016802else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016804sed 's/^/| /' conftest.$ac_ext >&5
16805
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016806 { echo "$as_me:$LINENO: result: no" >&5
16807echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016808
16809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016810
16811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016812{ echo "$as_me:$LINENO: checking for fsync" >&5
16813echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016814cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016815/* confdefs.h. */
16816_ACEOF
16817cat confdefs.h >>conftest.$ac_ext
16818cat >>conftest.$ac_ext <<_ACEOF
16819/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016820#include <unistd.h>
16821int
16822main ()
16823{
16824void *x=fsync
16825 ;
16826 return 0;
16827}
16828_ACEOF
16829rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016830if { (ac_try="$ac_compile"
16831case "(($ac_try" in
16832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16833 *) ac_try_echo=$ac_try;;
16834esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016838 grep -v '^ *+' conftest.er1 >conftest.err
16839 rm -f conftest.er1
16840 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016842 (exit $ac_status); } && {
16843 test -z "$ac_c_werror_flag" ||
16844 test ! -s conftest.err
16845 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016846
16847cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016848#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016849_ACEOF
16850
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016851 { echo "$as_me:$LINENO: result: yes" >&5
16852echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016853else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016855sed 's/^/| /' conftest.$ac_ext >&5
16856
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016857 { echo "$as_me:$LINENO: result: no" >&5
16858echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016859
16860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016861
16862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016863{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16864echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016865cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016866/* confdefs.h. */
16867_ACEOF
16868cat confdefs.h >>conftest.$ac_ext
16869cat >>conftest.$ac_ext <<_ACEOF
16870/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016871#include <unistd.h>
16872int
16873main ()
16874{
16875void *x=fdatasync
16876 ;
16877 return 0;
16878}
16879_ACEOF
16880rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881if { (ac_try="$ac_compile"
16882case "(($ac_try" in
16883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16884 *) ac_try_echo=$ac_try;;
16885esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016889 grep -v '^ *+' conftest.er1 >conftest.err
16890 rm -f conftest.er1
16891 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893 (exit $ac_status); } && {
16894 test -z "$ac_c_werror_flag" ||
16895 test ! -s conftest.err
16896 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016897
16898cat >>confdefs.h <<\_ACEOF
16899#define HAVE_FDATASYNC 1
16900_ACEOF
16901
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016902 { echo "$as_me:$LINENO: result: yes" >&5
16903echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016904else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016906sed 's/^/| /' conftest.$ac_ext >&5
16907
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016908 { echo "$as_me:$LINENO: result: no" >&5
16909echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016910
16911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912
16913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016914{ echo "$as_me:$LINENO: checking for epoll" >&5
16915echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016916cat >conftest.$ac_ext <<_ACEOF
16917/* confdefs.h. */
16918_ACEOF
16919cat confdefs.h >>conftest.$ac_ext
16920cat >>conftest.$ac_ext <<_ACEOF
16921/* end confdefs.h. */
16922#include <sys/epoll.h>
16923int
16924main ()
16925{
16926void *x=epoll_create
16927 ;
16928 return 0;
16929}
16930_ACEOF
16931rm -f conftest.$ac_objext
16932if { (ac_try="$ac_compile"
16933case "(($ac_try" in
16934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16935 *) ac_try_echo=$ac_try;;
16936esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016938 (eval "$ac_compile") 2>conftest.er1
16939 ac_status=$?
16940 grep -v '^ *+' conftest.er1 >conftest.err
16941 rm -f conftest.er1
16942 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016944 (exit $ac_status); } && {
16945 test -z "$ac_c_werror_flag" ||
16946 test ! -s conftest.err
16947 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016948
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016949cat >>confdefs.h <<\_ACEOF
16950#define HAVE_EPOLL 1
16951_ACEOF
16952
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016953 { echo "$as_me:$LINENO: result: yes" >&5
16954echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016955else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016956 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016957sed 's/^/| /' conftest.$ac_ext >&5
16958
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016959 { echo "$as_me:$LINENO: result: no" >&5
16960echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016961
16962fi
16963
16964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016965{ echo "$as_me:$LINENO: checking for kqueue" >&5
16966echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016967cat >conftest.$ac_ext <<_ACEOF
16968/* confdefs.h. */
16969_ACEOF
16970cat confdefs.h >>conftest.$ac_ext
16971cat >>conftest.$ac_ext <<_ACEOF
16972/* end confdefs.h. */
16973
16974#include <sys/types.h>
16975#include <sys/event.h>
16976
16977int
16978main ()
16979{
16980int x=kqueue()
16981 ;
16982 return 0;
16983}
16984_ACEOF
16985rm -f conftest.$ac_objext
16986if { (ac_try="$ac_compile"
16987case "(($ac_try" in
16988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16989 *) ac_try_echo=$ac_try;;
16990esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016992 (eval "$ac_compile") 2>conftest.er1
16993 ac_status=$?
16994 grep -v '^ *+' conftest.er1 >conftest.err
16995 rm -f conftest.er1
16996 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016998 (exit $ac_status); } && {
16999 test -z "$ac_c_werror_flag" ||
17000 test ! -s conftest.err
17001 } && test -s conftest.$ac_objext; then
17002
17003cat >>confdefs.h <<\_ACEOF
17004#define HAVE_KQUEUE 1
17005_ACEOF
17006
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017007 { echo "$as_me:$LINENO: result: yes" >&5
17008echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017009else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017010 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017011sed 's/^/| /' conftest.$ac_ext >&5
17012
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017013 { echo "$as_me:$LINENO: result: no" >&5
17014echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017015
17016fi
17017
17018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017019# On some systems (eg. FreeBSD 5), we would find a definition of the
17020# functions ctermid_r, setgroups in the library, but no prototype
17021# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17022# address to avoid compiler warnings and potential miscompilations
17023# because of the missing prototypes.
17024
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017025{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17026echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017027cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017028/* confdefs.h. */
17029_ACEOF
17030cat confdefs.h >>conftest.$ac_ext
17031cat >>conftest.$ac_ext <<_ACEOF
17032/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017033
17034#include "confdefs.h"
17035#include <stdio.h>
17036
Martin v. Löwisd5843682002-11-21 20:41:28 +000017037int
17038main ()
17039{
17040void* p = ctermid_r
17041 ;
17042 return 0;
17043}
17044_ACEOF
17045rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046if { (ac_try="$ac_compile"
17047case "(($ac_try" in
17048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17049 *) ac_try_echo=$ac_try;;
17050esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017054 grep -v '^ *+' conftest.er1 >conftest.err
17055 rm -f conftest.er1
17056 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058 (exit $ac_status); } && {
17059 test -z "$ac_c_werror_flag" ||
17060 test ! -s conftest.err
17061 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017062
17063cat >>confdefs.h <<\_ACEOF
17064#define HAVE_CTERMID_R 1
17065_ACEOF
17066
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017067 { echo "$as_me:$LINENO: result: yes" >&5
17068echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017069else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017071sed 's/^/| /' conftest.$ac_ext >&5
17072
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017073 { echo "$as_me:$LINENO: result: no" >&5
17074echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017075
17076fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17079
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017080{ echo "$as_me:$LINENO: checking for flock" >&5
17081echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017083/* confdefs.h. */
17084_ACEOF
17085cat confdefs.h >>conftest.$ac_ext
17086cat >>conftest.$ac_ext <<_ACEOF
17087/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017088
17089#include "confdefs.h"
17090#include <sys/file.h>
17091
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017092int
17093main ()
17094{
17095void* p = flock
17096 ;
17097 return 0;
17098}
17099_ACEOF
17100rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101if { (ac_try="$ac_compile"
17102case "(($ac_try" in
17103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17104 *) ac_try_echo=$ac_try;;
17105esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017109 grep -v '^ *+' conftest.er1 >conftest.err
17110 rm -f conftest.er1
17111 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017113 (exit $ac_status); } && {
17114 test -z "$ac_c_werror_flag" ||
17115 test ! -s conftest.err
17116 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017117
17118cat >>confdefs.h <<\_ACEOF
17119#define HAVE_FLOCK 1
17120_ACEOF
17121
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017122 { echo "$as_me:$LINENO: result: yes" >&5
17123echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017124else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017126sed 's/^/| /' conftest.$ac_ext >&5
17127
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017128 { echo "$as_me:$LINENO: result: no" >&5
17129echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017130
17131fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17134
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017135{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17136echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017137cat >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öwisf26d63b2003-03-30 17:23:49 +000017143
17144#include "confdefs.h"
17145#include <unistd.h>
17146
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017147int
17148main ()
17149{
17150void* p = getpagesize
17151 ;
17152 return 0;
17153}
17154_ACEOF
17155rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017156if { (ac_try="$ac_compile"
17157case "(($ac_try" in
17158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17159 *) ac_try_echo=$ac_try;;
17160esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017164 grep -v '^ *+' conftest.er1 >conftest.err
17165 rm -f conftest.er1
17166 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017168 (exit $ac_status); } && {
17169 test -z "$ac_c_werror_flag" ||
17170 test ! -s conftest.err
17171 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017172
17173cat >>confdefs.h <<\_ACEOF
17174#define HAVE_GETPAGESIZE 1
17175_ACEOF
17176
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017177 { echo "$as_me:$LINENO: result: yes" >&5
17178echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017179else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017181sed 's/^/| /' conftest.$ac_ext >&5
17182
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017183 { echo "$as_me:$LINENO: result: no" >&5
17184echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017185
17186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187
17188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017189
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017190for ac_prog in true
17191do
17192 # Extract the first word of "$ac_prog", so it can be a program name with args.
17193set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017194{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17195echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017196if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017197 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017198else
17199 if test -n "$TRUE"; then
17200 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17201else
17202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17203for as_dir in $PATH
17204do
17205 IFS=$as_save_IFS
17206 test -z "$as_dir" && as_dir=.
17207 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017208 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 +000017209 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017210 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017211 break 2
17212 fi
17213done
17214done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017216
17217fi
17218fi
17219TRUE=$ac_cv_prog_TRUE
17220if test -n "$TRUE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017221 { echo "$as_me:$LINENO: result: $TRUE" >&5
17222echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017223else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017224 { echo "$as_me:$LINENO: result: no" >&5
17225echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017226fi
17227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017229 test -n "$TRUE" && break
17230done
17231test -n "$TRUE" || TRUE="/bin/true"
17232
17233
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017234{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17235echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017236if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017237 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017238else
17239 ac_check_lib_save_LIBS=$LIBS
17240LIBS="-lc $LIBS"
17241cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017242/* confdefs.h. */
17243_ACEOF
17244cat confdefs.h >>conftest.$ac_ext
17245cat >>conftest.$ac_ext <<_ACEOF
17246/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248/* Override any GCC internal prototype to avoid an error.
17249 Use char because int might match the return type of a GCC
17250 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017251#ifdef __cplusplus
17252extern "C"
17253#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017254char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017255int
17256main ()
17257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017259 ;
17260 return 0;
17261}
17262_ACEOF
17263rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264if { (ac_try="$ac_link"
17265case "(($ac_try" in
17266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17267 *) ac_try_echo=$ac_try;;
17268esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017272 grep -v '^ *+' conftest.er1 >conftest.err
17273 rm -f conftest.er1
17274 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276 (exit $ac_status); } && {
17277 test -z "$ac_c_werror_flag" ||
17278 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017279 } && test -s conftest$ac_exeext &&
17280 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017281 ac_cv_lib_c_inet_aton=yes
17282else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017284sed 's/^/| /' conftest.$ac_ext >&5
17285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288
17289rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017291LIBS=$ac_check_lib_save_LIBS
17292fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017293{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17294echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17295if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017296 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017297else
17298
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017299{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17300echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017301if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017302 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017303else
17304 ac_check_lib_save_LIBS=$LIBS
17305LIBS="-lresolv $LIBS"
17306cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017307/* confdefs.h. */
17308_ACEOF
17309cat confdefs.h >>conftest.$ac_ext
17310cat >>conftest.$ac_ext <<_ACEOF
17311/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313/* Override any GCC internal prototype to avoid an error.
17314 Use char because int might match the return type of a GCC
17315 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017316#ifdef __cplusplus
17317extern "C"
17318#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017319char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017320int
17321main ()
17322{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017324 ;
17325 return 0;
17326}
17327_ACEOF
17328rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329if { (ac_try="$ac_link"
17330case "(($ac_try" in
17331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17332 *) ac_try_echo=$ac_try;;
17333esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017337 grep -v '^ *+' conftest.er1 >conftest.err
17338 rm -f conftest.er1
17339 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341 (exit $ac_status); } && {
17342 test -z "$ac_c_werror_flag" ||
17343 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017344 } && test -s conftest$ac_exeext &&
17345 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017346 ac_cv_lib_resolv_inet_aton=yes
17347else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017349sed 's/^/| /' conftest.$ac_ext >&5
17350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353
17354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017356LIBS=$ac_check_lib_save_LIBS
17357fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017358{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17359echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17360if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017361 cat >>confdefs.h <<_ACEOF
17362#define HAVE_LIBRESOLV 1
17363_ACEOF
17364
17365 LIBS="-lresolv $LIBS"
17366
17367fi
17368
17369
17370fi
17371
17372
Christian Heimesd0764e22007-12-04 15:00:33 +000017373# On Tru64, chflags seems to be present, but calling it will
17374# exit Python
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017375{ echo "$as_me:$LINENO: checking for chflags" >&5
17376echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017377if test "${ac_cv_have_chflags+set}" = set; then
17378 echo $ECHO_N "(cached) $ECHO_C" >&6
17379else
17380 if test "$cross_compiling" = yes; then
17381 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000017382else
17383 cat >conftest.$ac_ext <<_ACEOF
17384/* confdefs.h. */
17385_ACEOF
17386cat confdefs.h >>conftest.$ac_ext
17387cat >>conftest.$ac_ext <<_ACEOF
17388/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017389[
Christian Heimesd0764e22007-12-04 15:00:33 +000017390#include <sys/stat.h>
17391#include <unistd.h>
17392int main(int argc, char*argv[])
17393{
17394 if(chflags(argv[0], 0) != 0)
17395 return 1;
17396 return 0;
17397}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017398]
Christian Heimesd0764e22007-12-04 15:00:33 +000017399_ACEOF
17400rm -f conftest$ac_exeext
17401if { (ac_try="$ac_link"
17402case "(($ac_try" in
17403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17404 *) ac_try_echo=$ac_try;;
17405esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017407 (eval "$ac_link") 2>&5
17408 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17411 { (case "(($ac_try" in
17412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17413 *) ac_try_echo=$ac_try;;
17414esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017416 (eval "$ac_try") 2>&5
17417 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017419 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017420 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017421else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017422 echo "$as_me: program exited with status $ac_status" >&5
17423echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017424sed 's/^/| /' conftest.$ac_ext >&5
17425
17426( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017427ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017428fi
17429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17430fi
17431
17432
17433
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017434fi
17435{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
17436echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
17437if test "$ac_cv_have_chflags" = cross ; then
17438 { echo "$as_me:$LINENO: checking for chflags" >&5
17439echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17440if test "${ac_cv_func_chflags+set}" = set; then
17441 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesd0764e22007-12-04 15:00:33 +000017442else
17443 cat >conftest.$ac_ext <<_ACEOF
17444/* confdefs.h. */
17445_ACEOF
17446cat confdefs.h >>conftest.$ac_ext
17447cat >>conftest.$ac_ext <<_ACEOF
17448/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017449/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
17450 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17451#define chflags innocuous_chflags
Christian Heimesd0764e22007-12-04 15:00:33 +000017452
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017453/* System header to define __stub macros and hopefully few prototypes,
17454 which can conflict with char chflags (); below.
17455 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17456 <limits.h> exists even on freestanding compilers. */
17457
17458#ifdef __STDC__
17459# include <limits.h>
17460#else
17461# include <assert.h>
17462#endif
17463
17464#undef chflags
17465
17466/* Override any GCC internal prototype to avoid an error.
17467 Use char because int might match the return type of a GCC
17468 builtin and then its argument prototype would still apply. */
17469#ifdef __cplusplus
17470extern "C"
17471#endif
17472char chflags ();
17473/* The GNU C library defines this for functions which it implements
17474 to always fail with ENOSYS. Some functions are actually named
17475 something starting with __ and the normal name is an alias. */
17476#if defined __stub_chflags || defined __stub___chflags
17477choke me
17478#endif
17479
17480int
17481main ()
17482{
17483return chflags ();
17484 ;
17485 return 0;
17486}
17487_ACEOF
17488rm -f conftest.$ac_objext conftest$ac_exeext
17489if { (ac_try="$ac_link"
17490case "(($ac_try" in
17491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17492 *) ac_try_echo=$ac_try;;
17493esac
17494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17495 (eval "$ac_link") 2>conftest.er1
17496 ac_status=$?
17497 grep -v '^ *+' conftest.er1 >conftest.err
17498 rm -f conftest.er1
17499 cat conftest.err >&5
17500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17501 (exit $ac_status); } && {
17502 test -z "$ac_c_werror_flag" ||
17503 test ! -s conftest.err
17504 } && test -s conftest$ac_exeext &&
17505 $as_test_x conftest$ac_exeext; then
17506 ac_cv_func_chflags=yes
17507else
17508 echo "$as_me: failed program was:" >&5
17509sed 's/^/| /' conftest.$ac_ext >&5
17510
17511 ac_cv_func_chflags=no
17512fi
17513
17514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17515 conftest$ac_exeext conftest.$ac_ext
17516fi
17517{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
17518echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
17519if test $ac_cv_func_chflags = yes; then
17520 ac_cv_have_chflags="yes"
17521else
17522 ac_cv_have_chflags="no"
17523fi
17524
17525fi
17526if test "$ac_cv_have_chflags" = yes ; then
17527
17528cat >>confdefs.h <<\_ACEOF
17529#define HAVE_CHFLAGS 1
17530_ACEOF
17531
17532fi
17533
17534{ echo "$as_me:$LINENO: checking for lchflags" >&5
17535echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17536if test "${ac_cv_have_lchflags+set}" = set; then
17537 echo $ECHO_N "(cached) $ECHO_C" >&6
17538else
17539 if test "$cross_compiling" = yes; then
17540 ac_cv_have_lchflags=cross
17541else
17542 cat >conftest.$ac_ext <<_ACEOF
17543/* confdefs.h. */
17544_ACEOF
17545cat confdefs.h >>conftest.$ac_ext
17546cat >>conftest.$ac_ext <<_ACEOF
17547/* end confdefs.h. */
17548[
Christian Heimesd0764e22007-12-04 15:00:33 +000017549#include <sys/stat.h>
17550#include <unistd.h>
17551int main(int argc, char*argv[])
17552{
17553 if(lchflags(argv[0], 0) != 0)
17554 return 1;
17555 return 0;
17556}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017557]
Christian Heimesd0764e22007-12-04 15:00:33 +000017558_ACEOF
17559rm -f conftest$ac_exeext
17560if { (ac_try="$ac_link"
17561case "(($ac_try" in
17562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17563 *) ac_try_echo=$ac_try;;
17564esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017566 (eval "$ac_link") 2>&5
17567 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017569 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17570 { (case "(($ac_try" in
17571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17572 *) ac_try_echo=$ac_try;;
17573esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017575 (eval "$ac_try") 2>&5
17576 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017578 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017579 ac_cv_have_lchflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017580else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017581 echo "$as_me: program exited with status $ac_status" >&5
17582echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017583sed 's/^/| /' conftest.$ac_ext >&5
17584
17585( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017586ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017587fi
17588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17589fi
17590
17591
17592
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017593fi
17594{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
17595echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
17596if test "$ac_cv_have_lchflags" = cross ; then
17597 { echo "$as_me:$LINENO: checking for lchflags" >&5
17598echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17599if test "${ac_cv_func_lchflags+set}" = set; then
17600 echo $ECHO_N "(cached) $ECHO_C" >&6
17601else
17602 cat >conftest.$ac_ext <<_ACEOF
17603/* confdefs.h. */
17604_ACEOF
17605cat confdefs.h >>conftest.$ac_ext
17606cat >>conftest.$ac_ext <<_ACEOF
17607/* end confdefs.h. */
17608/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
17609 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17610#define lchflags innocuous_lchflags
17611
17612/* System header to define __stub macros and hopefully few prototypes,
17613 which can conflict with char lchflags (); below.
17614 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17615 <limits.h> exists even on freestanding compilers. */
17616
17617#ifdef __STDC__
17618# include <limits.h>
17619#else
17620# include <assert.h>
17621#endif
17622
17623#undef lchflags
17624
17625/* Override any GCC internal prototype to avoid an error.
17626 Use char because int might match the return type of a GCC
17627 builtin and then its argument prototype would still apply. */
17628#ifdef __cplusplus
17629extern "C"
17630#endif
17631char lchflags ();
17632/* The GNU C library defines this for functions which it implements
17633 to always fail with ENOSYS. Some functions are actually named
17634 something starting with __ and the normal name is an alias. */
17635#if defined __stub_lchflags || defined __stub___lchflags
17636choke me
17637#endif
17638
17639int
17640main ()
17641{
17642return lchflags ();
17643 ;
17644 return 0;
17645}
17646_ACEOF
17647rm -f conftest.$ac_objext conftest$ac_exeext
17648if { (ac_try="$ac_link"
17649case "(($ac_try" in
17650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17651 *) ac_try_echo=$ac_try;;
17652esac
17653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17654 (eval "$ac_link") 2>conftest.er1
17655 ac_status=$?
17656 grep -v '^ *+' conftest.er1 >conftest.err
17657 rm -f conftest.er1
17658 cat conftest.err >&5
17659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17660 (exit $ac_status); } && {
17661 test -z "$ac_c_werror_flag" ||
17662 test ! -s conftest.err
17663 } && test -s conftest$ac_exeext &&
17664 $as_test_x conftest$ac_exeext; then
17665 ac_cv_func_lchflags=yes
17666else
17667 echo "$as_me: failed program was:" >&5
17668sed 's/^/| /' conftest.$ac_ext >&5
17669
17670 ac_cv_func_lchflags=no
17671fi
17672
17673rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17674 conftest$ac_exeext conftest.$ac_ext
17675fi
17676{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
17677echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
17678if test $ac_cv_func_lchflags = yes; then
17679 ac_cv_have_lchflags="yes"
17680else
17681 ac_cv_have_lchflags="no"
17682fi
17683
17684fi
17685if test "$ac_cv_have_lchflags" = yes ; then
17686
17687cat >>confdefs.h <<\_ACEOF
17688#define HAVE_LCHFLAGS 1
17689_ACEOF
17690
17691fi
17692
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017693case $ac_sys_system/$ac_sys_release in
17694Darwin/*)
17695 _CUR_CFLAGS="${CFLAGS}"
17696 _CUR_LDFLAGS="${LDFLAGS}"
17697 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17698 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17699 ;;
17700esac
17701
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017702{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17703echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017704if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017705 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017706else
17707 ac_check_lib_save_LIBS=$LIBS
17708LIBS="-lz $LIBS"
17709cat >conftest.$ac_ext <<_ACEOF
17710/* confdefs.h. */
17711_ACEOF
17712cat confdefs.h >>conftest.$ac_ext
17713cat >>conftest.$ac_ext <<_ACEOF
17714/* end confdefs.h. */
17715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716/* Override any GCC internal prototype to avoid an error.
17717 Use char because int might match the return type of a GCC
17718 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017719#ifdef __cplusplus
17720extern "C"
17721#endif
17722char inflateCopy ();
17723int
17724main ()
17725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017727 ;
17728 return 0;
17729}
17730_ACEOF
17731rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732if { (ac_try="$ac_link"
17733case "(($ac_try" in
17734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17735 *) ac_try_echo=$ac_try;;
17736esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017739 ac_status=$?
17740 grep -v '^ *+' conftest.er1 >conftest.err
17741 rm -f conftest.er1
17742 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744 (exit $ac_status); } && {
17745 test -z "$ac_c_werror_flag" ||
17746 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017747 } && test -s conftest$ac_exeext &&
17748 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017749 ac_cv_lib_z_inflateCopy=yes
17750else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017751 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017752sed 's/^/| /' conftest.$ac_ext >&5
17753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756
17757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017758 conftest$ac_exeext conftest.$ac_ext
17759LIBS=$ac_check_lib_save_LIBS
17760fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017761{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17762echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17763if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017764
17765cat >>confdefs.h <<\_ACEOF
17766#define HAVE_ZLIB_COPY 1
17767_ACEOF
17768
17769fi
17770
17771
17772case $ac_sys_system/$ac_sys_release in
17773Darwin/*)
17774 CFLAGS="${_CUR_CFLAGS}"
17775 LDFLAGS="${_CUR_LDFLAGS}"
17776 ;;
17777esac
17778
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017779{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17780echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017782/* confdefs.h. */
17783_ACEOF
17784cat confdefs.h >>conftest.$ac_ext
17785cat >>conftest.$ac_ext <<_ACEOF
17786/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017787
17788#include "confdefs.h"
17789#include <netdb.h>
17790
Martin v. Löwise9416172003-05-03 10:12:45 +000017791int
17792main ()
17793{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017794void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017795 ;
17796 return 0;
17797}
17798_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017799rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800if { (ac_try="$ac_link"
17801case "(($ac_try" in
17802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17803 *) ac_try_echo=$ac_try;;
17804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017808 grep -v '^ *+' conftest.er1 >conftest.err
17809 rm -f conftest.er1
17810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017812 (exit $ac_status); } && {
17813 test -z "$ac_c_werror_flag" ||
17814 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017815 } && test -s conftest$ac_exeext &&
17816 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017817
17818cat >>confdefs.h <<\_ACEOF
17819#define HAVE_HSTRERROR 1
17820_ACEOF
17821
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017822 { echo "$as_me:$LINENO: result: yes" >&5
17823echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017824else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017826sed 's/^/| /' conftest.$ac_ext >&5
17827
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017828 { echo "$as_me:$LINENO: result: no" >&5
17829echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017830
17831fi
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
Martin v. Löwise9416172003-05-03 10:12:45 +000017835
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017836{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17837echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017838cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017839/* confdefs.h. */
17840_ACEOF
17841cat confdefs.h >>conftest.$ac_ext
17842cat >>conftest.$ac_ext <<_ACEOF
17843/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017844
17845#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017846#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017847#include <sys/socket.h>
17848#include <netinet/in.h>
17849#include <arpa/inet.h>
17850
Martin v. Löwise9416172003-05-03 10:12:45 +000017851int
17852main ()
17853{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017854void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017855 ;
17856 return 0;
17857}
17858_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017859rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860if { (ac_try="$ac_link"
17861case "(($ac_try" in
17862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17863 *) ac_try_echo=$ac_try;;
17864esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017868 grep -v '^ *+' conftest.er1 >conftest.err
17869 rm -f conftest.er1
17870 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017872 (exit $ac_status); } && {
17873 test -z "$ac_c_werror_flag" ||
17874 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017875 } && test -s conftest$ac_exeext &&
17876 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017877
17878cat >>confdefs.h <<\_ACEOF
17879#define HAVE_INET_ATON 1
17880_ACEOF
17881
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017882 { echo "$as_me:$LINENO: result: yes" >&5
17883echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017884else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017886sed 's/^/| /' conftest.$ac_ext >&5
17887
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017888 { echo "$as_me:$LINENO: result: no" >&5
17889echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017890
17891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017892
17893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017895
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017896{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17897echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017898cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017899/* confdefs.h. */
17900_ACEOF
17901cat confdefs.h >>conftest.$ac_ext
17902cat >>conftest.$ac_ext <<_ACEOF
17903/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017904
17905#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017906#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017907#include <sys/socket.h>
17908#include <netinet/in.h>
17909#include <arpa/inet.h>
17910
Martin v. Löwise9416172003-05-03 10:12:45 +000017911int
17912main ()
17913{
17914void* p = inet_pton
17915 ;
17916 return 0;
17917}
17918_ACEOF
17919rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017920if { (ac_try="$ac_compile"
17921case "(($ac_try" in
17922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17923 *) ac_try_echo=$ac_try;;
17924esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017928 grep -v '^ *+' conftest.er1 >conftest.err
17929 rm -f conftest.er1
17930 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017932 (exit $ac_status); } && {
17933 test -z "$ac_c_werror_flag" ||
17934 test ! -s conftest.err
17935 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017936
17937cat >>confdefs.h <<\_ACEOF
17938#define HAVE_INET_PTON 1
17939_ACEOF
17940
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017941 { echo "$as_me:$LINENO: result: yes" >&5
17942echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017943else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017945sed 's/^/| /' conftest.$ac_ext >&5
17946
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017947 { echo "$as_me:$LINENO: result: no" >&5
17948echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017949
17950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951
17952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017953
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017954# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017955{ echo "$as_me:$LINENO: checking for setgroups" >&5
17956echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017958/* confdefs.h. */
17959_ACEOF
17960cat confdefs.h >>conftest.$ac_ext
17961cat >>conftest.$ac_ext <<_ACEOF
17962/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017963
17964#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017965#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017966#ifdef HAVE_GRP_H
17967#include <grp.h>
17968#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017969
Martin v. Löwisd5843682002-11-21 20:41:28 +000017970int
17971main ()
17972{
17973void* p = setgroups
17974 ;
17975 return 0;
17976}
17977_ACEOF
17978rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979if { (ac_try="$ac_compile"
17980case "(($ac_try" in
17981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17982 *) ac_try_echo=$ac_try;;
17983esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017985 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017987 grep -v '^ *+' conftest.er1 >conftest.err
17988 rm -f conftest.er1
17989 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991 (exit $ac_status); } && {
17992 test -z "$ac_c_werror_flag" ||
17993 test ! -s conftest.err
17994 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017995
17996cat >>confdefs.h <<\_ACEOF
17997#define HAVE_SETGROUPS 1
17998_ACEOF
17999
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018000 { echo "$as_me:$LINENO: result: yes" >&5
18001echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018002else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018004sed 's/^/| /' conftest.$ac_ext >&5
18005
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018006 { echo "$as_me:$LINENO: result: no" >&5
18007echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018008
18009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010
18011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018012
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018013# check for openpty and forkpty
18014
Martin v. Löwis11437992002-04-12 09:54:03 +000018015
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018016for ac_func in openpty
18017do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018018as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18019{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18020echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018023else
Martin v. Löwis11437992002-04-12 09:54:03 +000018024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018025/* confdefs.h. */
18026_ACEOF
18027cat confdefs.h >>conftest.$ac_ext
18028cat >>conftest.$ac_ext <<_ACEOF
18029/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018030/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18031 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18032#define $ac_func innocuous_$ac_func
18033
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018034/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018035 which can conflict with char $ac_func (); below.
18036 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018037 <limits.h> exists even on freestanding compilers. */
18038
18039#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018040# include <limits.h>
18041#else
18042# include <assert.h>
18043#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018044
18045#undef $ac_func
18046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018047/* Override any GCC internal prototype to avoid an error.
18048 Use char because int might match the return type of a GCC
18049 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018050#ifdef __cplusplus
18051extern "C"
18052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018053char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018054/* The GNU C library defines this for functions which it implements
18055 to always fail with ENOSYS. Some functions are actually named
18056 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018058choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018059#endif
18060
Skip Montanaro6dead952003-09-25 14:50:04 +000018061int
18062main ()
18063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018065 ;
18066 return 0;
18067}
18068_ACEOF
18069rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018070if { (ac_try="$ac_link"
18071case "(($ac_try" in
18072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18073 *) ac_try_echo=$ac_try;;
18074esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018078 grep -v '^ *+' conftest.er1 >conftest.err
18079 rm -f conftest.er1
18080 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082 (exit $ac_status); } && {
18083 test -z "$ac_c_werror_flag" ||
18084 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018085 } && test -s conftest$ac_exeext &&
18086 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018087 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018088else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018090sed 's/^/| /' conftest.$ac_ext >&5
18091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018092 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018094
18095rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018096 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018097fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018098ac_res=`eval echo '${'$as_ac_var'}'`
18099 { echo "$as_me:$LINENO: result: $ac_res" >&5
18100echo "${ECHO_T}$ac_res" >&6; }
18101if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018103#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018104_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018105
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018106else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018107 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18108echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018109if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018110 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018111else
Martin v. Löwis11437992002-04-12 09:54:03 +000018112 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018113LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018114cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018115/* confdefs.h. */
18116_ACEOF
18117cat confdefs.h >>conftest.$ac_ext
18118cat >>conftest.$ac_ext <<_ACEOF
18119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018121/* Override any GCC internal prototype to avoid an error.
18122 Use char because int might match the return type of a GCC
18123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018124#ifdef __cplusplus
18125extern "C"
18126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018127char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018128int
18129main ()
18130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018132 ;
18133 return 0;
18134}
18135_ACEOF
18136rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018137if { (ac_try="$ac_link"
18138case "(($ac_try" in
18139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18140 *) ac_try_echo=$ac_try;;
18141esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018145 grep -v '^ *+' conftest.er1 >conftest.err
18146 rm -f conftest.er1
18147 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149 (exit $ac_status); } && {
18150 test -z "$ac_c_werror_flag" ||
18151 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018152 } && test -s conftest$ac_exeext &&
18153 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018154 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018155else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018157sed 's/^/| /' conftest.$ac_ext >&5
18158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018159 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018161
18162rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018164LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018165fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018166{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18167echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18168if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018169 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018170#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018171_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018172 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018173else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018174 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18175echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018176if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018177 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018178else
18179 ac_check_lib_save_LIBS=$LIBS
18180LIBS="-lbsd $LIBS"
18181cat >conftest.$ac_ext <<_ACEOF
18182/* confdefs.h. */
18183_ACEOF
18184cat confdefs.h >>conftest.$ac_ext
18185cat >>conftest.$ac_ext <<_ACEOF
18186/* end confdefs.h. */
18187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018188/* Override any GCC internal prototype to avoid an error.
18189 Use char because int might match the return type of a GCC
18190 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018191#ifdef __cplusplus
18192extern "C"
18193#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018194char openpty ();
18195int
18196main ()
18197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018198return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018199 ;
18200 return 0;
18201}
18202_ACEOF
18203rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204if { (ac_try="$ac_link"
18205case "(($ac_try" in
18206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18207 *) ac_try_echo=$ac_try;;
18208esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018210 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018211 ac_status=$?
18212 grep -v '^ *+' conftest.er1 >conftest.err
18213 rm -f conftest.er1
18214 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018216 (exit $ac_status); } && {
18217 test -z "$ac_c_werror_flag" ||
18218 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018219 } && test -s conftest$ac_exeext &&
18220 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018221 ac_cv_lib_bsd_openpty=yes
18222else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018223 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018224sed 's/^/| /' conftest.$ac_ext >&5
18225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018226 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018228
18229rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018230 conftest$ac_exeext conftest.$ac_ext
18231LIBS=$ac_check_lib_save_LIBS
18232fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018233{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18234echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18235if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018236 cat >>confdefs.h <<\_ACEOF
18237#define HAVE_OPENPTY 1
18238_ACEOF
18239 LIBS="$LIBS -lbsd"
18240fi
18241
18242
18243fi
18244
Fred Drake8cef4cf2000-06-28 16:40:38 +000018245
18246fi
18247done
18248
Martin v. Löwis11437992002-04-12 09:54:03 +000018249
Fred Drake8cef4cf2000-06-28 16:40:38 +000018250for ac_func in forkpty
18251do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018252as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18253{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18254echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018255if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018256 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018257else
Martin v. Löwis11437992002-04-12 09:54:03 +000018258 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018259/* confdefs.h. */
18260_ACEOF
18261cat confdefs.h >>conftest.$ac_ext
18262cat >>conftest.$ac_ext <<_ACEOF
18263/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018264/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18265 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18266#define $ac_func innocuous_$ac_func
18267
Fred Drake8cef4cf2000-06-28 16:40:38 +000018268/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018269 which can conflict with char $ac_func (); below.
18270 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018271 <limits.h> exists even on freestanding compilers. */
18272
18273#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018274# include <limits.h>
18275#else
18276# include <assert.h>
18277#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018278
18279#undef $ac_func
18280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018281/* Override any GCC internal prototype to avoid an error.
18282 Use char because int might match the return type of a GCC
18283 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018284#ifdef __cplusplus
18285extern "C"
18286#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018287char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018288/* The GNU C library defines this for functions which it implements
18289 to always fail with ENOSYS. Some functions are actually named
18290 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018291#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018292choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018293#endif
18294
Skip Montanaro6dead952003-09-25 14:50:04 +000018295int
18296main ()
18297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018298return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018299 ;
18300 return 0;
18301}
18302_ACEOF
18303rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018304if { (ac_try="$ac_link"
18305case "(($ac_try" in
18306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18307 *) ac_try_echo=$ac_try;;
18308esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018310 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018312 grep -v '^ *+' conftest.er1 >conftest.err
18313 rm -f conftest.er1
18314 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018316 (exit $ac_status); } && {
18317 test -z "$ac_c_werror_flag" ||
18318 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018319 } && test -s conftest$ac_exeext &&
18320 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018321 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018322else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018324sed 's/^/| /' conftest.$ac_ext >&5
18325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018326 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018328
18329rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018330 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018331fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018332ac_res=`eval echo '${'$as_ac_var'}'`
18333 { echo "$as_me:$LINENO: result: $ac_res" >&5
18334echo "${ECHO_T}$ac_res" >&6; }
18335if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018336 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018337#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018338_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018339
Fred Drake8cef4cf2000-06-28 16:40:38 +000018340else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018341 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18342echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018343if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018344 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018345else
Martin v. Löwis11437992002-04-12 09:54:03 +000018346 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018347LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018348cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018349/* confdefs.h. */
18350_ACEOF
18351cat confdefs.h >>conftest.$ac_ext
18352cat >>conftest.$ac_ext <<_ACEOF
18353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018355/* Override any GCC internal prototype to avoid an error.
18356 Use char because int might match the return type of a GCC
18357 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018358#ifdef __cplusplus
18359extern "C"
18360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018361char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018362int
18363main ()
18364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018365return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018366 ;
18367 return 0;
18368}
18369_ACEOF
18370rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018371if { (ac_try="$ac_link"
18372case "(($ac_try" in
18373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18374 *) ac_try_echo=$ac_try;;
18375esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018379 grep -v '^ *+' conftest.er1 >conftest.err
18380 rm -f conftest.er1
18381 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018383 (exit $ac_status); } && {
18384 test -z "$ac_c_werror_flag" ||
18385 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018386 } && test -s conftest$ac_exeext &&
18387 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018388 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018389else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018391sed 's/^/| /' conftest.$ac_ext >&5
18392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018393 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018395
18396rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018398LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018399fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018400{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18401echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18402if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018403 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018404#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018405_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018406 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018407else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018408 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18409echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018410if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018411 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018412else
18413 ac_check_lib_save_LIBS=$LIBS
18414LIBS="-lbsd $LIBS"
18415cat >conftest.$ac_ext <<_ACEOF
18416/* confdefs.h. */
18417_ACEOF
18418cat confdefs.h >>conftest.$ac_ext
18419cat >>conftest.$ac_ext <<_ACEOF
18420/* end confdefs.h. */
18421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018422/* Override any GCC internal prototype to avoid an error.
18423 Use char because int might match the return type of a GCC
18424 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018425#ifdef __cplusplus
18426extern "C"
18427#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018428char forkpty ();
18429int
18430main ()
18431{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018432return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018433 ;
18434 return 0;
18435}
18436_ACEOF
18437rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018438if { (ac_try="$ac_link"
18439case "(($ac_try" in
18440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18441 *) ac_try_echo=$ac_try;;
18442esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018444 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018445 ac_status=$?
18446 grep -v '^ *+' conftest.er1 >conftest.err
18447 rm -f conftest.er1
18448 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018450 (exit $ac_status); } && {
18451 test -z "$ac_c_werror_flag" ||
18452 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018453 } && test -s conftest$ac_exeext &&
18454 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018455 ac_cv_lib_bsd_forkpty=yes
18456else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018457 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018458sed 's/^/| /' conftest.$ac_ext >&5
18459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018460 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018462
18463rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018464 conftest$ac_exeext conftest.$ac_ext
18465LIBS=$ac_check_lib_save_LIBS
18466fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018467{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18468echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18469if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018470 cat >>confdefs.h <<\_ACEOF
18471#define HAVE_FORKPTY 1
18472_ACEOF
18473 LIBS="$LIBS -lbsd"
18474fi
18475
18476
18477fi
18478
Fred Drake8cef4cf2000-06-28 16:40:38 +000018479
18480fi
18481done
18482
Jack Jansendd19cf82001-12-06 22:36:17 +000018483
Christian Heimesb186d002008-03-18 15:15:01 +000018484# Stuff for expat.
18485
18486for ac_func in memmove
18487do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018488as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18489{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18490echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018491if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018492 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018493else
18494 cat >conftest.$ac_ext <<_ACEOF
18495/* confdefs.h. */
18496_ACEOF
18497cat confdefs.h >>conftest.$ac_ext
18498cat >>conftest.$ac_ext <<_ACEOF
18499/* end confdefs.h. */
18500/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18501 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18502#define $ac_func innocuous_$ac_func
18503
18504/* System header to define __stub macros and hopefully few prototypes,
18505 which can conflict with char $ac_func (); below.
18506 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18507 <limits.h> exists even on freestanding compilers. */
18508
18509#ifdef __STDC__
18510# include <limits.h>
18511#else
18512# include <assert.h>
18513#endif
18514
18515#undef $ac_func
18516
18517/* Override any GCC internal prototype to avoid an error.
18518 Use char because int might match the return type of a GCC
18519 builtin and then its argument prototype would still apply. */
18520#ifdef __cplusplus
18521extern "C"
18522#endif
18523char $ac_func ();
18524/* The GNU C library defines this for functions which it implements
18525 to always fail with ENOSYS. Some functions are actually named
18526 something starting with __ and the normal name is an alias. */
18527#if defined __stub_$ac_func || defined __stub___$ac_func
18528choke me
18529#endif
18530
18531int
18532main ()
18533{
18534return $ac_func ();
18535 ;
18536 return 0;
18537}
18538_ACEOF
18539rm -f conftest.$ac_objext conftest$ac_exeext
18540if { (ac_try="$ac_link"
18541case "(($ac_try" in
18542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18543 *) ac_try_echo=$ac_try;;
18544esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018546 (eval "$ac_link") 2>conftest.er1
18547 ac_status=$?
18548 grep -v '^ *+' conftest.er1 >conftest.err
18549 rm -f conftest.er1
18550 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018552 (exit $ac_status); } && {
18553 test -z "$ac_c_werror_flag" ||
18554 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018555 } && test -s conftest$ac_exeext &&
18556 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018557 eval "$as_ac_var=yes"
18558else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018559 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018560sed 's/^/| /' conftest.$ac_ext >&5
18561
18562 eval "$as_ac_var=no"
18563fi
18564
18565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18566 conftest$ac_exeext conftest.$ac_ext
18567fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018568ac_res=`eval echo '${'$as_ac_var'}'`
18569 { echo "$as_me:$LINENO: result: $ac_res" >&5
18570echo "${ECHO_T}$ac_res" >&6; }
18571if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018572 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018573#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018574_ACEOF
18575
18576fi
18577done
18578
18579
Michael W. Hudson54241132001-12-07 15:38:26 +000018580# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018581
18582
18583
18584
18585
18586
Fred Drake8cef4cf2000-06-28 16:40:38 +000018587for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18588do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018589as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18590{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18591echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018592if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018593 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018594else
Martin v. Löwis11437992002-04-12 09:54:03 +000018595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018596/* confdefs.h. */
18597_ACEOF
18598cat confdefs.h >>conftest.$ac_ext
18599cat >>conftest.$ac_ext <<_ACEOF
18600/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018601/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18602 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18603#define $ac_func innocuous_$ac_func
18604
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018605/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018606 which can conflict with char $ac_func (); below.
18607 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018608 <limits.h> exists even on freestanding compilers. */
18609
18610#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018611# include <limits.h>
18612#else
18613# include <assert.h>
18614#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018615
18616#undef $ac_func
18617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018618/* Override any GCC internal prototype to avoid an error.
18619 Use char because int might match the return type of a GCC
18620 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018621#ifdef __cplusplus
18622extern "C"
18623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018624char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018625/* The GNU C library defines this for functions which it implements
18626 to always fail with ENOSYS. Some functions are actually named
18627 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018628#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018629choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018630#endif
18631
Skip Montanaro6dead952003-09-25 14:50:04 +000018632int
18633main ()
18634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 ;
18637 return 0;
18638}
18639_ACEOF
18640rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018641if { (ac_try="$ac_link"
18642case "(($ac_try" in
18643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18644 *) ac_try_echo=$ac_try;;
18645esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018647 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018649 grep -v '^ *+' conftest.er1 >conftest.err
18650 rm -f conftest.er1
18651 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018653 (exit $ac_status); } && {
18654 test -z "$ac_c_werror_flag" ||
18655 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018656 } && test -s conftest$ac_exeext &&
18657 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018658 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018659else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018661sed 's/^/| /' conftest.$ac_ext >&5
18662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018663 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018665
18666rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018667 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018668fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018669ac_res=`eval echo '${'$as_ac_var'}'`
18670 { echo "$as_me:$LINENO: result: $ac_res" >&5
18671echo "${ECHO_T}$ac_res" >&6; }
18672if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018673 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018674#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018675_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018676
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018677fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018678done
18679
Michael W. Hudson54241132001-12-07 15:38:26 +000018680
Martin v. Löwis11437992002-04-12 09:54:03 +000018681
18682
18683
Christian Heimesb186d002008-03-18 15:15:01 +000018684for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018685do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018686as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18687{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18688echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018689if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018690 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018691else
Martin v. Löwis11437992002-04-12 09:54:03 +000018692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018693/* confdefs.h. */
18694_ACEOF
18695cat confdefs.h >>conftest.$ac_ext
18696cat >>conftest.$ac_ext <<_ACEOF
18697/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018698/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18699 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18700#define $ac_func innocuous_$ac_func
18701
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018702/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018703 which can conflict with char $ac_func (); below.
18704 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018705 <limits.h> exists even on freestanding compilers. */
18706
18707#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018708# include <limits.h>
18709#else
18710# include <assert.h>
18711#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018712
18713#undef $ac_func
18714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018715/* Override any GCC internal prototype to avoid an error.
18716 Use char because int might match the return type of a GCC
18717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018718#ifdef __cplusplus
18719extern "C"
18720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018721char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018722/* The GNU C library defines this for functions which it implements
18723 to always fail with ENOSYS. Some functions are actually named
18724 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018725#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018726choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018727#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018728
Skip Montanaro6dead952003-09-25 14:50:04 +000018729int
18730main ()
18731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018732return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018733 ;
18734 return 0;
18735}
18736_ACEOF
18737rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018738if { (ac_try="$ac_link"
18739case "(($ac_try" in
18740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18741 *) ac_try_echo=$ac_try;;
18742esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018744 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018746 grep -v '^ *+' conftest.er1 >conftest.err
18747 rm -f conftest.er1
18748 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018750 (exit $ac_status); } && {
18751 test -z "$ac_c_werror_flag" ||
18752 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018753 } && test -s conftest$ac_exeext &&
18754 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018755 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018756else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018758sed 's/^/| /' conftest.$ac_ext >&5
18759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018760 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018762
18763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018764 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018765fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018766ac_res=`eval echo '${'$as_ac_var'}'`
18767 { echo "$as_me:$LINENO: result: $ac_res" >&5
18768echo "${ECHO_T}$ac_res" >&6; }
18769if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018770 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018771#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018772_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018773
Martin v. Löwis1142de32002-03-29 16:28:31 +000018774else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018775 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018776 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018777 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18778 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018779esac
18780
Martin v. Löwis1142de32002-03-29 16:28:31 +000018781fi
18782done
18783
18784
Martin v. Löwis11437992002-04-12 09:54:03 +000018785
Martin v. Löwis1142de32002-03-29 16:28:31 +000018786for ac_func in getpgrp
18787do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018788as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18789{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18790echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018791if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018792 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018793else
Martin v. Löwis11437992002-04-12 09:54:03 +000018794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018795/* confdefs.h. */
18796_ACEOF
18797cat confdefs.h >>conftest.$ac_ext
18798cat >>conftest.$ac_ext <<_ACEOF
18799/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018800/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18801 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18802#define $ac_func innocuous_$ac_func
18803
Martin v. Löwis1142de32002-03-29 16:28:31 +000018804/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018805 which can conflict with char $ac_func (); below.
18806 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018807 <limits.h> exists even on freestanding compilers. */
18808
18809#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018810# include <limits.h>
18811#else
18812# include <assert.h>
18813#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018814
18815#undef $ac_func
18816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018817/* Override any GCC internal prototype to avoid an error.
18818 Use char because int might match the return type of a GCC
18819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018820#ifdef __cplusplus
18821extern "C"
18822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018823char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018824/* The GNU C library defines this for functions which it implements
18825 to always fail with ENOSYS. Some functions are actually named
18826 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018827#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018828choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018829#endif
18830
Skip Montanaro6dead952003-09-25 14:50:04 +000018831int
18832main ()
18833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018834return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018835 ;
18836 return 0;
18837}
18838_ACEOF
18839rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018840if { (ac_try="$ac_link"
18841case "(($ac_try" in
18842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18843 *) ac_try_echo=$ac_try;;
18844esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018846 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018848 grep -v '^ *+' conftest.er1 >conftest.err
18849 rm -f conftest.er1
18850 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018852 (exit $ac_status); } && {
18853 test -z "$ac_c_werror_flag" ||
18854 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018855 } && test -s conftest$ac_exeext &&
18856 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018857 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018858else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018860sed 's/^/| /' conftest.$ac_ext >&5
18861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018862 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018864
18865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018866 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018867fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018868ac_res=`eval echo '${'$as_ac_var'}'`
18869 { echo "$as_me:$LINENO: result: $ac_res" >&5
18870echo "${ECHO_T}$ac_res" >&6; }
18871if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018872 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018873#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018874_ACEOF
18875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018876/* confdefs.h. */
18877_ACEOF
18878cat confdefs.h >>conftest.$ac_ext
18879cat >>conftest.$ac_ext <<_ACEOF
18880/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018881#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018882int
18883main ()
18884{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018885getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018886 ;
18887 return 0;
18888}
18889_ACEOF
18890rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018891if { (ac_try="$ac_compile"
18892case "(($ac_try" in
18893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18894 *) ac_try_echo=$ac_try;;
18895esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018899 grep -v '^ *+' conftest.er1 >conftest.err
18900 rm -f conftest.er1
18901 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018903 (exit $ac_status); } && {
18904 test -z "$ac_c_werror_flag" ||
18905 test ! -s conftest.err
18906 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018907
18908cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018909#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018910_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018911
Martin v. Löwis11437992002-04-12 09:54:03 +000018912
Guido van Rossumf78abae1997-01-21 22:02:36 +000018913else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018915sed 's/^/| /' conftest.$ac_ext >&5
18916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018917
Guido van Rossum627b2d71993-12-24 10:39:16 +000018918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018919
18920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018921
Guido van Rossum627b2d71993-12-24 10:39:16 +000018922fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018923done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018924
Jack Jansen150753c2003-03-29 22:07:47 +000018925
18926for ac_func in setpgrp
18927do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018928as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18929{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18930echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018931if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018932 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018933else
Martin v. Löwis11437992002-04-12 09:54:03 +000018934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018935/* confdefs.h. */
18936_ACEOF
18937cat confdefs.h >>conftest.$ac_ext
18938cat >>conftest.$ac_ext <<_ACEOF
18939/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018940/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18941 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18942#define $ac_func innocuous_$ac_func
18943
Jack Jansen150753c2003-03-29 22:07:47 +000018944/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018945 which can conflict with char $ac_func (); below.
18946 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018947 <limits.h> exists even on freestanding compilers. */
18948
18949#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018950# include <limits.h>
18951#else
18952# include <assert.h>
18953#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018954
18955#undef $ac_func
18956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018957/* Override any GCC internal prototype to avoid an error.
18958 Use char because int might match the return type of a GCC
18959 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018960#ifdef __cplusplus
18961extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018962#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018963char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018964/* The GNU C library defines this for functions which it implements
18965 to always fail with ENOSYS. Some functions are actually named
18966 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018967#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018968choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018969#endif
18970
Skip Montanaro6dead952003-09-25 14:50:04 +000018971int
18972main ()
18973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018974return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018975 ;
18976 return 0;
18977}
18978_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018979rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018980if { (ac_try="$ac_link"
18981case "(($ac_try" in
18982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18983 *) ac_try_echo=$ac_try;;
18984esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018986 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018988 grep -v '^ *+' conftest.er1 >conftest.err
18989 rm -f conftest.er1
18990 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018992 (exit $ac_status); } && {
18993 test -z "$ac_c_werror_flag" ||
18994 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018995 } && test -s conftest$ac_exeext &&
18996 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018997 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018998else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019000sed 's/^/| /' conftest.$ac_ext >&5
19001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019002 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019004
19005rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019006 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019007fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019008ac_res=`eval echo '${'$as_ac_var'}'`
19009 { echo "$as_me:$LINENO: result: $ac_res" >&5
19010echo "${ECHO_T}$ac_res" >&6; }
19011if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019012 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019013#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019014_ACEOF
19015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019016/* confdefs.h. */
19017_ACEOF
19018cat confdefs.h >>conftest.$ac_ext
19019cat >>conftest.$ac_ext <<_ACEOF
19020/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019021#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019022int
19023main ()
19024{
19025setpgrp(0,0);
19026 ;
19027 return 0;
19028}
19029_ACEOF
19030rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019031if { (ac_try="$ac_compile"
19032case "(($ac_try" in
19033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19034 *) ac_try_echo=$ac_try;;
19035esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019037 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019039 grep -v '^ *+' conftest.er1 >conftest.err
19040 rm -f conftest.er1
19041 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019043 (exit $ac_status); } && {
19044 test -z "$ac_c_werror_flag" ||
19045 test ! -s conftest.err
19046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019047
19048cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019049#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019050_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019051
Jack Jansen150753c2003-03-29 22:07:47 +000019052
19053else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019054 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019055sed 's/^/| /' conftest.$ac_ext >&5
19056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019057
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019059
19060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019061
19062fi
19063done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019064
Martin v. Löwis11437992002-04-12 09:54:03 +000019065
Thomas Wouters3a584202000-08-05 23:28:51 +000019066for ac_func in gettimeofday
19067do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019068as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19069{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19070echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019071if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019073else
Martin v. Löwis11437992002-04-12 09:54:03 +000019074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019075/* confdefs.h. */
19076_ACEOF
19077cat confdefs.h >>conftest.$ac_ext
19078cat >>conftest.$ac_ext <<_ACEOF
19079/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019080/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19081 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19082#define $ac_func innocuous_$ac_func
19083
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019084/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019085 which can conflict with char $ac_func (); below.
19086 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019087 <limits.h> exists even on freestanding compilers. */
19088
19089#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019090# include <limits.h>
19091#else
19092# include <assert.h>
19093#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019094
19095#undef $ac_func
19096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019097/* Override any GCC internal prototype to avoid an error.
19098 Use char because int might match the return type of a GCC
19099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019100#ifdef __cplusplus
19101extern "C"
19102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019103char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019104/* The GNU C library defines this for functions which it implements
19105 to always fail with ENOSYS. Some functions are actually named
19106 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019107#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019108choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019109#endif
19110
Skip Montanaro6dead952003-09-25 14:50:04 +000019111int
19112main ()
19113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019114return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019115 ;
19116 return 0;
19117}
19118_ACEOF
19119rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019120if { (ac_try="$ac_link"
19121case "(($ac_try" in
19122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19123 *) ac_try_echo=$ac_try;;
19124esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019126 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019128 grep -v '^ *+' conftest.er1 >conftest.err
19129 rm -f conftest.er1
19130 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019132 (exit $ac_status); } && {
19133 test -z "$ac_c_werror_flag" ||
19134 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019135 } && test -s conftest$ac_exeext &&
19136 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019137 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019138else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019140sed 's/^/| /' conftest.$ac_ext >&5
19141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019142 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019144
19145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019146 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019147fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019148ac_res=`eval echo '${'$as_ac_var'}'`
19149 { echo "$as_me:$LINENO: result: $ac_res" >&5
19150echo "${ECHO_T}$ac_res" >&6; }
19151if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019152 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019153#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019154_ACEOF
19155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019156/* confdefs.h. */
19157_ACEOF
19158cat confdefs.h >>conftest.$ac_ext
19159cat >>conftest.$ac_ext <<_ACEOF
19160/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019161#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019162int
19163main ()
19164{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019165gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019166 ;
19167 return 0;
19168}
19169_ACEOF
19170rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019171if { (ac_try="$ac_compile"
19172case "(($ac_try" in
19173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19174 *) ac_try_echo=$ac_try;;
19175esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019179 grep -v '^ *+' conftest.er1 >conftest.err
19180 rm -f conftest.er1
19181 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019183 (exit $ac_status); } && {
19184 test -z "$ac_c_werror_flag" ||
19185 test ! -s conftest.err
19186 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019187 :
19188else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019190sed 's/^/| /' conftest.$ac_ext >&5
19191
Martin v. Löwis11437992002-04-12 09:54:03 +000019192
19193cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019194#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019195_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019196
Martin v. Löwis11437992002-04-12 09:54:03 +000019197
Guido van Rossum627b2d71993-12-24 10:39:16 +000019198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019199
19200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019201
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019202fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019203done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019204
Michael W. Hudson54241132001-12-07 15:38:26 +000019205
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019206{ echo "$as_me:$LINENO: checking for major" >&5
19207echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019209/* confdefs.h. */
19210_ACEOF
19211cat confdefs.h >>conftest.$ac_ext
19212cat >>conftest.$ac_ext <<_ACEOF
19213/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019214
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019215#if defined(MAJOR_IN_MKDEV)
19216#include <sys/mkdev.h>
19217#elif defined(MAJOR_IN_SYSMACROS)
19218#include <sys/sysmacros.h>
19219#else
19220#include <sys/types.h>
19221#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019222
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019223int
19224main ()
19225{
19226
19227 makedev(major(0),minor(0));
19228
19229 ;
19230 return 0;
19231}
19232_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019233rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019234if { (ac_try="$ac_link"
19235case "(($ac_try" in
19236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19237 *) ac_try_echo=$ac_try;;
19238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019240 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019242 grep -v '^ *+' conftest.er1 >conftest.err
19243 rm -f conftest.er1
19244 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019246 (exit $ac_status); } && {
19247 test -z "$ac_c_werror_flag" ||
19248 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019249 } && test -s conftest$ac_exeext &&
19250 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019251
19252
19253cat >>confdefs.h <<\_ACEOF
19254#define HAVE_DEVICE_MACROS 1
19255_ACEOF
19256
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019257 { echo "$as_me:$LINENO: result: yes" >&5
19258echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019259
19260else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019262sed 's/^/| /' conftest.$ac_ext >&5
19263
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019264
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019265 { echo "$as_me:$LINENO: result: no" >&5
19266echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019267
19268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019269
19270rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019271 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019272
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019273# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019274# for [no]getaddrinfo in netdb.h.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019275{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19276echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019277cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019278/* confdefs.h. */
19279_ACEOF
19280cat confdefs.h >>conftest.$ac_ext
19281cat >>conftest.$ac_ext <<_ACEOF
19282/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019283
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019284#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019285#include <sys/socket.h>
19286#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019287#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019288
Martin v. Löwis11437992002-04-12 09:54:03 +000019289int
19290main ()
19291{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019292
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019293getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019294
Martin v. Löwis11437992002-04-12 09:54:03 +000019295 ;
19296 return 0;
19297}
19298_ACEOF
19299rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019300if { (ac_try="$ac_link"
19301case "(($ac_try" in
19302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19303 *) ac_try_echo=$ac_try;;
19304esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019306 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019308 grep -v '^ *+' conftest.er1 >conftest.err
19309 rm -f conftest.er1
19310 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019312 (exit $ac_status); } && {
19313 test -z "$ac_c_werror_flag" ||
19314 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019315 } && test -s conftest$ac_exeext &&
19316 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019317
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019318{ echo "$as_me:$LINENO: result: yes" >&5
19319echo "${ECHO_T}yes" >&6; }
19320{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19321echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019322if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019323 { echo "$as_me:$LINENO: result: buggy" >&5
19324echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019325buggygetaddrinfo=yes
19326else
Martin v. Löwis11437992002-04-12 09:54:03 +000019327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019328/* confdefs.h. */
19329_ACEOF
19330cat confdefs.h >>conftest.$ac_ext
19331cat >>conftest.$ac_ext <<_ACEOF
19332/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019333
19334#include <sys/types.h>
19335#include <netdb.h>
19336#include <string.h>
19337#include <sys/socket.h>
19338#include <netinet/in.h>
19339
19340main()
19341{
19342 int passive, gaierr, inet4 = 0, inet6 = 0;
19343 struct addrinfo hints, *ai, *aitop;
19344 char straddr[INET6_ADDRSTRLEN], strport[16];
19345
19346 for (passive = 0; passive <= 1; passive++) {
19347 memset(&hints, 0, sizeof(hints));
19348 hints.ai_family = AF_UNSPEC;
19349 hints.ai_flags = passive ? AI_PASSIVE : 0;
19350 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019351 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019352 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19353 (void)gai_strerror(gaierr);
19354 goto bad;
19355 }
19356 for (ai = aitop; ai; ai = ai->ai_next) {
19357 if (ai->ai_addr == NULL ||
19358 ai->ai_addrlen == 0 ||
19359 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19360 straddr, sizeof(straddr), strport, sizeof(strport),
19361 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19362 goto bad;
19363 }
19364 switch (ai->ai_family) {
19365 case AF_INET:
19366 if (strcmp(strport, "54321") != 0) {
19367 goto bad;
19368 }
19369 if (passive) {
19370 if (strcmp(straddr, "0.0.0.0") != 0) {
19371 goto bad;
19372 }
19373 } else {
19374 if (strcmp(straddr, "127.0.0.1") != 0) {
19375 goto bad;
19376 }
19377 }
19378 inet4++;
19379 break;
19380 case AF_INET6:
19381 if (strcmp(strport, "54321") != 0) {
19382 goto bad;
19383 }
19384 if (passive) {
19385 if (strcmp(straddr, "::") != 0) {
19386 goto bad;
19387 }
19388 } else {
19389 if (strcmp(straddr, "::1") != 0) {
19390 goto bad;
19391 }
19392 }
19393 inet6++;
19394 break;
19395 case AF_UNSPEC:
19396 goto bad;
19397 break;
19398 default:
19399 /* another family support? */
19400 break;
19401 }
19402 }
19403 }
19404
19405 if (!(inet4 == 0 || inet4 == 2))
19406 goto bad;
19407 if (!(inet6 == 0 || inet6 == 2))
19408 goto bad;
19409
19410 if (aitop)
19411 freeaddrinfo(aitop);
19412 exit(0);
19413
19414 bad:
19415 if (aitop)
19416 freeaddrinfo(aitop);
19417 exit(1);
19418}
19419
Martin v. Löwis11437992002-04-12 09:54:03 +000019420_ACEOF
19421rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019422if { (ac_try="$ac_link"
19423case "(($ac_try" in
19424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19425 *) ac_try_echo=$ac_try;;
19426esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019428 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019429 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019431 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019432 { (case "(($ac_try" in
19433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19434 *) ac_try_echo=$ac_try;;
19435esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019437 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019438 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019440 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019441 { echo "$as_me:$LINENO: result: good" >&5
19442echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019443buggygetaddrinfo=no
19444else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019445 echo "$as_me: program exited with status $ac_status" >&5
19446echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019447sed 's/^/| /' conftest.$ac_ext >&5
19448
Martin v. Löwis11437992002-04-12 09:54:03 +000019449( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019450{ echo "$as_me:$LINENO: result: buggy" >&5
19451echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019452buggygetaddrinfo=yes
19453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019454rm -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 +000019455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019456
19457
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019458else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019460sed 's/^/| /' conftest.$ac_ext >&5
19461
Martin v. Löwis11437992002-04-12 09:54:03 +000019462
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019463{ echo "$as_me:$LINENO: result: no" >&5
19464echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019465buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019466
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019468
19469rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019471
19472if test "$buggygetaddrinfo" = "yes"; then
19473 if test "$ipv6" = "yes"; then
19474 echo 'Fatal: You must get working getaddrinfo() function.'
19475 echo ' or you can specify "--disable-ipv6"'.
19476 exit 1
19477 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019478else
Martin v. Löwis11437992002-04-12 09:54:03 +000019479
19480cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019481#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019482_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019483
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019484fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019485
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019486for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019487do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019488as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19489{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19490echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019491if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019492 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019493else
Martin v. Löwis11437992002-04-12 09:54:03 +000019494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019495/* confdefs.h. */
19496_ACEOF
19497cat confdefs.h >>conftest.$ac_ext
19498cat >>conftest.$ac_ext <<_ACEOF
19499/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019500/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19501 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19502#define $ac_func innocuous_$ac_func
19503
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019504/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019505 which can conflict with char $ac_func (); below.
19506 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019507 <limits.h> exists even on freestanding compilers. */
19508
19509#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019510# include <limits.h>
19511#else
19512# include <assert.h>
19513#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019514
19515#undef $ac_func
19516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019517/* Override any GCC internal prototype to avoid an error.
19518 Use char because int might match the return type of a GCC
19519 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019520#ifdef __cplusplus
19521extern "C"
19522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019523char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019524/* The GNU C library defines this for functions which it implements
19525 to always fail with ENOSYS. Some functions are actually named
19526 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019527#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019528choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019529#endif
19530
Skip Montanaro6dead952003-09-25 14:50:04 +000019531int
19532main ()
19533{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019534return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019535 ;
19536 return 0;
19537}
19538_ACEOF
19539rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019540if { (ac_try="$ac_link"
19541case "(($ac_try" in
19542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19543 *) ac_try_echo=$ac_try;;
19544esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019546 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019548 grep -v '^ *+' conftest.er1 >conftest.err
19549 rm -f conftest.er1
19550 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019552 (exit $ac_status); } && {
19553 test -z "$ac_c_werror_flag" ||
19554 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019555 } && test -s conftest$ac_exeext &&
19556 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019557 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019558else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019560sed 's/^/| /' conftest.$ac_ext >&5
19561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019562 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019564
19565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019566 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019567fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019568ac_res=`eval echo '${'$as_ac_var'}'`
19569 { echo "$as_me:$LINENO: result: $ac_res" >&5
19570echo "${ECHO_T}$ac_res" >&6; }
19571if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019572 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019573#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019574_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019575
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019576fi
19577done
19578
Michael W. Hudson54241132001-12-07 15:38:26 +000019579
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019580# checks for structures
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019581{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19582echo $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 +000019583if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019584 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019585else
Martin v. Löwis11437992002-04-12 09:54:03 +000019586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019587/* confdefs.h. */
19588_ACEOF
19589cat confdefs.h >>conftest.$ac_ext
19590cat >>conftest.$ac_ext <<_ACEOF
19591/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019592#include <sys/types.h>
19593#include <sys/time.h>
19594#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019595
Martin v. Löwis11437992002-04-12 09:54:03 +000019596int
19597main ()
19598{
19599if ((struct tm *) 0)
19600return 0;
19601 ;
19602 return 0;
19603}
19604_ACEOF
19605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019606if { (ac_try="$ac_compile"
19607case "(($ac_try" in
19608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19609 *) ac_try_echo=$ac_try;;
19610esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019614 grep -v '^ *+' conftest.er1 >conftest.err
19615 rm -f conftest.er1
19616 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019618 (exit $ac_status); } && {
19619 test -z "$ac_c_werror_flag" ||
19620 test ! -s conftest.err
19621 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019622 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019623else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019625sed 's/^/| /' conftest.$ac_ext >&5
19626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019627 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019629
19630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019631fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019632{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19633echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019634if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019635
19636cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019637#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019638_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019639
19640fi
19641
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019642{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19643echo $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 +000019644if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019645 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019646else
Martin v. Löwis11437992002-04-12 09:54:03 +000019647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019648/* confdefs.h. */
19649_ACEOF
19650cat confdefs.h >>conftest.$ac_ext
19651cat >>conftest.$ac_ext <<_ACEOF
19652/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019653#include <sys/types.h>
19654#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019655
Martin v. Löwis11437992002-04-12 09:54:03 +000019656int
19657main ()
19658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019659struct tm tm;
19660 int *p = &tm.tm_sec;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019661 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019662 ;
19663 return 0;
19664}
19665_ACEOF
19666rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019667if { (ac_try="$ac_compile"
19668case "(($ac_try" in
19669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19670 *) ac_try_echo=$ac_try;;
19671esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019675 grep -v '^ *+' conftest.er1 >conftest.err
19676 rm -f conftest.er1
19677 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019679 (exit $ac_status); } && {
19680 test -z "$ac_c_werror_flag" ||
19681 test ! -s conftest.err
19682 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019683 ac_cv_struct_tm=time.h
19684else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019686sed 's/^/| /' conftest.$ac_ext >&5
19687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019688 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019690
19691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019692fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019693{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19694echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019695if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019696
19697cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019698#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019699_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019700
19701fi
19702
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019703{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19704echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019705if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019706 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019707else
Martin v. Löwis11437992002-04-12 09:54:03 +000019708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019709/* confdefs.h. */
19710_ACEOF
19711cat confdefs.h >>conftest.$ac_ext
19712cat >>conftest.$ac_ext <<_ACEOF
19713/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019714#include <sys/types.h>
19715#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019716
19717
Martin v. Löwis11437992002-04-12 09:54:03 +000019718int
19719main ()
19720{
19721static struct tm ac_aggr;
19722if (ac_aggr.tm_zone)
19723return 0;
19724 ;
19725 return 0;
19726}
19727_ACEOF
19728rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019729if { (ac_try="$ac_compile"
19730case "(($ac_try" in
19731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19732 *) ac_try_echo=$ac_try;;
19733esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019737 grep -v '^ *+' conftest.er1 >conftest.err
19738 rm -f conftest.er1
19739 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019741 (exit $ac_status); } && {
19742 test -z "$ac_c_werror_flag" ||
19743 test ! -s conftest.err
19744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019745 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019746else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019748sed 's/^/| /' conftest.$ac_ext >&5
19749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019751/* confdefs.h. */
19752_ACEOF
19753cat confdefs.h >>conftest.$ac_ext
19754cat >>conftest.$ac_ext <<_ACEOF
19755/* end confdefs.h. */
19756#include <sys/types.h>
19757#include <$ac_cv_struct_tm>
19758
19759
19760int
19761main ()
19762{
19763static struct tm ac_aggr;
19764if (sizeof ac_aggr.tm_zone)
19765return 0;
19766 ;
19767 return 0;
19768}
19769_ACEOF
19770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019771if { (ac_try="$ac_compile"
19772case "(($ac_try" in
19773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19774 *) ac_try_echo=$ac_try;;
19775esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019777 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019779 grep -v '^ *+' conftest.er1 >conftest.err
19780 rm -f conftest.er1
19781 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019783 (exit $ac_status); } && {
19784 test -z "$ac_c_werror_flag" ||
19785 test ! -s conftest.err
19786 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019787 ac_cv_member_struct_tm_tm_zone=yes
19788else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019790sed 's/^/| /' conftest.$ac_ext >&5
19791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019792 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019794
19795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019797
19798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019799fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019800{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19801echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19802if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019803
19804cat >>confdefs.h <<_ACEOF
19805#define HAVE_STRUCT_TM_TM_ZONE 1
19806_ACEOF
19807
19808
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019809fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019810
Martin v. Löwis11437992002-04-12 09:54:03 +000019811if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19812
19813cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019814#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019815_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019816
19817else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019818 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19819echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019820if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019821 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019822else
19823 cat >conftest.$ac_ext <<_ACEOF
19824/* confdefs.h. */
19825_ACEOF
19826cat confdefs.h >>conftest.$ac_ext
19827cat >>conftest.$ac_ext <<_ACEOF
19828/* end confdefs.h. */
19829#include <time.h>
19830
19831int
19832main ()
19833{
19834#ifndef tzname
19835 (void) tzname;
19836#endif
19837
19838 ;
19839 return 0;
19840}
19841_ACEOF
19842rm -f conftest.$ac_objext
19843if { (ac_try="$ac_compile"
19844case "(($ac_try" in
19845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19846 *) ac_try_echo=$ac_try;;
19847esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019849 (eval "$ac_compile") 2>conftest.er1
19850 ac_status=$?
19851 grep -v '^ *+' conftest.er1 >conftest.err
19852 rm -f conftest.er1
19853 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019855 (exit $ac_status); } && {
19856 test -z "$ac_c_werror_flag" ||
19857 test ! -s conftest.err
19858 } && test -s conftest.$ac_objext; then
19859 ac_cv_have_decl_tzname=yes
19860else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019861 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019862sed 's/^/| /' conftest.$ac_ext >&5
19863
19864 ac_cv_have_decl_tzname=no
19865fi
19866
19867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19868fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019869{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19870echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19871if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019872
19873cat >>confdefs.h <<_ACEOF
19874#define HAVE_DECL_TZNAME 1
19875_ACEOF
19876
19877
19878else
19879 cat >>confdefs.h <<_ACEOF
19880#define HAVE_DECL_TZNAME 0
19881_ACEOF
19882
19883
19884fi
19885
19886
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019887 { echo "$as_me:$LINENO: checking for tzname" >&5
19888echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019889if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019890 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019891else
Martin v. Löwis11437992002-04-12 09:54:03 +000019892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019893/* confdefs.h. */
19894_ACEOF
19895cat confdefs.h >>conftest.$ac_ext
19896cat >>conftest.$ac_ext <<_ACEOF
19897/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019898#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019899#if !HAVE_DECL_TZNAME
19900extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019902
Martin v. Löwis11437992002-04-12 09:54:03 +000019903int
19904main ()
19905{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019906return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019907 ;
19908 return 0;
19909}
19910_ACEOF
19911rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019912if { (ac_try="$ac_link"
19913case "(($ac_try" in
19914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19915 *) ac_try_echo=$ac_try;;
19916esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019918 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019920 grep -v '^ *+' conftest.er1 >conftest.err
19921 rm -f conftest.er1
19922 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019924 (exit $ac_status); } && {
19925 test -z "$ac_c_werror_flag" ||
19926 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019927 } && test -s conftest$ac_exeext &&
19928 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019929 ac_cv_var_tzname=yes
19930else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019932sed 's/^/| /' conftest.$ac_ext >&5
19933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019934 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019936
19937rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019938 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019939fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019940{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19941echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019942 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019943
19944cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019945#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019946_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019947
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019948 fi
19949fi
19950
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019951{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19952echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019953if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019955else
19956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019957/* confdefs.h. */
19958_ACEOF
19959cat confdefs.h >>conftest.$ac_ext
19960cat >>conftest.$ac_ext <<_ACEOF
19961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019962$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019963int
19964main ()
19965{
19966static struct stat ac_aggr;
19967if (ac_aggr.st_rdev)
19968return 0;
19969 ;
19970 return 0;
19971}
19972_ACEOF
19973rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019974if { (ac_try="$ac_compile"
19975case "(($ac_try" in
19976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19977 *) ac_try_echo=$ac_try;;
19978esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019982 grep -v '^ *+' conftest.er1 >conftest.err
19983 rm -f conftest.er1
19984 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019986 (exit $ac_status); } && {
19987 test -z "$ac_c_werror_flag" ||
19988 test ! -s conftest.err
19989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019990 ac_cv_member_struct_stat_st_rdev=yes
19991else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019993sed 's/^/| /' conftest.$ac_ext >&5
19994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019996/* confdefs.h. */
19997_ACEOF
19998cat confdefs.h >>conftest.$ac_ext
19999cat >>conftest.$ac_ext <<_ACEOF
20000/* end confdefs.h. */
20001$ac_includes_default
20002int
20003main ()
20004{
20005static struct stat ac_aggr;
20006if (sizeof ac_aggr.st_rdev)
20007return 0;
20008 ;
20009 return 0;
20010}
20011_ACEOF
20012rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020013if { (ac_try="$ac_compile"
20014case "(($ac_try" in
20015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20016 *) ac_try_echo=$ac_try;;
20017esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020019 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020021 grep -v '^ *+' conftest.er1 >conftest.err
20022 rm -f conftest.er1
20023 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020025 (exit $ac_status); } && {
20026 test -z "$ac_c_werror_flag" ||
20027 test ! -s conftest.err
20028 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020029 ac_cv_member_struct_stat_st_rdev=yes
20030else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020032sed 's/^/| /' conftest.$ac_ext >&5
20033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020034 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020036
20037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020039
20040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020041fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020042{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20043echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20044if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020045
20046cat >>confdefs.h <<_ACEOF
20047#define HAVE_STRUCT_STAT_ST_RDEV 1
20048_ACEOF
20049
20050
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020051fi
20052
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020053{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20054echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020055if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020057else
Martin v. Löwis11437992002-04-12 09:54:03 +000020058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020059/* confdefs.h. */
20060_ACEOF
20061cat confdefs.h >>conftest.$ac_ext
20062cat >>conftest.$ac_ext <<_ACEOF
20063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020064$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020065int
20066main ()
20067{
20068static struct stat ac_aggr;
20069if (ac_aggr.st_blksize)
20070return 0;
20071 ;
20072 return 0;
20073}
20074_ACEOF
20075rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020076if { (ac_try="$ac_compile"
20077case "(($ac_try" in
20078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20079 *) ac_try_echo=$ac_try;;
20080esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020082 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020084 grep -v '^ *+' conftest.er1 >conftest.err
20085 rm -f conftest.er1
20086 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020088 (exit $ac_status); } && {
20089 test -z "$ac_c_werror_flag" ||
20090 test ! -s conftest.err
20091 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020092 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020093else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020095sed 's/^/| /' conftest.$ac_ext >&5
20096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020098/* confdefs.h. */
20099_ACEOF
20100cat confdefs.h >>conftest.$ac_ext
20101cat >>conftest.$ac_ext <<_ACEOF
20102/* end confdefs.h. */
20103$ac_includes_default
20104int
20105main ()
20106{
20107static struct stat ac_aggr;
20108if (sizeof ac_aggr.st_blksize)
20109return 0;
20110 ;
20111 return 0;
20112}
20113_ACEOF
20114rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020115if { (ac_try="$ac_compile"
20116case "(($ac_try" in
20117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20118 *) ac_try_echo=$ac_try;;
20119esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020121 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020123 grep -v '^ *+' conftest.er1 >conftest.err
20124 rm -f conftest.er1
20125 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020127 (exit $ac_status); } && {
20128 test -z "$ac_c_werror_flag" ||
20129 test ! -s conftest.err
20130 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020131 ac_cv_member_struct_stat_st_blksize=yes
20132else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020134sed 's/^/| /' conftest.$ac_ext >&5
20135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020136 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020138
20139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020141
20142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020143fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020144{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20145echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20146if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020147
Martin v. Löwis11437992002-04-12 09:54:03 +000020148cat >>confdefs.h <<_ACEOF
20149#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20150_ACEOF
20151
20152
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020153fi
20154
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020155{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20156echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020157if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020158 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020159else
20160 cat >conftest.$ac_ext <<_ACEOF
20161/* confdefs.h. */
20162_ACEOF
20163cat confdefs.h >>conftest.$ac_ext
20164cat >>conftest.$ac_ext <<_ACEOF
20165/* end confdefs.h. */
20166$ac_includes_default
20167int
20168main ()
20169{
20170static struct stat ac_aggr;
20171if (ac_aggr.st_flags)
20172return 0;
20173 ;
20174 return 0;
20175}
20176_ACEOF
20177rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020178if { (ac_try="$ac_compile"
20179case "(($ac_try" in
20180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20181 *) ac_try_echo=$ac_try;;
20182esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020184 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020185 ac_status=$?
20186 grep -v '^ *+' conftest.er1 >conftest.err
20187 rm -f conftest.er1
20188 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020190 (exit $ac_status); } && {
20191 test -z "$ac_c_werror_flag" ||
20192 test ! -s conftest.err
20193 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020194 ac_cv_member_struct_stat_st_flags=yes
20195else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020196 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020197sed 's/^/| /' conftest.$ac_ext >&5
20198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020199 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020200/* confdefs.h. */
20201_ACEOF
20202cat confdefs.h >>conftest.$ac_ext
20203cat >>conftest.$ac_ext <<_ACEOF
20204/* end confdefs.h. */
20205$ac_includes_default
20206int
20207main ()
20208{
20209static struct stat ac_aggr;
20210if (sizeof ac_aggr.st_flags)
20211return 0;
20212 ;
20213 return 0;
20214}
20215_ACEOF
20216rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020217if { (ac_try="$ac_compile"
20218case "(($ac_try" in
20219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20220 *) ac_try_echo=$ac_try;;
20221esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020223 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020224 ac_status=$?
20225 grep -v '^ *+' conftest.er1 >conftest.err
20226 rm -f conftest.er1
20227 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020229 (exit $ac_status); } && {
20230 test -z "$ac_c_werror_flag" ||
20231 test ! -s conftest.err
20232 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020233 ac_cv_member_struct_stat_st_flags=yes
20234else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020235 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020236sed 's/^/| /' conftest.$ac_ext >&5
20237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020238 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020240
20241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020243
20244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020245fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020246{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20247echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20248if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020249
20250cat >>confdefs.h <<_ACEOF
20251#define HAVE_STRUCT_STAT_ST_FLAGS 1
20252_ACEOF
20253
20254
20255fi
20256
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020257{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20258echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020259if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020260 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020261else
20262 cat >conftest.$ac_ext <<_ACEOF
20263/* confdefs.h. */
20264_ACEOF
20265cat confdefs.h >>conftest.$ac_ext
20266cat >>conftest.$ac_ext <<_ACEOF
20267/* end confdefs.h. */
20268$ac_includes_default
20269int
20270main ()
20271{
20272static struct stat ac_aggr;
20273if (ac_aggr.st_gen)
20274return 0;
20275 ;
20276 return 0;
20277}
20278_ACEOF
20279rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020280if { (ac_try="$ac_compile"
20281case "(($ac_try" in
20282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20283 *) ac_try_echo=$ac_try;;
20284esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020287 ac_status=$?
20288 grep -v '^ *+' conftest.er1 >conftest.err
20289 rm -f conftest.er1
20290 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020292 (exit $ac_status); } && {
20293 test -z "$ac_c_werror_flag" ||
20294 test ! -s conftest.err
20295 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020296 ac_cv_member_struct_stat_st_gen=yes
20297else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020298 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020299sed 's/^/| /' conftest.$ac_ext >&5
20300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020301 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020302/* confdefs.h. */
20303_ACEOF
20304cat confdefs.h >>conftest.$ac_ext
20305cat >>conftest.$ac_ext <<_ACEOF
20306/* end confdefs.h. */
20307$ac_includes_default
20308int
20309main ()
20310{
20311static struct stat ac_aggr;
20312if (sizeof ac_aggr.st_gen)
20313return 0;
20314 ;
20315 return 0;
20316}
20317_ACEOF
20318rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020319if { (ac_try="$ac_compile"
20320case "(($ac_try" in
20321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20322 *) ac_try_echo=$ac_try;;
20323esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020326 ac_status=$?
20327 grep -v '^ *+' conftest.er1 >conftest.err
20328 rm -f conftest.er1
20329 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020331 (exit $ac_status); } && {
20332 test -z "$ac_c_werror_flag" ||
20333 test ! -s conftest.err
20334 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020335 ac_cv_member_struct_stat_st_gen=yes
20336else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020337 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020338sed 's/^/| /' conftest.$ac_ext >&5
20339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020340 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020342
20343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020345
20346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020347fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020348{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20349echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20350if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020351
20352cat >>confdefs.h <<_ACEOF
20353#define HAVE_STRUCT_STAT_ST_GEN 1
20354_ACEOF
20355
20356
20357fi
20358
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020359{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20360echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020361if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020362 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020363else
20364 cat >conftest.$ac_ext <<_ACEOF
20365/* confdefs.h. */
20366_ACEOF
20367cat confdefs.h >>conftest.$ac_ext
20368cat >>conftest.$ac_ext <<_ACEOF
20369/* end confdefs.h. */
20370$ac_includes_default
20371int
20372main ()
20373{
20374static struct stat ac_aggr;
20375if (ac_aggr.st_birthtime)
20376return 0;
20377 ;
20378 return 0;
20379}
20380_ACEOF
20381rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020382if { (ac_try="$ac_compile"
20383case "(($ac_try" in
20384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20385 *) ac_try_echo=$ac_try;;
20386esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020389 ac_status=$?
20390 grep -v '^ *+' conftest.er1 >conftest.err
20391 rm -f conftest.er1
20392 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020394 (exit $ac_status); } && {
20395 test -z "$ac_c_werror_flag" ||
20396 test ! -s conftest.err
20397 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020398 ac_cv_member_struct_stat_st_birthtime=yes
20399else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020400 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020401sed 's/^/| /' conftest.$ac_ext >&5
20402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020403 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020404/* confdefs.h. */
20405_ACEOF
20406cat confdefs.h >>conftest.$ac_ext
20407cat >>conftest.$ac_ext <<_ACEOF
20408/* end confdefs.h. */
20409$ac_includes_default
20410int
20411main ()
20412{
20413static struct stat ac_aggr;
20414if (sizeof ac_aggr.st_birthtime)
20415return 0;
20416 ;
20417 return 0;
20418}
20419_ACEOF
20420rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020421if { (ac_try="$ac_compile"
20422case "(($ac_try" in
20423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20424 *) ac_try_echo=$ac_try;;
20425esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020428 ac_status=$?
20429 grep -v '^ *+' conftest.er1 >conftest.err
20430 rm -f conftest.er1
20431 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020433 (exit $ac_status); } && {
20434 test -z "$ac_c_werror_flag" ||
20435 test ! -s conftest.err
20436 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020437 ac_cv_member_struct_stat_st_birthtime=yes
20438else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020439 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020440sed 's/^/| /' conftest.$ac_ext >&5
20441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020442 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020444
20445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020447
20448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020449fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020450{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20451echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20452if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020453
20454cat >>confdefs.h <<_ACEOF
20455#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20456_ACEOF
20457
20458
20459fi
20460
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020461{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20462echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020463if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020465else
Martin v. Löwis11437992002-04-12 09:54:03 +000020466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020467/* confdefs.h. */
20468_ACEOF
20469cat confdefs.h >>conftest.$ac_ext
20470cat >>conftest.$ac_ext <<_ACEOF
20471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020472$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020473int
20474main ()
20475{
20476static struct stat ac_aggr;
20477if (ac_aggr.st_blocks)
20478return 0;
20479 ;
20480 return 0;
20481}
20482_ACEOF
20483rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020484if { (ac_try="$ac_compile"
20485case "(($ac_try" in
20486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20487 *) ac_try_echo=$ac_try;;
20488esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020492 grep -v '^ *+' conftest.er1 >conftest.err
20493 rm -f conftest.er1
20494 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020496 (exit $ac_status); } && {
20497 test -z "$ac_c_werror_flag" ||
20498 test ! -s conftest.err
20499 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020500 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020501else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020503sed 's/^/| /' conftest.$ac_ext >&5
20504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020506/* confdefs.h. */
20507_ACEOF
20508cat confdefs.h >>conftest.$ac_ext
20509cat >>conftest.$ac_ext <<_ACEOF
20510/* end confdefs.h. */
20511$ac_includes_default
20512int
20513main ()
20514{
20515static struct stat ac_aggr;
20516if (sizeof ac_aggr.st_blocks)
20517return 0;
20518 ;
20519 return 0;
20520}
20521_ACEOF
20522rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020523if { (ac_try="$ac_compile"
20524case "(($ac_try" in
20525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20526 *) ac_try_echo=$ac_try;;
20527esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020529 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020531 grep -v '^ *+' conftest.er1 >conftest.err
20532 rm -f conftest.er1
20533 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020535 (exit $ac_status); } && {
20536 test -z "$ac_c_werror_flag" ||
20537 test ! -s conftest.err
20538 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020539 ac_cv_member_struct_stat_st_blocks=yes
20540else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020542sed 's/^/| /' conftest.$ac_ext >&5
20543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020544 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020546
20547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020549
20550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020551fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020552{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20553echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20554if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020555
Martin v. Löwis11437992002-04-12 09:54:03 +000020556cat >>confdefs.h <<_ACEOF
20557#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20558_ACEOF
20559
20560
20561cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020562#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020563_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020564
20565else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020566 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020567 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020568 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20569 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020570esac
20571
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020572fi
20573
Michael W. Hudson54241132001-12-07 15:38:26 +000020574
Martin v. Löwis11437992002-04-12 09:54:03 +000020575
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020576{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20577echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020578if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020580else
Martin v. Löwis11437992002-04-12 09:54:03 +000020581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020582/* confdefs.h. */
20583_ACEOF
20584cat confdefs.h >>conftest.$ac_ext
20585cat >>conftest.$ac_ext <<_ACEOF
20586/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020587#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020588int
20589main ()
20590{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020591return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020592 ;
20593 return 0;
20594}
20595_ACEOF
20596rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020597if { (ac_try="$ac_compile"
20598case "(($ac_try" in
20599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20600 *) ac_try_echo=$ac_try;;
20601esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020605 grep -v '^ *+' conftest.er1 >conftest.err
20606 rm -f conftest.er1
20607 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020609 (exit $ac_status); } && {
20610 test -z "$ac_c_werror_flag" ||
20611 test ! -s conftest.err
20612 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020613 ac_cv_header_time_altzone=yes
20614else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020616sed 's/^/| /' conftest.$ac_ext >&5
20617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020618 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020619fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20622fi
20623
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020624{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20625echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020626if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020627
20628cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020629#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020630_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020631
20632fi
20633
Guido van Rossumda88dad1995-01-26 00:46:29 +000020634was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020635{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20636echo $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 +000020637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020638/* confdefs.h. */
20639_ACEOF
20640cat confdefs.h >>conftest.$ac_ext
20641cat >>conftest.$ac_ext <<_ACEOF
20642/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020643
20644#include <sys/types.h>
20645#include <sys/select.h>
20646#include <sys/time.h>
20647
Martin v. Löwis11437992002-04-12 09:54:03 +000020648int
20649main ()
20650{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020651;
Martin v. Löwis11437992002-04-12 09:54:03 +000020652 ;
20653 return 0;
20654}
20655_ACEOF
20656rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020657if { (ac_try="$ac_compile"
20658case "(($ac_try" in
20659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20660 *) ac_try_echo=$ac_try;;
20661esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020665 grep -v '^ *+' conftest.er1 >conftest.err
20666 rm -f conftest.er1
20667 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020669 (exit $ac_status); } && {
20670 test -z "$ac_c_werror_flag" ||
20671 test ! -s conftest.err
20672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020673
20674
20675cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020676#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020677_ACEOF
20678
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020679 was_it_defined=yes
20680
Guido van Rossumf78abae1997-01-21 22:02:36 +000020681else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020683sed 's/^/| /' conftest.$ac_ext >&5
20684
Thomas Wouters477c8d52006-05-27 19:21:47 +000020685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020686fi
20687
20688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020689{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20690echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020691
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020692{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20693echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020694if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020695 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020696else
Martin v. Löwis11437992002-04-12 09:54:03 +000020697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020698/* confdefs.h. */
20699_ACEOF
20700cat confdefs.h >>conftest.$ac_ext
20701cat >>conftest.$ac_ext <<_ACEOF
20702/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020703
20704# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020705int
20706main ()
20707{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020708struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020709 ;
20710 return 0;
20711}
20712_ACEOF
20713rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020714if { (ac_try="$ac_compile"
20715case "(($ac_try" in
20716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20717 *) ac_try_echo=$ac_try;;
20718esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020720 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020722 grep -v '^ *+' conftest.er1 >conftest.err
20723 rm -f conftest.er1
20724 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020726 (exit $ac_status); } && {
20727 test -z "$ac_c_werror_flag" ||
20728 test ! -s conftest.err
20729 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020730 ac_cv_struct_addrinfo=yes
20731else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020733sed 's/^/| /' conftest.$ac_ext >&5
20734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020735 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020736fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20739fi
20740
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020741{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20742echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020743if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020744
20745cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020746#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020747_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020748
20749fi
20750
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020751{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20752echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020753if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020754 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020755else
Martin v. Löwis11437992002-04-12 09:54:03 +000020756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020757/* confdefs.h. */
20758_ACEOF
20759cat confdefs.h >>conftest.$ac_ext
20760cat >>conftest.$ac_ext <<_ACEOF
20761/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020762
20763# include <sys/types.h>
20764# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020765int
20766main ()
20767{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020768struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020769 ;
20770 return 0;
20771}
20772_ACEOF
20773rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020774if { (ac_try="$ac_compile"
20775case "(($ac_try" in
20776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20777 *) ac_try_echo=$ac_try;;
20778esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020782 grep -v '^ *+' conftest.er1 >conftest.err
20783 rm -f conftest.er1
20784 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020786 (exit $ac_status); } && {
20787 test -z "$ac_c_werror_flag" ||
20788 test ! -s conftest.err
20789 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020790 ac_cv_struct_sockaddr_storage=yes
20791else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020793sed 's/^/| /' conftest.$ac_ext >&5
20794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020795 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020796fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20799fi
20800
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020801{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20802echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020803if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020804
20805cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020806#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020807_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020808
20809fi
20810
Guido van Rossum627b2d71993-12-24 10:39:16 +000020811# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020812
Michael W. Hudson54241132001-12-07 15:38:26 +000020813
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020814{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20815echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020816if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020817 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020818else
Martin v. Löwis11437992002-04-12 09:54:03 +000020819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020820/* confdefs.h. */
20821_ACEOF
20822cat confdefs.h >>conftest.$ac_ext
20823cat >>conftest.$ac_ext <<_ACEOF
20824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020825$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020826int
20827main ()
20828{
20829static int test_array [1 - 2 * !(((char) -1) < 0)];
20830test_array [0] = 0
20831
20832 ;
20833 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020834}
Martin v. Löwis11437992002-04-12 09:54:03 +000020835_ACEOF
20836rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020837if { (ac_try="$ac_compile"
20838case "(($ac_try" in
20839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20840 *) ac_try_echo=$ac_try;;
20841esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020845 grep -v '^ *+' conftest.er1 >conftest.err
20846 rm -f conftest.er1
20847 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020849 (exit $ac_status); } && {
20850 test -z "$ac_c_werror_flag" ||
20851 test ! -s conftest.err
20852 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020853 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020854else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020856sed 's/^/| /' conftest.$ac_ext >&5
20857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020858 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020860
20861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020862fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020863{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20864echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020865if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020866 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020867#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020868_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020869
20870fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020871
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020872{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20873echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020874if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020875 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020876else
20877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020878/* confdefs.h. */
20879_ACEOF
20880cat confdefs.h >>conftest.$ac_ext
20881cat >>conftest.$ac_ext <<_ACEOF
20882/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020883
Martin v. Löwis11437992002-04-12 09:54:03 +000020884int
20885main ()
20886{
20887/* FIXME: Include the comments suggested by Paul. */
20888#ifndef __cplusplus
20889 /* Ultrix mips cc rejects this. */
20890 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020891 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020892 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020893 char const *const *pcpcc;
20894 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020895 /* NEC SVR4.0.2 mips cc rejects this. */
20896 struct point {int x, y;};
20897 static struct point const zero = {0,0};
20898 /* AIX XL C 1.02.0.0 rejects this.
20899 It does not let you subtract one const X* pointer from another in
20900 an arm of an if-expression whose if-part is not a constant
20901 expression */
20902 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020903 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020904 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020905 ++pcpcc;
20906 ppc = (char**) pcpcc;
20907 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020908 { /* SCO 3.2v4 cc rejects this. */
20909 char *t;
20910 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020911
Martin v. Löwis11437992002-04-12 09:54:03 +000020912 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020913 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020914 }
20915 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20916 int x[] = {25, 17};
20917 const int *foo = &x[0];
20918 ++foo;
20919 }
20920 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20921 typedef const int *iptr;
20922 iptr p = 0;
20923 ++p;
20924 }
20925 { /* AIX XL C 1.02.0.0 rejects this saying
20926 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20927 struct s { int j; const int *ap[3]; };
20928 struct s *b; b->j = 5;
20929 }
20930 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20931 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020932 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020933 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020934 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020935#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020936
Martin v. Löwis11437992002-04-12 09:54:03 +000020937 ;
20938 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020939}
Martin v. Löwis11437992002-04-12 09:54:03 +000020940_ACEOF
20941rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020942if { (ac_try="$ac_compile"
20943case "(($ac_try" in
20944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20945 *) ac_try_echo=$ac_try;;
20946esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020950 grep -v '^ *+' conftest.er1 >conftest.err
20951 rm -f conftest.er1
20952 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020954 (exit $ac_status); } && {
20955 test -z "$ac_c_werror_flag" ||
20956 test ! -s conftest.err
20957 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020958 ac_cv_c_const=yes
20959else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020961sed 's/^/| /' conftest.$ac_ext >&5
20962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020963 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020965
20966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020967fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020968{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20969echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020970if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020971
20972cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020973#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020974_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020975
20976fi
20977
Michael W. Hudson54241132001-12-07 15:38:26 +000020978
Guido van Rossumda88dad1995-01-26 00:46:29 +000020979works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020980{ echo "$as_me:$LINENO: checking for working volatile" >&5
20981echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020982cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020983/* confdefs.h. */
20984_ACEOF
20985cat confdefs.h >>conftest.$ac_ext
20986cat >>conftest.$ac_ext <<_ACEOF
20987/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020988
Martin v. Löwis11437992002-04-12 09:54:03 +000020989int
20990main ()
20991{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020992volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020993 ;
20994 return 0;
20995}
20996_ACEOF
20997rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020998if { (ac_try="$ac_compile"
20999case "(($ac_try" in
21000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21001 *) ac_try_echo=$ac_try;;
21002esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021006 grep -v '^ *+' conftest.er1 >conftest.err
21007 rm -f conftest.er1
21008 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021010 (exit $ac_status); } && {
21011 test -z "$ac_c_werror_flag" ||
21012 test ! -s conftest.err
21013 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021014 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021015else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021017sed 's/^/| /' conftest.$ac_ext >&5
21018
Martin v. Löwis11437992002-04-12 09:54:03 +000021019
21020cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021021#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021022_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021023
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021024
Guido van Rossum627b2d71993-12-24 10:39:16 +000021025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021026
21027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021028{ echo "$as_me:$LINENO: result: $works" >&5
21029echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021030
Guido van Rossumda88dad1995-01-26 00:46:29 +000021031works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021032{ echo "$as_me:$LINENO: checking for working signed char" >&5
21033echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021035/* confdefs.h. */
21036_ACEOF
21037cat confdefs.h >>conftest.$ac_ext
21038cat >>conftest.$ac_ext <<_ACEOF
21039/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021040
Martin v. Löwis11437992002-04-12 09:54:03 +000021041int
21042main ()
21043{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021044signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021045 ;
21046 return 0;
21047}
21048_ACEOF
21049rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021050if { (ac_try="$ac_compile"
21051case "(($ac_try" in
21052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21053 *) ac_try_echo=$ac_try;;
21054esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021058 grep -v '^ *+' conftest.er1 >conftest.err
21059 rm -f conftest.er1
21060 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021062 (exit $ac_status); } && {
21063 test -z "$ac_c_werror_flag" ||
21064 test ! -s conftest.err
21065 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021066 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021067else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021069sed 's/^/| /' conftest.$ac_ext >&5
21070
Martin v. Löwis11437992002-04-12 09:54:03 +000021071
21072cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021073#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021074_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021075
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021076
Guido van Rossum7f43da71994-08-01 12:15:30 +000021077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021078
21079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021080{ echo "$as_me:$LINENO: result: $works" >&5
21081echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021082
Guido van Rossumda88dad1995-01-26 00:46:29 +000021083have_prototypes=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021084{ echo "$as_me:$LINENO: checking for prototypes" >&5
21085echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021086cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021087/* confdefs.h. */
21088_ACEOF
21089cat confdefs.h >>conftest.$ac_ext
21090cat >>conftest.$ac_ext <<_ACEOF
21091/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021092int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021093int
21094main ()
21095{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021096return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021097 ;
21098 return 0;
21099}
21100_ACEOF
21101rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021102if { (ac_try="$ac_compile"
21103case "(($ac_try" in
21104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21105 *) ac_try_echo=$ac_try;;
21106esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021110 grep -v '^ *+' conftest.er1 >conftest.err
21111 rm -f conftest.er1
21112 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021114 (exit $ac_status); } && {
21115 test -z "$ac_c_werror_flag" ||
21116 test ! -s conftest.err
21117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021118
21119
21120cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021121#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021122_ACEOF
21123
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021124 have_prototypes=yes
21125
Guido van Rossumf78abae1997-01-21 22:02:36 +000021126else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021128sed 's/^/| /' conftest.$ac_ext >&5
21129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021130
Guido van Rossum7f43da71994-08-01 12:15:30 +000021131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021132
21133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021134{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21135echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021136
Guido van Rossumda88dad1995-01-26 00:46:29 +000021137works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021138{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21139echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021141/* confdefs.h. */
21142_ACEOF
21143cat confdefs.h >>conftest.$ac_ext
21144cat >>conftest.$ac_ext <<_ACEOF
21145/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021146
21147#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021148int foo(int x, ...) {
21149 va_list va;
21150 va_start(va, x);
21151 va_arg(va, int);
21152 va_arg(va, char *);
21153 va_arg(va, double);
21154 return 0;
21155}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021156
Martin v. Löwis11437992002-04-12 09:54:03 +000021157int
21158main ()
21159{
Guido van Rossum90eea071996-08-30 20:58:57 +000021160return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021161 ;
21162 return 0;
21163}
21164_ACEOF
21165rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021166if { (ac_try="$ac_compile"
21167case "(($ac_try" in
21168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21169 *) ac_try_echo=$ac_try;;
21170esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021174 grep -v '^ *+' conftest.er1 >conftest.err
21175 rm -f conftest.er1
21176 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021178 (exit $ac_status); } && {
21179 test -z "$ac_c_werror_flag" ||
21180 test ! -s conftest.err
21181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021182
21183
21184cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021185#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021186_ACEOF
21187
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021188 works=yes
21189
Guido van Rossumf78abae1997-01-21 22:02:36 +000021190else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021192sed 's/^/| /' conftest.$ac_ext >&5
21193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021194
Guido van Rossum627b2d71993-12-24 10:39:16 +000021195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021196
21197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021198{ echo "$as_me:$LINENO: result: $works" >&5
21199echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021200
Martin v. Löwisd6320502004-08-12 13:45:08 +000021201# check for socketpair
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021202{ echo "$as_me:$LINENO: checking for socketpair" >&5
21203echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021204cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021205/* confdefs.h. */
21206_ACEOF
21207cat confdefs.h >>conftest.$ac_ext
21208cat >>conftest.$ac_ext <<_ACEOF
21209/* end confdefs.h. */
21210
21211#include <sys/types.h>
21212#include <sys/socket.h>
21213
21214int
21215main ()
21216{
21217void *x=socketpair
21218 ;
21219 return 0;
21220}
21221_ACEOF
21222rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021223if { (ac_try="$ac_compile"
21224case "(($ac_try" in
21225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21226 *) ac_try_echo=$ac_try;;
21227esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021231 grep -v '^ *+' conftest.er1 >conftest.err
21232 rm -f conftest.er1
21233 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021235 (exit $ac_status); } && {
21236 test -z "$ac_c_werror_flag" ||
21237 test ! -s conftest.err
21238 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021239
21240cat >>confdefs.h <<\_ACEOF
21241#define HAVE_SOCKETPAIR 1
21242_ACEOF
21243
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021244 { echo "$as_me:$LINENO: result: yes" >&5
21245echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021246else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021247 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021248sed 's/^/| /' conftest.$ac_ext >&5
21249
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021250 { echo "$as_me:$LINENO: result: no" >&5
21251echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021252
21253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021254
21255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021256
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021257# check if sockaddr has sa_len member
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021258{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21259echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021260cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021261/* confdefs.h. */
21262_ACEOF
21263cat confdefs.h >>conftest.$ac_ext
21264cat >>conftest.$ac_ext <<_ACEOF
21265/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021266#include <sys/types.h>
21267#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021268int
21269main ()
21270{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021271struct sockaddr x;
21272x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021273 ;
21274 return 0;
21275}
21276_ACEOF
21277rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021278if { (ac_try="$ac_compile"
21279case "(($ac_try" in
21280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21281 *) ac_try_echo=$ac_try;;
21282esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021284 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021286 grep -v '^ *+' conftest.er1 >conftest.err
21287 rm -f conftest.er1
21288 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021290 (exit $ac_status); } && {
21291 test -z "$ac_c_werror_flag" ||
21292 test ! -s conftest.err
21293 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021294 { echo "$as_me:$LINENO: result: yes" >&5
21295echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021296
21297cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021298#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021299_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021300
21301else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021303sed 's/^/| /' conftest.$ac_ext >&5
21304
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021305 { echo "$as_me:$LINENO: result: no" >&5
21306echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021308
21309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021310
Guido van Rossumda88dad1995-01-26 00:46:29 +000021311va_list_is_array=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021312{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21313echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021314cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021315/* confdefs.h. */
21316_ACEOF
21317cat confdefs.h >>conftest.$ac_ext
21318cat >>conftest.$ac_ext <<_ACEOF
21319/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021320
21321#ifdef HAVE_STDARG_PROTOTYPES
21322#include <stdarg.h>
21323#else
21324#include <varargs.h>
21325#endif
21326
Martin v. Löwis11437992002-04-12 09:54:03 +000021327int
21328main ()
21329{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021330va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021331 ;
21332 return 0;
21333}
21334_ACEOF
21335rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021336if { (ac_try="$ac_compile"
21337case "(($ac_try" in
21338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21339 *) ac_try_echo=$ac_try;;
21340esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021342 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021344 grep -v '^ *+' conftest.er1 >conftest.err
21345 rm -f conftest.er1
21346 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021348 (exit $ac_status); } && {
21349 test -z "$ac_c_werror_flag" ||
21350 test ! -s conftest.err
21351 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021352 :
21353else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021355sed 's/^/| /' conftest.$ac_ext >&5
21356
Martin v. Löwis11437992002-04-12 09:54:03 +000021357
21358
21359cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021360#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021361_ACEOF
21362
Guido van Rossumda88dad1995-01-26 00:46:29 +000021363 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021364
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021366
21367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021368{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21369echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021370
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021371# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021372
21373
21374
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021375{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21376echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021377if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021378 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021379else
Martin v. Löwis11437992002-04-12 09:54:03 +000021380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021381/* confdefs.h. */
21382_ACEOF
21383cat confdefs.h >>conftest.$ac_ext
21384cat >>conftest.$ac_ext <<_ACEOF
21385/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021386/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21387 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21388#define gethostbyname_r innocuous_gethostbyname_r
21389
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021390/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021391 which can conflict with char gethostbyname_r (); below.
21392 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021393 <limits.h> exists even on freestanding compilers. */
21394
21395#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021396# include <limits.h>
21397#else
21398# include <assert.h>
21399#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021400
21401#undef gethostbyname_r
21402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021403/* Override any GCC internal prototype to avoid an error.
21404 Use char because int might match the return type of a GCC
21405 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021406#ifdef __cplusplus
21407extern "C"
21408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021409char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021410/* The GNU C library defines this for functions which it implements
21411 to always fail with ENOSYS. Some functions are actually named
21412 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021413#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021414choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021415#endif
21416
Skip Montanaro6dead952003-09-25 14:50:04 +000021417int
21418main ()
21419{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021420return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021421 ;
21422 return 0;
21423}
21424_ACEOF
21425rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021426if { (ac_try="$ac_link"
21427case "(($ac_try" in
21428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21429 *) ac_try_echo=$ac_try;;
21430esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021432 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021434 grep -v '^ *+' conftest.er1 >conftest.err
21435 rm -f conftest.er1
21436 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021438 (exit $ac_status); } && {
21439 test -z "$ac_c_werror_flag" ||
21440 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021441 } && test -s conftest$ac_exeext &&
21442 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021443 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021444else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021446sed 's/^/| /' conftest.$ac_ext >&5
21447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021448 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021450
21451rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021452 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021453fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021454{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21455echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21456if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021457
Martin v. Löwis11437992002-04-12 09:54:03 +000021458 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021459#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021460_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021461
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021462 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21463echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021464 OLD_CFLAGS=$CFLAGS
21465 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021467/* confdefs.h. */
21468_ACEOF
21469cat confdefs.h >>conftest.$ac_ext
21470cat >>conftest.$ac_ext <<_ACEOF
21471/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021472
21473# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021474
Martin v. Löwis11437992002-04-12 09:54:03 +000021475int
21476main ()
21477{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021478
21479 char *name;
21480 struct hostent *he, *res;
21481 char buffer[2048];
21482 int buflen = 2048;
21483 int h_errnop;
21484
21485 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021486
21487 ;
21488 return 0;
21489}
21490_ACEOF
21491rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021492if { (ac_try="$ac_compile"
21493case "(($ac_try" in
21494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21495 *) ac_try_echo=$ac_try;;
21496esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021500 grep -v '^ *+' conftest.er1 >conftest.err
21501 rm -f conftest.er1
21502 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021504 (exit $ac_status); } && {
21505 test -z "$ac_c_werror_flag" ||
21506 test ! -s conftest.err
21507 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021508
21509 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021510#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021511_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021512
Martin v. Löwis11437992002-04-12 09:54:03 +000021513
21514cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021515#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021516_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021517
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021518 { echo "$as_me:$LINENO: result: yes" >&5
21519echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021520
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021521else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021523sed 's/^/| /' conftest.$ac_ext >&5
21524
Martin v. Löwis11437992002-04-12 09:54:03 +000021525
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021526 { echo "$as_me:$LINENO: result: no" >&5
21527echo "${ECHO_T}no" >&6; }
21528 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21529echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021531/* confdefs.h. */
21532_ACEOF
21533cat confdefs.h >>conftest.$ac_ext
21534cat >>conftest.$ac_ext <<_ACEOF
21535/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021536
21537# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021538
Martin v. Löwis11437992002-04-12 09:54:03 +000021539int
21540main ()
21541{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021542
21543 char *name;
21544 struct hostent *he;
21545 char buffer[2048];
21546 int buflen = 2048;
21547 int h_errnop;
21548
21549 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021550
21551 ;
21552 return 0;
21553}
21554_ACEOF
21555rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021556if { (ac_try="$ac_compile"
21557case "(($ac_try" in
21558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21559 *) ac_try_echo=$ac_try;;
21560esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021564 grep -v '^ *+' conftest.er1 >conftest.err
21565 rm -f conftest.er1
21566 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021568 (exit $ac_status); } && {
21569 test -z "$ac_c_werror_flag" ||
21570 test ! -s conftest.err
21571 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021572
21573 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021574#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021575_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021576
Martin v. Löwis11437992002-04-12 09:54:03 +000021577
21578cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021579#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021580_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021581
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021582 { echo "$as_me:$LINENO: result: yes" >&5
21583echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021584
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021585else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021587sed 's/^/| /' conftest.$ac_ext >&5
21588
Martin v. Löwis11437992002-04-12 09:54:03 +000021589
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021590 { echo "$as_me:$LINENO: result: no" >&5
21591echo "${ECHO_T}no" >&6; }
21592 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21593echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021595/* confdefs.h. */
21596_ACEOF
21597cat confdefs.h >>conftest.$ac_ext
21598cat >>conftest.$ac_ext <<_ACEOF
21599/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021600
21601# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021602
Martin v. Löwis11437992002-04-12 09:54:03 +000021603int
21604main ()
21605{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021606
21607 char *name;
21608 struct hostent *he;
21609 struct hostent_data data;
21610
21611 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021612
21613 ;
21614 return 0;
21615}
21616_ACEOF
21617rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021618if { (ac_try="$ac_compile"
21619case "(($ac_try" in
21620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21621 *) ac_try_echo=$ac_try;;
21622esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021626 grep -v '^ *+' conftest.er1 >conftest.err
21627 rm -f conftest.er1
21628 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021630 (exit $ac_status); } && {
21631 test -z "$ac_c_werror_flag" ||
21632 test ! -s conftest.err
21633 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021634
21635 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021636#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021637_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021638
Martin v. Löwis11437992002-04-12 09:54:03 +000021639
21640cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021641#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021642_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021643
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021644 { echo "$as_me:$LINENO: result: yes" >&5
21645echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021646
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021647else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021649sed 's/^/| /' conftest.$ac_ext >&5
21650
Martin v. Löwis11437992002-04-12 09:54:03 +000021651
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021652 { echo "$as_me:$LINENO: result: no" >&5
21653echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021656
21657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021658
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021660
21661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021662
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021664
21665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021666 CFLAGS=$OLD_CFLAGS
21667
21668else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021669
Martin v. Löwis11437992002-04-12 09:54:03 +000021670
21671for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021672do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021673as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21674{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21675echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021676if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021677 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021678else
Martin v. Löwis11437992002-04-12 09:54:03 +000021679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021680/* confdefs.h. */
21681_ACEOF
21682cat confdefs.h >>conftest.$ac_ext
21683cat >>conftest.$ac_ext <<_ACEOF
21684/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021685/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21686 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21687#define $ac_func innocuous_$ac_func
21688
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021689/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021690 which can conflict with char $ac_func (); below.
21691 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021692 <limits.h> exists even on freestanding compilers. */
21693
21694#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021695# include <limits.h>
21696#else
21697# include <assert.h>
21698#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021699
21700#undef $ac_func
21701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021702/* Override any GCC internal prototype to avoid an error.
21703 Use char because int might match the return type of a GCC
21704 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021705#ifdef __cplusplus
21706extern "C"
21707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021708char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021709/* The GNU C library defines this for functions which it implements
21710 to always fail with ENOSYS. Some functions are actually named
21711 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021712#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021713choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021714#endif
21715
Skip Montanaro6dead952003-09-25 14:50:04 +000021716int
21717main ()
21718{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021719return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021720 ;
21721 return 0;
21722}
21723_ACEOF
21724rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021725if { (ac_try="$ac_link"
21726case "(($ac_try" in
21727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21728 *) ac_try_echo=$ac_try;;
21729esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021731 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021733 grep -v '^ *+' conftest.er1 >conftest.err
21734 rm -f conftest.er1
21735 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021737 (exit $ac_status); } && {
21738 test -z "$ac_c_werror_flag" ||
21739 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021740 } && test -s conftest$ac_exeext &&
21741 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021742 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021743else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021745sed 's/^/| /' conftest.$ac_ext >&5
21746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021747 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021749
21750rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021751 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021752fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021753ac_res=`eval echo '${'$as_ac_var'}'`
21754 { echo "$as_me:$LINENO: result: $ac_res" >&5
21755echo "${ECHO_T}$ac_res" >&6; }
21756if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021757 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021758#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021759_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021760
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021761fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021762done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021763
Michael W. Hudson54241132001-12-07 15:38:26 +000021764
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021765fi
21766
Michael W. Hudson54241132001-12-07 15:38:26 +000021767
21768
21769
21770
21771
21772
Guido van Rossum627b2d71993-12-24 10:39:16 +000021773# checks for system services
21774# (none yet)
21775
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021776# Linux requires this for correct f.p. operations
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021777{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21778echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021779if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021780 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021781else
Martin v. Löwis11437992002-04-12 09:54:03 +000021782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021783/* confdefs.h. */
21784_ACEOF
21785cat confdefs.h >>conftest.$ac_ext
21786cat >>conftest.$ac_ext <<_ACEOF
21787/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021788/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21789 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21790#define __fpu_control innocuous___fpu_control
21791
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021792/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021793 which can conflict with char __fpu_control (); below.
21794 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021795 <limits.h> exists even on freestanding compilers. */
21796
21797#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021798# include <limits.h>
21799#else
21800# include <assert.h>
21801#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021802
21803#undef __fpu_control
21804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021805/* Override any GCC internal prototype to avoid an error.
21806 Use char because int might match the return type of a GCC
21807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021808#ifdef __cplusplus
21809extern "C"
21810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021811char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021812/* The GNU C library defines this for functions which it implements
21813 to always fail with ENOSYS. Some functions are actually named
21814 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021815#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021816choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021817#endif
21818
Skip Montanaro6dead952003-09-25 14:50:04 +000021819int
21820main ()
21821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021822return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021823 ;
21824 return 0;
21825}
21826_ACEOF
21827rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021828if { (ac_try="$ac_link"
21829case "(($ac_try" in
21830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21831 *) ac_try_echo=$ac_try;;
21832esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021834 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021836 grep -v '^ *+' conftest.er1 >conftest.err
21837 rm -f conftest.er1
21838 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021840 (exit $ac_status); } && {
21841 test -z "$ac_c_werror_flag" ||
21842 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021843 } && test -s conftest$ac_exeext &&
21844 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021845 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021846else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021848sed 's/^/| /' conftest.$ac_ext >&5
21849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021850 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021852
21853rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021854 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021855fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021856{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21857echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21858if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021859 :
21860else
Martin v. Löwis11437992002-04-12 09:54:03 +000021861
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021862{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21863echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021864if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021865 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021866else
Martin v. Löwis11437992002-04-12 09:54:03 +000021867 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021868LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021869cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021870/* confdefs.h. */
21871_ACEOF
21872cat confdefs.h >>conftest.$ac_ext
21873cat >>conftest.$ac_ext <<_ACEOF
21874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021876/* Override any GCC internal prototype to avoid an error.
21877 Use char because int might match the return type of a GCC
21878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021879#ifdef __cplusplus
21880extern "C"
21881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021882char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021883int
21884main ()
21885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021886return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021887 ;
21888 return 0;
21889}
21890_ACEOF
21891rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021892if { (ac_try="$ac_link"
21893case "(($ac_try" in
21894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21895 *) ac_try_echo=$ac_try;;
21896esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021898 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021900 grep -v '^ *+' conftest.er1 >conftest.err
21901 rm -f conftest.er1
21902 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021904 (exit $ac_status); } && {
21905 test -z "$ac_c_werror_flag" ||
21906 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021907 } && test -s conftest$ac_exeext &&
21908 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021909 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021910else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021912sed 's/^/| /' conftest.$ac_ext >&5
21913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021914 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021916
21917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021919LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021920fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021921{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21922echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21923if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021924 cat >>confdefs.h <<_ACEOF
21925#define HAVE_LIBIEEE 1
21926_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021927
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021928 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021929
Guido van Rossum627b2d71993-12-24 10:39:16 +000021930fi
21931
Michael W. Hudson54241132001-12-07 15:38:26 +000021932
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021933fi
21934
Michael W. Hudson54241132001-12-07 15:38:26 +000021935
Guido van Rossum7f253911997-05-09 02:42:48 +000021936# Check for --with-fpectl
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021937{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21938echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021940# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021941if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021942 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021943if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021944then
21945
21946cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021947#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021948_ACEOF
21949
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021950 { echo "$as_me:$LINENO: result: yes" >&5
21951echo "${ECHO_T}yes" >&6; }
21952else { echo "$as_me:$LINENO: result: no" >&5
21953echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021954fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021955else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021956 { echo "$as_me:$LINENO: result: no" >&5
21957echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021958fi
21959
Guido van Rossum7f253911997-05-09 02:42:48 +000021960
Guido van Rossum7f43da71994-08-01 12:15:30 +000021961# check for --with-libm=...
21962
Guido van Rossum563e7081996-09-10 18:20:48 +000021963case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021964Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021965*) LIBM=-lm
21966esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021967{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21968echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021970# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021971if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021972 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021973if test "$withval" = no
21974then LIBM=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021975 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21976echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021977elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021978then LIBM=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021979 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21980echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21981else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21982echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021983 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021984fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021985else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021986 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21987echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021988fi
21989
Guido van Rossum7f43da71994-08-01 12:15:30 +000021990
21991# check for --with-libc=...
21992
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021993{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21994echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021996# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021997if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021998 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021999if test "$withval" = no
22000then LIBC=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022001 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22002echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022003elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022004then LIBC=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022005 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22006echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22007else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22008echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022009 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022010fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022011else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022012 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22013echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022014fi
22015
Guido van Rossum7f43da71994-08-01 12:15:30 +000022016
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022017# **************************************************
22018# * Check for various properties of floating point *
22019# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022020
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022021{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22022echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022023if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022024 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022025else
22026
22027if test "$cross_compiling" = yes; then
22028 ac_cv_little_endian_double=no
22029else
22030 cat >conftest.$ac_ext <<_ACEOF
22031/* confdefs.h. */
22032_ACEOF
22033cat confdefs.h >>conftest.$ac_ext
22034cat >>conftest.$ac_ext <<_ACEOF
22035/* end confdefs.h. */
22036
22037#include <string.h>
22038int main() {
22039 double x = 9006104071832581.0;
22040 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22041 return 0;
22042 else
22043 return 1;
22044}
22045
22046_ACEOF
22047rm -f conftest$ac_exeext
22048if { (ac_try="$ac_link"
22049case "(($ac_try" in
22050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22051 *) ac_try_echo=$ac_try;;
22052esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022054 (eval "$ac_link") 2>&5
22055 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022057 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22058 { (case "(($ac_try" in
22059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22060 *) ac_try_echo=$ac_try;;
22061esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022063 (eval "$ac_try") 2>&5
22064 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022066 (exit $ac_status); }; }; then
22067 ac_cv_little_endian_double=yes
22068else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022069 echo "$as_me: program exited with status $ac_status" >&5
22070echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022071sed 's/^/| /' conftest.$ac_ext >&5
22072
22073( exit $ac_status )
22074ac_cv_little_endian_double=no
22075fi
22076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22077fi
22078
22079
22080fi
22081
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022082{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22083echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022084if test "$ac_cv_little_endian_double" = yes
22085then
22086
22087cat >>confdefs.h <<\_ACEOF
22088#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22089_ACEOF
22090
22091fi
22092
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022093{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22094echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022095if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022096 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022097else
22098
22099if test "$cross_compiling" = yes; then
22100 ac_cv_big_endian_double=no
22101else
22102 cat >conftest.$ac_ext <<_ACEOF
22103/* confdefs.h. */
22104_ACEOF
22105cat confdefs.h >>conftest.$ac_ext
22106cat >>conftest.$ac_ext <<_ACEOF
22107/* end confdefs.h. */
22108
22109#include <string.h>
22110int main() {
22111 double x = 9006104071832581.0;
22112 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22113 return 0;
22114 else
22115 return 1;
22116}
22117
22118_ACEOF
22119rm -f conftest$ac_exeext
22120if { (ac_try="$ac_link"
22121case "(($ac_try" in
22122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22123 *) ac_try_echo=$ac_try;;
22124esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022126 (eval "$ac_link") 2>&5
22127 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022129 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22130 { (case "(($ac_try" in
22131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22132 *) ac_try_echo=$ac_try;;
22133esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022135 (eval "$ac_try") 2>&5
22136 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022138 (exit $ac_status); }; }; then
22139 ac_cv_big_endian_double=yes
22140else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022141 echo "$as_me: program exited with status $ac_status" >&5
22142echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022143sed 's/^/| /' conftest.$ac_ext >&5
22144
22145( exit $ac_status )
22146ac_cv_big_endian_double=no
22147fi
22148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22149fi
22150
22151
22152fi
22153
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022154{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22155echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022156if test "$ac_cv_big_endian_double" = yes
22157then
22158
22159cat >>confdefs.h <<\_ACEOF
22160#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22161_ACEOF
22162
22163fi
22164
22165# Some ARM platforms use a mixed-endian representation for doubles.
22166# While Python doesn't currently have full support for these platforms
22167# (see e.g., issue 1762561), we can at least make sure that float <-> string
22168# conversions work.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022169{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22170echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022171if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022172 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022173else
22174
22175if test "$cross_compiling" = yes; then
22176 ac_cv_mixed_endian_double=no
22177else
22178 cat >conftest.$ac_ext <<_ACEOF
22179/* confdefs.h. */
22180_ACEOF
22181cat confdefs.h >>conftest.$ac_ext
22182cat >>conftest.$ac_ext <<_ACEOF
22183/* end confdefs.h. */
22184
22185#include <string.h>
22186int main() {
22187 double x = 9006104071832581.0;
22188 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22189 return 0;
22190 else
22191 return 1;
22192}
22193
22194_ACEOF
22195rm -f conftest$ac_exeext
22196if { (ac_try="$ac_link"
22197case "(($ac_try" in
22198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22199 *) ac_try_echo=$ac_try;;
22200esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022202 (eval "$ac_link") 2>&5
22203 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022205 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22206 { (case "(($ac_try" in
22207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22208 *) ac_try_echo=$ac_try;;
22209esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022211 (eval "$ac_try") 2>&5
22212 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022214 (exit $ac_status); }; }; then
22215 ac_cv_mixed_endian_double=yes
22216else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022217 echo "$as_me: program exited with status $ac_status" >&5
22218echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022219sed 's/^/| /' conftest.$ac_ext >&5
22220
22221( exit $ac_status )
22222ac_cv_mixed_endian_double=no
22223fi
22224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22225fi
22226
22227
22228fi
22229
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022230{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22231echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022232if test "$ac_cv_mixed_endian_double" = yes
22233then
22234
22235cat >>confdefs.h <<\_ACEOF
22236#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22237_ACEOF
22238
22239fi
22240
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022241# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022242# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022243# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022244# rounding; this is a problem on x86, where the x87 FPU has a default
22245# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22246# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022247if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22248then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022249 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022250 # x87 control word. It should be, but you never know...
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022251 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22252echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022253 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022254/* confdefs.h. */
22255_ACEOF
22256cat confdefs.h >>conftest.$ac_ext
22257cat >>conftest.$ac_ext <<_ACEOF
22258/* end confdefs.h. */
22259
22260int
22261main ()
22262{
22263
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022264 unsigned short cw;
22265 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22266 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022267
22268 ;
22269 return 0;
22270}
22271_ACEOF
22272rm -f conftest.$ac_objext
22273if { (ac_try="$ac_compile"
22274case "(($ac_try" in
22275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22276 *) ac_try_echo=$ac_try;;
22277esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022279 (eval "$ac_compile") 2>conftest.er1
22280 ac_status=$?
22281 grep -v '^ *+' conftest.er1 >conftest.err
22282 rm -f conftest.er1
22283 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022285 (exit $ac_status); } && {
22286 test -z "$ac_c_werror_flag" ||
22287 test ! -s conftest.err
22288 } && test -s conftest.$ac_objext; then
22289 have_gcc_asm_for_x87=yes
22290else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022291 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022292sed 's/^/| /' conftest.$ac_ext >&5
22293
22294 have_gcc_asm_for_x87=no
22295fi
22296
22297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022298 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22299echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022300 if test "$have_gcc_asm_for_x87" = yes
22301 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022302
22303cat >>confdefs.h <<\_ACEOF
22304#define HAVE_GCC_ASM_FOR_X87 1
22305_ACEOF
22306
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022307 fi
22308fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022309
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022310# Detect whether system arithmetic is subject to x87-style double
22311# rounding issues. The result of this test has little meaning on non
22312# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22313# mode is round-to-nearest and double rounding issues are present, and
22314# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022315{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22316echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022317# $BASECFLAGS may affect the result
22318ac_save_cc="$CC"
22319CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022320if test "$cross_compiling" = yes; then
22321 ac_cv_x87_double_rounding=no
22322else
22323 cat >conftest.$ac_ext <<_ACEOF
22324/* confdefs.h. */
22325_ACEOF
22326cat confdefs.h >>conftest.$ac_ext
22327cat >>conftest.$ac_ext <<_ACEOF
22328/* end confdefs.h. */
22329
22330#include <stdlib.h>
22331#include <math.h>
22332int main() {
22333 volatile double x, y, z;
22334 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22335 x = 0.99999999999999989; /* 1-2**-53 */
22336 y = 1./x;
22337 if (y != 1.)
22338 exit(0);
22339 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22340 x = 1e16;
22341 y = 2.99999;
22342 z = x + y;
22343 if (z != 1e16+4.)
22344 exit(0);
22345 /* both tests show evidence of double rounding */
22346 exit(1);
22347}
22348
22349_ACEOF
22350rm -f conftest$ac_exeext
22351if { (ac_try="$ac_link"
22352case "(($ac_try" in
22353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22354 *) ac_try_echo=$ac_try;;
22355esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022357 (eval "$ac_link") 2>&5
22358 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022360 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22361 { (case "(($ac_try" in
22362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22363 *) ac_try_echo=$ac_try;;
22364esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022366 (eval "$ac_try") 2>&5
22367 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022369 (exit $ac_status); }; }; then
22370 ac_cv_x87_double_rounding=no
22371else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022372 echo "$as_me: program exited with status $ac_status" >&5
22373echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022374sed 's/^/| /' conftest.$ac_ext >&5
22375
22376( exit $ac_status )
22377ac_cv_x87_double_rounding=yes
22378fi
22379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22380fi
22381
22382
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022383CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022384{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22385echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022386if test "$ac_cv_x87_double_rounding" = yes
22387then
22388
22389cat >>confdefs.h <<\_ACEOF
22390#define X87_DOUBLE_ROUNDING 1
22391_ACEOF
22392
22393fi
22394
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022395# ************************************
22396# * Check for mathematical functions *
22397# ************************************
22398
22399LIBS_SAVE=$LIBS
22400LIBS="$LIBS $LIBM"
22401
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022402# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22403# -0. on some architectures.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022404{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22405echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022406if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022407 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022408else
22409
22410if test "$cross_compiling" = yes; then
22411 ac_cv_tanh_preserves_zero_sign=no
22412else
22413 cat >conftest.$ac_ext <<_ACEOF
22414/* confdefs.h. */
22415_ACEOF
22416cat confdefs.h >>conftest.$ac_ext
22417cat >>conftest.$ac_ext <<_ACEOF
22418/* end confdefs.h. */
22419
22420#include <math.h>
22421#include <stdlib.h>
22422int main() {
22423 /* return 0 if either negative zeros don't exist
22424 on this platform or if negative zeros exist
22425 and tanh(-0.) == -0. */
22426 if (atan2(0., -1.) == atan2(-0., -1.) ||
22427 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22428 else exit(1);
22429}
22430
22431_ACEOF
22432rm -f conftest$ac_exeext
22433if { (ac_try="$ac_link"
22434case "(($ac_try" in
22435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22436 *) ac_try_echo=$ac_try;;
22437esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022439 (eval "$ac_link") 2>&5
22440 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022442 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22443 { (case "(($ac_try" in
22444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22445 *) ac_try_echo=$ac_try;;
22446esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022448 (eval "$ac_try") 2>&5
22449 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022451 (exit $ac_status); }; }; then
22452 ac_cv_tanh_preserves_zero_sign=yes
22453else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022454 echo "$as_me: program exited with status $ac_status" >&5
22455echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022456sed 's/^/| /' conftest.$ac_ext >&5
22457
22458( exit $ac_status )
22459ac_cv_tanh_preserves_zero_sign=no
22460fi
22461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22462fi
22463
22464
22465fi
22466
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022467{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22468echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022469if test "$ac_cv_tanh_preserves_zero_sign" = yes
22470then
22471
22472cat >>confdefs.h <<\_ACEOF
22473#define TANH_PRESERVES_ZERO_SIGN 1
22474_ACEOF
22475
22476fi
22477
22478
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022479
Michael W. Hudson54241132001-12-07 15:38:26 +000022480
Christian Heimes99170a52007-12-19 02:07:34 +000022481
22482
22483
22484
22485
Mark Dickinsonf2537862009-04-18 13:58:18 +000022486
22487for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022488do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022489as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22490{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22491echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022492if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022493 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022494else
22495 cat >conftest.$ac_ext <<_ACEOF
22496/* confdefs.h. */
22497_ACEOF
22498cat confdefs.h >>conftest.$ac_ext
22499cat >>conftest.$ac_ext <<_ACEOF
22500/* end confdefs.h. */
22501/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22502 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22503#define $ac_func innocuous_$ac_func
22504
22505/* System header to define __stub macros and hopefully few prototypes,
22506 which can conflict with char $ac_func (); below.
22507 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22508 <limits.h> exists even on freestanding compilers. */
22509
22510#ifdef __STDC__
22511# include <limits.h>
22512#else
22513# include <assert.h>
22514#endif
22515
22516#undef $ac_func
22517
22518/* Override any GCC internal prototype to avoid an error.
22519 Use char because int might match the return type of a GCC
22520 builtin and then its argument prototype would still apply. */
22521#ifdef __cplusplus
22522extern "C"
22523#endif
22524char $ac_func ();
22525/* The GNU C library defines this for functions which it implements
22526 to always fail with ENOSYS. Some functions are actually named
22527 something starting with __ and the normal name is an alias. */
22528#if defined __stub_$ac_func || defined __stub___$ac_func
22529choke me
22530#endif
22531
22532int
22533main ()
22534{
22535return $ac_func ();
22536 ;
22537 return 0;
22538}
22539_ACEOF
22540rm -f conftest.$ac_objext conftest$ac_exeext
22541if { (ac_try="$ac_link"
22542case "(($ac_try" in
22543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22544 *) ac_try_echo=$ac_try;;
22545esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022547 (eval "$ac_link") 2>conftest.er1
22548 ac_status=$?
22549 grep -v '^ *+' conftest.er1 >conftest.err
22550 rm -f conftest.er1
22551 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022553 (exit $ac_status); } && {
22554 test -z "$ac_c_werror_flag" ||
22555 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022556 } && test -s conftest$ac_exeext &&
22557 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022558 eval "$as_ac_var=yes"
22559else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022560 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022561sed 's/^/| /' conftest.$ac_ext >&5
22562
22563 eval "$as_ac_var=no"
22564fi
22565
22566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22567 conftest$ac_exeext conftest.$ac_ext
22568fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022569ac_res=`eval echo '${'$as_ac_var'}'`
22570 { echo "$as_me:$LINENO: result: $ac_res" >&5
22571echo "${ECHO_T}$ac_res" >&6; }
22572if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022573 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022574#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022575_ACEOF
22576
22577fi
22578done
22579
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022580{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22581echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022582if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022583 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022584else
22585 cat >conftest.$ac_ext <<_ACEOF
22586/* confdefs.h. */
22587_ACEOF
22588cat confdefs.h >>conftest.$ac_ext
22589cat >>conftest.$ac_ext <<_ACEOF
22590/* end confdefs.h. */
22591#include <math.h>
22592
22593int
22594main ()
22595{
22596#ifndef isinf
22597 (void) isinf;
22598#endif
22599
22600 ;
22601 return 0;
22602}
22603_ACEOF
22604rm -f conftest.$ac_objext
22605if { (ac_try="$ac_compile"
22606case "(($ac_try" in
22607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22608 *) ac_try_echo=$ac_try;;
22609esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022611 (eval "$ac_compile") 2>conftest.er1
22612 ac_status=$?
22613 grep -v '^ *+' conftest.er1 >conftest.err
22614 rm -f conftest.er1
22615 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022617 (exit $ac_status); } && {
22618 test -z "$ac_c_werror_flag" ||
22619 test ! -s conftest.err
22620 } && test -s conftest.$ac_objext; then
22621 ac_cv_have_decl_isinf=yes
22622else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022623 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022624sed 's/^/| /' conftest.$ac_ext >&5
22625
22626 ac_cv_have_decl_isinf=no
22627fi
22628
22629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22630fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022631{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22632echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22633if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022634
22635cat >>confdefs.h <<_ACEOF
22636#define HAVE_DECL_ISINF 1
22637_ACEOF
22638
22639
22640else
22641 cat >>confdefs.h <<_ACEOF
22642#define HAVE_DECL_ISINF 0
22643_ACEOF
22644
22645
22646fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022647{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22648echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022649if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022650 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022651else
22652 cat >conftest.$ac_ext <<_ACEOF
22653/* confdefs.h. */
22654_ACEOF
22655cat confdefs.h >>conftest.$ac_ext
22656cat >>conftest.$ac_ext <<_ACEOF
22657/* end confdefs.h. */
22658#include <math.h>
22659
22660int
22661main ()
22662{
22663#ifndef isnan
22664 (void) isnan;
22665#endif
22666
22667 ;
22668 return 0;
22669}
22670_ACEOF
22671rm -f conftest.$ac_objext
22672if { (ac_try="$ac_compile"
22673case "(($ac_try" in
22674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22675 *) ac_try_echo=$ac_try;;
22676esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022678 (eval "$ac_compile") 2>conftest.er1
22679 ac_status=$?
22680 grep -v '^ *+' conftest.er1 >conftest.err
22681 rm -f conftest.er1
22682 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022684 (exit $ac_status); } && {
22685 test -z "$ac_c_werror_flag" ||
22686 test ! -s conftest.err
22687 } && test -s conftest.$ac_objext; then
22688 ac_cv_have_decl_isnan=yes
22689else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022690 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022691sed 's/^/| /' conftest.$ac_ext >&5
22692
22693 ac_cv_have_decl_isnan=no
22694fi
22695
22696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22697fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022698{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22699echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22700if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022701
22702cat >>confdefs.h <<_ACEOF
22703#define HAVE_DECL_ISNAN 1
22704_ACEOF
22705
22706
22707else
22708 cat >>confdefs.h <<_ACEOF
22709#define HAVE_DECL_ISNAN 0
22710_ACEOF
22711
22712
22713fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022714{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22715echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022716if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022717 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022718else
22719 cat >conftest.$ac_ext <<_ACEOF
22720/* confdefs.h. */
22721_ACEOF
22722cat confdefs.h >>conftest.$ac_ext
22723cat >>conftest.$ac_ext <<_ACEOF
22724/* end confdefs.h. */
22725#include <math.h>
22726
22727int
22728main ()
22729{
22730#ifndef isfinite
22731 (void) isfinite;
22732#endif
22733
22734 ;
22735 return 0;
22736}
22737_ACEOF
22738rm -f conftest.$ac_objext
22739if { (ac_try="$ac_compile"
22740case "(($ac_try" in
22741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22742 *) ac_try_echo=$ac_try;;
22743esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022745 (eval "$ac_compile") 2>conftest.er1
22746 ac_status=$?
22747 grep -v '^ *+' conftest.er1 >conftest.err
22748 rm -f conftest.er1
22749 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022751 (exit $ac_status); } && {
22752 test -z "$ac_c_werror_flag" ||
22753 test ! -s conftest.err
22754 } && test -s conftest.$ac_objext; then
22755 ac_cv_have_decl_isfinite=yes
22756else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022757 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022758sed 's/^/| /' conftest.$ac_ext >&5
22759
22760 ac_cv_have_decl_isfinite=no
22761fi
22762
22763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22764fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022765{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22766echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22767if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022768
22769cat >>confdefs.h <<_ACEOF
22770#define HAVE_DECL_ISFINITE 1
22771_ACEOF
22772
22773
22774else
22775 cat >>confdefs.h <<_ACEOF
22776#define HAVE_DECL_ISFINITE 0
22777_ACEOF
22778
22779
22780fi
22781
22782
Christian Heimes99170a52007-12-19 02:07:34 +000022783
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022784LIBS=$LIBS_SAVE
22785
Mark Dickinson875ada42009-11-28 12:52:39 +000022786# For multiprocessing module, check that sem_open
22787# actually works. For FreeBSD versions <= 7.2,
22788# the kernel module that provides POSIX semaphores
22789# isn't loaded by default, so an attempt to call
22790# sem_open results in a 'Signal 12' error.
22791{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
22792echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
22793if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
22794 echo $ECHO_N "(cached) $ECHO_C" >&6
22795else
22796 if test "$cross_compiling" = yes; then
22797 ac_cv_posix_semaphores_enabled=yes
22798else
22799 cat >conftest.$ac_ext <<_ACEOF
22800/* confdefs.h. */
22801_ACEOF
22802cat confdefs.h >>conftest.$ac_ext
22803cat >>conftest.$ac_ext <<_ACEOF
22804/* end confdefs.h. */
22805
22806#include <unistd.h>
22807#include <fcntl.h>
22808#include <stdio.h>
22809#include <semaphore.h>
22810#include <sys/stat.h>
22811
22812int main(void) {
22813 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22814 if (a == SEM_FAILED) {
22815 perror("sem_open");
22816 return 1;
22817 }
22818 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022819 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000022820 return 0;
22821}
22822
22823_ACEOF
22824rm -f conftest$ac_exeext
22825if { (ac_try="$ac_link"
22826case "(($ac_try" in
22827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22828 *) ac_try_echo=$ac_try;;
22829esac
22830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22831 (eval "$ac_link") 2>&5
22832 ac_status=$?
22833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22834 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22835 { (case "(($ac_try" in
22836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22837 *) ac_try_echo=$ac_try;;
22838esac
22839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22840 (eval "$ac_try") 2>&5
22841 ac_status=$?
22842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22843 (exit $ac_status); }; }; then
22844 ac_cv_posix_semaphores_enabled=yes
22845else
22846 echo "$as_me: program exited with status $ac_status" >&5
22847echo "$as_me: failed program was:" >&5
22848sed 's/^/| /' conftest.$ac_ext >&5
22849
22850( exit $ac_status )
22851ac_cv_posix_semaphores_enabled=no
22852fi
22853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22854fi
22855
22856
22857
22858fi
22859
22860{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
22861echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
22862if test $ac_cv_posix_semaphores_enabled = no
22863then
22864
22865cat >>confdefs.h <<\_ACEOF
22866#define POSIX_SEMAPHORES_NOT_ENABLED 1
22867_ACEOF
22868
22869fi
22870
Mark Dickinson10683072009-04-18 21:18:19 +000022871# Multiprocessing check for broken sem_getvalue
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022872{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22873echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022874if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022875 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022876See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022877echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022878See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022879 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022880else
22881 cat >conftest.$ac_ext <<_ACEOF
22882/* confdefs.h. */
22883_ACEOF
22884cat confdefs.h >>conftest.$ac_ext
22885cat >>conftest.$ac_ext <<_ACEOF
22886/* end confdefs.h. */
22887
22888#include <unistd.h>
22889#include <fcntl.h>
22890#include <stdio.h>
22891#include <semaphore.h>
22892#include <sys/stat.h>
22893
22894int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022895 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000022896 int count;
22897 int res;
22898 if(a==SEM_FAILED){
22899 perror("sem_open");
22900 return 1;
22901
22902 }
22903 res = sem_getvalue(a, &count);
22904 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022905 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000022906 return res==-1 ? 1 : 0;
22907}
22908
22909
22910_ACEOF
22911rm -f conftest$ac_exeext
22912if { (ac_try="$ac_link"
22913case "(($ac_try" in
22914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22915 *) ac_try_echo=$ac_try;;
22916esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022918 (eval "$ac_link") 2>&5
22919 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022921 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22922 { (case "(($ac_try" in
22923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22924 *) ac_try_echo=$ac_try;;
22925esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022927 (eval "$ac_try") 2>&5
22928 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022930 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022931 { echo "$as_me:$LINENO: result: no" >&5
22932echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022933else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022934 echo "$as_me: program exited with status $ac_status" >&5
22935echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022936sed 's/^/| /' conftest.$ac_ext >&5
22937
22938( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022939{ echo "$as_me:$LINENO: result: yes" >&5
22940echo "${ECHO_T}yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022941
22942cat >>confdefs.h <<\_ACEOF
22943#define HAVE_BROKEN_SEM_GETVALUE 1
22944_ACEOF
22945
22946
22947fi
22948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22949fi
22950
22951
22952
Mark Dickinsonbd792642009-03-18 20:06:12 +000022953# determine what size digit to use for Python's longs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022954{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22955echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022956# Check whether --enable-big-digits was given.
22957if test "${enable_big_digits+set}" = set; then
22958 enableval=$enable_big_digits; case $enable_big_digits in
22959yes)
22960 enable_big_digits=30 ;;
22961no)
22962 enable_big_digits=15 ;;
2296315|30)
22964 ;;
22965*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022966 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22967echo "$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 +000022968 { (exit 1); exit 1; }; } ;;
22969esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022970{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22971echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022972
22973cat >>confdefs.h <<_ACEOF
22974#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22975_ACEOF
22976
22977
22978else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022979 { echo "$as_me:$LINENO: result: no value specified" >&5
22980echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022981fi
22982
22983
Guido van Rossumef2255b2000-03-10 22:30:29 +000022984# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022985if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022986 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22987echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022988if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022989 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022990fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022991{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22992echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022993else
Martin v. Löwis11437992002-04-12 09:54:03 +000022994 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022995{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22996echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022998/* confdefs.h. */
22999_ACEOF
23000cat confdefs.h >>conftest.$ac_ext
23001cat >>conftest.$ac_ext <<_ACEOF
23002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023003$ac_includes_default
23004#include <wchar.h>
23005_ACEOF
23006rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023007if { (ac_try="$ac_compile"
23008case "(($ac_try" in
23009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23010 *) ac_try_echo=$ac_try;;
23011esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023015 grep -v '^ *+' conftest.er1 >conftest.err
23016 rm -f conftest.er1
23017 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023019 (exit $ac_status); } && {
23020 test -z "$ac_c_werror_flag" ||
23021 test ! -s conftest.err
23022 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023023 ac_header_compiler=yes
23024else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023026sed 's/^/| /' conftest.$ac_ext >&5
23027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023028 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023030
23031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023032{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23033echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023034
23035# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023036{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23037echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023039/* confdefs.h. */
23040_ACEOF
23041cat confdefs.h >>conftest.$ac_ext
23042cat >>conftest.$ac_ext <<_ACEOF
23043/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023044#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023045_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023046if { (ac_try="$ac_cpp conftest.$ac_ext"
23047case "(($ac_try" in
23048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23049 *) ac_try_echo=$ac_try;;
23050esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023052 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023053 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023054 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023055 rm -f conftest.er1
23056 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023058 (exit $ac_status); } >/dev/null && {
23059 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23060 test ! -s conftest.err
23061 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023062 ac_header_preproc=yes
23063else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023065sed 's/^/| /' conftest.$ac_ext >&5
23066
Martin v. Löwis11437992002-04-12 09:54:03 +000023067 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023069
Martin v. Löwis11437992002-04-12 09:54:03 +000023070rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023071{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23072echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023073
23074# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023075case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23076 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023077 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23078echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23079 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23080echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023081 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023082 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023083 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023084 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23085echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23086 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23087echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23088 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23089echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23090 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23091echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23092 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23093echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23094 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23095echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023096 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023097## -------------------------------------- ##
23098## Report this to http://bugs.python.org/ ##
23099## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023100_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023101 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023102 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023103esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023104{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23105echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023106if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023107 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023108else
23109 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023110fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023111{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23112echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023113
23114fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023115if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023116
23117
23118cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023119#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023120_ACEOF
23121
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023122 wchar_h="yes"
23123
Guido van Rossumef2255b2000-03-10 22:30:29 +000023124else
Martin v. Löwis11437992002-04-12 09:54:03 +000023125 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023126
23127fi
23128
Michael W. Hudson54241132001-12-07 15:38:26 +000023129
Martin v. Löwis11437992002-04-12 09:54:03 +000023130
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023131# determine wchar_t size
23132if test "$wchar_h" = yes
23133then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023134 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23135echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23136if test "${ac_cv_type_wchar_t+set}" = set; then
23137 echo $ECHO_N "(cached) $ECHO_C" >&6
23138else
23139 cat >conftest.$ac_ext <<_ACEOF
23140/* confdefs.h. */
23141_ACEOF
23142cat confdefs.h >>conftest.$ac_ext
23143cat >>conftest.$ac_ext <<_ACEOF
23144/* end confdefs.h. */
23145#include <wchar.h>
23146
23147typedef wchar_t ac__type_new_;
23148int
23149main ()
23150{
23151if ((ac__type_new_ *) 0)
23152 return 0;
23153if (sizeof (ac__type_new_))
23154 return 0;
23155 ;
23156 return 0;
23157}
23158_ACEOF
23159rm -f conftest.$ac_objext
23160if { (ac_try="$ac_compile"
23161case "(($ac_try" in
23162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23163 *) ac_try_echo=$ac_try;;
23164esac
23165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23166 (eval "$ac_compile") 2>conftest.er1
23167 ac_status=$?
23168 grep -v '^ *+' conftest.er1 >conftest.err
23169 rm -f conftest.er1
23170 cat conftest.err >&5
23171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23172 (exit $ac_status); } && {
23173 test -z "$ac_c_werror_flag" ||
23174 test ! -s conftest.err
23175 } && test -s conftest.$ac_objext; then
23176 ac_cv_type_wchar_t=yes
23177else
23178 echo "$as_me: failed program was:" >&5
23179sed 's/^/| /' conftest.$ac_ext >&5
23180
23181 ac_cv_type_wchar_t=no
23182fi
23183
23184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23185fi
23186{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23187echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23188
23189# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023190# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23191# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23192# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023193{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23194echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023195if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023196 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023197else
Martin v. Löwis11437992002-04-12 09:54:03 +000023198 if test "$cross_compiling" = yes; then
23199 # Depending upon the size, compute the lo and hi bounds.
23200cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023201/* confdefs.h. */
23202_ACEOF
23203cat confdefs.h >>conftest.$ac_ext
23204cat >>conftest.$ac_ext <<_ACEOF
23205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023206#include <wchar.h>
23207
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023208 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023209int
23210main ()
23211{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023212static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023213test_array [0] = 0
23214
23215 ;
23216 return 0;
23217}
23218_ACEOF
23219rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023220if { (ac_try="$ac_compile"
23221case "(($ac_try" in
23222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23223 *) ac_try_echo=$ac_try;;
23224esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023226 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023228 grep -v '^ *+' conftest.er1 >conftest.err
23229 rm -f conftest.er1
23230 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023232 (exit $ac_status); } && {
23233 test -z "$ac_c_werror_flag" ||
23234 test ! -s conftest.err
23235 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023236 ac_lo=0 ac_mid=0
23237 while :; do
23238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023239/* confdefs.h. */
23240_ACEOF
23241cat confdefs.h >>conftest.$ac_ext
23242cat >>conftest.$ac_ext <<_ACEOF
23243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023244#include <wchar.h>
23245
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023246 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023247int
23248main ()
23249{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023251test_array [0] = 0
23252
23253 ;
23254 return 0;
23255}
23256_ACEOF
23257rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023258if { (ac_try="$ac_compile"
23259case "(($ac_try" in
23260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23261 *) ac_try_echo=$ac_try;;
23262esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023266 grep -v '^ *+' conftest.er1 >conftest.err
23267 rm -f conftest.er1
23268 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023270 (exit $ac_status); } && {
23271 test -z "$ac_c_werror_flag" ||
23272 test ! -s conftest.err
23273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023274 ac_hi=$ac_mid; break
23275else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023277sed 's/^/| /' conftest.$ac_ext >&5
23278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023279 ac_lo=`expr $ac_mid + 1`
23280 if test $ac_lo -le $ac_mid; then
23281 ac_lo= ac_hi=
23282 break
23283 fi
23284 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023286
23287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023288 done
23289else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023291sed 's/^/| /' conftest.$ac_ext >&5
23292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023294/* confdefs.h. */
23295_ACEOF
23296cat confdefs.h >>conftest.$ac_ext
23297cat >>conftest.$ac_ext <<_ACEOF
23298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023299#include <wchar.h>
23300
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023301 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023302int
23303main ()
23304{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023306test_array [0] = 0
23307
23308 ;
23309 return 0;
23310}
23311_ACEOF
23312rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023313if { (ac_try="$ac_compile"
23314case "(($ac_try" in
23315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23316 *) ac_try_echo=$ac_try;;
23317esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023321 grep -v '^ *+' conftest.er1 >conftest.err
23322 rm -f conftest.er1
23323 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023325 (exit $ac_status); } && {
23326 test -z "$ac_c_werror_flag" ||
23327 test ! -s conftest.err
23328 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023329 ac_hi=-1 ac_mid=-1
23330 while :; do
23331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023332/* confdefs.h. */
23333_ACEOF
23334cat confdefs.h >>conftest.$ac_ext
23335cat >>conftest.$ac_ext <<_ACEOF
23336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023337#include <wchar.h>
23338
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023339 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023340int
23341main ()
23342{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023343static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023344test_array [0] = 0
23345
23346 ;
23347 return 0;
23348}
23349_ACEOF
23350rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023351if { (ac_try="$ac_compile"
23352case "(($ac_try" in
23353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23354 *) ac_try_echo=$ac_try;;
23355esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023359 grep -v '^ *+' conftest.er1 >conftest.err
23360 rm -f conftest.er1
23361 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023363 (exit $ac_status); } && {
23364 test -z "$ac_c_werror_flag" ||
23365 test ! -s conftest.err
23366 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023367 ac_lo=$ac_mid; break
23368else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023370sed 's/^/| /' conftest.$ac_ext >&5
23371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023372 ac_hi=`expr '(' $ac_mid ')' - 1`
23373 if test $ac_mid -le $ac_hi; then
23374 ac_lo= ac_hi=
23375 break
23376 fi
23377 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023379
23380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023381 done
23382else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023384sed 's/^/| /' conftest.$ac_ext >&5
23385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023386 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023388
23389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023391
23392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023393# Binary search between lo and hi bounds.
23394while test "x$ac_lo" != "x$ac_hi"; do
23395 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023397/* confdefs.h. */
23398_ACEOF
23399cat confdefs.h >>conftest.$ac_ext
23400cat >>conftest.$ac_ext <<_ACEOF
23401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023402#include <wchar.h>
23403
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023404 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023405int
23406main ()
23407{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023409test_array [0] = 0
23410
23411 ;
23412 return 0;
23413}
23414_ACEOF
23415rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023416if { (ac_try="$ac_compile"
23417case "(($ac_try" in
23418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23419 *) ac_try_echo=$ac_try;;
23420esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023424 grep -v '^ *+' conftest.er1 >conftest.err
23425 rm -f conftest.er1
23426 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023428 (exit $ac_status); } && {
23429 test -z "$ac_c_werror_flag" ||
23430 test ! -s conftest.err
23431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023432 ac_hi=$ac_mid
23433else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023435sed 's/^/| /' conftest.$ac_ext >&5
23436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023437 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023439
23440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023441done
23442case $ac_lo in
23443?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023444'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023445 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023446See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023447echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023448See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023449 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023450 else
23451 ac_cv_sizeof_wchar_t=0
23452 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023453esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023454else
Martin v. Löwis11437992002-04-12 09:54:03 +000023455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023456/* confdefs.h. */
23457_ACEOF
23458cat confdefs.h >>conftest.$ac_ext
23459cat >>conftest.$ac_ext <<_ACEOF
23460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023461#include <wchar.h>
23462
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023463 typedef wchar_t ac__type_sizeof_;
23464static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23465static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023466#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023467#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023468int
23469main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023470{
Martin v. Löwis11437992002-04-12 09:54:03 +000023471
23472 FILE *f = fopen ("conftest.val", "w");
23473 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023474 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023475 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023476 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023477 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023478 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023479 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023480 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023481 }
23482 else
23483 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023484 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023486 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023487 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023488 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023489 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023490
23491 ;
23492 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023493}
Martin v. Löwis11437992002-04-12 09:54:03 +000023494_ACEOF
23495rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023496if { (ac_try="$ac_link"
23497case "(($ac_try" in
23498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23499 *) ac_try_echo=$ac_try;;
23500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023502 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023503 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023506 { (case "(($ac_try" in
23507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23508 *) ac_try_echo=$ac_try;;
23509esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023511 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023512 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023514 (exit $ac_status); }; }; then
23515 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023516else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023517 echo "$as_me: program exited with status $ac_status" >&5
23518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023519sed 's/^/| /' conftest.$ac_ext >&5
23520
Martin v. Löwis11437992002-04-12 09:54:03 +000023521( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023522if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023523 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023524See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023525echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023526See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023527 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023528 else
23529 ac_cv_sizeof_wchar_t=0
23530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023532rm -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 +000023533fi
23534rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023535fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023536{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23537echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023538
23539
23540
Martin v. Löwis11437992002-04-12 09:54:03 +000023541cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023542#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023543_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023544
Michael W. Hudson54241132001-12-07 15:38:26 +000023545
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023546fi
23547
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023548{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23549echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023550have_ucs4_tcl=no
23551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023552/* confdefs.h. */
23553_ACEOF
23554cat confdefs.h >>conftest.$ac_ext
23555cat >>conftest.$ac_ext <<_ACEOF
23556/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023557
23558#include <tcl.h>
23559#if TCL_UTF_MAX != 6
23560# error "NOT UCS4_TCL"
23561#endif
23562int
23563main ()
23564{
23565
23566 ;
23567 return 0;
23568}
23569_ACEOF
23570rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023571if { (ac_try="$ac_compile"
23572case "(($ac_try" in
23573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23574 *) ac_try_echo=$ac_try;;
23575esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023579 grep -v '^ *+' conftest.er1 >conftest.err
23580 rm -f conftest.er1
23581 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023583 (exit $ac_status); } && {
23584 test -z "$ac_c_werror_flag" ||
23585 test ! -s conftest.err
23586 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023587
23588
23589cat >>confdefs.h <<\_ACEOF
23590#define HAVE_UCS4_TCL 1
23591_ACEOF
23592
23593 have_ucs4_tcl=yes
23594
23595else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023597sed 's/^/| /' conftest.$ac_ext >&5
23598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023599
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023601
23602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023603{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23604echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023605
Skip Montanaro6dead952003-09-25 14:50:04 +000023606# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023607if test "$wchar_h" = yes
23608then
23609 # check whether wchar_t is signed or not
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023610 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23611echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023612 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023613 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023614else
23615
23616 if test "$cross_compiling" = yes; then
23617 ac_cv_wchar_t_signed=yes
23618else
23619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023620/* confdefs.h. */
23621_ACEOF
23622cat confdefs.h >>conftest.$ac_ext
23623cat >>conftest.$ac_ext <<_ACEOF
23624/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023625
23626 #include <wchar.h>
23627 int main()
23628 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023629 /* Success: exit code 0 */
23630 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023631 }
23632
23633_ACEOF
23634rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023635if { (ac_try="$ac_link"
23636case "(($ac_try" in
23637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23638 *) ac_try_echo=$ac_try;;
23639esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023641 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023642 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023644 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023645 { (case "(($ac_try" in
23646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23647 *) ac_try_echo=$ac_try;;
23648esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023650 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023651 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023653 (exit $ac_status); }; }; then
23654 ac_cv_wchar_t_signed=yes
23655else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023656 echo "$as_me: program exited with status $ac_status" >&5
23657echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023658sed 's/^/| /' conftest.$ac_ext >&5
23659
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023660( exit $ac_status )
23661ac_cv_wchar_t_signed=no
23662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023663rm -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 +000023664fi
23665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023666
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023667fi
23668
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023669 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23670echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023671fi
23672
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023673{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23674echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023675
23676# Check whether --with-wide-unicode was given.
23677if test "${with_wide_unicode+set}" = set; then
23678 withval=$with_wide_unicode;
23679if test "$withval" != no
23680then unicode_size="4"
23681else unicode_size="2"
23682fi
23683
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023684else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023685
Georg Brandl52d168a2008-01-07 18:10:24 +000023686case "$have_ucs4_tcl" in
23687 yes) unicode_size="4" ;;
23688 *) unicode_size="2" ;;
23689esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023690
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023691fi
23692
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023693
23694
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023695
Georg Brandl52d168a2008-01-07 18:10:24 +000023696case "$unicode_size" in
23697 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023698#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023699_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023700 ;;
23701 *) cat >>confdefs.h <<\_ACEOF
23702#define Py_UNICODE_SIZE 2
23703_ACEOF
23704 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023705esac
23706
Michael W. Hudson54241132001-12-07 15:38:26 +000023707
Martin v. Löwis11437992002-04-12 09:54:03 +000023708
23709
Georg Brandl52d168a2008-01-07 18:10:24 +000023710# wchar_t is only usable if it maps to an unsigned type
23711if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023712 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023713then
23714 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023715
Martin v. Löwis11437992002-04-12 09:54:03 +000023716cat >>confdefs.h <<\_ACEOF
23717#define HAVE_USABLE_WCHAR_T 1
23718_ACEOF
23719
Georg Brandl52d168a2008-01-07 18:10:24 +000023720 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023721#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023722_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023723
Georg Brandl52d168a2008-01-07 18:10:24 +000023724elif test "$ac_cv_sizeof_short" = "$unicode_size"
23725then
23726 PY_UNICODE_TYPE="unsigned short"
23727 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023728#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023729_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023730
Georg Brandl52d168a2008-01-07 18:10:24 +000023731elif test "$ac_cv_sizeof_long" = "$unicode_size"
23732then
23733 PY_UNICODE_TYPE="unsigned long"
23734 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023735#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023736_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023737
Georg Brandl52d168a2008-01-07 18:10:24 +000023738else
23739 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023740fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023741{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23742echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023743
23744# check for endianness
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023745{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23746echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023747if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023749else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023750 # See if sys/param.h defines the BYTE_ORDER macro.
23751cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023752/* confdefs.h. */
23753_ACEOF
23754cat confdefs.h >>conftest.$ac_ext
23755cat >>conftest.$ac_ext <<_ACEOF
23756/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023757#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023758#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023759
Martin v. Löwis11437992002-04-12 09:54:03 +000023760int
23761main ()
23762{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023763#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23764 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23765 bogus endian macros
23766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023767
23768 ;
23769 return 0;
23770}
23771_ACEOF
23772rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023773if { (ac_try="$ac_compile"
23774case "(($ac_try" in
23775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23776 *) ac_try_echo=$ac_try;;
23777esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023781 grep -v '^ *+' conftest.er1 >conftest.err
23782 rm -f conftest.er1
23783 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023785 (exit $ac_status); } && {
23786 test -z "$ac_c_werror_flag" ||
23787 test ! -s conftest.err
23788 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023789 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023790cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023791/* confdefs.h. */
23792_ACEOF
23793cat confdefs.h >>conftest.$ac_ext
23794cat >>conftest.$ac_ext <<_ACEOF
23795/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023796#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023797#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023798
Martin v. Löwis11437992002-04-12 09:54:03 +000023799int
23800main ()
23801{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023802#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023803 not big endian
23804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023805
23806 ;
23807 return 0;
23808}
23809_ACEOF
23810rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023811if { (ac_try="$ac_compile"
23812case "(($ac_try" in
23813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23814 *) ac_try_echo=$ac_try;;
23815esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023819 grep -v '^ *+' conftest.er1 >conftest.err
23820 rm -f conftest.er1
23821 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023823 (exit $ac_status); } && {
23824 test -z "$ac_c_werror_flag" ||
23825 test ! -s conftest.err
23826 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023827 ac_cv_c_bigendian=yes
23828else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023830sed 's/^/| /' conftest.$ac_ext >&5
23831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023832 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023834
23835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023836else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023838sed 's/^/| /' conftest.$ac_ext >&5
23839
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023840 # It does not; compile a test program.
23841if test "$cross_compiling" = yes; then
23842 # try to guess the endianness by grepping values into an object file
23843 ac_cv_c_bigendian=unknown
23844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023845/* confdefs.h. */
23846_ACEOF
23847cat confdefs.h >>conftest.$ac_ext
23848cat >>conftest.$ac_ext <<_ACEOF
23849/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023850short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23851short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23852void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23853short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23854short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23855void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023856int
23857main ()
23858{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023859 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023860 ;
23861 return 0;
23862}
23863_ACEOF
23864rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023865if { (ac_try="$ac_compile"
23866case "(($ac_try" in
23867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23868 *) ac_try_echo=$ac_try;;
23869esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023873 grep -v '^ *+' conftest.er1 >conftest.err
23874 rm -f conftest.er1
23875 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023877 (exit $ac_status); } && {
23878 test -z "$ac_c_werror_flag" ||
23879 test ! -s conftest.err
23880 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023881 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023882 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000023883fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023884if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23885 if test "$ac_cv_c_bigendian" = unknown; then
23886 ac_cv_c_bigendian=no
23887 else
23888 # finding both strings is unlikely to happen, but who knows?
23889 ac_cv_c_bigendian=unknown
23890 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023891fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023892else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023894sed 's/^/| /' conftest.$ac_ext >&5
23895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023896
Martin v. Löwis11437992002-04-12 09:54:03 +000023897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023898
23899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023900else
23901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023902/* confdefs.h. */
23903_ACEOF
23904cat confdefs.h >>conftest.$ac_ext
23905cat >>conftest.$ac_ext <<_ACEOF
23906/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023907$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023908int
23909main ()
23910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023911
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023912 /* Are we little or big endian? From Harbison&Steele. */
23913 union
23914 {
23915 long int l;
23916 char c[sizeof (long int)];
23917 } u;
23918 u.l = 1;
23919 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023920
23921 ;
23922 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023923}
Martin v. Löwis11437992002-04-12 09:54:03 +000023924_ACEOF
23925rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023926if { (ac_try="$ac_link"
23927case "(($ac_try" in
23928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23929 *) ac_try_echo=$ac_try;;
23930esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023932 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023933 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023935 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023936 { (case "(($ac_try" in
23937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23938 *) ac_try_echo=$ac_try;;
23939esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023941 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023942 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023944 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023945 ac_cv_c_bigendian=no
23946else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023947 echo "$as_me: program exited with status $ac_status" >&5
23948echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023949sed 's/^/| /' conftest.$ac_ext >&5
23950
Martin v. Löwis11437992002-04-12 09:54:03 +000023951( exit $ac_status )
23952ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023954rm -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 +000023955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023956
23957
Martin v. Löwis11437992002-04-12 09:54:03 +000023958fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023959
23960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23961fi
23962{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23963echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23964case $ac_cv_c_bigendian in
23965 yes)
Benjamin Petersona8332062009-09-11 22:36:27 +000023966
23967cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023968#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000023969_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023970 ;;
23971 no)
23972 ;;
23973 *)
23974 { { echo "$as_me:$LINENO: error: unknown endianness
23975presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23976echo "$as_me: error: unknown endianness
23977presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023978 { (exit 1); exit 1; }; } ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023979esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023980
Michael W. Hudson54241132001-12-07 15:38:26 +000023981
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023982# Check whether right shifting a negative integer extends the sign bit
23983# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023984{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23985echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023986if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023987 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023988else
Martin v. Löwis11437992002-04-12 09:54:03 +000023989
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023990if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023991 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023992else
Martin v. Löwis11437992002-04-12 09:54:03 +000023993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023994/* confdefs.h. */
23995_ACEOF
23996cat confdefs.h >>conftest.$ac_ext
23997cat >>conftest.$ac_ext <<_ACEOF
23998/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023999
24000int main()
24001{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024002 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024003}
24004
Martin v. Löwis11437992002-04-12 09:54:03 +000024005_ACEOF
24006rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024007if { (ac_try="$ac_link"
24008case "(($ac_try" in
24009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24010 *) ac_try_echo=$ac_try;;
24011esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024013 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024014 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024016 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024017 { (case "(($ac_try" in
24018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24019 *) ac_try_echo=$ac_try;;
24020esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024022 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024023 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024025 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024026 ac_cv_rshift_extends_sign=yes
24027else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024028 echo "$as_me: program exited with status $ac_status" >&5
24029echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024030sed 's/^/| /' conftest.$ac_ext >&5
24031
Martin v. Löwis11437992002-04-12 09:54:03 +000024032( exit $ac_status )
24033ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024035rm -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 +000024036fi
24037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024038
24039fi
24040
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024041{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24042echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024043if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024044then
Martin v. Löwis11437992002-04-12 09:54:03 +000024045
24046cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024047#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024048_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024049
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024050fi
24051
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024052# check for getc_unlocked and related locking functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024053{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24054echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024055if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024057else
Martin v. Löwis11437992002-04-12 09:54:03 +000024058
24059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024060/* confdefs.h. */
24061_ACEOF
24062cat confdefs.h >>conftest.$ac_ext
24063cat >>conftest.$ac_ext <<_ACEOF
24064/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024065#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024066int
24067main ()
24068{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024069
24070 FILE *f = fopen("/dev/null", "r");
24071 flockfile(f);
24072 getc_unlocked(f);
24073 funlockfile(f);
24074
Martin v. Löwis11437992002-04-12 09:54:03 +000024075 ;
24076 return 0;
24077}
24078_ACEOF
24079rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024080if { (ac_try="$ac_link"
24081case "(($ac_try" in
24082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24083 *) ac_try_echo=$ac_try;;
24084esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024086 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024088 grep -v '^ *+' conftest.er1 >conftest.err
24089 rm -f conftest.er1
24090 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024092 (exit $ac_status); } && {
24093 test -z "$ac_c_werror_flag" ||
24094 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024095 } && test -s conftest$ac_exeext &&
24096 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024097 ac_cv_have_getc_unlocked=yes
24098else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024100sed 's/^/| /' conftest.$ac_ext >&5
24101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024102 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024104
24105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024106 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024107fi
24108
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024109{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24110echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024111if test "$ac_cv_have_getc_unlocked" = yes
24112then
Martin v. Löwis11437992002-04-12 09:54:03 +000024113
24114cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024115#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024116_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024117
24118fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024119
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024120# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024121# save the value of LIBS so we don't actually link Python with readline
24122LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024123
Gregory P. Smith18820942008-09-07 06:24:49 +000024124# On some systems we need to link readline to a termcap compatible
24125# library. NOTE: Keep the precedence of listed libraries synchronised
24126# with setup.py.
24127py_cv_lib_readline=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024128{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24129echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024130for py_libtermcap in "" ncursesw ncurses curses termcap; do
24131 if test -z "$py_libtermcap"; then
24132 READLINE_LIBS="-lreadline"
24133 else
24134 READLINE_LIBS="-lreadline -l$py_libtermcap"
24135 fi
24136 LIBS="$READLINE_LIBS $LIBS_no_readline"
24137 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024138/* confdefs.h. */
24139_ACEOF
24140cat confdefs.h >>conftest.$ac_ext
24141cat >>conftest.$ac_ext <<_ACEOF
24142/* end confdefs.h. */
24143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024144/* Override any GCC internal prototype to avoid an error.
24145 Use char because int might match the return type of a GCC
24146 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024147#ifdef __cplusplus
24148extern "C"
24149#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024150char readline ();
24151int
24152main ()
24153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024154return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024155 ;
24156 return 0;
24157}
24158_ACEOF
24159rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024160if { (ac_try="$ac_link"
24161case "(($ac_try" in
24162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24163 *) ac_try_echo=$ac_try;;
24164esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024166 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024167 ac_status=$?
24168 grep -v '^ *+' conftest.er1 >conftest.err
24169 rm -f conftest.er1
24170 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024172 (exit $ac_status); } && {
24173 test -z "$ac_c_werror_flag" ||
24174 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024175 } && test -s conftest$ac_exeext &&
24176 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024177 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024178else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024179 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024180sed 's/^/| /' conftest.$ac_ext >&5
24181
Gregory P. Smith18820942008-09-07 06:24:49 +000024182
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024184
24185rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024186 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024187 if test $py_cv_lib_readline = yes; then
24188 break
24189 fi
24190done
24191# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24192#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024193if test $py_cv_lib_readline = no; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024194 { echo "$as_me:$LINENO: result: none" >&5
24195echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024196else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024197 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24198echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024199
24200cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024201#define HAVE_LIBREADLINE 1
24202_ACEOF
24203
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024204fi
24205
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024206# check for readline 2.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024207{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24208echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024209if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024210 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024211else
24212 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024213LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024214cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024215/* confdefs.h. */
24216_ACEOF
24217cat confdefs.h >>conftest.$ac_ext
24218cat >>conftest.$ac_ext <<_ACEOF
24219/* end confdefs.h. */
24220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024221/* Override any GCC internal prototype to avoid an error.
24222 Use char because int might match the return type of a GCC
24223 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024224#ifdef __cplusplus
24225extern "C"
24226#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024227char rl_callback_handler_install ();
24228int
24229main ()
24230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024231return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024232 ;
24233 return 0;
24234}
24235_ACEOF
24236rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024237if { (ac_try="$ac_link"
24238case "(($ac_try" in
24239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24240 *) ac_try_echo=$ac_try;;
24241esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024243 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024245 grep -v '^ *+' conftest.er1 >conftest.err
24246 rm -f conftest.er1
24247 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024249 (exit $ac_status); } && {
24250 test -z "$ac_c_werror_flag" ||
24251 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024252 } && test -s conftest$ac_exeext &&
24253 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024254 ac_cv_lib_readline_rl_callback_handler_install=yes
24255else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024256 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024257sed 's/^/| /' conftest.$ac_ext >&5
24258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024259 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024261
24262rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024263 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024264LIBS=$ac_check_lib_save_LIBS
24265fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024266{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24267echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24268if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024269
24270cat >>confdefs.h <<\_ACEOF
24271#define HAVE_RL_CALLBACK 1
24272_ACEOF
24273
24274fi
24275
24276
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024277# check for readline 2.2
24278cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024279/* confdefs.h. */
24280_ACEOF
24281cat confdefs.h >>conftest.$ac_ext
24282cat >>conftest.$ac_ext <<_ACEOF
24283/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024284#include <readline/readline.h>
24285_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024286if { (ac_try="$ac_cpp conftest.$ac_ext"
24287case "(($ac_try" in
24288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24289 *) ac_try_echo=$ac_try;;
24290esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024292 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024293 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024294 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024295 rm -f conftest.er1
24296 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024298 (exit $ac_status); } >/dev/null && {
24299 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24300 test ! -s conftest.err
24301 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024302 have_readline=yes
24303else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024305sed 's/^/| /' conftest.$ac_ext >&5
24306
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024307 have_readline=no
24308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024309
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024310rm -f conftest.err conftest.$ac_ext
24311if test $have_readline = yes
24312then
24313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024314/* confdefs.h. */
24315_ACEOF
24316cat confdefs.h >>conftest.$ac_ext
24317cat >>conftest.$ac_ext <<_ACEOF
24318/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024319#include <readline/readline.h>
24320
24321_ACEOF
24322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024323 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024324
24325cat >>confdefs.h <<\_ACEOF
24326#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24327_ACEOF
24328
24329fi
Ronald Oussoren79a93512010-04-18 19:08:47 +000024330rm -f -r conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000024331
24332 cat >conftest.$ac_ext <<_ACEOF
24333/* confdefs.h. */
24334_ACEOF
24335cat confdefs.h >>conftest.$ac_ext
24336cat >>conftest.$ac_ext <<_ACEOF
24337/* end confdefs.h. */
24338#include <readline/readline.h>
24339
24340_ACEOF
24341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24342 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24343
24344cat >>confdefs.h <<\_ACEOF
24345#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24346_ACEOF
24347
24348fi
Ronald Oussoren79a93512010-04-18 19:08:47 +000024349rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024350
24351fi
24352
Martin v. Löwis0daad592001-09-30 21:09:59 +000024353# check for readline 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024354{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24355echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024356if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024358else
Martin v. Löwis11437992002-04-12 09:54:03 +000024359 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024360LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024361cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024362/* confdefs.h. */
24363_ACEOF
24364cat confdefs.h >>conftest.$ac_ext
24365cat >>conftest.$ac_ext <<_ACEOF
24366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024368/* Override any GCC internal prototype to avoid an error.
24369 Use char because int might match the return type of a GCC
24370 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024371#ifdef __cplusplus
24372extern "C"
24373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024374char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024375int
24376main ()
24377{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024378return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024379 ;
24380 return 0;
24381}
24382_ACEOF
24383rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024384if { (ac_try="$ac_link"
24385case "(($ac_try" in
24386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24387 *) ac_try_echo=$ac_try;;
24388esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024390 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024392 grep -v '^ *+' conftest.er1 >conftest.err
24393 rm -f conftest.er1
24394 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024396 (exit $ac_status); } && {
24397 test -z "$ac_c_werror_flag" ||
24398 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024399 } && test -s conftest$ac_exeext &&
24400 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024401 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024402else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024404sed 's/^/| /' conftest.$ac_ext >&5
24405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024406 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024408
24409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024411LIBS=$ac_check_lib_save_LIBS
24412fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024413{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24414echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24415if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024416
Martin v. Löwis11437992002-04-12 09:54:03 +000024417cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024418#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024419_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024420
Martin v. Löwis0daad592001-09-30 21:09:59 +000024421fi
24422
Michael W. Hudson54241132001-12-07 15:38:26 +000024423
Thomas Wouters89d996e2007-09-08 17:39:28 +000024424# also in 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024425{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24426echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024427if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024428 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024429else
24430 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024431LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024432cat >conftest.$ac_ext <<_ACEOF
24433/* confdefs.h. */
24434_ACEOF
24435cat confdefs.h >>conftest.$ac_ext
24436cat >>conftest.$ac_ext <<_ACEOF
24437/* end confdefs.h. */
24438
24439/* Override any GCC internal prototype to avoid an error.
24440 Use char because int might match the return type of a GCC
24441 builtin and then its argument prototype would still apply. */
24442#ifdef __cplusplus
24443extern "C"
24444#endif
24445char rl_completion_display_matches_hook ();
24446int
24447main ()
24448{
24449return rl_completion_display_matches_hook ();
24450 ;
24451 return 0;
24452}
24453_ACEOF
24454rm -f conftest.$ac_objext conftest$ac_exeext
24455if { (ac_try="$ac_link"
24456case "(($ac_try" in
24457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24458 *) ac_try_echo=$ac_try;;
24459esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024461 (eval "$ac_link") 2>conftest.er1
24462 ac_status=$?
24463 grep -v '^ *+' conftest.er1 >conftest.err
24464 rm -f conftest.er1
24465 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024467 (exit $ac_status); } && {
24468 test -z "$ac_c_werror_flag" ||
24469 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024470 } && test -s conftest$ac_exeext &&
24471 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024472 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24473else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024474 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024475sed 's/^/| /' conftest.$ac_ext >&5
24476
24477 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24478fi
24479
24480rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24481 conftest$ac_exeext conftest.$ac_ext
24482LIBS=$ac_check_lib_save_LIBS
24483fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024484{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24485echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24486if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024487
24488cat >>confdefs.h <<\_ACEOF
24489#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24490_ACEOF
24491
24492fi
24493
24494
Martin v. Löwis0daad592001-09-30 21:09:59 +000024495# check for readline 4.2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024496{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24497echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024498if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024499 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024500else
Martin v. Löwis11437992002-04-12 09:54:03 +000024501 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024502LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024503cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024504/* confdefs.h. */
24505_ACEOF
24506cat confdefs.h >>conftest.$ac_ext
24507cat >>conftest.$ac_ext <<_ACEOF
24508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024510/* Override any GCC internal prototype to avoid an error.
24511 Use char because int might match the return type of a GCC
24512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024513#ifdef __cplusplus
24514extern "C"
24515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024516char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024517int
24518main ()
24519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024520return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024521 ;
24522 return 0;
24523}
24524_ACEOF
24525rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024526if { (ac_try="$ac_link"
24527case "(($ac_try" in
24528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24529 *) ac_try_echo=$ac_try;;
24530esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024532 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024534 grep -v '^ *+' conftest.er1 >conftest.err
24535 rm -f conftest.er1
24536 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024538 (exit $ac_status); } && {
24539 test -z "$ac_c_werror_flag" ||
24540 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024541 } && test -s conftest$ac_exeext &&
24542 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024543 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024544else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024546sed 's/^/| /' conftest.$ac_ext >&5
24547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024548 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024550
24551rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024553LIBS=$ac_check_lib_save_LIBS
24554fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024555{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24556echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24557if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024558
Martin v. Löwis11437992002-04-12 09:54:03 +000024559cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024560#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024561_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024562
Guido van Rossum353ae582001-07-10 16:45:32 +000024563fi
24564
Jack Jansendd19cf82001-12-06 22:36:17 +000024565
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024566# also in readline 4.2
24567cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024568/* confdefs.h. */
24569_ACEOF
24570cat confdefs.h >>conftest.$ac_ext
24571cat >>conftest.$ac_ext <<_ACEOF
24572/* end confdefs.h. */
24573#include <readline/readline.h>
24574_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024575if { (ac_try="$ac_cpp conftest.$ac_ext"
24576case "(($ac_try" in
24577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24578 *) ac_try_echo=$ac_try;;
24579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024581 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024582 ac_status=$?
24583 grep -v '^ *+' conftest.er1 >conftest.err
24584 rm -f conftest.er1
24585 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024587 (exit $ac_status); } >/dev/null && {
24588 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24589 test ! -s conftest.err
24590 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024591 have_readline=yes
24592else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024593 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024594sed 's/^/| /' conftest.$ac_ext >&5
24595
24596 have_readline=no
24597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024598
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024599rm -f conftest.err conftest.$ac_ext
24600if test $have_readline = yes
24601then
24602 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024603/* confdefs.h. */
24604_ACEOF
24605cat confdefs.h >>conftest.$ac_ext
24606cat >>conftest.$ac_ext <<_ACEOF
24607/* end confdefs.h. */
24608#include <readline/readline.h>
24609
24610_ACEOF
24611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24612 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24613
24614cat >>confdefs.h <<\_ACEOF
24615#define HAVE_RL_CATCH_SIGNAL 1
24616_ACEOF
24617
24618fi
Ronald Oussoren79a93512010-04-18 19:08:47 +000024619rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024620
24621fi
24622
Martin v. Löwis82bca632006-02-10 20:49:30 +000024623# End of readline checks: restore LIBS
24624LIBS=$LIBS_no_readline
24625
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024626{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24627echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024628if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024629 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024630else
Martin v. Löwis11437992002-04-12 09:54:03 +000024631
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024632if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024633 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024634else
Martin v. Löwis11437992002-04-12 09:54:03 +000024635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024636/* confdefs.h. */
24637_ACEOF
24638cat confdefs.h >>conftest.$ac_ext
24639cat >>conftest.$ac_ext <<_ACEOF
24640/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024641
24642int main()
24643{
24644 int val1 = nice(1);
24645 if (val1 != -1 && val1 == nice(2))
24646 exit(0);
24647 exit(1);
24648}
24649
Martin v. Löwis11437992002-04-12 09:54:03 +000024650_ACEOF
24651rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024652if { (ac_try="$ac_link"
24653case "(($ac_try" in
24654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24655 *) ac_try_echo=$ac_try;;
24656esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024658 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024659 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024662 { (case "(($ac_try" in
24663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24664 *) ac_try_echo=$ac_try;;
24665esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024667 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024668 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024670 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024671 ac_cv_broken_nice=yes
24672else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024673 echo "$as_me: program exited with status $ac_status" >&5
24674echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024675sed 's/^/| /' conftest.$ac_ext >&5
24676
Martin v. Löwis11437992002-04-12 09:54:03 +000024677( exit $ac_status )
24678ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024680rm -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 +000024681fi
24682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024683
24684fi
24685
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024686{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24687echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024688if test "$ac_cv_broken_nice" = yes
24689then
Martin v. Löwis11437992002-04-12 09:54:03 +000024690
24691cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024692#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024693_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024694
24695fi
24696
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024697{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24698echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024699if test "$cross_compiling" = yes; then
24700 ac_cv_broken_poll=no
24701else
24702 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024703/* confdefs.h. */
24704_ACEOF
24705cat confdefs.h >>conftest.$ac_ext
24706cat >>conftest.$ac_ext <<_ACEOF
24707/* end confdefs.h. */
24708
24709#include <poll.h>
24710
24711int main (void)
24712 {
24713 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24714
24715 close (42);
24716
24717 int poll_test = poll (&poll_struct, 1, 0);
24718
24719 if (poll_test < 0)
24720 {
24721 exit(0);
24722 }
24723 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24724 {
24725 exit(0);
24726 }
24727 else
24728 {
24729 exit(1);
24730 }
24731 }
24732
24733_ACEOF
24734rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024735if { (ac_try="$ac_link"
24736case "(($ac_try" in
24737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24738 *) ac_try_echo=$ac_try;;
24739esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024741 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024742 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024744 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024745 { (case "(($ac_try" in
24746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24747 *) ac_try_echo=$ac_try;;
24748esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024750 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024751 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024753 (exit $ac_status); }; }; then
24754 ac_cv_broken_poll=yes
24755else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024756 echo "$as_me: program exited with status $ac_status" >&5
24757echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024758sed 's/^/| /' conftest.$ac_ext >&5
24759
24760( exit $ac_status )
24761ac_cv_broken_poll=no
24762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024763rm -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 +000024764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024765
24766
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024767{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24768echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024769if test "$ac_cv_broken_poll" = yes
24770then
24771
24772cat >>confdefs.h <<\_ACEOF
24773#define HAVE_BROKEN_POLL 1
24774_ACEOF
24775
24776fi
24777
Brett Cannon43802422005-02-10 20:48:03 +000024778# 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 +000024779# (which is not required by ISO C or UNIX spec) and/or if we support
24780# tzname[]
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024781{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24782echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024783if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024784 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024785else
24786 cat >conftest.$ac_ext <<_ACEOF
24787/* confdefs.h. */
24788_ACEOF
24789cat confdefs.h >>conftest.$ac_ext
24790cat >>conftest.$ac_ext <<_ACEOF
24791/* end confdefs.h. */
24792#include <sys/types.h>
24793#include <$ac_cv_struct_tm>
24794
24795
24796int
24797main ()
24798{
24799static struct tm ac_aggr;
24800if (ac_aggr.tm_zone)
24801return 0;
24802 ;
24803 return 0;
24804}
24805_ACEOF
24806rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024807if { (ac_try="$ac_compile"
24808case "(($ac_try" in
24809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24810 *) ac_try_echo=$ac_try;;
24811esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024813 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024814 ac_status=$?
24815 grep -v '^ *+' conftest.er1 >conftest.err
24816 rm -f conftest.er1
24817 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819 (exit $ac_status); } && {
24820 test -z "$ac_c_werror_flag" ||
24821 test ! -s conftest.err
24822 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024823 ac_cv_member_struct_tm_tm_zone=yes
24824else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024825 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024826sed 's/^/| /' conftest.$ac_ext >&5
24827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024828 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024829/* confdefs.h. */
24830_ACEOF
24831cat confdefs.h >>conftest.$ac_ext
24832cat >>conftest.$ac_ext <<_ACEOF
24833/* end confdefs.h. */
24834#include <sys/types.h>
24835#include <$ac_cv_struct_tm>
24836
24837
24838int
24839main ()
24840{
24841static struct tm ac_aggr;
24842if (sizeof ac_aggr.tm_zone)
24843return 0;
24844 ;
24845 return 0;
24846}
24847_ACEOF
24848rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024849if { (ac_try="$ac_compile"
24850case "(($ac_try" in
24851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24852 *) ac_try_echo=$ac_try;;
24853esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024855 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024856 ac_status=$?
24857 grep -v '^ *+' conftest.er1 >conftest.err
24858 rm -f conftest.er1
24859 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024861 (exit $ac_status); } && {
24862 test -z "$ac_c_werror_flag" ||
24863 test ! -s conftest.err
24864 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024865 ac_cv_member_struct_tm_tm_zone=yes
24866else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024867 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024868sed 's/^/| /' conftest.$ac_ext >&5
24869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024870 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024872
24873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024875
24876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024877fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024878{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24879echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24880if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024881
24882cat >>confdefs.h <<_ACEOF
24883#define HAVE_STRUCT_TM_TM_ZONE 1
24884_ACEOF
24885
24886
24887fi
24888
24889if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24890
24891cat >>confdefs.h <<\_ACEOF
24892#define HAVE_TM_ZONE 1
24893_ACEOF
24894
24895else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024896 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24897echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024898if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024899 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024900else
24901 cat >conftest.$ac_ext <<_ACEOF
24902/* confdefs.h. */
24903_ACEOF
24904cat confdefs.h >>conftest.$ac_ext
24905cat >>conftest.$ac_ext <<_ACEOF
24906/* end confdefs.h. */
24907#include <time.h>
24908
24909int
24910main ()
24911{
24912#ifndef tzname
24913 (void) tzname;
24914#endif
24915
24916 ;
24917 return 0;
24918}
24919_ACEOF
24920rm -f conftest.$ac_objext
24921if { (ac_try="$ac_compile"
24922case "(($ac_try" in
24923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24924 *) ac_try_echo=$ac_try;;
24925esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024927 (eval "$ac_compile") 2>conftest.er1
24928 ac_status=$?
24929 grep -v '^ *+' conftest.er1 >conftest.err
24930 rm -f conftest.er1
24931 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024933 (exit $ac_status); } && {
24934 test -z "$ac_c_werror_flag" ||
24935 test ! -s conftest.err
24936 } && test -s conftest.$ac_objext; then
24937 ac_cv_have_decl_tzname=yes
24938else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024939 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024940sed 's/^/| /' conftest.$ac_ext >&5
24941
24942 ac_cv_have_decl_tzname=no
24943fi
24944
24945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24946fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024947{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24948echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24949if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024950
24951cat >>confdefs.h <<_ACEOF
24952#define HAVE_DECL_TZNAME 1
24953_ACEOF
24954
24955
24956else
24957 cat >>confdefs.h <<_ACEOF
24958#define HAVE_DECL_TZNAME 0
24959_ACEOF
24960
24961
24962fi
24963
24964
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024965 { echo "$as_me:$LINENO: checking for tzname" >&5
24966echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024967if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024968 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024969else
24970 cat >conftest.$ac_ext <<_ACEOF
24971/* confdefs.h. */
24972_ACEOF
24973cat confdefs.h >>conftest.$ac_ext
24974cat >>conftest.$ac_ext <<_ACEOF
24975/* end confdefs.h. */
24976#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024977#if !HAVE_DECL_TZNAME
24978extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024979#endif
24980
24981int
24982main ()
24983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024984return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024985 ;
24986 return 0;
24987}
24988_ACEOF
24989rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024990if { (ac_try="$ac_link"
24991case "(($ac_try" in
24992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24993 *) ac_try_echo=$ac_try;;
24994esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024996 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024997 ac_status=$?
24998 grep -v '^ *+' conftest.er1 >conftest.err
24999 rm -f conftest.er1
25000 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025002 (exit $ac_status); } && {
25003 test -z "$ac_c_werror_flag" ||
25004 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025005 } && test -s conftest$ac_exeext &&
25006 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025007 ac_cv_var_tzname=yes
25008else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025009 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025010sed 's/^/| /' conftest.$ac_ext >&5
25011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025012 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025014
25015rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025016 conftest$ac_exeext conftest.$ac_ext
25017fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025018{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25019echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025020 if test $ac_cv_var_tzname = yes; then
25021
25022cat >>confdefs.h <<\_ACEOF
25023#define HAVE_TZNAME 1
25024_ACEOF
25025
25026 fi
25027fi
25028
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025029
Martin v. Löwis1d459062005-03-14 21:23:33 +000025030# check tzset(3) exists and works like we expect it to
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025031{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25032echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025033if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025034 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025035else
25036
25037if test "$cross_compiling" = yes; then
25038 ac_cv_working_tzset=no
25039else
25040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025041/* confdefs.h. */
25042_ACEOF
25043cat confdefs.h >>conftest.$ac_ext
25044cat >>conftest.$ac_ext <<_ACEOF
25045/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025046
25047#include <stdlib.h>
25048#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025049#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025050
25051#if HAVE_TZNAME
25052extern char *tzname[];
25053#endif
25054
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025055int main()
25056{
Brett Cannon18367812003-09-19 00:59:16 +000025057 /* Note that we need to ensure that not only does tzset(3)
25058 do 'something' with localtime, but it works as documented
25059 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025060 This includes making sure that tzname is set properly if
25061 tm->tm_zone does not exist since it is the alternative way
25062 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025063
25064 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025065 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025066 */
25067
Martin v. Löwis1d459062005-03-14 21:23:33 +000025068 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025069 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25070
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025071 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025072 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025073 if (localtime(&groundhogday)->tm_hour != 0)
25074 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025075#if HAVE_TZNAME
25076 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25077 if (strcmp(tzname[0], "UTC") ||
25078 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25079 exit(1);
25080#endif
Brett Cannon18367812003-09-19 00:59:16 +000025081
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025082 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025083 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025084 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025085 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025086#if HAVE_TZNAME
25087 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25088 exit(1);
25089#endif
Brett Cannon18367812003-09-19 00:59:16 +000025090
25091 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25092 tzset();
25093 if (localtime(&groundhogday)->tm_hour != 11)
25094 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025095#if HAVE_TZNAME
25096 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25097 exit(1);
25098#endif
25099
25100#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025101 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25102 exit(1);
25103 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25104 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025105#endif
Brett Cannon18367812003-09-19 00:59:16 +000025106
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025107 exit(0);
25108}
25109
25110_ACEOF
25111rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025112if { (ac_try="$ac_link"
25113case "(($ac_try" in
25114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25115 *) ac_try_echo=$ac_try;;
25116esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025118 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025119 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025121 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025122 { (case "(($ac_try" in
25123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25124 *) ac_try_echo=$ac_try;;
25125esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025127 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025128 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025130 (exit $ac_status); }; }; then
25131 ac_cv_working_tzset=yes
25132else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025133 echo "$as_me: program exited with status $ac_status" >&5
25134echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025135sed 's/^/| /' conftest.$ac_ext >&5
25136
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025137( exit $ac_status )
25138ac_cv_working_tzset=no
25139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025140rm -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 +000025141fi
25142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025143
25144fi
25145
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025146{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25147echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025148if test "$ac_cv_working_tzset" = yes
25149then
25150
25151cat >>confdefs.h <<\_ACEOF
25152#define HAVE_WORKING_TZSET 1
25153_ACEOF
25154
25155fi
25156
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025157# Look for subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025158{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25159echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025160if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025161 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025162else
25163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025164/* confdefs.h. */
25165_ACEOF
25166cat confdefs.h >>conftest.$ac_ext
25167cat >>conftest.$ac_ext <<_ACEOF
25168/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025169#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025170int
25171main ()
25172{
25173
25174struct stat st;
25175st.st_mtim.tv_nsec = 1;
25176
25177 ;
25178 return 0;
25179}
25180_ACEOF
25181rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025182if { (ac_try="$ac_compile"
25183case "(($ac_try" in
25184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25185 *) ac_try_echo=$ac_try;;
25186esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025188 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025190 grep -v '^ *+' conftest.er1 >conftest.err
25191 rm -f conftest.er1
25192 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025194 (exit $ac_status); } && {
25195 test -z "$ac_c_werror_flag" ||
25196 test ! -s conftest.err
25197 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025198 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025199else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025201sed 's/^/| /' conftest.$ac_ext >&5
25202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025203 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025204fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25207fi
25208
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025209{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25210echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025211if test "$ac_cv_stat_tv_nsec" = yes
25212then
25213
25214cat >>confdefs.h <<\_ACEOF
25215#define HAVE_STAT_TV_NSEC 1
25216_ACEOF
25217
25218fi
25219
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025220# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025221{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25222echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025223if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025224 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025225else
25226 cat >conftest.$ac_ext <<_ACEOF
25227/* confdefs.h. */
25228_ACEOF
25229cat confdefs.h >>conftest.$ac_ext
25230cat >>conftest.$ac_ext <<_ACEOF
25231/* end confdefs.h. */
25232#include <sys/stat.h>
25233int
25234main ()
25235{
25236
25237struct stat st;
25238st.st_mtimespec.tv_nsec = 1;
25239
25240 ;
25241 return 0;
25242}
25243_ACEOF
25244rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025245if { (ac_try="$ac_compile"
25246case "(($ac_try" in
25247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25248 *) ac_try_echo=$ac_try;;
25249esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025252 ac_status=$?
25253 grep -v '^ *+' conftest.er1 >conftest.err
25254 rm -f conftest.er1
25255 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025257 (exit $ac_status); } && {
25258 test -z "$ac_c_werror_flag" ||
25259 test ! -s conftest.err
25260 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025261 ac_cv_stat_tv_nsec2=yes
25262else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025263 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025264sed 's/^/| /' conftest.$ac_ext >&5
25265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025266 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025267fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25270fi
25271
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025272{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25273echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025274if test "$ac_cv_stat_tv_nsec2" = yes
25275then
25276
25277cat >>confdefs.h <<\_ACEOF
25278#define HAVE_STAT_TV_NSEC2 1
25279_ACEOF
25280
25281fi
25282
Jack Jansen666b1e72001-10-31 12:11:48 +000025283# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025284{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25285echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025286if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025287 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025288else
Martin v. Löwis11437992002-04-12 09:54:03 +000025289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025290/* confdefs.h. */
25291_ACEOF
25292cat confdefs.h >>conftest.$ac_ext
25293cat >>conftest.$ac_ext <<_ACEOF
25294/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025295#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025296int
25297main ()
25298{
Jack Jansen666b1e72001-10-31 12:11:48 +000025299
25300 int rtn;
25301 rtn = mvwdelch(0,0,0);
25302
Martin v. Löwis11437992002-04-12 09:54:03 +000025303 ;
25304 return 0;
25305}
25306_ACEOF
25307rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025308if { (ac_try="$ac_compile"
25309case "(($ac_try" in
25310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25311 *) ac_try_echo=$ac_try;;
25312esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025314 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025316 grep -v '^ *+' conftest.er1 >conftest.err
25317 rm -f conftest.er1
25318 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025320 (exit $ac_status); } && {
25321 test -z "$ac_c_werror_flag" ||
25322 test ! -s conftest.err
25323 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025324 ac_cv_mvwdelch_is_expression=yes
25325else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025327sed 's/^/| /' conftest.$ac_ext >&5
25328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025329 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025330fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25333fi
25334
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025335{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25336echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025337
25338if test "$ac_cv_mvwdelch_is_expression" = yes
25339then
Martin v. Löwis11437992002-04-12 09:54:03 +000025340
25341cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025342#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025343_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025344
25345fi
25346
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025347{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25348echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025349if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025350 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025351else
Martin v. Löwis11437992002-04-12 09:54:03 +000025352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025353/* confdefs.h. */
25354_ACEOF
25355cat confdefs.h >>conftest.$ac_ext
25356cat >>conftest.$ac_ext <<_ACEOF
25357/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025358#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025359int
25360main ()
25361{
Jack Jansen666b1e72001-10-31 12:11:48 +000025362
25363 WINDOW *w;
25364 w->_flags = 0;
25365
Martin v. Löwis11437992002-04-12 09:54:03 +000025366 ;
25367 return 0;
25368}
25369_ACEOF
25370rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025371if { (ac_try="$ac_compile"
25372case "(($ac_try" in
25373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25374 *) ac_try_echo=$ac_try;;
25375esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025379 grep -v '^ *+' conftest.er1 >conftest.err
25380 rm -f conftest.er1
25381 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025383 (exit $ac_status); } && {
25384 test -z "$ac_c_werror_flag" ||
25385 test ! -s conftest.err
25386 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025387 ac_cv_window_has_flags=yes
25388else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025390sed 's/^/| /' conftest.$ac_ext >&5
25391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025392 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025393fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25396fi
25397
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025398{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25399echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025400
Jack Jansen666b1e72001-10-31 12:11:48 +000025401
25402if test "$ac_cv_window_has_flags" = yes
25403then
Martin v. Löwis11437992002-04-12 09:54:03 +000025404
25405cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025406#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025407_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025408
25409fi
25410
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025411{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25412echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025413cat >conftest.$ac_ext <<_ACEOF
25414/* confdefs.h. */
25415_ACEOF
25416cat confdefs.h >>conftest.$ac_ext
25417cat >>conftest.$ac_ext <<_ACEOF
25418/* end confdefs.h. */
25419#include <curses.h>
25420int
25421main ()
25422{
25423void *x=is_term_resized
25424 ;
25425 return 0;
25426}
25427_ACEOF
25428rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025429if { (ac_try="$ac_compile"
25430case "(($ac_try" in
25431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25432 *) ac_try_echo=$ac_try;;
25433esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025435 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025436 ac_status=$?
25437 grep -v '^ *+' conftest.er1 >conftest.err
25438 rm -f conftest.er1
25439 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025441 (exit $ac_status); } && {
25442 test -z "$ac_c_werror_flag" ||
25443 test ! -s conftest.err
25444 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025445
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025446cat >>confdefs.h <<\_ACEOF
25447#define HAVE_CURSES_IS_TERM_RESIZED 1
25448_ACEOF
25449
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025450 { echo "$as_me:$LINENO: result: yes" >&5
25451echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025452else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025453 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025454sed 's/^/| /' conftest.$ac_ext >&5
25455
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025456 { echo "$as_me:$LINENO: result: no" >&5
25457echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025458
25459fi
25460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25462
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025463{ echo "$as_me:$LINENO: checking for resize_term" >&5
25464echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025465cat >conftest.$ac_ext <<_ACEOF
25466/* confdefs.h. */
25467_ACEOF
25468cat confdefs.h >>conftest.$ac_ext
25469cat >>conftest.$ac_ext <<_ACEOF
25470/* end confdefs.h. */
25471#include <curses.h>
25472int
25473main ()
25474{
25475void *x=resize_term
25476 ;
25477 return 0;
25478}
25479_ACEOF
25480rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025481if { (ac_try="$ac_compile"
25482case "(($ac_try" in
25483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25484 *) ac_try_echo=$ac_try;;
25485esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025487 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025488 ac_status=$?
25489 grep -v '^ *+' conftest.er1 >conftest.err
25490 rm -f conftest.er1
25491 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025493 (exit $ac_status); } && {
25494 test -z "$ac_c_werror_flag" ||
25495 test ! -s conftest.err
25496 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025497
25498cat >>confdefs.h <<\_ACEOF
25499#define HAVE_CURSES_RESIZE_TERM 1
25500_ACEOF
25501
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025502 { echo "$as_me:$LINENO: result: yes" >&5
25503echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025504else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025505 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025506sed 's/^/| /' conftest.$ac_ext >&5
25507
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025508 { echo "$as_me:$LINENO: result: no" >&5
25509echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025510
25511fi
25512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25514
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025515{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25516echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025517cat >conftest.$ac_ext <<_ACEOF
25518/* confdefs.h. */
25519_ACEOF
25520cat confdefs.h >>conftest.$ac_ext
25521cat >>conftest.$ac_ext <<_ACEOF
25522/* end confdefs.h. */
25523#include <curses.h>
25524int
25525main ()
25526{
25527void *x=resizeterm
25528 ;
25529 return 0;
25530}
25531_ACEOF
25532rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025533if { (ac_try="$ac_compile"
25534case "(($ac_try" in
25535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25536 *) ac_try_echo=$ac_try;;
25537esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025539 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025540 ac_status=$?
25541 grep -v '^ *+' conftest.er1 >conftest.err
25542 rm -f conftest.er1
25543 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025545 (exit $ac_status); } && {
25546 test -z "$ac_c_werror_flag" ||
25547 test ! -s conftest.err
25548 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025549
25550cat >>confdefs.h <<\_ACEOF
25551#define HAVE_CURSES_RESIZETERM 1
25552_ACEOF
25553
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025554 { echo "$as_me:$LINENO: result: yes" >&5
25555echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025556else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025557 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025558sed 's/^/| /' conftest.$ac_ext >&5
25559
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025560 { echo "$as_me:$LINENO: result: no" >&5
25561echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025562
25563fi
25564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25566
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025567{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25568echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025569
25570if test -r /dev/ptmx
25571then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025572 { echo "$as_me:$LINENO: result: yes" >&5
25573echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025574
25575cat >>confdefs.h <<\_ACEOF
25576#define HAVE_DEV_PTMX 1
25577_ACEOF
25578
Thomas Wouters89f507f2006-12-13 04:49:30 +000025579else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025580 { echo "$as_me:$LINENO: result: no" >&5
25581echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025582fi
25583
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025584{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25585echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025586
25587if test -r /dev/ptc
25588then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025589 { echo "$as_me:$LINENO: result: yes" >&5
25590echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025591
25592cat >>confdefs.h <<\_ACEOF
25593#define HAVE_DEV_PTC 1
25594_ACEOF
25595
Thomas Wouters89f507f2006-12-13 04:49:30 +000025596else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025597 { echo "$as_me:$LINENO: result: no" >&5
25598echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025599fi
25600
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025601{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25602echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025603if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025604 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025605See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025606echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025607See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025608 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025609else
25610 cat >conftest.$ac_ext <<_ACEOF
25611/* confdefs.h. */
25612_ACEOF
25613cat confdefs.h >>conftest.$ac_ext
25614cat >>conftest.$ac_ext <<_ACEOF
25615/* end confdefs.h. */
25616#include <stdio.h>
25617#include <stddef.h>
25618#include <string.h>
25619
Christian Heimes2c181612007-12-17 20:04:13 +000025620#ifdef HAVE_SYS_TYPES_H
25621#include <sys/types.h>
25622#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025623
25624#ifdef HAVE_SSIZE_T
25625typedef ssize_t Py_ssize_t;
25626#elif SIZEOF_VOID_P == SIZEOF_LONG
25627typedef long Py_ssize_t;
25628#else
25629typedef int Py_ssize_t;
25630#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025631
Christian Heimes2c181612007-12-17 20:04:13 +000025632int main()
25633{
25634 char buffer[256];
25635
Thomas Wouters477c8d52006-05-27 19:21:47 +000025636 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25637 return 1;
25638
Thomas Wouters89f507f2006-12-13 04:49:30 +000025639 if (strcmp(buffer, "123"))
25640 return 1;
25641
25642 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25643 return 1;
25644
25645 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025646 return 1;
25647
25648 return 0;
25649}
25650_ACEOF
25651rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025652if { (ac_try="$ac_link"
25653case "(($ac_try" in
25654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25655 *) ac_try_echo=$ac_try;;
25656esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025658 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025659 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025662 { (case "(($ac_try" in
25663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25664 *) ac_try_echo=$ac_try;;
25665esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025667 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025668 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025670 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025671 { echo "$as_me:$LINENO: result: yes" >&5
25672echo "${ECHO_T}yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025673
25674cat >>confdefs.h <<\_ACEOF
25675#define PY_FORMAT_SIZE_T "z"
25676_ACEOF
25677
25678else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025679 echo "$as_me: program exited with status $ac_status" >&5
25680echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025681sed 's/^/| /' conftest.$ac_ext >&5
25682
25683( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025684{ echo "$as_me:$LINENO: result: no" >&5
25685echo "${ECHO_T}no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000025688fi
25689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025690
25691
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025692{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25693echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025694if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025695 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025696else
Martin v. Löwis11437992002-04-12 09:54:03 +000025697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025698/* confdefs.h. */
25699_ACEOF
25700cat confdefs.h >>conftest.$ac_ext
25701cat >>conftest.$ac_ext <<_ACEOF
25702/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025703
25704#ifdef HAVE_SYS_TYPES_H
25705#include <sys/types.h>
25706#endif
25707#ifdef HAVE_SYS_SOCKET_H
25708#include <sys/socket.h>
25709#endif
25710
25711
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025712typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025713int
25714main ()
25715{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025716if ((ac__type_new_ *) 0)
25717 return 0;
25718if (sizeof (ac__type_new_))
25719 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025720 ;
25721 return 0;
25722}
25723_ACEOF
25724rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025725if { (ac_try="$ac_compile"
25726case "(($ac_try" in
25727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25728 *) ac_try_echo=$ac_try;;
25729esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025733 grep -v '^ *+' conftest.er1 >conftest.err
25734 rm -f conftest.er1
25735 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025737 (exit $ac_status); } && {
25738 test -z "$ac_c_werror_flag" ||
25739 test ! -s conftest.err
25740 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025741 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025742else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025744sed 's/^/| /' conftest.$ac_ext >&5
25745
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025746 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025748
25749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025750fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025751{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25752echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25753if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025754 :
25755else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025756
Martin v. Löwis01c04012002-11-11 14:58:44 +000025757cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025758#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025759_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025760
25761fi
25762
Michael W. Hudson54241132001-12-07 15:38:26 +000025763
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025764{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25765echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025766if test "$cross_compiling" = yes; then
25767 ac_cv_broken_mbstowcs=no
25768else
25769 cat >conftest.$ac_ext <<_ACEOF
25770/* confdefs.h. */
25771_ACEOF
25772cat confdefs.h >>conftest.$ac_ext
25773cat >>conftest.$ac_ext <<_ACEOF
25774/* end confdefs.h. */
25775
25776#include<stdlib.h>
25777int main() {
25778 size_t len = -1;
25779 const char *str = "text";
25780 len = mbstowcs(NULL, str, 0);
25781 return (len != 4);
25782}
25783
25784_ACEOF
25785rm -f conftest$ac_exeext
25786if { (ac_try="$ac_link"
25787case "(($ac_try" in
25788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25789 *) ac_try_echo=$ac_try;;
25790esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025792 (eval "$ac_link") 2>&5
25793 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025795 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25796 { (case "(($ac_try" in
25797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25798 *) ac_try_echo=$ac_try;;
25799esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025801 (eval "$ac_try") 2>&5
25802 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025804 (exit $ac_status); }; }; then
25805 ac_cv_broken_mbstowcs=no
25806else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025807 echo "$as_me: program exited with status $ac_status" >&5
25808echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025809sed 's/^/| /' conftest.$ac_ext >&5
25810
25811( exit $ac_status )
25812ac_cv_broken_mbstowcs=yes
25813fi
25814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25815fi
25816
25817
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025818{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25819echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025820if test "$ac_cv_broken_mbstowcs" = yes
25821then
25822
25823cat >>confdefs.h <<\_ACEOF
25824#define HAVE_BROKEN_MBSTOWCS 1
25825_ACEOF
25826
25827fi
25828
Antoine Pitroub52ec782009-01-25 16:34:23 +000025829# Check for --with-computed-gotos
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025830{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25831echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025832
25833# Check whether --with-computed-gotos was given.
25834if test "${with_computed_gotos+set}" = set; then
25835 withval=$with_computed_gotos;
25836if test "$withval" != no
25837then
25838
25839cat >>confdefs.h <<\_ACEOF
25840#define USE_COMPUTED_GOTOS 1
25841_ACEOF
25842
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025843 { echo "$as_me:$LINENO: result: yes" >&5
25844echo "${ECHO_T}yes" >&6; }
25845else { echo "$as_me:$LINENO: result: no" >&5
25846echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025847fi
25848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025849 { echo "$as_me:$LINENO: result: no" >&5
25850echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025851fi
25852
25853
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000025854if test $ac_sys_system = Darwin
25855then
25856 LIBS="$LIBS -framework CoreFoundation"
25857fi
25858
25859
Antoine Pitroub52ec782009-01-25 16:34:23 +000025860
Michael W. Hudson54241132001-12-07 15:38:26 +000025861
25862
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025863for h in `(cd $srcdir;echo Python/thread_*.h)`
25864do
25865 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25866done
25867
Michael W. Hudson54241132001-12-07 15:38:26 +000025868
Neal Norwitzd24499d2005-12-18 21:36:39 +000025869SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025870{ echo "$as_me:$LINENO: checking for build directories" >&5
25871echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025872for dir in $SRCDIRS; do
25873 if test ! -d $dir; then
25874 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025875 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025876done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025877{ echo "$as_me:$LINENO: result: done" >&5
25878echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025879
Guido van Rossum627b2d71993-12-24 10:39:16 +000025880# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025881ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025882
Martin v. Löwis11437992002-04-12 09:54:03 +000025883cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025884# This file is a shell script that caches the results of configure
25885# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025886# scripts and configure runs, see configure's option --config-cache.
25887# It is not useful on other systems. If it contains results you don't
25888# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025889#
Martin v. Löwis11437992002-04-12 09:54:03 +000025890# config.status only pays attention to the cache file if you give it
25891# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025892#
Skip Montanaro6dead952003-09-25 14:50:04 +000025893# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025894# loading this file, other *unset* `ac_cv_foo' will be assigned the
25895# following values.
25896
25897_ACEOF
25898
Guido van Rossumf78abae1997-01-21 22:02:36 +000025899# The following way of writing the cache mishandles newlines in values,
25900# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025901# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025902# Ultrix sh set writes to stderr and can't be redirected directly,
25903# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025904(
25905 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25906 eval ac_val=\$$ac_var
25907 case $ac_val in #(
25908 *${as_nl}*)
25909 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025910 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25911echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025912 esac
25913 case $ac_var in #(
25914 _ | IFS | as_nl) ;; #(
25915 *) $as_unset $ac_var ;;
25916 esac ;;
25917 esac
25918 done
25919
Martin v. Löwis11437992002-04-12 09:54:03 +000025920 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025921 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25922 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025923 # `set' does not quote correctly, so add quotes (double-quote
25924 # substitution turns \\\\ into \\, and sed turns \\ into \).
25925 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025926 "s/'/'\\\\''/g;
25927 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025928 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025929 *)
25930 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025931 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025932 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025933 esac |
25934 sort
25935) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025936 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025937 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025938 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025939 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025940 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25941 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025942 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25943 :end' >>confcache
25944if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25945 if test -w "$cache_file"; then
25946 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025947 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25948echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025949 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025950 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025951 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25952echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025953 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025954fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025955rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025957test "x$prefix" = xNONE && prefix=$ac_default_prefix
25958# Let make expand exec_prefix.
25959test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025960
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025961DEFS=-DHAVE_CONFIG_H
25962
Skip Montanaro6dead952003-09-25 14:50:04 +000025963ac_libobjs=
25964ac_ltlibobjs=
25965for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25966 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025967 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025968 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025969 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25970 # will be set to the directory where LIBOBJS objects are built.
25971 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25972 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025973done
25974LIBOBJS=$ac_libobjs
25975
25976LTLIBOBJS=$ac_ltlibobjs
25977
25978
Martin v. Löwis11437992002-04-12 09:54:03 +000025979
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025980: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025981ac_clean_files_save=$ac_clean_files
25982ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025983{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25984echo "$as_me: creating $CONFIG_STATUS" >&6;}
25985cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025986#! $SHELL
25987# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025988# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025989# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025990# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025991
Martin v. Löwis11437992002-04-12 09:54:03 +000025992debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025993ac_cs_recheck=false
25994ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025995SHELL=\${CONFIG_SHELL-$SHELL}
25996_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025997
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025998cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025999## --------------------- ##
26000## M4sh Initialization. ##
26001## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026003# Be more Bourne compatible
26004DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026005if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26006 emulate sh
26007 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026008 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026009 # is contrary to our usage. Disable this feature.
26010 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026011 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026012else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026013 case `(set -o) 2>/dev/null` in
26014 *posix*) set -o posix ;;
26015esac
26016
Michael W. Hudson54241132001-12-07 15:38:26 +000026017fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026018
26019
Michael W. Hudson54241132001-12-07 15:38:26 +000026020
Michael W. Hudson54241132001-12-07 15:38:26 +000026021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026022# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026023# Avoid depending upon Character Ranges.
26024as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26025as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26026as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26027as_cr_digits='0123456789'
26028as_cr_alnum=$as_cr_Letters$as_cr_digits
26029
26030# The user is always right.
26031if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026032 echo "#! /bin/sh" >conf$$.sh
26033 echo "exit 0" >>conf$$.sh
26034 chmod +x conf$$.sh
26035 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26036 PATH_SEPARATOR=';'
26037 else
26038 PATH_SEPARATOR=:
26039 fi
26040 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026041fi
26042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026043# Support unset when possible.
26044if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26045 as_unset=unset
26046else
26047 as_unset=false
26048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026050
26051# IFS
26052# We need space, tab and new line, in precisely that order. Quoting is
26053# there to prevent editors from complaining about space-tab.
26054# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26055# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026056as_nl='
26057'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026058IFS=" "" $as_nl"
26059
26060# Find who we are. Look in the path if we contain no directory separator.
26061case $0 in
26062 *[\\/]* ) as_myself=$0 ;;
26063 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026064for as_dir in $PATH
26065do
26066 IFS=$as_save_IFS
26067 test -z "$as_dir" && as_dir=.
26068 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26069done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026070IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026072 ;;
26073esac
26074# We did not find ourselves, most probably we were run as `sh COMMAND'
26075# in which case we are not to be found in the path.
26076if test "x$as_myself" = x; then
26077 as_myself=$0
26078fi
26079if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026080 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026081 { (exit 1); exit 1; }
26082fi
26083
26084# Work around bugs in pre-3.0 UWIN ksh.
26085for as_var in ENV MAIL MAILPATH
26086do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26087done
26088PS1='$ '
26089PS2='> '
26090PS4='+ '
26091
26092# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026093for as_var in \
26094 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26095 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26096 LC_TELEPHONE LC_TIME
26097do
26098 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26099 eval $as_var=C; export $as_var
26100 else
26101 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26102 fi
26103done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026104
26105# Required to use basename.
26106if expr a : '\(a\)' >/dev/null 2>&1 &&
26107 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26108 as_expr=expr
26109else
26110 as_expr=false
26111fi
26112
26113if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26114 as_basename=basename
26115else
26116 as_basename=false
26117fi
26118
26119
26120# Name of the executable.
26121as_me=`$as_basename -- "$0" ||
26122$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26123 X"$0" : 'X\(//\)$' \| \
26124 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026125echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026126 sed '/^.*\/\([^/][^/]*\)\/*$/{
26127 s//\1/
26128 q
26129 }
26130 /^X\/\(\/\/\)$/{
26131 s//\1/
26132 q
26133 }
26134 /^X\/\(\/\).*/{
26135 s//\1/
26136 q
26137 }
26138 s/.*/./; q'`
26139
26140# CDPATH.
26141$as_unset CDPATH
26142
26143
26144
Martin v. Löwis11437992002-04-12 09:54:03 +000026145 as_lineno_1=$LINENO
26146 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026147 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026148 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026149
Martin v. Löwis11437992002-04-12 09:54:03 +000026150 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26151 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026152 # line-number line after each line using $LINENO; the second 'sed'
26153 # does the real work. The second script uses 'N' to pair each
26154 # line-number line with the line containing $LINENO, and appends
26155 # trailing '-' during substitution so that $LINENO is not a special
26156 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026157 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026158 # scripts with optimization help from Paolo Bonzini. Blame Lee
26159 # E. McMahon (1931-1989) for sed's syntax. :-)
26160 sed -n '
26161 p
26162 /[$]LINENO/=
26163 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026164 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026165 s/[$]LINENO.*/&-/
26166 t lineno
26167 b
26168 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026169 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026170 :loop
26171 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026172 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026173 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026174 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026175 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026176 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026177 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026178
Martin v. Löwis11437992002-04-12 09:54:03 +000026179 # Don't try to exec as it changes $[0], causing all sort of problems
26180 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026181 # original and so on. Autoconf is especially sensitive to this).
26182 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026183 # Exit status is that of the last command.
26184 exit
26185}
26186
26187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026188if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26189 as_dirname=dirname
26190else
26191 as_dirname=false
26192fi
26193
26194ECHO_C= ECHO_N= ECHO_T=
26195case `echo -n x` in
26196-n*)
26197 case `echo 'x\c'` in
26198 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26199 *) ECHO_C='\c';;
26200 esac;;
26201*)
26202 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026203esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026205if expr a : '\(a\)' >/dev/null 2>&1 &&
26206 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026207 as_expr=expr
26208else
26209 as_expr=false
26210fi
26211
26212rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026213if test -d conf$$.dir; then
26214 rm -f conf$$.dir/conf$$.file
26215else
26216 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026217 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026218fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026219echo >conf$$.file
26220if ln -s conf$$.file conf$$ 2>/dev/null; then
26221 as_ln_s='ln -s'
26222 # ... but there are two gotchas:
26223 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26224 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26225 # In both cases, we have to default to `cp -p'.
26226 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026227 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026228elif ln conf$$.file conf$$ 2>/dev/null; then
26229 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026230else
26231 as_ln_s='cp -p'
26232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026233rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26234rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026235
Skip Montanaro6dead952003-09-25 14:50:04 +000026236if mkdir -p . 2>/dev/null; then
26237 as_mkdir_p=:
26238else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026239 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026240 as_mkdir_p=false
26241fi
26242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026243if test -x / >/dev/null 2>&1; then
26244 as_test_x='test -x'
26245else
26246 if ls -dL / >/dev/null 2>&1; then
26247 as_ls_L_option=L
26248 else
26249 as_ls_L_option=
26250 fi
26251 as_test_x='
26252 eval sh -c '\''
26253 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026254 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026255 else
26256 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026257 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026258 esac;
26259 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26260 ???[sx]*):;;*)false;;esac;fi
26261 '\'' sh
26262 '
26263fi
26264as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026265
26266# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026267as_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 +000026268
26269# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026270as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026271
26272
Martin v. Löwis11437992002-04-12 09:54:03 +000026273exec 6>&1
26274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026275# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026276# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026277# values after options handling.
26278ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026279This file was extended by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026280generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026281
26282 CONFIG_FILES = $CONFIG_FILES
26283 CONFIG_HEADERS = $CONFIG_HEADERS
26284 CONFIG_LINKS = $CONFIG_LINKS
26285 CONFIG_COMMANDS = $CONFIG_COMMANDS
26286 $ $0 $@
26287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026288on `(hostname || uname -n) 2>/dev/null | sed 1q`
26289"
26290
Martin v. Löwis11437992002-04-12 09:54:03 +000026291_ACEOF
26292
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026293cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026294# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026295config_files="$ac_config_files"
26296config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026298_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026299
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026300cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026301ac_cs_usage="\
26302\`$as_me' instantiates files from templates according to the
26303current configuration.
26304
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026305Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026306
26307 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026308 -V, --version print version number and configuration settings, then exit
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026309 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026310 -d, --debug don't remove temporary files
26311 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026312 --file=FILE[:TEMPLATE]
26313 instantiate the configuration file FILE
26314 --header=FILE[:TEMPLATE]
26315 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026316
26317Configuration files:
26318$config_files
26319
26320Configuration headers:
26321$config_headers
26322
26323Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026325_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026326cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026327ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026328python config.status 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026329configured by $0, generated by GNU Autoconf 2.61,
26330 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026331
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026332Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026333This config.status script is free software; the Free Software Foundation
26334gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026335
26336ac_pwd='$ac_pwd'
26337srcdir='$srcdir'
26338INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026339_ACEOF
26340
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026341cat >>$CONFIG_STATUS <<\_ACEOF
26342# If no file are specified by the user, then we need to provide default
26343# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026344ac_need_defaults=:
26345while test $# != 0
26346do
26347 case $1 in
26348 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026349 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26350 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026351 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026352 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026353 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026354 ac_option=$1
26355 ac_optarg=$2
26356 ac_shift=shift
26357 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026358 esac
26359
Skip Montanaro6dead952003-09-25 14:50:04 +000026360 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026361 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026362 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26363 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026364 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026365 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026366 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026367 debug=: ;;
26368 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026369 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026370 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026371 ac_need_defaults=false;;
26372 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026373 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026374 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026375 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026376 --he | --h)
26377 # Conflict between --help and --header
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026378 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026379Try \`$0 --help' for more information." >&2
26380 { (exit 1); exit 1; }; };;
26381 --help | --hel | -h )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026382 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026383 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26384 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26385 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026386
26387 # This is an error.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026388 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026389Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026390 { (exit 1); exit 1; }; } ;;
26391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026392 *) ac_config_targets="$ac_config_targets $1"
26393 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026394
26395 esac
26396 shift
26397done
26398
Skip Montanaro6dead952003-09-25 14:50:04 +000026399ac_configure_extra_args=
26400
26401if $ac_cs_silent; then
26402 exec 6>/dev/null
26403 ac_configure_extra_args="$ac_configure_extra_args --silent"
26404fi
26405
26406_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026407cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026408if \$ac_cs_recheck; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026409 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26410 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026411 export CONFIG_SHELL
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026412 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026413fi
26414
Martin v. Löwis11437992002-04-12 09:54:03 +000026415_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026416cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026417exec 5>>config.log
26418{
26419 echo
26420 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26421## Running $as_me. ##
26422_ASBOX
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026423 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026424} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026426_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026427cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026428_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026429
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026430cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026431
26432# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026433for ac_config_target in $ac_config_targets
26434do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026435 case $ac_config_target in
26436 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26437 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26438 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026439 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26440 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026441 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26442 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026443 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026444
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026445 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26446echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026447 { (exit 1); exit 1; }; };;
26448 esac
26449done
26450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451
Martin v. Löwis11437992002-04-12 09:54:03 +000026452# If the user did not use the arguments to specify the items to instantiate,
26453# then the envvar interface is used. Set only those that are not.
26454# We use the long form for the default assignment because of an extremely
26455# bizarre bug on SunOS 4.1.3.
26456if $ac_need_defaults; then
26457 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26458 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26459fi
26460
Skip Montanaro6dead952003-09-25 14:50:04 +000026461# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026462# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026463# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026464# Hook for its removal unless debugging.
26465# Note that there is a small window in which the directory will not be cleaned:
26466# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026467$debug ||
26468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026469 tmp=
26470 trap 'exit_status=$?
26471 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26472' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026473 trap '{ (exit 1); exit 1; }' 1 2 13 15
26474}
Martin v. Löwis11437992002-04-12 09:54:03 +000026475# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026476
Martin v. Löwis11437992002-04-12 09:54:03 +000026477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026478 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026479 test -n "$tmp" && test -d "$tmp"
26480} ||
26481{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026482 tmp=./conf$$-$RANDOM
26483 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026484} ||
26485{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026486 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026487 { (exit 1); exit 1; }
26488}
26489
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026490#
26491# Set up the sed scripts for CONFIG_FILES section.
26492#
26493
26494# No need to generate the scripts if there are no CONFIG_FILES.
26495# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026496if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026497
26498_ACEOF
26499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026500
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026502ac_delim='%!_!# '
26503for ac_last_try in false false false false false :; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026504 cat >conf$$subs.sed <<_ACEOF
26505SHELL!$SHELL$ac_delim
26506PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26507PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26508PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26509PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26510PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26511PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26512exec_prefix!$exec_prefix$ac_delim
26513prefix!$prefix$ac_delim
26514program_transform_name!$program_transform_name$ac_delim
26515bindir!$bindir$ac_delim
26516sbindir!$sbindir$ac_delim
26517libexecdir!$libexecdir$ac_delim
26518datarootdir!$datarootdir$ac_delim
26519datadir!$datadir$ac_delim
26520sysconfdir!$sysconfdir$ac_delim
26521sharedstatedir!$sharedstatedir$ac_delim
26522localstatedir!$localstatedir$ac_delim
26523includedir!$includedir$ac_delim
26524oldincludedir!$oldincludedir$ac_delim
26525docdir!$docdir$ac_delim
26526infodir!$infodir$ac_delim
26527htmldir!$htmldir$ac_delim
26528dvidir!$dvidir$ac_delim
26529pdfdir!$pdfdir$ac_delim
26530psdir!$psdir$ac_delim
26531libdir!$libdir$ac_delim
26532localedir!$localedir$ac_delim
26533mandir!$mandir$ac_delim
26534DEFS!$DEFS$ac_delim
26535ECHO_C!$ECHO_C$ac_delim
26536ECHO_N!$ECHO_N$ac_delim
26537ECHO_T!$ECHO_T$ac_delim
26538LIBS!$LIBS$ac_delim
26539build_alias!$build_alias$ac_delim
26540host_alias!$host_alias$ac_delim
26541target_alias!$target_alias$ac_delim
26542VERSION!$VERSION$ac_delim
26543SOVERSION!$SOVERSION$ac_delim
26544CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26545UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26546ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Benjamin Petersone7e59c22010-03-23 21:05:56 +000026547LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
26548LIPO_64BIT_FLAGS!$LIPO_64BIT_FLAGS$ac_delim
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026549PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26550PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26551PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26552PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26553PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26554FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26555FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26556FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26557FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26558FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26559MACHDEP!$MACHDEP$ac_delim
26560SGI_ABI!$SGI_ABI$ac_delim
26561CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26562EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26563CC!$CC$ac_delim
26564CFLAGS!$CFLAGS$ac_delim
26565LDFLAGS!$LDFLAGS$ac_delim
26566CPPFLAGS!$CPPFLAGS$ac_delim
26567ac_ct_CC!$ac_ct_CC$ac_delim
26568EXEEXT!$EXEEXT$ac_delim
26569OBJEXT!$OBJEXT$ac_delim
26570CXX!$CXX$ac_delim
26571MAINCC!$MAINCC$ac_delim
26572CPP!$CPP$ac_delim
26573GREP!$GREP$ac_delim
26574EGREP!$EGREP$ac_delim
26575BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26576LIBRARY!$LIBRARY$ac_delim
26577LDLIBRARY!$LDLIBRARY$ac_delim
26578DLLLIBRARY!$DLLLIBRARY$ac_delim
26579BLDLIBRARY!$BLDLIBRARY$ac_delim
26580LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26581INSTSONAME!$INSTSONAME$ac_delim
26582RUNSHARED!$RUNSHARED$ac_delim
26583LINKCC!$LINKCC$ac_delim
26584GNULD!$GNULD$ac_delim
26585RANLIB!$RANLIB$ac_delim
26586AR!$AR$ac_delim
26587ARFLAGS!$ARFLAGS$ac_delim
26588SVNVERSION!$SVNVERSION$ac_delim
26589INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26590INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26591INSTALL_DATA!$INSTALL_DATA$ac_delim
26592LN!$LN$ac_delim
26593OPT!$OPT$ac_delim
26594BASECFLAGS!$BASECFLAGS$ac_delim
26595UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26596OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26597LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26598SO!$SO$ac_delim
26599LDSHARED!$LDSHARED$ac_delim
26600BLDSHARED!$BLDSHARED$ac_delim
26601CCSHARED!$CCSHARED$ac_delim
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026602_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026603
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026604 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026605 break
26606 elif $ac_last_try; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026607 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26608echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026609 { (exit 1); exit 1; }; }
26610 else
26611 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026612 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026613done
26614
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026615ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26616if test -n "$ac_eof"; then
26617 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26618 ac_eof=`expr $ac_eof + 1`
26619fi
26620
26621cat >>$CONFIG_STATUS <<_ACEOF
26622cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26623/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026624_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026625sed '
26626s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26627s/^/s,@/; s/!/@,|#_!!_#|/
26628:n
26629t n
26630s/'"$ac_delim"'$/,g/; t
26631s/$/\\/; p
26632N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26633' >>$CONFIG_STATUS <conf$$subs.sed
26634rm -f conf$$subs.sed
26635cat >>$CONFIG_STATUS <<_ACEOF
26636CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026637_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026638
26639
26640ac_delim='%!_!# '
26641for ac_last_try in false false false false false :; do
26642 cat >conf$$subs.sed <<_ACEOF
Benjamin Petersone7e59c22010-03-23 21:05:56 +000026643LINKFORSHARED!$LINKFORSHARED$ac_delim
26644CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026645SHLIBS!$SHLIBS$ac_delim
26646USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26647SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26648USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26649LDLAST!$LDLAST$ac_delim
26650THREADOBJ!$THREADOBJ$ac_delim
26651DLINCLDIR!$DLINCLDIR$ac_delim
26652DYNLOADFILE!$DYNLOADFILE$ac_delim
26653MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26654TRUE!$TRUE$ac_delim
26655LIBOBJS!$LIBOBJS$ac_delim
26656HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26657HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26658HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26659HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26660HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26661LIBM!$LIBM$ac_delim
26662LIBC!$LIBC$ac_delim
26663THREADHEADERS!$THREADHEADERS$ac_delim
26664SRCDIRS!$SRCDIRS$ac_delim
26665LTLIBOBJS!$LTLIBOBJS$ac_delim
26666_ACEOF
26667
Benjamin Petersone7e59c22010-03-23 21:05:56 +000026668 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026669 break
26670 elif $ac_last_try; then
26671 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26672echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026673 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026674 else
26675 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26676 fi
26677done
26678
26679ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26680if test -n "$ac_eof"; then
26681 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26682 ac_eof=`expr $ac_eof + 1`
26683fi
26684
26685cat >>$CONFIG_STATUS <<_ACEOF
26686cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26687/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026688_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026689sed '
26690s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26691s/^/s,@/; s/!/@,|#_!!_#|/
26692:n
26693t n
26694s/'"$ac_delim"'$/,g/; t
26695s/$/\\/; p
26696N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26697' >>$CONFIG_STATUS <conf$$subs.sed
26698rm -f conf$$subs.sed
26699cat >>$CONFIG_STATUS <<_ACEOF
26700:end
26701s/|#_!!_#|//g
26702CEOF$ac_eof
26703_ACEOF
26704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026705
26706# VPATH may cause trouble with some makes, so we remove $(srcdir),
26707# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26708# trailing colons and then remove the whole line if VPATH becomes empty
26709# (actually we leave an empty line to preserve line numbers).
26710if test "x$srcdir" = x.; then
26711 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26712s/:*\$(srcdir):*/:/
26713s/:*\${srcdir}:*/:/
26714s/:*@srcdir@:*/:/
26715s/^\([^=]*=[ ]*\):*/\1/
26716s/:*$//
26717s/^[^=]*=[ ]*$//
26718}'
26719fi
26720
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026721cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026722fi # test -n "$CONFIG_FILES"
26723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026724
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026725for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026726do
26727 case $ac_tag in
26728 :[FHLC]) ac_mode=$ac_tag; continue;;
26729 esac
26730 case $ac_mode$ac_tag in
26731 :[FHL]*:*);;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026732 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26733echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026734 { (exit 1); exit 1; }; };;
26735 :[FH]-) ac_tag=-:-;;
26736 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26737 esac
26738 ac_save_IFS=$IFS
26739 IFS=:
26740 set x $ac_tag
26741 IFS=$ac_save_IFS
26742 shift
26743 ac_file=$1
26744 shift
26745
26746 case $ac_mode in
26747 :L) ac_source=$1;;
26748 :[FH])
26749 ac_file_inputs=
26750 for ac_f
26751 do
26752 case $ac_f in
26753 -) ac_f="$tmp/stdin";;
26754 *) # Look for the file first in the build tree, then in the source tree
26755 # (if the path is not absolute). The absolute path cannot be DOS-style,
26756 # because $ac_f cannot contain `:'.
26757 test -f "$ac_f" ||
26758 case $ac_f in
26759 [\\/$]*) false;;
26760 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26761 esac ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026762 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26763echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026764 { (exit 1); exit 1; }; };;
26765 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026766 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026767 done
26768
26769 # Let's still pretend it is `configure' which instantiates (i.e., don't
26770 # use $as_me), people would be surprised to read:
26771 # /* config.h. Generated by config.status. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026772 configure_input="Generated from "`IFS=:
26773 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026774 if test x"$ac_file" != x-; then
26775 configure_input="$ac_file. $configure_input"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026776 { echo "$as_me:$LINENO: creating $ac_file" >&5
26777echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026778 fi
26779
26780 case $ac_tag in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026781 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026782 esac
26783 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026784 esac
26785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026786 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026787$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026788 X"$ac_file" : 'X\(//\)[^/]' \| \
26789 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026790 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026791echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026792 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26793 s//\1/
26794 q
26795 }
26796 /^X\(\/\/\)[^/].*/{
26797 s//\1/
26798 q
26799 }
26800 /^X\(\/\/\)$/{
26801 s//\1/
26802 q
26803 }
26804 /^X\(\/\).*/{
26805 s//\1/
26806 q
26807 }
26808 s/.*/./; q'`
26809 { as_dir="$ac_dir"
26810 case $as_dir in #(
26811 -*) as_dir=./$as_dir;;
26812 esac
26813 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026814 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026815 while :; do
26816 case $as_dir in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026817 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026818 *) as_qdir=$as_dir;;
26819 esac
26820 as_dirs="'$as_qdir' $as_dirs"
26821 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026822$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026823 X"$as_dir" : 'X\(//\)[^/]' \| \
26824 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026825 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026826echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026827 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26828 s//\1/
26829 q
26830 }
26831 /^X\(\/\/\)[^/].*/{
26832 s//\1/
26833 q
26834 }
26835 /^X\(\/\/\)$/{
26836 s//\1/
26837 q
26838 }
26839 /^X\(\/\).*/{
26840 s//\1/
26841 q
26842 }
26843 s/.*/./; q'`
26844 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026845 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026846 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026847 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26848echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026849 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026850 ac_builddir=.
26851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026852case "$ac_dir" in
26853.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26854*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026855 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026856 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026857 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026858 case $ac_top_builddir_sub in
26859 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26860 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26861 esac ;;
26862esac
26863ac_abs_top_builddir=$ac_pwd
26864ac_abs_builddir=$ac_pwd$ac_dir_suffix
26865# for backward compatibility:
26866ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026867
26868case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026869 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026870 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026871 ac_top_srcdir=$ac_top_builddir_sub
26872 ac_abs_top_srcdir=$ac_pwd ;;
26873 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026874 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026875 ac_top_srcdir=$srcdir
26876 ac_abs_top_srcdir=$srcdir ;;
26877 *) # Relative name.
26878 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26879 ac_top_srcdir=$ac_top_build_prefix$srcdir
26880 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026881esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026882ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026883
Martin v. Löwis11437992002-04-12 09:54:03 +000026884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026885 case $ac_mode in
26886 :F)
26887 #
26888 # CONFIG_FILE
26889 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026890
26891 case $INSTALL in
26892 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026893 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026894 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026895_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026896
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026897cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026898# If the template does not know about datarootdir, expand it.
26899# FIXME: This hack should be removed a few years after 2.60.
26900ac_datarootdir_hack=; ac_datarootdir_seen=
26901
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026902case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026903 p
26904 q
26905}
26906/@datadir@/p
26907/@docdir@/p
26908/@infodir@/p
26909/@localedir@/p
26910/@mandir@/p
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026911' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026912*datarootdir*) ac_datarootdir_seen=yes;;
26913*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026914 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26915echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026916_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026917cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026918 ac_datarootdir_hack='
26919 s&@datadir@&$datadir&g
26920 s&@docdir@&$docdir&g
26921 s&@infodir@&$infodir&g
26922 s&@localedir@&$localedir&g
26923 s&@mandir@&$mandir&g
26924 s&\\\${datarootdir}&$datarootdir&g' ;;
26925esac
26926_ACEOF
26927
26928# Neutralize VPATH when `$srcdir' = `.'.
26929# Shell code in configure.ac might set extrasub.
26930# FIXME: do we really want to maintain this feature?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026931cat >>$CONFIG_STATUS <<_ACEOF
26932 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026933$extrasub
26934_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026935cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026936:t
26937/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026938s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026939s&@top_builddir@&$ac_top_builddir_sub&;t t
26940s&@srcdir@&$ac_srcdir&;t t
26941s&@abs_srcdir@&$ac_abs_srcdir&;t t
26942s&@top_srcdir@&$ac_top_srcdir&;t t
26943s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26944s&@builddir@&$ac_builddir&;t t
26945s&@abs_builddir@&$ac_abs_builddir&;t t
26946s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26947s&@INSTALL@&$ac_INSTALL&;t t
26948$ac_datarootdir_hack
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026949" $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 +000026950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026951test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26952 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26953 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026954 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026955which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026956echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026957which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026959 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026960 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026961 -) cat "$tmp/out"; rm -f "$tmp/out";;
26962 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26963 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026964 ;;
26965 :H)
26966 #
26967 # CONFIG_HEADER
26968 #
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026969_ACEOF
26970
26971# Transform confdefs.h into a sed script `conftest.defines', that
26972# substitutes the proper values into config.h.in to produce config.h.
26973rm -f conftest.defines conftest.tail
26974# First, append a space to every undef/define line, to ease matching.
26975echo 's/$/ /' >conftest.defines
26976# Then, protect against being on the right side of a sed subst, or in
26977# an unquoted here document, in config.status. If some macros were
26978# called several times there might be several #defines for the same
26979# symbol, which is useless. But do not sort them, since the last
26980# AC_DEFINE must be honored.
26981ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26982# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26983# NAME is the cpp macro being defined, VALUE is the value it is being given.
26984# PARAMS is the parameter list in the macro definition--in most cases, it's
26985# just an empty string.
26986ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26987ac_dB='\\)[ (].*,\\1define\\2'
26988ac_dC=' '
26989ac_dD=' ,'
26990
26991uniq confdefs.h |
26992 sed -n '
26993 t rset
26994 :rset
26995 s/^[ ]*#[ ]*define[ ][ ]*//
26996 t ok
26997 d
26998 :ok
26999 s/[\\&,]/\\&/g
27000 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27001 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27002 ' >>conftest.defines
27003
27004# Remove the space that was appended to ease matching.
27005# Then replace #undef with comments. This is necessary, for
27006# example, in the case of _POSIX_SOURCE, which is predefined and required
27007# on some systems where configure will not decide to define it.
27008# (The regexp can be short, since the line contains either #define or #undef.)
27009echo 's/ $//
27010s,^[ #]*u.*,/* & */,' >>conftest.defines
27011
27012# Break up conftest.defines:
27013ac_max_sed_lines=50
27014
27015# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27016# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27017# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27018# et cetera.
27019ac_in='$ac_file_inputs'
27020ac_out='"$tmp/out1"'
27021ac_nxt='"$tmp/out2"'
27022
27023while :
27024do
27025 # Write a here document:
27026 cat >>$CONFIG_STATUS <<_ACEOF
27027 # First, check the format of the line:
27028 cat >"\$tmp/defines.sed" <<\\CEOF
27029/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27030/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27031b
27032:def
27033_ACEOF
27034 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27035 echo 'CEOF
27036 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27037 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27038 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27039 grep . conftest.tail >/dev/null || break
27040 rm -f conftest.defines
27041 mv conftest.tail conftest.defines
27042done
27043rm -f conftest.defines conftest.tail
27044
27045echo "ac_result=$ac_in" >>$CONFIG_STATUS
27046cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027047 if test x"$ac_file" != x-; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027048 echo "/* $configure_input */" >"$tmp/config.h"
27049 cat "$ac_result" >>"$tmp/config.h"
27050 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27051 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27052echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027053 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027054 rm -f $ac_file
27055 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027056 fi
27057 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027058 echo "/* $configure_input */"
27059 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027060 fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027061 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027062 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027064
27065 esac
27066
27067done # for ac_tag
27068
Guido van Rossum627b2d71993-12-24 10:39:16 +000027069
Martin v. Löwis11437992002-04-12 09:54:03 +000027070{ (exit 0); exit 0; }
27071_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027072chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027073ac_clean_files=$ac_clean_files_save
27074
27075
27076# configure is writing to config.log, and then calls config.status.
27077# config.status does its own redirection, appending to config.log.
27078# Unfortunately, on DOS this fails, as config.log is still kept open
27079# by configure, so config.status won't be able to write to it; its
27080# output is simply discarded. So we exec the FD to /dev/null,
27081# effectively closing config.log, so it can be properly (re)opened and
27082# appended to by config.status. When coming back to configure, we
27083# need to make the FD available again.
27084if test "$no_create" != yes; then
27085 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027086 ac_config_status_args=
27087 test "$silent" = yes &&
27088 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027089 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027090 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027091 exec 5>>config.log
27092 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27093 # would make configure fail if this is the last instruction.
27094 $ac_cs_success || { (exit 1); exit 1; }
27095fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027096
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027097
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027098echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027099if test ! -f Modules/Setup
27100then
27101 cp $srcdir/Modules/Setup.dist Modules/Setup
27102fi
27103
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027104echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027105if test ! -f Modules/Setup.local
27106then
27107 echo "# Edit this file for local setup changes" >Modules/Setup.local
27108fi
27109
27110echo "creating Makefile"
27111$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27112 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027113 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027114mv config.c Modules