blob: cbce7424c783c1d469f59c68b15e597defddc824 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren095d2822010-03-08 07:03:14 +00002# From configure.in Revision: 78477 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004# Generated by GNU Autoconf 2.61 for python 3.1.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Christian Heimes70e5cab2008-12-03 18:18:23 +0000578PACKAGE_VERSION='3.1'
579PACKAGE_STRING='python 3.1'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000619ac_subst_vars='SHELL
Benjamin Petersona8332062009-09-11 22:36:27 +0000620PATH_SEPARATOR
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696GNULD
697RANLIB
698AR
699ARFLAGS
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
707UNIVERSAL_ARCH_FLAGS
708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001128 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001132# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001174 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001177 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 # Try the directory containing this script, then the parent directory.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001185 ac_confdir=`$as_dirname -- "$0" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001223 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001249\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001310 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001317 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001325 --enable-big-digits[=BITS]
1326 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001331 --with-universal-archs=ARCH
1332 select architectures for universal build ("32-bit",
Ronald Oussoren856624d2009-09-08 07:13:53 +00001333 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001334 --with-framework-name=FRAMEWORK
1335 specify an alternate name of the framework built
1336 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001337 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001338 --with-cxx-main=<compiler>
1339 compile main() and link python executable with C++
1340 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --with-suffix=.exe set executable suffix
1342 --with-pydebug build with Py_DEBUG defined
1343 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001344 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001345 --with-dbmliborder=db1:db2:...
1346 order to check db backends for dbm. Valid value is a
1347 colon separated string with the backend names
1348 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
1355 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
1359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001363 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001364 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1365 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367Some influential environment variables:
1368 CC C compiler command
1369 CFLAGS C compiler flags
1370 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1371 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 LIBS libraries to pass to the linker, e.g. -l<library>
1373 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1374 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 CPP C preprocessor
1376
1377Use these variables to override the choices made by `configure' or to help
1378it to find libraries and programs with nonstandard names/locations.
1379
Georg Brandle2e15612009-05-20 18:25:10 +00001380Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001383fi
1384
1385if test "$ac_init_help" = "recursive"; then
1386 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001388 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_builddir=.
1390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001391case "$ac_dir" in
1392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 case $ac_top_builddir_sub in
1398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1400 esac ;;
1401esac
1402ac_abs_top_builddir=$ac_pwd
1403ac_abs_builddir=$ac_pwd$ac_dir_suffix
1404# for backward compatibility:
1405ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001408 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 ac_top_srcdir=$ac_top_builddir_sub
1411 ac_abs_top_srcdir=$ac_pwd ;;
1412 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 ac_top_srcdir=$srcdir
1415 ac_abs_top_srcdir=$srcdir ;;
1416 *) # Relative name.
1417 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1418 ac_top_srcdir=$ac_top_build_prefix$srcdir
1419 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001420esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423 cd "$ac_dir" || { ac_status=$?; continue; }
1424 # Check for guested configure.
1425 if test -f "$ac_srcdir/configure.gnu"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1428 elif test -f "$ac_srcdir/configure"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001432 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 fi || ac_status=$?
1434 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 done
1436fi
1437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001439if $ac_init_version; then
1440 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001441python configure 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001442generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014452002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This configure script is free software; the Free Software Foundation
1447gives unlimited permission to copy, distribute and modify it.
1448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This file contains any messages produced by compilers while
1453running configure, to aid debugging if configure makes a mistake.
1454
Christian Heimes70e5cab2008-12-03 18:18:23 +00001455It was created by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001456generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458 $ $0 $@
1459
1460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001462{
1463cat <<_ASUNAME
1464## --------- ##
1465## Platform. ##
1466## --------- ##
1467
1468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1469uname -m = `(uname -m) 2>/dev/null || echo unknown`
1470uname -r = `(uname -r) 2>/dev/null || echo unknown`
1471uname -s = `(uname -s) 2>/dev/null || echo unknown`
1472uname -v = `(uname -v) 2>/dev/null || echo unknown`
1473
1474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1476
1477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1484
1485_ASUNAME
1486
1487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1488for as_dir in $PATH
1489do
1490 IFS=$as_save_IFS
1491 test -z "$as_dir" && as_dir=.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001492 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001493done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496} >&5
1497
1498cat >&5 <<_ACEOF
1499
1500
1501## ----------- ##
1502## Core tests. ##
1503## ----------- ##
1504
1505_ACEOF
1506
1507
1508# Keep a trace of the command line.
1509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001514ac_configure_args0=
1515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_must_keep_next=false
1517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001518do
Skip Montanaro6dead952003-09-25 14:50:04 +00001519 for ac_arg
1520 do
1521 case $ac_arg in
1522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1524 | -silent | --silent | --silen | --sile | --sil)
1525 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 *\'*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001527 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 esac
1529 case $ac_pass in
1530 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1531 2)
1532 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 case $ac_arg in
1537 *=* | --config-cache | -C | -disable-* | --disable-* \
1538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1540 | -with-* | --with-* | -without-* | --without-* | --x)
1541 case "$ac_configure_args0 " in
1542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1543 esac
1544 ;;
1545 -* ) ac_must_keep_next=true ;;
1546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 ;;
1550 esac
1551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001552done
Skip Montanaro6dead952003-09-25 14:50:04 +00001553$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1554$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
1556# When interrupted or exit'd, cleanup temporary files, and complete
1557# config.log. We remove comments because anyway the quotes in there
1558# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559# WARNING: Use '\'' to represent an apostrophe within the trap.
1560# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561trap 'exit_status=$?
1562 # Save into config.log some information that might help in debugging.
1563 {
1564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001565
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 cat <<\_ASBOX
1567## ---------------- ##
1568## Cache variables. ##
1569## ---------------- ##
1570_ASBOX
1571 echo
1572 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573(
1574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1575 eval ac_val=\$$ac_var
1576 case $ac_val in #(
1577 *${as_nl}*)
1578 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001579 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1580echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 esac
1582 case $ac_var in #(
1583 _ | IFS | as_nl) ;; #(
1584 *) $as_unset $ac_var ;;
1585 esac ;;
1586 esac
1587 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1590 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 "s/'\''/'\''\\\\'\'''\''/g;
1593 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1594 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001595 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 esac |
1599 sort
1600)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001602
1603 cat <<\_ASBOX
1604## ----------------- ##
1605## Output variables. ##
1606## ----------------- ##
1607_ASBOX
1608 echo
1609 for ac_var in $ac_subst_vars
1610 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 eval ac_val=\$$ac_var
1612 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001615 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001616 done | sort
1617 echo
1618
1619 if test -n "$ac_subst_files"; then
1620 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621## ------------------- ##
1622## File substitutions. ##
1623## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001624_ASBOX
1625 echo
1626 for ac_var in $ac_subst_files
1627 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 eval ac_val=\$$ac_var
1629 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001630 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001632 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001633 done | sort
1634 echo
1635 fi
1636
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 if test -s confdefs.h; then
1638 cat <<\_ASBOX
1639## ----------- ##
1640## confdefs.h. ##
1641## ----------- ##
1642_ASBOX
1643 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 echo
1646 fi
1647 test "$ac_signal" != 0 &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001648 echo "$as_me: caught signal $ac_signal"
1649 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 rm -f core *.core core.conftest.* &&
1652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001655for ac_signal in 1 2 13 15; do
1656 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1657done
1658ac_signal=0
1659
1660# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# Predefined preprocessor variables.
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_NAME "$PACKAGE_NAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_VERSION "$PACKAGE_VERSION"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_STRING "$PACKAGE_STRING"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1687_ACEOF
1688
1689
1690# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001691# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692if test -n "$CONFIG_SITE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001693 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694elif test "x$prefix" != xNONE; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001695 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001697 set x "$ac_default_prefix/share/config.site" \
1698 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001700shift
1701for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 if test -r "$ac_site_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001704 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1705echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 . "$ac_site_file"
1708 fi
1709done
1710
1711if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 # Some versions of bash will fail to source /dev/null (special
1713 # files actually), so we avoid doing that.
1714 if test -f "$cache_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001715 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1716echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 esac
1721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001723 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1724echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 >$cache_file
1726fi
1727
1728# Check that the precious variables saved in the cache have kept the same
1729# value.
1730ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1733 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 case $ac_old_set,$ac_new_set in
1737 set,)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1739echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 ac_cache_corrupted=: ;;
1741 ,set)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_cache_corrupted=: ;;
1745 ,);;
1746 *)
1747 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1751echo "$as_me: former value: $ac_old_val" >&2;}
1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1753echo "$as_me: current value: $ac_new_val" >&2;}
1754 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 fi;;
1756 esac
1757 # Pass precious variables to config.status.
1758 if test "$ac_new_set" = set; then
1759 case $ac_new_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 *) ac_arg=$ac_var=$ac_new_val ;;
1762 esac
1763 case " $ac_configure_args " in
1764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1765 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1766 esac
1767 fi
1768done
1769if $ac_cache_corrupted; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001774 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775fi
1776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
Guido van Rossum7f43da71994-08-01 12:15:30 +00001801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807
Michael W. Hudson54241132001-12-07 15:38:26 +00001808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001810
1811
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
Benjamin Petersond23f8222009-04-05 19:13:16 +00001813if test "$prefix" != "/"; then
1814 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1815fi
1816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
1819
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001821
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001822# We don't use PACKAGE_ variables, and they cause conflicts
1823# with other autoconf-based packages that include Python.h
1824grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1825rm confdefs.h
1826mv confdefs.h.new confdefs.h
1827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Christian Heimes70e5cab2008-12-03 18:18:23 +00001829VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwis1142de32002-03-29 16:28:31 +00001831
1832SOVERSION=1.0
1833
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001834# The later defininition of _XOPEN_SOURCE disables certain features
1835# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1836
1837cat >>confdefs.h <<\_ACEOF
1838#define _GNU_SOURCE 1
1839_ACEOF
1840
1841
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001842# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1843# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1844# them.
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _NETBSD_SOURCE 1
1848_ACEOF
1849
1850
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define __BSD_VISIBLE 1
1857_ACEOF
1858
1859
Martin v. Löwisd6320502004-08-12 13:45:08 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1862
1863cat >>confdefs.h <<\_ACEOF
1864#define _BSD_TYPES 1
1865_ACEOF
1866
1867
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001868# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1869# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1870# them.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _DARWIN_C_SOURCE 1
1874_ACEOF
1875
1876
1877
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001878define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001879
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001880# Arguments passed to configure.
1881
1882CONFIG_ARGS="$ac_configure_args"
1883
Ronald Oussorend5736812010-02-07 12:04:41 +00001884{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1885echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001888 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001889 case $enableval in
1890 yes)
1891 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussorend5736812010-02-07 12:04:41 +00001892 if test ! -d "${enableval}"
1893 then
1894 enableval=/
1895 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001896 ;;
1897 esac
1898 case $enableval in
1899 no)
1900 UNIVERSALSDK=
1901 enable_universalsdk=
1902 ;;
1903 *)
1904 UNIVERSALSDK=$enableval
Ronald Oussorend5736812010-02-07 12:04:41 +00001905 if test ! -d "${UNIVERSALSDK}"
1906 then
1907 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1908echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1909 { (exit 1); exit 1; }; }
1910 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001911 ;;
1912 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001913
Ronald Oussorend5736812010-02-07 12:04:41 +00001914
Thomas Wouters477c8d52006-05-27 19:21:47 +00001915else
1916
1917 UNIVERSALSDK=
1918 enable_universalsdk=
1919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001920fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001921
Ronald Oussorend5736812010-02-07 12:04:41 +00001922if test -n "${UNIVERSALSDK}"
1923then
1924 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1925echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1926else
1927 { echo "$as_me:$LINENO: result: no" >&5
1928echo "${ECHO_T}no" >&6; }
1929fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001931
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001932
1933
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001934UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001935{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1936echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001937
1938# Check whether --with-universal-archs was given.
1939if test "${with_universal_archs+set}" = set; then
1940 withval=$with_universal_archs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001941 { echo "$as_me:$LINENO: result: $withval" >&5
1942echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001943 UNIVERSAL_ARCHS="$withval"
1944
1945else
1946
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001947 { echo "$as_me:$LINENO: result: 32-bit" >&5
1948echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001949
1950fi
1951
1952
1953
1954
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001955
1956# Check whether --with-framework-name was given.
1957if test "${with_framework_name+set}" = set; then
1958 withval=$with_framework_name;
1959 PYTHONFRAMEWORK=${withval}
1960 PYTHONFRAMEWORKDIR=${withval}.framework
1961 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1962
1963else
1964
1965 PYTHONFRAMEWORK=Python
1966 PYTHONFRAMEWORKDIR=Python.framework
1967 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1968
1969fi
1970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001971# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001972if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001973 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001974 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001975 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001976 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001977 esac
1978 case $enableval in
1979 no)
1980 PYTHONFRAMEWORK=
1981 PYTHONFRAMEWORKDIR=no-framework
1982 PYTHONFRAMEWORKPREFIX=
1983 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001984 FRAMEWORKINSTALLFIRST=
1985 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001986 FRAMEWORKALTINSTALLFIRST=
1987 FRAMEWORKALTINSTALLLAST=
1988 if test "x${prefix}" = "xNONE"; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001994 ;;
1995 *)
1996 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001999 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002000 if test "$UNIVERSAL_ARCHS" = "all"
2001 then
2002 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002003 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002004 else
Ronald Oussorene3918352009-03-30 18:00:28 +00002005 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002006 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2007 fi
2008
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002009 if test "x${prefix}" = "xNONE" ; then
2010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2011 else
2012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2013 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002014 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002015
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002016 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002017 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002018 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002020 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2023
2024 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2025
Jack Jansene578a632001-08-15 01:27:14 +00002026 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Guido van Rossum563e7081996-09-10 18:20:48 +00002028else
Martin v. Löwis11437992002-04-12 09:54:03 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002031 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002032 PYTHONFRAMEWORKPREFIX=
2033 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002034 FRAMEWORKINSTALLFIRST=
2035 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002036 FRAMEWORKALTINSTALLFIRST=
2037 FRAMEWORKALTINSTALLLAST=
2038 if test "x${prefix}" = "xNONE" ; then
2039 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2040 else
2041 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2042 fi
Jack Jansene578a632001-08-15 01:27:14 +00002043 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045 if test "$UNIVERSAL_ARCHS" = "all"
2046 then
2047 FRAMEWORKINSTALLLAST=update4wayuniversal
2048 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2049 fi
2050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002051fi
2052
Thomas Wouters477c8d52006-05-27 19:21:47 +00002053
2054
Michael W. Hudson54241132001-12-07 15:38:26 +00002055
2056
2057
2058
Jack Jansene578a632001-08-15 01:27:14 +00002059
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002060
2061
2062
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002063
Jack Jansene578a632001-08-15 01:27:14 +00002064##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002065## AC_HELP_STRING(--with-dyld,
2066## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002067##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002068# Set name for machine-dependent library files
2069
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002070{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2071echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072if test -z "$MACHDEP"
2073then
Guido van Rossum563e7081996-09-10 18:20:48 +00002074 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002075 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002076 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002077 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002079 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002080 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002081 ac_md_system=`echo $ac_sys_system |
2082 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2083 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002084 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002085 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002086
Guido van Rossum07397971997-04-29 21:49:50 +00002087 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002088 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002089 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002090 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002091 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002092 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002093 esac
2094fi
Guido van Rossum91922671997-10-09 20:24:13 +00002095
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002096# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2097# disable features if it is defined, without any means to access these
2098# features as extensions. For these systems, we skip the definition of
2099# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2100# some feature, make sure there is no alternative way to access this
2101# feature. Also, when using wildcards, make sure you have verified the
2102# need for not defining _XOPEN_SOURCE on all systems matching the
2103# wildcard, and that the wildcard does not include future systems
2104# (which may remove their limitations).
2105case $ac_sys_system/$ac_sys_release in
2106 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2107 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002108 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002109 # In addition, Stefan Krah confirms that issue #1244610 exists through
2110 # OpenBSD 4.6, but is fixed in 4.7.
2111 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002112 define_xopen_source=no
2113 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2114 # also defined. This can be overridden by defining _BSD_SOURCE
2115 # As this has a different meaning on Linux, only define it on OpenBSD
2116
2117cat >>confdefs.h <<\_ACEOF
2118#define _BSD_SOURCE 1
2119_ACEOF
2120
2121 ;;
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002122 OpenBSD/4.[789])
Martin v. Löwisf6594222010-02-15 08:37:47 +00002123 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2124 # also defined. This can be overridden by defining _BSD_SOURCE
2125 # As this has a different meaning on Linux, only define it on OpenBSD
2126
2127cat >>confdefs.h <<\_ACEOF
2128#define _BSD_SOURCE 1
2129_ACEOF
2130
2131 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002132 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2133 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2134 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002135 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 +00002136 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002137 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2138 # of union __?sigval. Reported by Stuart Bishop.
2139 SunOS/5.6)
2140 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002141 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2142 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002143 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002144 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002145 define_xopen_source=no;;
2146 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002147 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002148 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002149 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002150 # On FreeBSD 4, the math functions C89 does not cover are never defined
2151 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2152 FreeBSD/4.*)
2153 define_xopen_source=no;;
2154 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2155 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2156 # identifies itself as Darwin/7.*
2157 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2158 # disables platform specific features beyond repair.
2159 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2160 # has no effect, don't bother defining them
2161 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002162 define_xopen_source=no;;
Ronald Oussoren095d2822010-03-08 07:03:14 +00002163 Darwin/1[6789].*)
2164 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002165 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2166 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2167 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002168 AIX/4)
2169 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002170 AIX/5)
2171 if test `uname -r` -eq 1; then
2172 define_xopen_source=no
2173 fi
2174 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002175 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2176 # defining NI_NUMERICHOST.
2177 QNX/6.3.2)
2178 define_xopen_source=no
2179 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002180
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002181esac
2182
2183if test $define_xopen_source = yes
2184then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002185 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2186 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002187 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2188 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002189 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002190 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002191
2192cat >>confdefs.h <<\_ACEOF
2193#define _XOPEN_SOURCE 500
2194_ACEOF
2195
2196 ;;
2197 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002198
2199cat >>confdefs.h <<\_ACEOF
2200#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002201_ACEOF
2202
Skip Montanarof0d5f792004-08-15 14:08:23 +00002203 ;;
2204 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002205
2206 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2207 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2208 # several APIs are not declared. Since this is also needed in some
2209 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002210 # except for Solaris 10, where it must not be defined,
2211 # as it implies XPG4.2
2212 case $ac_sys_system/$ac_sys_release in
2213 SunOS/5.10)
2214 ;;
2215 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002216
2217cat >>confdefs.h <<\_ACEOF
2218#define _XOPEN_SOURCE_EXTENDED 1
2219_ACEOF
2220
Martin v. Löwis7dece662005-11-26 11:38:24 +00002221 ;;
2222 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002223
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002224
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002225cat >>confdefs.h <<\_ACEOF
2226#define _POSIX_C_SOURCE 200112L
2227_ACEOF
2228
2229
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002230fi
2231
Guido van Rossum91922671997-10-09 20:24:13 +00002232#
2233# SGI compilers allow the specification of the both the ABI and the
2234# ISA on the command line. Depending on the values of these switches,
2235# different and often incompatable code will be generated.
2236#
2237# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2238# thus supply support for various ABI/ISA combinations. The MACHDEP
2239# variable is also adjusted.
2240#
2241
2242if test ! -z "$SGI_ABI"
2243then
2244 CC="cc $SGI_ABI"
2245 LDFLAGS="$SGI_ABI $LDFLAGS"
2246 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2247fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002248{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2249echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002250
Jack Jansen6b08a402004-06-03 12:41:45 +00002251# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2252# it may influence the way we can build extensions, so distutils
2253# needs to check it
2254
Thomas Wouters477c8d52006-05-27 19:21:47 +00002255
Jack Jansen6b08a402004-06-03 12:41:45 +00002256CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002257EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002258
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002259{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2260echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002261ac_sys_machine=`uname -m`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002262{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2263echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002264
Guido van Rossum627b2d71993-12-24 10:39:16 +00002265# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002266
2267# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2268# for debug/optimization stuff. BASECFLAGS is for flags that are required
2269# just to get things to compile and link. Users are free to override OPT
2270# when running configure or make. The build should not break if they do.
2271# BASECFLAGS should generally not be messed with, however.
2272
2273# XXX shouldn't some/most/all of this code be merged with the stuff later
2274# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002275{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2276echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002278# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002279if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002280 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002281 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002282 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002283 without_gcc=yes;;
2284 yes) CC=gcc
2285 without_gcc=no;;
2286 *) CC=$withval
2287 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002288 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002289else
Martin v. Löwis11437992002-04-12 09:54:03 +00002290
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002291 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002292 AIX*) CC=cc_r
2293 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002294 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002295 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002296fi
2297
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002298{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2299echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002300
Guido van Rossum8b131c51995-03-09 14:10:13 +00002301# If the user switches compilers, we can't believe the cache
2302if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2303then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002304 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002305(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002306echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002307(it is also a good idea to do 'make clean' before compiling)" >&2;}
2308 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002309fi
2310
Martin v. Löwis11437992002-04-12 09:54:03 +00002311ac_ext=c
2312ac_cpp='$CPP $CPPFLAGS'
2313ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2314ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2315ac_compiler_gnu=$ac_cv_c_compiler_gnu
2316if test -n "$ac_tool_prefix"; then
2317 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2318set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002319{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2320echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002321if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002323else
2324 if test -n "$CC"; then
2325 ac_cv_prog_CC="$CC" # Let the user override the test.
2326else
Martin v. Löwis11437992002-04-12 09:54:03 +00002327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2328for as_dir in $PATH
2329do
2330 IFS=$as_save_IFS
2331 test -z "$as_dir" && as_dir=.
2332 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002333 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 +00002334 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002335 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002336 break 2
2337 fi
2338done
2339done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002341
Jack Jansendd19cf82001-12-06 22:36:17 +00002342fi
2343fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002344CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002345if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002346 { echo "$as_me:$LINENO: result: $CC" >&5
2347echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002348else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002349 { echo "$as_me:$LINENO: result: no" >&5
2350echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002351fi
2352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002353
Martin v. Löwis11437992002-04-12 09:54:03 +00002354fi
2355if test -z "$ac_cv_prog_CC"; then
2356 ac_ct_CC=$CC
2357 # Extract the first word of "gcc", so it can be a program name with args.
2358set dummy gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002359{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2360echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002361if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002362 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002363else
2364 if test -n "$ac_ct_CC"; then
2365 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2366else
2367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2368for as_dir in $PATH
2369do
2370 IFS=$as_save_IFS
2371 test -z "$as_dir" && as_dir=.
2372 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002373 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 +00002374 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002375 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002376 break 2
2377 fi
2378done
2379done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002381
2382fi
2383fi
2384ac_ct_CC=$ac_cv_prog_ac_ct_CC
2385if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002386 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2387echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002388else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002389 { echo "$as_me:$LINENO: result: no" >&5
2390echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002391fi
2392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393 if test "x$ac_ct_CC" = x; then
2394 CC=""
2395 else
2396 case $cross_compiling:$ac_tool_warned in
2397yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002398{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2399whose name does not start with the host triplet. If you think this
2400configuration is useful to you, please write to autoconf@gnu.org." >&5
2401echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2402whose name does not start with the host triplet. If you think this
2403configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002404ac_tool_warned=yes ;;
2405esac
2406 CC=$ac_ct_CC
2407 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002408else
2409 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002410fi
2411
Jack Jansendd19cf82001-12-06 22:36:17 +00002412if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413 if test -n "$ac_tool_prefix"; then
2414 # 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 +00002415set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002416{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2417echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002418if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002419 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002420else
2421 if test -n "$CC"; then
2422 ac_cv_prog_CC="$CC" # Let the user override the test.
2423else
Martin v. Löwis11437992002-04-12 09:54:03 +00002424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2425for as_dir in $PATH
2426do
2427 IFS=$as_save_IFS
2428 test -z "$as_dir" && as_dir=.
2429 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430 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 +00002431 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002432 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002433 break 2
2434 fi
2435done
2436done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439fi
2440fi
2441CC=$ac_cv_prog_CC
2442if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002443 { echo "$as_me:$LINENO: result: $CC" >&5
2444echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002445else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002446 { echo "$as_me:$LINENO: result: no" >&5
2447echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002448fi
2449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002450
Martin v. Löwis11437992002-04-12 09:54:03 +00002451 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002452fi
2453if test -z "$CC"; then
2454 # Extract the first word of "cc", so it can be a program name with args.
2455set dummy cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002456{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2457echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002458if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002459 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002460else
2461 if test -n "$CC"; then
2462 ac_cv_prog_CC="$CC" # Let the user override the test.
2463else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2466for as_dir in $PATH
2467do
2468 IFS=$as_save_IFS
2469 test -z "$as_dir" && as_dir=.
2470 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 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 +00002472 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2473 ac_prog_rejected=yes
2474 continue
2475 fi
2476 ac_cv_prog_CC="cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002477 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 break 2
2479 fi
2480done
2481done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002483
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002484if test $ac_prog_rejected = yes; then
2485 # We found a bogon in the path, so make sure we never use it.
2486 set dummy $ac_cv_prog_CC
2487 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002489 # We chose a different compiler from the bogus one.
2490 # However, it has the same basename, so the bogon will be chosen
2491 # first if we set CC to just the basename; use the full file name.
2492 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002494 fi
2495fi
2496fi
2497fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002498CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002499if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002500 { echo "$as_me:$LINENO: result: $CC" >&5
2501echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002502else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002503 { echo "$as_me:$LINENO: result: no" >&5
2504echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002505fi
2506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507
Martin v. Löwis11437992002-04-12 09:54:03 +00002508fi
2509if test -z "$CC"; then
2510 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 do
2513 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2514set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002515{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2516echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002517if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002519else
2520 if test -n "$CC"; then
2521 ac_cv_prog_CC="$CC" # Let the user override the test.
2522else
Martin v. Löwis11437992002-04-12 09:54:03 +00002523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2524for as_dir in $PATH
2525do
2526 IFS=$as_save_IFS
2527 test -z "$as_dir" && as_dir=.
2528 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 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 +00002530 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002531 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002533 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
2535done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002537
2538fi
2539fi
2540CC=$ac_cv_prog_CC
2541if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002542 { echo "$as_me:$LINENO: result: $CC" >&5
2543echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002544else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002545 { echo "$as_me:$LINENO: result: no" >&5
2546echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002547fi
2548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 test -n "$CC" && break
2551 done
2552fi
2553if test -z "$CC"; then
2554 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002556do
2557 # Extract the first word of "$ac_prog", so it can be a program name with args.
2558set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002559{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2560echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002561if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002562 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002563else
2564 if test -n "$ac_ct_CC"; then
2565 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2566else
2567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2568for as_dir in $PATH
2569do
2570 IFS=$as_save_IFS
2571 test -z "$as_dir" && as_dir=.
2572 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 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 +00002574 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002575 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 break 2
2577 fi
2578done
2579done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582fi
2583fi
2584ac_ct_CC=$ac_cv_prog_ac_ct_CC
2585if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002586 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2587echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002588else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002589 { echo "$as_me:$LINENO: result: no" >&5
2590echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002591fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 test -n "$ac_ct_CC" && break
2595done
Michael W. Hudson54241132001-12-07 15:38:26 +00002596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 if test "x$ac_ct_CC" = x; then
2598 CC=""
2599 else
2600 case $cross_compiling:$ac_tool_warned in
2601yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002602{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2603whose name does not start with the host triplet. If you think this
2604configuration is useful to you, please write to autoconf@gnu.org." >&5
2605echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2606whose name does not start with the host triplet. If you think this
2607configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608ac_tool_warned=yes ;;
2609esac
2610 CC=$ac_ct_CC
2611 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002612fi
2613
2614fi
2615
2616
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002617test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002618See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002619echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002620See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002621 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002622
2623# Provide some information about the compiler.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002624echo "$as_me:$LINENO: checking for C compiler version" >&5
2625ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626{ (ac_try="$ac_compiler --version >&5"
2627case "(($ac_try" in
2628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2629 *) ac_try_echo=$ac_try;;
2630esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636{ (ac_try="$ac_compiler -v >&5"
2637case "(($ac_try" in
2638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2639 *) ac_try_echo=$ac_try;;
2640esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646{ (ac_try="$ac_compiler -V >&5"
2647case "(($ac_try" in
2648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2649 *) ac_try_echo=$ac_try;;
2650esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 (exit $ac_status); }
2656
2657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002658/* confdefs.h. */
2659_ACEOF
2660cat confdefs.h >>conftest.$ac_ext
2661cat >>conftest.$ac_ext <<_ACEOF
2662/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664int
2665main ()
2666{
2667
2668 ;
2669 return 0;
2670}
2671_ACEOF
2672ac_clean_files_save=$ac_clean_files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002673ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002674# Try to create an executable without -o first, disregard a.out.
2675# It will help us diagnose broken compilers, and finding out an intuition
2676# of exeext.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002677{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2678echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2679ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2680#
2681# List of possible output files, starting from the most likely.
2682# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2683# only as a last resort. b.out is created by i960 compilers.
2684ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2685#
2686# The IRIX 6 linker writes into existing files which may not be
2687# executable, retaining their permissions. Remove them first so a
2688# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689ac_rmfiles=
2690for ac_file in $ac_files
2691do
2692 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002693 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2695 esac
2696done
2697rm -f $ac_rmfiles
2698
2699if { (ac_try="$ac_link_default"
2700case "(($ac_try" in
2701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2702 *) ac_try_echo=$ac_try;;
2703esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2710# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2711# in a Makefile. We should not override ac_cv_exeext if it was cached,
2712# so that the user can short-circuit this test for compilers unknown to
2713# Autoconf.
2714for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002715do
2716 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002718 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002719 ;;
2720 [ab].out )
2721 # We found the default executable, but exeext='' is most
2722 # certainly right.
2723 break;;
2724 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2726 then :; else
2727 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2728 fi
2729 # We set ac_cv_exeext here because the later test for it is not
2730 # safe: cross compilers may not add the suffix if given an `-o'
2731 # argument, so we may need to know it at that point already.
2732 # Even if this section looks crufty: it has the advantage of
2733 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002734 break;;
2735 * )
2736 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 esac
2738done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002739test "$ac_cv_exeext" = no && ac_cv_exeext=
2740
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002741else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002742 ac_file=''
2743fi
2744
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002745{ echo "$as_me:$LINENO: result: $ac_file" >&5
2746echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002747if test -z "$ac_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002749sed 's/^/| /' conftest.$ac_ext >&5
2750
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002751{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002752See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002753echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002754See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002755 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002756fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002757
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002758ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002760# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002761# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002762{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2763echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002764# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2765# If not cross compiling, check that we can run a simple program.
2766if test "$cross_compiling" != yes; then
2767 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768 { (case "(($ac_try" in
2769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2770 *) ac_try_echo=$ac_try;;
2771esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002773 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 (exit $ac_status); }; }; then
2777 cross_compiling=no
2778 else
2779 if test "$cross_compiling" = maybe; then
2780 cross_compiling=yes
2781 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002782 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002783If you meant to cross compile, use \`--host'.
2784See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002785echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002786If you meant to cross compile, use \`--host'.
2787See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002788 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 fi
2790 fi
2791fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002792{ echo "$as_me:$LINENO: result: yes" >&5
2793echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002794
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002795rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002796ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002797# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002798# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002799{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2800echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2801{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2802echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002803
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002804{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2805echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002806if { (ac_try="$ac_link"
2807case "(($ac_try" in
2808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2809 *) ac_try_echo=$ac_try;;
2810esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002812 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002813 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002815 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002816 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2817# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2818# work properly (i.e., refer to `conftest.exe'), while it won't with
2819# `rm'.
2820for ac_file in conftest.exe conftest conftest.*; do
2821 test -f "$ac_file" || continue
2822 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002823 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002824 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2825 break;;
2826 * ) break;;
2827 esac
2828done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002829else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002830 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002831See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002832echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002833See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002834 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002835fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002836
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002837rm -f conftest$ac_cv_exeext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002838{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2839echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002840
2841rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002842EXEEXT=$ac_cv_exeext
2843ac_exeext=$EXEEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002844{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2845echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002846if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002847 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002848else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002849 cat >conftest.$ac_ext <<_ACEOF
2850/* confdefs.h. */
2851_ACEOF
2852cat confdefs.h >>conftest.$ac_ext
2853cat >>conftest.$ac_ext <<_ACEOF
2854/* end confdefs.h. */
2855
2856int
2857main ()
2858{
2859
2860 ;
2861 return 0;
2862}
2863_ACEOF
2864rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002865if { (ac_try="$ac_compile"
2866case "(($ac_try" in
2867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2868 *) ac_try_echo=$ac_try;;
2869esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002871 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002875 for ac_file in conftest.o conftest.obj conftest.*; do
2876 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002878 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002879 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2880 break;;
2881 esac
2882done
2883else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002885sed 's/^/| /' conftest.$ac_ext >&5
2886
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002887{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002888See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002889echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002890See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002891 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002892fi
2893
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002894rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002895fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002896{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2897echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002898OBJEXT=$ac_cv_objext
2899ac_objext=$OBJEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002900{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2901echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002902if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002903 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002904else
2905 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002906/* confdefs.h. */
2907_ACEOF
2908cat confdefs.h >>conftest.$ac_ext
2909cat >>conftest.$ac_ext <<_ACEOF
2910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002911
Martin v. Löwis11437992002-04-12 09:54:03 +00002912int
2913main ()
2914{
2915#ifndef __GNUC__
2916 choke me
2917#endif
2918
2919 ;
2920 return 0;
2921}
2922_ACEOF
2923rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002924if { (ac_try="$ac_compile"
2925case "(($ac_try" in
2926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2927 *) ac_try_echo=$ac_try;;
2928esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002932 grep -v '^ *+' conftest.er1 >conftest.err
2933 rm -f conftest.er1
2934 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936 (exit $ac_status); } && {
2937 test -z "$ac_c_werror_flag" ||
2938 test ! -s conftest.err
2939 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002940 ac_compiler_gnu=yes
2941else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002943sed 's/^/| /' conftest.$ac_ext >&5
2944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002945 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002947
2948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002949ac_cv_c_compiler_gnu=$ac_compiler_gnu
2950
2951fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002952{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2953echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2954GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002955ac_test_CFLAGS=${CFLAGS+set}
2956ac_save_CFLAGS=$CFLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002957{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2958echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002959if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002960 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002961else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962 ac_save_c_werror_flag=$ac_c_werror_flag
2963 ac_c_werror_flag=yes
2964 ac_cv_prog_cc_g=no
2965 CFLAGS="-g"
2966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002967/* confdefs.h. */
2968_ACEOF
2969cat confdefs.h >>conftest.$ac_ext
2970cat >>conftest.$ac_ext <<_ACEOF
2971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002972
Martin v. Löwis11437992002-04-12 09:54:03 +00002973int
2974main ()
2975{
2976
2977 ;
2978 return 0;
2979}
2980_ACEOF
2981rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002982if { (ac_try="$ac_compile"
2983case "(($ac_try" in
2984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2985 *) ac_try_echo=$ac_try;;
2986esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002990 grep -v '^ *+' conftest.er1 >conftest.err
2991 rm -f conftest.er1
2992 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002994 (exit $ac_status); } && {
2995 test -z "$ac_c_werror_flag" ||
2996 test ! -s conftest.err
2997 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002998 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002999else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003001sed 's/^/| /' conftest.$ac_ext >&5
3002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003 CFLAGS=""
3004 cat >conftest.$ac_ext <<_ACEOF
3005/* confdefs.h. */
3006_ACEOF
3007cat confdefs.h >>conftest.$ac_ext
3008cat >>conftest.$ac_ext <<_ACEOF
3009/* end confdefs.h. */
3010
3011int
3012main ()
3013{
3014
3015 ;
3016 return 0;
3017}
3018_ACEOF
3019rm -f conftest.$ac_objext
3020if { (ac_try="$ac_compile"
3021case "(($ac_try" in
3022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3023 *) ac_try_echo=$ac_try;;
3024esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003026 (eval "$ac_compile") 2>conftest.er1
3027 ac_status=$?
3028 grep -v '^ *+' conftest.er1 >conftest.err
3029 rm -f conftest.er1
3030 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003032 (exit $ac_status); } && {
3033 test -z "$ac_c_werror_flag" ||
3034 test ! -s conftest.err
3035 } && test -s conftest.$ac_objext; then
3036 :
3037else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003038 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039sed 's/^/| /' conftest.$ac_ext >&5
3040
3041 ac_c_werror_flag=$ac_save_c_werror_flag
3042 CFLAGS="-g"
3043 cat >conftest.$ac_ext <<_ACEOF
3044/* confdefs.h. */
3045_ACEOF
3046cat confdefs.h >>conftest.$ac_ext
3047cat >>conftest.$ac_ext <<_ACEOF
3048/* end confdefs.h. */
3049
3050int
3051main ()
3052{
3053
3054 ;
3055 return 0;
3056}
3057_ACEOF
3058rm -f conftest.$ac_objext
3059if { (ac_try="$ac_compile"
3060case "(($ac_try" in
3061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3062 *) ac_try_echo=$ac_try;;
3063esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065 (eval "$ac_compile") 2>conftest.er1
3066 ac_status=$?
3067 grep -v '^ *+' conftest.er1 >conftest.err
3068 rm -f conftest.er1
3069 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071 (exit $ac_status); } && {
3072 test -z "$ac_c_werror_flag" ||
3073 test ! -s conftest.err
3074 } && test -s conftest.$ac_objext; then
3075 ac_cv_prog_cc_g=yes
3076else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003077 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078sed 's/^/| /' conftest.$ac_ext >&5
3079
3080
Guido van Rossum627b2d71993-12-24 10:39:16 +00003081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003082
3083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003085
3086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3087fi
3088
3089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3090 ac_c_werror_flag=$ac_save_c_werror_flag
3091fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003092{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3093echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003094if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003095 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003096elif test $ac_cv_prog_cc_g = yes; then
3097 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003098 CFLAGS="-g -O2"
3099 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003100 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003101 fi
3102else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003103 if test "$GCC" = yes; then
3104 CFLAGS="-O2"
3105 else
3106 CFLAGS=
3107 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003108fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003109{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3110echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003112 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003113else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003115ac_save_CC=$CC
3116cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003117/* confdefs.h. */
3118_ACEOF
3119cat confdefs.h >>conftest.$ac_ext
3120cat >>conftest.$ac_ext <<_ACEOF
3121/* end confdefs.h. */
3122#include <stdarg.h>
3123#include <stdio.h>
3124#include <sys/types.h>
3125#include <sys/stat.h>
3126/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3127struct buf { int x; };
3128FILE * (*rcsopen) (struct buf *, struct stat *, int);
3129static char *e (p, i)
3130 char **p;
3131 int i;
3132{
3133 return p[i];
3134}
3135static char *f (char * (*g) (char **, int), char **p, ...)
3136{
3137 char *s;
3138 va_list v;
3139 va_start (v,p);
3140 s = g (p, va_arg (v,int));
3141 va_end (v);
3142 return s;
3143}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003144
3145/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3146 function prototypes and stuff, but not '\xHH' hex character constants.
3147 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003148 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003149 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3150 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003152int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3155 inside strings and character constants. */
3156#define FOO(x) 'x'
3157int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3158
Skip Montanaro6dead952003-09-25 14:50:04 +00003159int test (int i, double x);
3160struct s1 {int (*f) (int a);};
3161struct s2 {int (*f) (double a);};
3162int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3163int argc;
3164char **argv;
3165int
3166main ()
3167{
3168return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3169 ;
3170 return 0;
3171}
3172_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3174 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003175do
3176 CC="$ac_save_CC $ac_arg"
3177 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178if { (ac_try="$ac_compile"
3179case "(($ac_try" in
3180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3181 *) ac_try_echo=$ac_try;;
3182esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003186 grep -v '^ *+' conftest.er1 >conftest.err
3187 rm -f conftest.er1
3188 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 (exit $ac_status); } && {
3191 test -z "$ac_c_werror_flag" ||
3192 test ! -s conftest.err
3193 } && test -s conftest.$ac_objext; then
3194 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003195else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003197sed 's/^/| /' conftest.$ac_ext >&5
3198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199
Skip Montanaro6dead952003-09-25 14:50:04 +00003200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201
3202rm -f core conftest.err conftest.$ac_objext
3203 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003204done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003206CC=$ac_save_CC
3207
3208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003209# AC_CACHE_VAL
3210case "x$ac_cv_prog_cc_c89" in
3211 x)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003212 { echo "$as_me:$LINENO: result: none needed" >&5
3213echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214 xno)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003215 { echo "$as_me:$LINENO: result: unsupported" >&5
3216echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003217 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003219 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3220echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003221esac
3222
Skip Montanaro6dead952003-09-25 14:50:04 +00003223
Martin v. Löwis11437992002-04-12 09:54:03 +00003224ac_ext=c
3225ac_cpp='$CPP $CPPFLAGS'
3226ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3227ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3228ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003229
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003230
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003231
3232
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003233{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3234echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003236# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003237if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003239
3240 case $withval in
3241 no) with_cxx_main=no
3242 MAINCC='$(CC)';;
3243 yes) with_cxx_main=yes
3244 MAINCC='$(CXX)';;
3245 *) with_cxx_main=yes
3246 MAINCC=$withval
3247 if test -z "$CXX"
3248 then
3249 CXX=$withval
3250 fi;;
3251 esac
3252else
3253
3254 with_cxx_main=no
3255 MAINCC='$(CC)'
3256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257fi
3258
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003259{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3260echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003261
3262preset_cxx="$CXX"
3263if test -z "$CXX"
3264then
3265 case "$CC" in
3266 gcc) # Extract the first word of "g++", so it can be a program name with args.
3267set dummy g++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003268{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3269echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003271 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003272else
3273 case $CXX in
3274 [\\/]* | ?:[\\/]*)
3275 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3276 ;;
3277 *)
3278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279for as_dir in notfound
3280do
3281 IFS=$as_save_IFS
3282 test -z "$as_dir" && as_dir=.
3283 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284 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 +00003285 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003286 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003287 break 2
3288 fi
3289done
3290done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003292
3293 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3294 ;;
3295esac
3296fi
3297CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003298if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003299 { echo "$as_me:$LINENO: result: $CXX" >&5
3300echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003301else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003302 { echo "$as_me:$LINENO: result: no" >&5
3303echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003305
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003306 ;;
3307 cc) # Extract the first word of "c++", so it can be a program name with args.
3308set dummy c++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003309{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3310echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003311if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003312 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003313else
3314 case $CXX in
3315 [\\/]* | ?:[\\/]*)
3316 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3317 ;;
3318 *)
3319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3320for as_dir in notfound
3321do
3322 IFS=$as_save_IFS
3323 test -z "$as_dir" && as_dir=.
3324 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003325 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 +00003326 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003327 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003328 break 2
3329 fi
3330done
3331done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003333
3334 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3335 ;;
3336esac
3337fi
3338CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003339if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003340 { echo "$as_me:$LINENO: result: $CXX" >&5
3341echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003342else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003343 { echo "$as_me:$LINENO: result: no" >&5
3344echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003347 ;;
3348 esac
3349 if test "$CXX" = "notfound"
3350 then
3351 CXX=""
3352 fi
3353fi
3354if test -z "$CXX"
3355then
3356 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3357do
3358 # Extract the first word of "$ac_prog", so it can be a program name with args.
3359set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003360{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3361echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003362if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003363 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003364else
3365 if test -n "$CXX"; then
3366 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3367else
3368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3369for as_dir in $PATH
3370do
3371 IFS=$as_save_IFS
3372 test -z "$as_dir" && as_dir=.
3373 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003374 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 +00003375 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003376 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003377 break 2
3378 fi
3379done
3380done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003381IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003382
3383fi
3384fi
3385CXX=$ac_cv_prog_CXX
3386if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003387 { echo "$as_me:$LINENO: result: $CXX" >&5
3388echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003389else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003390 { echo "$as_me:$LINENO: result: no" >&5
3391echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003392fi
3393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003394
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003395 test -n "$CXX" && break
3396done
3397test -n "$CXX" || CXX="notfound"
3398
3399 if test "$CXX" = "notfound"
3400 then
3401 CXX=""
3402 fi
3403fi
3404if test "$preset_cxx" != "$CXX"
3405then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003406 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003407
3408 By default, distutils will build C++ extension modules with \"$CXX\".
3409 If this is not intended, then set CXX on the configure command line.
3410 " >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003411echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003412
3413 By default, distutils will build C++ extension modules with \"$CXX\".
3414 If this is not intended, then set CXX on the configure command line.
3415 " >&2;}
3416fi
3417
3418
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003419# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003420
3421ac_ext=c
3422ac_cpp='$CPP $CPPFLAGS'
3423ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3424ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3425ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003426{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3427echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003428# On Suns, sometimes $CPP names a directory.
3429if test -n "$CPP" && test -d "$CPP"; then
3430 CPP=
3431fi
3432if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003434 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003435else
Martin v. Löwis11437992002-04-12 09:54:03 +00003436 # Double quotes because CPP needs to be expanded
3437 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3438 do
3439 ac_preproc_ok=false
3440for ac_c_preproc_warn_flag in '' yes
3441do
3442 # Use a header file that comes with gcc, so configuring glibc
3443 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003444 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3445 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003446 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 # not just through cpp. "Syntax error" is here to catch this case.
3448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003449/* confdefs.h. */
3450_ACEOF
3451cat confdefs.h >>conftest.$ac_ext
3452cat >>conftest.$ac_ext <<_ACEOF
3453/* end confdefs.h. */
3454#ifdef __STDC__
3455# include <limits.h>
3456#else
3457# include <assert.h>
3458#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003459 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461if { (ac_try="$ac_cpp conftest.$ac_ext"
3462case "(($ac_try" in
3463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3464 *) ac_try_echo=$ac_try;;
3465esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003469 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 rm -f conftest.er1
3471 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 (exit $ac_status); } >/dev/null && {
3474 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3475 test ! -s conftest.err
3476 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003477 :
3478else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003480sed 's/^/| /' conftest.$ac_ext >&5
3481
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 # Broken: fails on valid input.
3483continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485
Martin v. Löwis11437992002-04-12 09:54:03 +00003486rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003489 # can be detected and how.
3490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003491/* confdefs.h. */
3492_ACEOF
3493cat confdefs.h >>conftest.$ac_ext
3494cat >>conftest.$ac_ext <<_ACEOF
3495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003496#include <ac_nonexistent.h>
3497_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003498if { (ac_try="$ac_cpp conftest.$ac_ext"
3499case "(($ac_try" in
3500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3501 *) ac_try_echo=$ac_try;;
3502esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003505 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003506 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003507 rm -f conftest.er1
3508 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003510 (exit $ac_status); } >/dev/null && {
3511 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3512 test ! -s conftest.err
3513 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 # Broken: success on invalid input.
3515continue
3516else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003518sed 's/^/| /' conftest.$ac_ext >&5
3519
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 # Passes both tests.
3521ac_preproc_ok=:
3522break
3523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003524
Martin v. Löwis11437992002-04-12 09:54:03 +00003525rm -f conftest.err conftest.$ac_ext
3526
3527done
3528# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3529rm -f conftest.err conftest.$ac_ext
3530if $ac_preproc_ok; then
3531 break
3532fi
3533
3534 done
3535 ac_cv_prog_CPP=$CPP
3536
3537fi
3538 CPP=$ac_cv_prog_CPP
3539else
3540 ac_cv_prog_CPP=$CPP
3541fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003542{ echo "$as_me:$LINENO: result: $CPP" >&5
3543echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003544ac_preproc_ok=false
3545for ac_c_preproc_warn_flag in '' yes
3546do
3547 # Use a header file that comes with gcc, so configuring glibc
3548 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003549 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3550 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 # On the NeXT, cc -E runs the code through the compiler's parser,
3552 # not just through cpp. "Syntax error" is here to catch this case.
3553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003554/* confdefs.h. */
3555_ACEOF
3556cat confdefs.h >>conftest.$ac_ext
3557cat >>conftest.$ac_ext <<_ACEOF
3558/* end confdefs.h. */
3559#ifdef __STDC__
3560# include <limits.h>
3561#else
3562# include <assert.h>
3563#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003564 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003565_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566if { (ac_try="$ac_cpp conftest.$ac_ext"
3567case "(($ac_try" in
3568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3569 *) ac_try_echo=$ac_try;;
3570esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 rm -f conftest.er1
3576 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578 (exit $ac_status); } >/dev/null && {
3579 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3580 test ! -s conftest.err
3581 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 :
3583else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003585sed 's/^/| /' conftest.$ac_ext >&5
3586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 # Broken: fails on valid input.
3588continue
3589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590
Martin v. Löwis11437992002-04-12 09:54:03 +00003591rm -f conftest.err conftest.$ac_ext
3592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 # can be detected and how.
3595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003596/* confdefs.h. */
3597_ACEOF
3598cat confdefs.h >>conftest.$ac_ext
3599cat >>conftest.$ac_ext <<_ACEOF
3600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003601#include <ac_nonexistent.h>
3602_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603if { (ac_try="$ac_cpp conftest.$ac_ext"
3604case "(($ac_try" in
3605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3606 *) ac_try_echo=$ac_try;;
3607esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003611 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 rm -f conftest.er1
3613 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615 (exit $ac_status); } >/dev/null && {
3616 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3617 test ! -s conftest.err
3618 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 # Broken: success on invalid input.
3620continue
3621else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003623sed 's/^/| /' conftest.$ac_ext >&5
3624
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 # Passes both tests.
3626ac_preproc_ok=:
3627break
3628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629
Martin v. Löwis11437992002-04-12 09:54:03 +00003630rm -f conftest.err conftest.$ac_ext
3631
3632done
3633# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3634rm -f conftest.err conftest.$ac_ext
3635if $ac_preproc_ok; then
3636 :
3637else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003638 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003639See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003640echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003641See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003642 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
3645ac_ext=c
3646ac_cpp='$CPP $CPPFLAGS'
3647ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3648ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3649ac_compiler_gnu=$ac_cv_c_compiler_gnu
3650
3651
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003652{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3653echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003655 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003656else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003657 # Extract the first word of "grep ggrep" to use in msg output
3658if test -z "$GREP"; then
3659set dummy grep ggrep; ac_prog_name=$2
3660if test "${ac_cv_path_GREP+set}" = set; then
3661 echo $ECHO_N "(cached) $ECHO_C" >&6
3662else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663 ac_path_GREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003664# Loop through the user's path and test for each of PROGNAME-LIST
3665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003666for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3667do
3668 IFS=$as_save_IFS
3669 test -z "$as_dir" && as_dir=.
3670 for ac_prog in grep ggrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003671 for ac_exec_ext in '' $ac_executable_extensions; do
3672 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3673 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3674 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675 # Check for GNU $ac_path_GREP
3676case `"$ac_path_GREP" --version 2>&1` in
3677*GNU*)
3678 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3679*)
3680 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003681 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 while :
3683 do
3684 cat "conftest.in" "conftest.in" >"conftest.tmp"
3685 mv "conftest.tmp" "conftest.in"
3686 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003687 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3689 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3690 ac_count=`expr $ac_count + 1`
3691 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3692 # Best one so far, save it but keep looking for a better one
3693 ac_cv_path_GREP="$ac_path_GREP"
3694 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003695 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696 # 10*(2^10) chars as input seems more than enough
3697 test $ac_count -gt 10 && break
3698 done
3699 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3700esac
3701
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003702
3703 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704 done
3705done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003706
3707done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003709
3710
3711fi
3712
3713GREP="$ac_cv_path_GREP"
3714if test -z "$GREP"; then
3715 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3716echo "$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 +00003717 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003718fi
3719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720else
3721 ac_cv_path_GREP=$GREP
3722fi
3723
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003726{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3727echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728 GREP="$ac_cv_path_GREP"
3729
3730
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003731{ echo "$as_me:$LINENO: checking for egrep" >&5
3732echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003734 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735else
3736 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3737 then ac_cv_path_EGREP="$GREP -E"
3738 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003739 # Extract the first word of "egrep" to use in msg output
3740if test -z "$EGREP"; then
3741set dummy egrep; ac_prog_name=$2
3742if test "${ac_cv_path_EGREP+set}" = set; then
3743 echo $ECHO_N "(cached) $ECHO_C" >&6
3744else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745 ac_path_EGREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003746# Loop through the user's path and test for each of PROGNAME-LIST
3747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3749do
3750 IFS=$as_save_IFS
3751 test -z "$as_dir" && as_dir=.
3752 for ac_prog in egrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003753 for ac_exec_ext in '' $ac_executable_extensions; do
3754 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3755 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3756 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757 # Check for GNU $ac_path_EGREP
3758case `"$ac_path_EGREP" --version 2>&1` in
3759*GNU*)
3760 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3761*)
3762 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003763 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764 while :
3765 do
3766 cat "conftest.in" "conftest.in" >"conftest.tmp"
3767 mv "conftest.tmp" "conftest.in"
3768 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003769 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3771 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3772 ac_count=`expr $ac_count + 1`
3773 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3774 # Best one so far, save it but keep looking for a better one
3775 ac_cv_path_EGREP="$ac_path_EGREP"
3776 ac_path_EGREP_max=$ac_count
3777 fi
3778 # 10*(2^10) chars as input seems more than enough
3779 test $ac_count -gt 10 && break
3780 done
3781 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3782esac
3783
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003784
3785 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 done
3787done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003788
3789done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003791
3792
3793fi
3794
3795EGREP="$ac_cv_path_EGREP"
3796if test -z "$EGREP"; then
3797 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3798echo "$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 +00003799 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003800fi
3801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802else
3803 ac_cv_path_EGREP=$EGREP
3804fi
3805
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807 fi
3808fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003809{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3810echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003812
3813
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003814
3815{ echo "$as_me:$LINENO: checking for AIX" >&5
3816echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3817cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00003818/* confdefs.h. */
3819_ACEOF
3820cat confdefs.h >>conftest.$ac_ext
3821cat >>conftest.$ac_ext <<_ACEOF
3822/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003823#ifdef _AIX
3824 yes
Benjamin Petersona8332062009-09-11 22:36:27 +00003825#endif
3826
Benjamin Petersona8332062009-09-11 22:36:27 +00003827_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003828if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3829 $EGREP "yes" >/dev/null 2>&1; then
3830 { echo "$as_me:$LINENO: result: yes" >&5
3831echo "${ECHO_T}yes" >&6; }
Benjamin Petersona8332062009-09-11 22:36:27 +00003832cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003833#define _ALL_SOURCE 1
3834_ACEOF
3835
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003836else
3837 { echo "$as_me:$LINENO: result: no" >&5
3838echo "${ECHO_T}no" >&6; }
3839fi
Ronald Oussoren095d2822010-03-08 07:03:14 +00003840rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00003841
3842
3843
3844# Check for unsupported systems
3845case $ac_sys_system/$ac_sys_release in
3846atheos*|Linux*/1*)
3847 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3848 echo See README for details.
3849 exit 1;;
3850esac
3851
3852
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003853{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3854echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003855
3856# Check whether --with-suffix was given.
3857if test "${with_suffix+set}" = set; then
3858 withval=$with_suffix;
3859 case $withval in
3860 no) EXEEXT=;;
3861 yes) EXEEXT=.exe;;
3862 *) EXEEXT=$withval;;
3863 esac
3864fi
3865
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003866{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3867echo "${ECHO_T}$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003868
3869# Test whether we're running on a non-case-sensitive system, in which
3870# case we give a warning if no ext is given
3871
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003872{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3873echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003874if test ! -d CaseSensitiveTestDir; then
3875mkdir CaseSensitiveTestDir
3876fi
3877
3878if test -d casesensitivetestdir
3879then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003880 { echo "$as_me:$LINENO: result: yes" >&5
3881echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003882 BUILDEXEEXT=.exe
3883else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003884 { echo "$as_me:$LINENO: result: no" >&5
3885echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003886 BUILDEXEEXT=$EXEEXT
3887fi
3888rmdir CaseSensitiveTestDir
3889
3890case $MACHDEP in
3891bsdos*)
3892 case $CC in
3893 gcc) CC="$CC -D_HAVE_BSDI";;
3894 esac;;
3895esac
3896
3897case $ac_sys_system in
3898hp*|HP*)
3899 case $CC in
3900 cc|*/cc) CC="$CC -Ae";;
3901 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00003902SunOS*)
3903 # Some functions have a prototype only with that define, e.g. confstr
3904
3905cat >>confdefs.h <<\_ACEOF
3906#define __EXTENSIONS__ 1
3907_ACEOF
3908
3909 ;;
3910esac
3911
3912
3913
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003914{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3915echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003916if test -z "$LIBRARY"
3917then
3918 LIBRARY='libpython$(VERSION).a'
3919fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003920{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3921echo "${ECHO_T}$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003922
3923# LDLIBRARY is the name of the library to link against (as opposed to the
3924# name of the library into which to insert object files). BLDLIBRARY is also
3925# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3926# is blank as the main program is not linked directly against LDLIBRARY.
3927# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3928# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3929# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3930# DLLLIBRARY is the shared (i.e., DLL) library.
3931#
3932# RUNSHARED is used to run shared python without installed libraries
3933#
3934# INSTSONAME is the name of the shared library that will be use to install
3935# on the system - some systems like version suffix, others don't
3936
3937
3938
3939
3940
3941
3942LDLIBRARY="$LIBRARY"
3943BLDLIBRARY='$(LDLIBRARY)'
3944INSTSONAME='$(LDLIBRARY)'
3945DLLLIBRARY=''
3946LDLIBRARYDIR=''
3947RUNSHARED=''
3948
3949# LINKCC is the command that links the python executable -- default is $(CC).
3950# If CXX is set, and if it is needed to link a main function that was
3951# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3952# python might then depend on the C++ runtime
3953# This is altered for AIX in order to build the export list before
3954# linking.
3955
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003956{ echo "$as_me:$LINENO: checking LINKCC" >&5
3957echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003958if test -z "$LINKCC"
3959then
3960 LINKCC='$(PURIFY) $(MAINCC)'
3961 case $ac_sys_system in
3962 AIX*)
3963 exp_extra="\"\""
3964 if test $ac_sys_release -ge 5 -o \
3965 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3966 exp_extra="."
3967 fi
3968 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00003969 QNX*)
3970 # qcc must be used because the other compilers do not
3971 # support -N.
3972 LINKCC=qcc;;
3973 esac
3974fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003975{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3976echo "${ECHO_T}$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003977
3978# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3979# make sure we default having it set to "no": this is used by
3980# distutils.unixccompiler to know if it should add --enable-new-dtags
3981# to linker command lines, and failing to detect GNU ld simply results
3982# in the same bahaviour as before.
3983
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003984{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3985echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003986ac_prog=ld
3987if test "$GCC" = yes; then
3988 ac_prog=`$CC -print-prog-name=ld`
3989fi
3990case `"$ac_prog" -V 2>&1 < /dev/null` in
3991 *GNU*)
3992 GNULD=yes;;
3993 *)
3994 GNULD=no;;
3995esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003996{ echo "$as_me:$LINENO: result: $GNULD" >&5
3997echo "${ECHO_T}$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003998
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003999{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4000echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004001# Check whether --enable-shared was given.
4002if test "${enable_shared+set}" = set; then
4003 enableval=$enable_shared;
4004fi
4005
4006
4007if test -z "$enable_shared"
4008then
4009 case $ac_sys_system in
4010 CYGWIN* | atheos*)
4011 enable_shared="yes";;
4012 *)
4013 enable_shared="no";;
4014 esac
4015fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004016{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4017echo "${ECHO_T}$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004018
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004019{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4020echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004021# Check whether --enable-profiling was given.
4022if test "${enable_profiling+set}" = set; then
4023 enableval=$enable_profiling; ac_save_cc="$CC"
4024 CC="$CC -pg"
4025 if test "$cross_compiling" = yes; then
4026 ac_enable_profiling="no"
4027else
4028 cat >conftest.$ac_ext <<_ACEOF
4029/* confdefs.h. */
4030_ACEOF
4031cat confdefs.h >>conftest.$ac_ext
4032cat >>conftest.$ac_ext <<_ACEOF
4033/* end confdefs.h. */
4034int main() { return 0; }
4035_ACEOF
4036rm -f conftest$ac_exeext
4037if { (ac_try="$ac_link"
4038case "(($ac_try" in
4039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4040 *) ac_try_echo=$ac_try;;
4041esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004043 (eval "$ac_link") 2>&5
4044 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004046 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4047 { (case "(($ac_try" in
4048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4049 *) ac_try_echo=$ac_try;;
4050esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004052 (eval "$ac_try") 2>&5
4053 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004055 (exit $ac_status); }; }; then
4056 ac_enable_profiling="yes"
4057else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004058 echo "$as_me: program exited with status $ac_status" >&5
4059echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004060sed 's/^/| /' conftest.$ac_ext >&5
4061
4062( exit $ac_status )
4063ac_enable_profiling="no"
4064fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4066fi
4067
4068
4069 CC="$ac_save_cc"
4070fi
4071
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004072{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4073echo "${ECHO_T}$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004074
4075case "$ac_enable_profiling" in
4076 "yes")
4077 BASECFLAGS="-pg $BASECFLAGS"
4078 LDFLAGS="-pg $LDFLAGS"
4079 ;;
4080esac
4081
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004082{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4083echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004084
4085# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4086# library that we build, but we do not want to link against it (we
4087# will find it with a -framework option). For this reason there is an
4088# extra variable BLDLIBRARY against which Python and the extension
4089# modules are linked, BLDLIBRARY. This is normally the same as
4090# LDLIBRARY, but empty for MacOSX framework builds.
4091if test "$enable_framework"
4092then
4093 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4094 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4095 BLDLIBRARY=''
4096else
4097 BLDLIBRARY='$(LDLIBRARY)'
4098fi
4099
4100# Other platforms follow
4101if test $enable_shared = "yes"; then
4102
4103cat >>confdefs.h <<\_ACEOF
4104#define Py_ENABLE_SHARED 1
4105_ACEOF
4106
4107 case $ac_sys_system in
4108 CYGWIN*)
4109 LDLIBRARY='libpython$(VERSION).dll.a'
4110 DLLLIBRARY='libpython$(VERSION).dll'
4111 ;;
4112 SunOS*)
4113 LDLIBRARY='libpython$(VERSION).so'
4114 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4115 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4116 INSTSONAME="$LDLIBRARY".$SOVERSION
4117 ;;
4118 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4119 LDLIBRARY='libpython$(VERSION).so'
4120 BLDLIBRARY='-L. -lpython$(VERSION)'
4121 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4122 case $ac_sys_system in
4123 FreeBSD*)
4124 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4125 ;;
4126 esac
4127 INSTSONAME="$LDLIBRARY".$SOVERSION
4128 ;;
4129 hp*|HP*)
4130 case `uname -m` in
4131 ia64)
4132 LDLIBRARY='libpython$(VERSION).so'
4133 ;;
4134 *)
4135 LDLIBRARY='libpython$(VERSION).sl'
4136 ;;
4137 esac
4138 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4139 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4140 ;;
4141 OSF*)
4142 LDLIBRARY='libpython$(VERSION).so'
4143 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4144 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4145 ;;
4146 atheos*)
4147 LDLIBRARY='libpython$(VERSION).so'
4148 BLDLIBRARY='-L. -lpython$(VERSION)'
4149 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4150 ;;
4151 Darwin*)
4152 LDLIBRARY='libpython$(VERSION).dylib'
4153 BLDLIBRARY='-L. -lpython$(VERSION)'
4154 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4155 ;;
4156
4157 esac
4158else # shared is disabled
4159 case $ac_sys_system in
4160 CYGWIN*)
4161 BLDLIBRARY='$(LIBRARY)'
4162 LDLIBRARY='libpython$(VERSION).dll.a'
4163 ;;
4164 esac
4165fi
4166
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004167{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4168echo "${ECHO_T}$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004169
4170if test -n "$ac_tool_prefix"; then
4171 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4172set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004173{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4174echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004175if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004176 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004177else
4178 if test -n "$RANLIB"; then
4179 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4180else
4181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4182for as_dir in $PATH
4183do
4184 IFS=$as_save_IFS
4185 test -z "$as_dir" && as_dir=.
4186 for ac_exec_ext in '' $ac_executable_extensions; do
4187 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4188 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004189 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004190 break 2
4191 fi
4192done
4193done
4194IFS=$as_save_IFS
4195
4196fi
4197fi
4198RANLIB=$ac_cv_prog_RANLIB
4199if test -n "$RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004200 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4201echo "${ECHO_T}$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004202else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004203 { echo "$as_me:$LINENO: result: no" >&5
4204echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004205fi
4206
4207
4208fi
4209if test -z "$ac_cv_prog_RANLIB"; then
4210 ac_ct_RANLIB=$RANLIB
4211 # Extract the first word of "ranlib", so it can be a program name with args.
4212set dummy ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004213{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4214echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004215if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004216 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004217else
4218 if test -n "$ac_ct_RANLIB"; then
4219 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4220else
4221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4222for as_dir in $PATH
4223do
4224 IFS=$as_save_IFS
4225 test -z "$as_dir" && as_dir=.
4226 for ac_exec_ext in '' $ac_executable_extensions; do
4227 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4228 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004229 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004230 break 2
4231 fi
4232done
4233done
4234IFS=$as_save_IFS
4235
4236fi
4237fi
4238ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4239if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004240 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4241echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004242else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004243 { echo "$as_me:$LINENO: result: no" >&5
4244echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004245fi
4246
4247 if test "x$ac_ct_RANLIB" = x; then
4248 RANLIB=":"
4249 else
4250 case $cross_compiling:$ac_tool_warned in
4251yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004252{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4253whose name does not start with the host triplet. If you think this
4254configuration is useful to you, please write to autoconf@gnu.org." >&5
4255echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4256whose name does not start with the host triplet. If you think this
4257configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004258ac_tool_warned=yes ;;
4259esac
4260 RANLIB=$ac_ct_RANLIB
4261 fi
4262else
4263 RANLIB="$ac_cv_prog_RANLIB"
4264fi
4265
4266
4267for ac_prog in ar aal
4268do
4269 # Extract the first word of "$ac_prog", so it can be a program name with args.
4270set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004271{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004273if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004274 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004275else
4276 if test -n "$AR"; then
4277 ac_cv_prog_AR="$AR" # Let the user override the test.
4278else
4279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4280for as_dir in $PATH
4281do
4282 IFS=$as_save_IFS
4283 test -z "$as_dir" && as_dir=.
4284 for ac_exec_ext in '' $ac_executable_extensions; do
4285 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4286 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004287 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004288 break 2
4289 fi
4290done
4291done
4292IFS=$as_save_IFS
4293
4294fi
4295fi
4296AR=$ac_cv_prog_AR
4297if test -n "$AR"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004298 { echo "$as_me:$LINENO: result: $AR" >&5
4299echo "${ECHO_T}$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004300else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004301 { echo "$as_me:$LINENO: result: no" >&5
4302echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004303fi
4304
4305
4306 test -n "$AR" && break
4307done
4308test -n "$AR" || AR="ar"
4309
4310
4311# tweak ARFLAGS only if the user didn't set it on the command line
4312
4313if test -z "$ARFLAGS"
4314then
4315 ARFLAGS="rc"
4316fi
4317
4318
4319# Extract the first word of "svnversion", so it can be a program name with args.
4320set dummy svnversion; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004321{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4322echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004323if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004324 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004325else
4326 if test -n "$SVNVERSION"; then
4327 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4328else
4329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4330for as_dir in $PATH
4331do
4332 IFS=$as_save_IFS
4333 test -z "$as_dir" && as_dir=.
4334 for ac_exec_ext in '' $ac_executable_extensions; do
4335 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4336 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004337 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004338 break 2
4339 fi
4340done
4341done
4342IFS=$as_save_IFS
4343
4344 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4345fi
4346fi
4347SVNVERSION=$ac_cv_prog_SVNVERSION
4348if test -n "$SVNVERSION"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004349 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4350echo "${ECHO_T}$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004351else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004352 { echo "$as_me:$LINENO: result: no" >&5
4353echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004354fi
4355
4356
4357if test $SVNVERSION = found
4358then
4359 SVNVERSION="svnversion \$(srcdir)"
4360else
4361 SVNVERSION="echo Unversioned directory"
4362fi
4363
4364case $MACHDEP in
4365bsdos*|hp*|HP*)
4366 # install -d does not work on BSDI or HP-UX
4367 if test -z "$INSTALL"
4368 then
4369 INSTALL="${srcdir}/install-sh -c"
4370 fi
4371esac
4372ac_aux_dir=
4373for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4374 if test -f "$ac_dir/install-sh"; then
4375 ac_aux_dir=$ac_dir
4376 ac_install_sh="$ac_aux_dir/install-sh -c"
4377 break
4378 elif test -f "$ac_dir/install.sh"; then
4379 ac_aux_dir=$ac_dir
4380 ac_install_sh="$ac_aux_dir/install.sh -c"
4381 break
4382 elif test -f "$ac_dir/shtool"; then
4383 ac_aux_dir=$ac_dir
4384 ac_install_sh="$ac_aux_dir/shtool install -c"
4385 break
4386 fi
4387done
4388if test -z "$ac_aux_dir"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004389 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4390echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004391 { (exit 1); exit 1; }; }
4392fi
4393
4394# These three variables are undocumented and unsupported,
4395# and are intended to be withdrawn in a future Autoconf release.
4396# They can cause serious problems if a builder's source tree is in a directory
4397# whose full name contains unusual characters.
4398ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4399ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4400ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4401
4402
4403# Find a good install program. We prefer a C program (faster),
4404# so one script is as good as another. But avoid the broken or
4405# incompatible versions:
4406# SysV /etc/install, /usr/sbin/install
4407# SunOS /usr/etc/install
4408# IRIX /sbin/install
4409# AIX /bin/install
4410# AmigaOS /C/install, which installs bootblocks on floppy discs
4411# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4412# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4413# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4414# OS/2's system install, which has a completely different semantic
4415# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004416{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4417echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004418if test -z "$INSTALL"; then
4419if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004420 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004421else
4422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4423for as_dir in $PATH
4424do
4425 IFS=$as_save_IFS
4426 test -z "$as_dir" && as_dir=.
4427 # Account for people who put trailing slashes in PATH elements.
4428case $as_dir/ in
4429 ./ | .// | /cC/* | \
4430 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4431 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4432 /usr/ucb/* ) ;;
4433 *)
4434 # OSF1 and SCO ODT 3.0 have their own names for install.
4435 # Don't use installbsd from OSF since it installs stuff as root
4436 # by default.
4437 for ac_prog in ginstall scoinst install; do
4438 for ac_exec_ext in '' $ac_executable_extensions; do
4439 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4440 if test $ac_prog = install &&
4441 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4442 # AIX install. It has an incompatible calling convention.
4443 :
4444 elif test $ac_prog = install &&
4445 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4446 # program-specific install script used by HP pwplus--don't use.
4447 :
4448 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004449 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4450 break 3
Antoine Pitrou20327222009-05-24 20:39:11 +00004451 fi
4452 fi
4453 done
4454 done
4455 ;;
4456esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004457done
4458IFS=$as_save_IFS
4459
Antoine Pitrou20327222009-05-24 20:39:11 +00004460
4461fi
4462 if test "${ac_cv_path_install+set}" = set; then
4463 INSTALL=$ac_cv_path_install
4464 else
4465 # As a last resort, use the slow shell script. Don't cache a
4466 # value for INSTALL within a source directory, because that will
4467 # break other packages using the cache if that directory is
4468 # removed, or if the value is a relative name.
4469 INSTALL=$ac_install_sh
4470 fi
4471fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004472{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4473echo "${ECHO_T}$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004474
4475# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4476# It thinks the first close brace ends the variable substitution.
4477test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4478
4479test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4480
4481test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4482
4483
4484# Not every filesystem supports hard links
4485
4486if test -z "$LN" ; then
4487 case $ac_sys_system in
4488 CYGWIN*) LN="ln -s";;
4489 atheos*) LN="ln -s";;
4490 *) LN=ln;;
4491 esac
4492fi
4493
4494# Check for --with-pydebug
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004495{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4496echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004497
4498# Check whether --with-pydebug was given.
4499if test "${with_pydebug+set}" = set; then
4500 withval=$with_pydebug;
4501if test "$withval" != no
4502then
4503
4504cat >>confdefs.h <<\_ACEOF
4505#define Py_DEBUG 1
4506_ACEOF
4507
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004508 { echo "$as_me:$LINENO: result: yes" >&5
4509echo "${ECHO_T}yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00004510 Py_DEBUG='true'
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004511else { echo "$as_me:$LINENO: result: no" >&5
4512echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00004513fi
4514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004515 { echo "$as_me:$LINENO: result: no" >&5
4516echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004517fi
4518
4519
4520# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4521# merged with this chunk of code?
4522
4523# Optimizer/debugger flags
4524# ------------------------
4525# (The following bit of code is complicated enough - please keep things
4526# indented properly. Just pretend you're editing Python code. ;-)
4527
4528# There are two parallel sets of case statements below, one that checks to
4529# see if OPT was set and one that does BASECFLAGS setting based upon
4530# compiler and platform. BASECFLAGS tweaks need to be made even if the
4531# user set OPT.
4532
4533# tweak OPT based on compiler and platform, only if the user didn't set
4534# it on the command line
4535
4536if test -z "$OPT"
4537then
4538 case $GCC in
4539 yes)
4540 if test "$CC" != 'g++' ; then
4541 STRICT_PROTO="-Wstrict-prototypes"
4542 fi
4543 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4544 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4545 WRAP="-fwrapv"
4546 fi
4547 case $ac_cv_prog_cc_g in
4548 yes)
4549 if test "$Py_DEBUG" = 'true' ; then
4550 # Optimization messes up debuggers, so turn it off for
4551 # debug builds.
4552 OPT="-g -Wall $STRICT_PROTO"
4553 else
4554 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4555 fi
4556 ;;
4557 *)
4558 OPT="-O3 -Wall $STRICT_PROTO"
4559 ;;
4560 esac
4561 case $ac_sys_system in
4562 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4563 ;;
4564 esac
4565 ;;
4566
4567 *)
4568 OPT="-O"
4569 ;;
4570 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004571fi
4572
4573
4574
4575# The -arch flags for universal builds on OSX
4576UNIVERSAL_ARCH_FLAGS=
4577
4578
4579# tweak BASECFLAGS based on compiler and platform
4580case $GCC in
4581yes)
4582 # Python violates C99 rules, by casting between incompatible
4583 # pointer types. GCC may generate bad code as a result of that,
4584 # so use -fno-strict-aliasing if supported.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004585 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4586echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004587 ac_save_cc="$CC"
4588 CC="$CC -fno-strict-aliasing"
4589 if test "$cross_compiling" = yes; then
4590 ac_cv_no_strict_aliasing_ok=no
4591else
4592 cat >conftest.$ac_ext <<_ACEOF
4593/* confdefs.h. */
4594_ACEOF
4595cat confdefs.h >>conftest.$ac_ext
4596cat >>conftest.$ac_ext <<_ACEOF
4597/* end confdefs.h. */
4598int main() { return 0; }
4599_ACEOF
4600rm -f conftest$ac_exeext
4601if { (ac_try="$ac_link"
4602case "(($ac_try" in
4603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4604 *) ac_try_echo=$ac_try;;
4605esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004607 (eval "$ac_link") 2>&5
4608 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004610 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4611 { (case "(($ac_try" in
4612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4613 *) ac_try_echo=$ac_try;;
4614esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004616 (eval "$ac_try") 2>&5
4617 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004619 (exit $ac_status); }; }; then
4620 ac_cv_no_strict_aliasing_ok=yes
4621else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004622 echo "$as_me: program exited with status $ac_status" >&5
4623echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004624sed 's/^/| /' conftest.$ac_ext >&5
4625
4626( exit $ac_status )
4627ac_cv_no_strict_aliasing_ok=no
4628fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4630fi
4631
4632
4633 CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004634 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4635echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004636 if test $ac_cv_no_strict_aliasing_ok = yes
4637 then
4638 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4639 fi
4640
4641 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4642 # support. Without this, treatment of subnormals doesn't follow
4643 # the standard.
4644 case $ac_sys_machine in
4645 alpha*)
4646 BASECFLAGS="$BASECFLAGS -mieee"
4647 ;;
4648 esac
4649
4650 case $ac_sys_system in
4651 SCO_SV*)
4652 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4653 ;;
4654 # is there any other compiler on Darwin besides gcc?
4655 Darwin*)
4656 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4657 # used to be here, but non-Apple gcc doesn't accept them.
4658
4659
4660 if test "${enable_universalsdk}"; then
4661 UNIVERSAL_ARCH_FLAGS=""
4662 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4663 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4664 ARCH_RUN_32BIT=""
4665
4666 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4667 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004668 ARCH_RUN_32BIT="true"
Antoine Pitrou20327222009-05-24 20:39:11 +00004669
4670 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4671 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004672 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Antoine Pitrou20327222009-05-24 20:39:11 +00004673
Ronald Oussoren856624d2009-09-08 07:13:53 +00004674 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4675 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004676 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004677
4678 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4679 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004680 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004681
Antoine Pitrou20327222009-05-24 20:39:11 +00004682 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004683 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4684echo "$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 +00004685 { (exit 1); exit 1; }; }
4686
4687 fi
4688
4689
4690 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4691 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4692 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4693 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4694 fi
4695 fi
4696
4697 # Calculate the right deployment target for this build.
4698 #
4699 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4700 if test ${cur_target} '>' 10.2; then
4701 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004702 if test ${enable_universalsdk}; then
4703 if test "${UNIVERSAL_ARCHS}" = "all"; then
4704 # Ensure that the default platform for a
4705 # 4-way universal build is OSX 10.5,
4706 # that's the first OS release where
4707 # 4-way builds make sense.
4708 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00004709
4710 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4711 cur_target='10.5'
4712
4713 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4714 cur_target='10.5'
4715
4716 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4717 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004718 fi
4719 else
Ronald Oussoren175a8842010-02-11 13:40:06 +00004720 if test `/usr/bin/arch` = "i386"; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004721 # On Intel macs default to a deployment
4722 # target of 10.4, that's the first OSX
4723 # release with Intel support.
4724 cur_target="10.4"
4725 fi
4726 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004727 fi
4728 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4729
4730 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4731 # environment with a value that is the same as what we'll use
4732 # in the Makefile to ensure that we'll get the same compiler
4733 # environment during configure and build time.
4734 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4735 export MACOSX_DEPLOYMENT_TARGET
4736 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4737
4738 ;;
4739 OSF*)
4740 BASECFLAGS="$BASECFLAGS -mieee"
4741 ;;
4742 esac
4743 ;;
4744
4745*)
4746 case $ac_sys_system in
4747 OpenUNIX*|UnixWare*)
4748 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4749 ;;
4750 OSF*)
4751 BASECFLAGS="$BASECFLAGS -ieee -std"
4752 ;;
4753 SCO_SV*)
4754 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4755 ;;
4756 esac
4757 ;;
4758esac
4759
4760if test "$Py_DEBUG" = 'true'; then
4761 :
4762else
4763 OPT="-DNDEBUG $OPT"
4764fi
4765
4766if test "$ac_arch_flags"
4767then
4768 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4769fi
4770
4771# disable check for icc since it seems to pass, but generates a warning
4772if test "$CC" = icc
4773then
4774 ac_cv_opt_olimit_ok=no
4775fi
4776
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004777{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4778echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004779if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004780 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004781else
4782 ac_save_cc="$CC"
4783CC="$CC -OPT:Olimit=0"
4784if test "$cross_compiling" = yes; then
4785 ac_cv_opt_olimit_ok=no
4786else
4787 cat >conftest.$ac_ext <<_ACEOF
4788/* confdefs.h. */
4789_ACEOF
4790cat confdefs.h >>conftest.$ac_ext
4791cat >>conftest.$ac_ext <<_ACEOF
4792/* end confdefs.h. */
4793int main() { return 0; }
4794_ACEOF
4795rm -f conftest$ac_exeext
4796if { (ac_try="$ac_link"
4797case "(($ac_try" in
4798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4799 *) ac_try_echo=$ac_try;;
4800esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004802 (eval "$ac_link") 2>&5
4803 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004805 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4806 { (case "(($ac_try" in
4807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4808 *) ac_try_echo=$ac_try;;
4809esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004811 (eval "$ac_try") 2>&5
4812 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004814 (exit $ac_status); }; }; then
4815 ac_cv_opt_olimit_ok=yes
4816else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004817 echo "$as_me: program exited with status $ac_status" >&5
4818echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004819sed 's/^/| /' conftest.$ac_ext >&5
4820
4821( exit $ac_status )
4822ac_cv_opt_olimit_ok=no
4823fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4825fi
4826
4827
4828CC="$ac_save_cc"
4829fi
4830
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004831{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4832echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004833if test $ac_cv_opt_olimit_ok = yes; then
4834 case $ac_sys_system in
4835 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4836 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4837 # environment?
4838 Darwin*)
4839 ;;
4840 *)
4841 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4842 ;;
4843 esac
4844else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004845 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4846echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004847 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004848 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004849else
4850 ac_save_cc="$CC"
4851 CC="$CC -Olimit 1500"
4852 if test "$cross_compiling" = yes; then
4853 ac_cv_olimit_ok=no
4854else
4855 cat >conftest.$ac_ext <<_ACEOF
4856/* confdefs.h. */
4857_ACEOF
4858cat confdefs.h >>conftest.$ac_ext
4859cat >>conftest.$ac_ext <<_ACEOF
4860/* end confdefs.h. */
4861int main() { return 0; }
4862_ACEOF
4863rm -f conftest$ac_exeext
4864if { (ac_try="$ac_link"
4865case "(($ac_try" in
4866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4867 *) ac_try_echo=$ac_try;;
4868esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004870 (eval "$ac_link") 2>&5
4871 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004873 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4874 { (case "(($ac_try" in
4875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4876 *) ac_try_echo=$ac_try;;
4877esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004879 (eval "$ac_try") 2>&5
4880 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004882 (exit $ac_status); }; }; then
4883 ac_cv_olimit_ok=yes
4884else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004885 echo "$as_me: program exited with status $ac_status" >&5
4886echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004887sed 's/^/| /' conftest.$ac_ext >&5
4888
4889( exit $ac_status )
4890ac_cv_olimit_ok=no
4891fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4893fi
4894
4895
4896 CC="$ac_save_cc"
4897fi
4898
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004899 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4900echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004901 if test $ac_cv_olimit_ok = yes; then
4902 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4903 fi
4904fi
4905
4906# Check whether GCC supports PyArg_ParseTuple format
4907if test "$GCC" = "yes"
4908then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004909 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4910echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004911 save_CFLAGS=$CFLAGS
4912 CFLAGS="$CFLAGS -Werror"
4913 cat >conftest.$ac_ext <<_ACEOF
4914/* confdefs.h. */
4915_ACEOF
4916cat confdefs.h >>conftest.$ac_ext
4917cat >>conftest.$ac_ext <<_ACEOF
4918/* end confdefs.h. */
4919
4920 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4921
4922int
4923main ()
4924{
4925
4926 ;
4927 return 0;
4928}
4929_ACEOF
4930rm -f conftest.$ac_objext
4931if { (ac_try="$ac_compile"
4932case "(($ac_try" in
4933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4934 *) ac_try_echo=$ac_try;;
4935esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004937 (eval "$ac_compile") 2>conftest.er1
4938 ac_status=$?
4939 grep -v '^ *+' conftest.er1 >conftest.err
4940 rm -f conftest.er1
4941 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004943 (exit $ac_status); } && {
4944 test -z "$ac_c_werror_flag" ||
4945 test ! -s conftest.err
4946 } && test -s conftest.$ac_objext; then
4947
4948cat >>confdefs.h <<\_ACEOF
4949#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4950_ACEOF
4951
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004952 { echo "$as_me:$LINENO: result: yes" >&5
4953echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004954else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004955 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004956sed 's/^/| /' conftest.$ac_ext >&5
4957
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004958 { echo "$as_me:$LINENO: result: no" >&5
4959echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004960
4961fi
4962
4963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4964 CFLAGS=$save_CFLAGS
4965fi
4966
4967# On some compilers, pthreads are available without further options
4968# (e.g. MacOS X). On some of these systems, the compiler will not
4969# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4970# So we have to see first whether pthreads are available without
4971# options before we can check whether -Kpthread improves anything.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004972{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4973echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004974if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004975 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004976else
4977 if test "$cross_compiling" = yes; then
4978 ac_cv_pthread_is_default=no
4979else
4980 cat >conftest.$ac_ext <<_ACEOF
4981/* confdefs.h. */
4982_ACEOF
4983cat confdefs.h >>conftest.$ac_ext
4984cat >>conftest.$ac_ext <<_ACEOF
4985/* end confdefs.h. */
4986
4987#include <pthread.h>
4988
4989void* routine(void* p){return NULL;}
4990
4991int main(){
4992 pthread_t p;
4993 if(pthread_create(&p,NULL,routine,NULL)!=0)
4994 return 1;
4995 (void)pthread_detach(p);
4996 return 0;
4997}
4998
4999_ACEOF
5000rm -f conftest$ac_exeext
5001if { (ac_try="$ac_link"
5002case "(($ac_try" in
5003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5004 *) ac_try_echo=$ac_try;;
5005esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005007 (eval "$ac_link") 2>&5
5008 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005010 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5011 { (case "(($ac_try" in
5012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5013 *) ac_try_echo=$ac_try;;
5014esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005016 (eval "$ac_try") 2>&5
5017 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005019 (exit $ac_status); }; }; then
5020
5021 ac_cv_pthread_is_default=yes
5022 ac_cv_kthread=no
5023 ac_cv_pthread=no
5024
5025else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005026 echo "$as_me: program exited with status $ac_status" >&5
5027echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005028sed 's/^/| /' conftest.$ac_ext >&5
5029
5030( exit $ac_status )
5031ac_cv_pthread_is_default=no
5032fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5034fi
5035
5036
5037
5038fi
5039
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005040{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5041echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005042
5043
5044if test $ac_cv_pthread_is_default = yes
5045then
5046 ac_cv_kpthread=no
5047else
5048# -Kpthread, if available, provides the right #defines
5049# and linker options to make pthread_create available
5050# Some compilers won't report that they do not support -Kpthread,
5051# so we need to run a program to see whether it really made the
5052# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005053{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5054echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005055if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005056 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005057else
5058 ac_save_cc="$CC"
5059CC="$CC -Kpthread"
5060if test "$cross_compiling" = yes; then
5061 ac_cv_kpthread=no
5062else
5063 cat >conftest.$ac_ext <<_ACEOF
5064/* confdefs.h. */
5065_ACEOF
5066cat confdefs.h >>conftest.$ac_ext
5067cat >>conftest.$ac_ext <<_ACEOF
5068/* end confdefs.h. */
5069
5070#include <pthread.h>
5071
5072void* routine(void* p){return NULL;}
5073
5074int main(){
5075 pthread_t p;
5076 if(pthread_create(&p,NULL,routine,NULL)!=0)
5077 return 1;
5078 (void)pthread_detach(p);
5079 return 0;
5080}
5081
5082_ACEOF
5083rm -f conftest$ac_exeext
5084if { (ac_try="$ac_link"
5085case "(($ac_try" in
5086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5087 *) ac_try_echo=$ac_try;;
5088esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005090 (eval "$ac_link") 2>&5
5091 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005093 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5094 { (case "(($ac_try" in
5095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5096 *) ac_try_echo=$ac_try;;
5097esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005099 (eval "$ac_try") 2>&5
5100 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005102 (exit $ac_status); }; }; then
5103 ac_cv_kpthread=yes
5104else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005105 echo "$as_me: program exited with status $ac_status" >&5
5106echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005107sed 's/^/| /' conftest.$ac_ext >&5
5108
5109( exit $ac_status )
5110ac_cv_kpthread=no
5111fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5113fi
5114
5115
5116CC="$ac_save_cc"
5117fi
5118
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005119{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5120echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005121fi
5122
5123if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5124then
5125# -Kthread, if available, provides the right #defines
5126# and linker options to make pthread_create available
5127# Some compilers won't report that they do not support -Kthread,
5128# so we need to run a program to see whether it really made the
5129# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005130{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5131echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005132if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005133 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005134else
5135 ac_save_cc="$CC"
5136CC="$CC -Kthread"
5137if test "$cross_compiling" = yes; then
5138 ac_cv_kthread=no
5139else
5140 cat >conftest.$ac_ext <<_ACEOF
5141/* confdefs.h. */
5142_ACEOF
5143cat confdefs.h >>conftest.$ac_ext
5144cat >>conftest.$ac_ext <<_ACEOF
5145/* end confdefs.h. */
5146
5147#include <pthread.h>
5148
5149void* routine(void* p){return NULL;}
5150
5151int main(){
5152 pthread_t p;
5153 if(pthread_create(&p,NULL,routine,NULL)!=0)
5154 return 1;
5155 (void)pthread_detach(p);
5156 return 0;
5157}
5158
5159_ACEOF
5160rm -f conftest$ac_exeext
5161if { (ac_try="$ac_link"
5162case "(($ac_try" in
5163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5164 *) ac_try_echo=$ac_try;;
5165esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005167 (eval "$ac_link") 2>&5
5168 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005170 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5171 { (case "(($ac_try" in
5172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5173 *) ac_try_echo=$ac_try;;
5174esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005176 (eval "$ac_try") 2>&5
5177 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005179 (exit $ac_status); }; }; then
5180 ac_cv_kthread=yes
5181else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005182 echo "$as_me: program exited with status $ac_status" >&5
5183echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005184sed 's/^/| /' conftest.$ac_ext >&5
5185
5186( exit $ac_status )
5187ac_cv_kthread=no
5188fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5190fi
5191
5192
5193CC="$ac_save_cc"
5194fi
5195
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005196{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5197echo "${ECHO_T}$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005198fi
5199
5200if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5201then
5202# -pthread, if available, provides the right #defines
5203# and linker options to make pthread_create available
5204# Some compilers won't report that they do not support -pthread,
5205# so we need to run a program to see whether it really made the
5206# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005207{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5208echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005209if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005210 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005211else
5212 ac_save_cc="$CC"
5213CC="$CC -pthread"
5214if test "$cross_compiling" = yes; then
5215 ac_cv_pthread=no
5216else
5217 cat >conftest.$ac_ext <<_ACEOF
5218/* confdefs.h. */
5219_ACEOF
5220cat confdefs.h >>conftest.$ac_ext
5221cat >>conftest.$ac_ext <<_ACEOF
5222/* end confdefs.h. */
5223
5224#include <pthread.h>
5225
5226void* routine(void* p){return NULL;}
5227
5228int main(){
5229 pthread_t p;
5230 if(pthread_create(&p,NULL,routine,NULL)!=0)
5231 return 1;
5232 (void)pthread_detach(p);
5233 return 0;
5234}
5235
5236_ACEOF
5237rm -f conftest$ac_exeext
5238if { (ac_try="$ac_link"
5239case "(($ac_try" in
5240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5241 *) ac_try_echo=$ac_try;;
5242esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005244 (eval "$ac_link") 2>&5
5245 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5248 { (case "(($ac_try" in
5249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5250 *) ac_try_echo=$ac_try;;
5251esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005253 (eval "$ac_try") 2>&5
5254 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005256 (exit $ac_status); }; }; then
5257 ac_cv_pthread=yes
5258else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005259 echo "$as_me: program exited with status $ac_status" >&5
5260echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005261sed 's/^/| /' conftest.$ac_ext >&5
5262
5263( exit $ac_status )
5264ac_cv_pthread=no
5265fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5267fi
5268
5269
5270CC="$ac_save_cc"
5271fi
5272
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005273{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5274echo "${ECHO_T}$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005275fi
5276
5277# If we have set a CC compiler flag for thread support then
5278# check if it works for CXX, too.
5279ac_cv_cxx_thread=no
5280if test ! -z "$CXX"
5281then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005282{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5283echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005284ac_save_cxx="$CXX"
5285
5286if test "$ac_cv_kpthread" = "yes"
5287then
5288 CXX="$CXX -Kpthread"
5289 ac_cv_cxx_thread=yes
5290elif test "$ac_cv_kthread" = "yes"
5291then
5292 CXX="$CXX -Kthread"
5293 ac_cv_cxx_thread=yes
5294elif test "$ac_cv_pthread" = "yes"
5295then
5296 CXX="$CXX -pthread"
5297 ac_cv_cxx_thread=yes
5298fi
5299
5300if test $ac_cv_cxx_thread = yes
5301then
5302 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5303 $CXX -c conftest.$ac_ext 2>&5
5304 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5305 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5306 then
5307 ac_cv_cxx_thread=yes
5308 else
5309 ac_cv_cxx_thread=no
5310 fi
5311 rm -fr conftest*
5312fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005313{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5314echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005315fi
5316CXX="$ac_save_cxx"
5317
5318
5319# checks for header files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005320{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5321echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005322if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005323 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005324else
5325 cat >conftest.$ac_ext <<_ACEOF
5326/* confdefs.h. */
5327_ACEOF
5328cat confdefs.h >>conftest.$ac_ext
5329cat >>conftest.$ac_ext <<_ACEOF
5330/* end confdefs.h. */
5331#include <stdlib.h>
5332#include <stdarg.h>
5333#include <string.h>
5334#include <float.h>
5335
5336int
5337main ()
5338{
5339
5340 ;
5341 return 0;
5342}
5343_ACEOF
5344rm -f conftest.$ac_objext
5345if { (ac_try="$ac_compile"
5346case "(($ac_try" in
5347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5348 *) ac_try_echo=$ac_try;;
5349esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005351 (eval "$ac_compile") 2>conftest.er1
5352 ac_status=$?
5353 grep -v '^ *+' conftest.er1 >conftest.err
5354 rm -f conftest.er1
5355 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005357 (exit $ac_status); } && {
5358 test -z "$ac_c_werror_flag" ||
5359 test ! -s conftest.err
5360 } && test -s conftest.$ac_objext; then
5361 ac_cv_header_stdc=yes
5362else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005363 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005364sed 's/^/| /' conftest.$ac_ext >&5
5365
5366 ac_cv_header_stdc=no
5367fi
5368
5369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5370
5371if test $ac_cv_header_stdc = yes; then
5372 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5373 cat >conftest.$ac_ext <<_ACEOF
5374/* confdefs.h. */
5375_ACEOF
5376cat confdefs.h >>conftest.$ac_ext
5377cat >>conftest.$ac_ext <<_ACEOF
5378/* end confdefs.h. */
5379#include <string.h>
5380
5381_ACEOF
5382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5383 $EGREP "memchr" >/dev/null 2>&1; then
5384 :
5385else
5386 ac_cv_header_stdc=no
5387fi
Ronald Oussoren095d2822010-03-08 07:03:14 +00005388rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005389
5390fi
5391
5392if test $ac_cv_header_stdc = yes; then
5393 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5394 cat >conftest.$ac_ext <<_ACEOF
5395/* confdefs.h. */
5396_ACEOF
5397cat confdefs.h >>conftest.$ac_ext
5398cat >>conftest.$ac_ext <<_ACEOF
5399/* end confdefs.h. */
5400#include <stdlib.h>
5401
5402_ACEOF
5403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5404 $EGREP "free" >/dev/null 2>&1; then
5405 :
5406else
5407 ac_cv_header_stdc=no
5408fi
Ronald Oussoren095d2822010-03-08 07:03:14 +00005409rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005410
5411fi
5412
5413if test $ac_cv_header_stdc = yes; then
5414 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5415 if test "$cross_compiling" = yes; then
5416 :
5417else
5418 cat >conftest.$ac_ext <<_ACEOF
5419/* confdefs.h. */
5420_ACEOF
5421cat confdefs.h >>conftest.$ac_ext
5422cat >>conftest.$ac_ext <<_ACEOF
5423/* end confdefs.h. */
5424#include <ctype.h>
5425#include <stdlib.h>
5426#if ((' ' & 0x0FF) == 0x020)
5427# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5428# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5429#else
5430# define ISLOWER(c) \
5431 (('a' <= (c) && (c) <= 'i') \
5432 || ('j' <= (c) && (c) <= 'r') \
5433 || ('s' <= (c) && (c) <= 'z'))
5434# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5435#endif
5436
5437#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5438int
5439main ()
5440{
5441 int i;
5442 for (i = 0; i < 256; i++)
5443 if (XOR (islower (i), ISLOWER (i))
5444 || toupper (i) != TOUPPER (i))
5445 return 2;
5446 return 0;
5447}
5448_ACEOF
5449rm -f conftest$ac_exeext
5450if { (ac_try="$ac_link"
5451case "(($ac_try" in
5452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5453 *) ac_try_echo=$ac_try;;
5454esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005456 (eval "$ac_link") 2>&5
5457 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005459 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5460 { (case "(($ac_try" in
5461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5462 *) ac_try_echo=$ac_try;;
5463esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005465 (eval "$ac_try") 2>&5
5466 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005468 (exit $ac_status); }; }; then
5469 :
5470else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005471 echo "$as_me: program exited with status $ac_status" >&5
5472echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005473sed 's/^/| /' conftest.$ac_ext >&5
5474
5475( exit $ac_status )
5476ac_cv_header_stdc=no
5477fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5479fi
5480
5481
5482fi
5483fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005484{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5485echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005486if test $ac_cv_header_stdc = yes; then
5487
5488cat >>confdefs.h <<\_ACEOF
5489#define STDC_HEADERS 1
5490_ACEOF
5491
5492fi
5493
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005494# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5505 inttypes.h stdint.h unistd.h
5506do
5507as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5508{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5509echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5510if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5511 echo $ECHO_N "(cached) $ECHO_C" >&6
5512else
5513 cat >conftest.$ac_ext <<_ACEOF
5514/* confdefs.h. */
5515_ACEOF
5516cat confdefs.h >>conftest.$ac_ext
5517cat >>conftest.$ac_ext <<_ACEOF
5518/* end confdefs.h. */
5519$ac_includes_default
5520
5521#include <$ac_header>
5522_ACEOF
5523rm -f conftest.$ac_objext
5524if { (ac_try="$ac_compile"
5525case "(($ac_try" in
5526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5527 *) ac_try_echo=$ac_try;;
5528esac
5529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5530 (eval "$ac_compile") 2>conftest.er1
5531 ac_status=$?
5532 grep -v '^ *+' conftest.er1 >conftest.err
5533 rm -f conftest.er1
5534 cat conftest.err >&5
5535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5536 (exit $ac_status); } && {
5537 test -z "$ac_c_werror_flag" ||
5538 test ! -s conftest.err
5539 } && test -s conftest.$ac_objext; then
5540 eval "$as_ac_Header=yes"
5541else
5542 echo "$as_me: failed program was:" >&5
5543sed 's/^/| /' conftest.$ac_ext >&5
5544
5545 eval "$as_ac_Header=no"
5546fi
5547
5548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5549fi
5550ac_res=`eval echo '${'$as_ac_Header'}'`
5551 { echo "$as_me:$LINENO: result: $ac_res" >&5
5552echo "${ECHO_T}$ac_res" >&6; }
5553if test `eval echo '${'$as_ac_Header'}'` = yes; then
5554 cat >>confdefs.h <<_ACEOF
5555#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5556_ACEOF
5557
5558fi
5559
5560done
5561
5562
Antoine Pitrou20327222009-05-24 20:39:11 +00005563
Martin v. Löwis11437992002-04-12 09:54:03 +00005564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
Anthony Baxter8a560de2004-10-13 15:30:56 +00005599
Martin v. Löwisc3001752005-01-23 09:27:24 +00005600
Martin v. Löwis11017b12006-01-14 18:12:57 +00005601
Thomas Wouters477c8d52006-05-27 19:21:47 +00005602
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005603
5604
5605
5606
5607
5608
5609
5610
Thomas Wouters89f507f2006-12-13 04:49:30 +00005611
Christian Heimes043d6f62008-01-07 17:19:16 +00005612
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005613
5614
Christian Heimesbbe741d2008-03-28 10:53:29 +00005615
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005616
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005617for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5618fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005619ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005620shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005621unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005622sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5623sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005624sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005625sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005626sys/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 +00005627sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005628bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005629do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005630as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005631if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005632 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5633echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005634if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005635 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005636fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005637ac_res=`eval echo '${'$as_ac_Header'}'`
5638 { echo "$as_me:$LINENO: result: $ac_res" >&5
5639echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005640else
Martin v. Löwis11437992002-04-12 09:54:03 +00005641 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005642{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5643echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005645/* confdefs.h. */
5646_ACEOF
5647cat confdefs.h >>conftest.$ac_ext
5648cat >>conftest.$ac_ext <<_ACEOF
5649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005650$ac_includes_default
5651#include <$ac_header>
5652_ACEOF
5653rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005654if { (ac_try="$ac_compile"
5655case "(($ac_try" in
5656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5657 *) ac_try_echo=$ac_try;;
5658esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005660 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005662 grep -v '^ *+' conftest.er1 >conftest.err
5663 rm -f conftest.er1
5664 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005666 (exit $ac_status); } && {
5667 test -z "$ac_c_werror_flag" ||
5668 test ! -s conftest.err
5669 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005671else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005673sed 's/^/| /' conftest.$ac_ext >&5
5674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005675 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005677
5678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005679{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5680echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005681
5682# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005683{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5684echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005686/* confdefs.h. */
5687_ACEOF
5688cat confdefs.h >>conftest.$ac_ext
5689cat >>conftest.$ac_ext <<_ACEOF
5690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005691#include <$ac_header>
5692_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005693if { (ac_try="$ac_cpp conftest.$ac_ext"
5694case "(($ac_try" in
5695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5696 *) ac_try_echo=$ac_try;;
5697esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005700 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005701 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005702 rm -f conftest.er1
5703 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005705 (exit $ac_status); } >/dev/null && {
5706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5707 test ! -s conftest.err
5708 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005709 ac_header_preproc=yes
5710else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005712sed 's/^/| /' conftest.$ac_ext >&5
5713
Martin v. Löwis11437992002-04-12 09:54:03 +00005714 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005716
Martin v. Löwis11437992002-04-12 09:54:03 +00005717rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005718{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5719echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005720
5721# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005722case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5723 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005724 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5725echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5726 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5727echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005728 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005729 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005730 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005731 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5732echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5733 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5734echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5735 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5736echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5737 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5738echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5739 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5740echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5741 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5742echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005743 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005744## -------------------------------------- ##
5745## Report this to http://bugs.python.org/ ##
5746## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005747_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005748 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005749 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005750esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005751{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5752echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005753if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005754 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005755else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005756 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005757fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005758ac_res=`eval echo '${'$as_ac_Header'}'`
5759 { echo "$as_me:$LINENO: result: $ac_res" >&5
5760echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005761
5762fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005763if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005764 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005765#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005766_ACEOF
5767
5768fi
5769
Guido van Rossum627b2d71993-12-24 10:39:16 +00005770done
5771
Martin v. Löwis11437992002-04-12 09:54:03 +00005772
5773
5774
5775
5776
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005777ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005778for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005779 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5780{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5781echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005782if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005784else
Martin v. Löwis11437992002-04-12 09:54:03 +00005785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005786/* confdefs.h. */
5787_ACEOF
5788cat confdefs.h >>conftest.$ac_ext
5789cat >>conftest.$ac_ext <<_ACEOF
5790/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005791#include <sys/types.h>
5792#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005793
Martin v. Löwis11437992002-04-12 09:54:03 +00005794int
5795main ()
5796{
5797if ((DIR *) 0)
5798return 0;
5799 ;
5800 return 0;
5801}
5802_ACEOF
5803rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005804if { (ac_try="$ac_compile"
5805case "(($ac_try" in
5806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5807 *) ac_try_echo=$ac_try;;
5808esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005812 grep -v '^ *+' conftest.er1 >conftest.err
5813 rm -f conftest.er1
5814 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005816 (exit $ac_status); } && {
5817 test -z "$ac_c_werror_flag" ||
5818 test ! -s conftest.err
5819 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005820 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005821else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005823sed 's/^/| /' conftest.$ac_ext >&5
5824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005825 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005827
5828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005829fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005830ac_res=`eval echo '${'$as_ac_Header'}'`
5831 { echo "$as_me:$LINENO: result: $ac_res" >&5
5832echo "${ECHO_T}$ac_res" >&6; }
5833if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005834 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005835#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005836_ACEOF
5837
5838ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005839fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005840
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005841done
5842# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5843if test $ac_header_dirent = dirent.h; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005844 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5845echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005846if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005848else
Martin v. Löwis11437992002-04-12 09:54:03 +00005849 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005850cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005851/* confdefs.h. */
5852_ACEOF
5853cat confdefs.h >>conftest.$ac_ext
5854cat >>conftest.$ac_ext <<_ACEOF
5855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005857/* Override any GCC internal prototype to avoid an error.
5858 Use char because int might match the return type of a GCC
5859 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005860#ifdef __cplusplus
5861extern "C"
5862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005863char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005864int
5865main ()
5866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005867return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005868 ;
5869 return 0;
5870}
5871_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005872for ac_lib in '' dir; do
5873 if test -z "$ac_lib"; then
5874 ac_res="none required"
5875 else
5876 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005877 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005878 fi
5879 rm -f conftest.$ac_objext conftest$ac_exeext
5880if { (ac_try="$ac_link"
5881case "(($ac_try" in
5882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5883 *) ac_try_echo=$ac_try;;
5884esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005886 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005887 ac_status=$?
5888 grep -v '^ *+' conftest.er1 >conftest.err
5889 rm -f conftest.er1
5890 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005892 (exit $ac_status); } && {
5893 test -z "$ac_c_werror_flag" ||
5894 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005895 } && test -s conftest$ac_exeext &&
5896 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005897 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005898else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005899 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005900sed 's/^/| /' conftest.$ac_ext >&5
5901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005902
Thomas Wouters477c8d52006-05-27 19:21:47 +00005903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005904
5905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5906 conftest$ac_exeext
5907 if test "${ac_cv_search_opendir+set}" = set; then
5908 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005910done
5911if test "${ac_cv_search_opendir+set}" = set; then
5912 :
5913else
5914 ac_cv_search_opendir=no
5915fi
5916rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005917LIBS=$ac_func_search_save_LIBS
5918fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005919{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5920echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005921ac_res=$ac_cv_search_opendir
5922if test "$ac_res" != no; then
5923 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005924
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005925fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005926
Michael W. Hudson54241132001-12-07 15:38:26 +00005927else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005928 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5929echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005930if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005931 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005932else
5933 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005935/* confdefs.h. */
5936_ACEOF
5937cat confdefs.h >>conftest.$ac_ext
5938cat >>conftest.$ac_ext <<_ACEOF
5939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005941/* Override any GCC internal prototype to avoid an error.
5942 Use char because int might match the return type of a GCC
5943 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005944#ifdef __cplusplus
5945extern "C"
5946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005947char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005948int
5949main ()
5950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005951return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005952 ;
5953 return 0;
5954}
5955_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005956for ac_lib in '' x; do
5957 if test -z "$ac_lib"; then
5958 ac_res="none required"
5959 else
5960 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005961 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005962 fi
5963 rm -f conftest.$ac_objext conftest$ac_exeext
5964if { (ac_try="$ac_link"
5965case "(($ac_try" in
5966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5967 *) ac_try_echo=$ac_try;;
5968esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005970 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005971 ac_status=$?
5972 grep -v '^ *+' conftest.er1 >conftest.err
5973 rm -f conftest.er1
5974 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005976 (exit $ac_status); } && {
5977 test -z "$ac_c_werror_flag" ||
5978 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005979 } && test -s conftest$ac_exeext &&
5980 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005981 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005982else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005983 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005984sed 's/^/| /' conftest.$ac_ext >&5
5985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005986
Thomas Wouters477c8d52006-05-27 19:21:47 +00005987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005988
5989rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5990 conftest$ac_exeext
5991 if test "${ac_cv_search_opendir+set}" = set; then
5992 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005994done
5995if test "${ac_cv_search_opendir+set}" = set; then
5996 :
5997else
5998 ac_cv_search_opendir=no
5999fi
6000rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006001LIBS=$ac_func_search_save_LIBS
6002fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006003{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6004echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006005ac_res=$ac_cv_search_opendir
6006if test "$ac_res" != no; then
6007 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006009fi
6010
6011fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006012
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006013{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6014echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006015if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006016 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006017else
6018 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006019/* confdefs.h. */
6020_ACEOF
6021cat confdefs.h >>conftest.$ac_ext
6022cat >>conftest.$ac_ext <<_ACEOF
6023/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006025int
6026main ()
6027{
6028return makedev(0, 0);
6029 ;
6030 return 0;
6031}
6032_ACEOF
6033rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006034if { (ac_try="$ac_link"
6035case "(($ac_try" in
6036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6037 *) ac_try_echo=$ac_try;;
6038esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006040 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006042 grep -v '^ *+' conftest.er1 >conftest.err
6043 rm -f conftest.er1
6044 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006046 (exit $ac_status); } && {
6047 test -z "$ac_c_werror_flag" ||
6048 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006049 } && test -s conftest$ac_exeext &&
6050 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006051 ac_cv_header_sys_types_h_makedev=yes
6052else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006054sed 's/^/| /' conftest.$ac_ext >&5
6055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006056 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006058
6059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006060 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061
6062fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006063{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6064echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065
6066if test $ac_cv_header_sys_types_h_makedev = no; then
6067if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006068 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6069echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006071 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006072fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006073{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6074echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075else
6076 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006077{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6078echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006080/* confdefs.h. */
6081_ACEOF
6082cat confdefs.h >>conftest.$ac_ext
6083cat >>conftest.$ac_ext <<_ACEOF
6084/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085$ac_includes_default
6086#include <sys/mkdev.h>
6087_ACEOF
6088rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006089if { (ac_try="$ac_compile"
6090case "(($ac_try" in
6091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6092 *) ac_try_echo=$ac_try;;
6093esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006095 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006097 grep -v '^ *+' conftest.er1 >conftest.err
6098 rm -f conftest.er1
6099 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006101 (exit $ac_status); } && {
6102 test -z "$ac_c_werror_flag" ||
6103 test ! -s conftest.err
6104 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 ac_header_compiler=yes
6106else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006108sed 's/^/| /' conftest.$ac_ext >&5
6109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006110 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006112
6113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006114{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6115echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006116
6117# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006118{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6119echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006121/* confdefs.h. */
6122_ACEOF
6123cat confdefs.h >>conftest.$ac_ext
6124cat >>conftest.$ac_ext <<_ACEOF
6125/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006126#include <sys/mkdev.h>
6127_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006128if { (ac_try="$ac_cpp conftest.$ac_ext"
6129case "(($ac_try" in
6130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6131 *) ac_try_echo=$ac_try;;
6132esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006136 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006137 rm -f conftest.er1
6138 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140 (exit $ac_status); } >/dev/null && {
6141 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6142 test ! -s conftest.err
6143 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144 ac_header_preproc=yes
6145else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006147sed 's/^/| /' conftest.$ac_ext >&5
6148
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149 ac_header_preproc=no
6150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006151
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006152rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006153{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6154echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155
6156# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006157case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6158 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006159 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6160echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6161 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6162echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006163 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006164 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006165 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006166 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6167echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6168 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6169echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6170 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6171echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6172 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6173echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6174 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6175echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6176 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6177echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006179## -------------------------------------- ##
6180## Report this to http://bugs.python.org/ ##
6181## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006182_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006184 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006186{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6187echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006189 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190else
6191 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6192fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006193{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6194echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195
6196fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006197if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198
6199cat >>confdefs.h <<\_ACEOF
6200#define MAJOR_IN_MKDEV 1
6201_ACEOF
6202
6203fi
6204
6205
6206
6207 if test $ac_cv_header_sys_mkdev_h = no; then
6208 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006209 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6210echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006212 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006214{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6215echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216else
6217 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006218{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6219echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006221/* confdefs.h. */
6222_ACEOF
6223cat confdefs.h >>conftest.$ac_ext
6224cat >>conftest.$ac_ext <<_ACEOF
6225/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226$ac_includes_default
6227#include <sys/sysmacros.h>
6228_ACEOF
6229rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006230if { (ac_try="$ac_compile"
6231case "(($ac_try" in
6232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6233 *) ac_try_echo=$ac_try;;
6234esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006238 grep -v '^ *+' conftest.er1 >conftest.err
6239 rm -f conftest.er1
6240 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006242 (exit $ac_status); } && {
6243 test -z "$ac_c_werror_flag" ||
6244 test ! -s conftest.err
6245 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246 ac_header_compiler=yes
6247else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006249sed 's/^/| /' conftest.$ac_ext >&5
6250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253
6254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006255{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6256echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257
6258# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006259{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6260echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006262/* confdefs.h. */
6263_ACEOF
6264cat confdefs.h >>conftest.$ac_ext
6265cat >>conftest.$ac_ext <<_ACEOF
6266/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267#include <sys/sysmacros.h>
6268_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006269if { (ac_try="$ac_cpp conftest.$ac_ext"
6270case "(($ac_try" in
6271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6272 *) ac_try_echo=$ac_try;;
6273esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006275 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006277 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278 rm -f conftest.er1
6279 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006281 (exit $ac_status); } >/dev/null && {
6282 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6283 test ! -s conftest.err
6284 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285 ac_header_preproc=yes
6286else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006288sed 's/^/| /' conftest.$ac_ext >&5
6289
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290 ac_header_preproc=no
6291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006292
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006293rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006294{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6295echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296
6297# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006298case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6299 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006300 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6301echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6302 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6303echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006304 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006305 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006306 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006307 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6308echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6309 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6310echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6311 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6312echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6313 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6314echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6315 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6316echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6317 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6318echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006319 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006320## -------------------------------------- ##
6321## Report this to http://bugs.python.org/ ##
6322## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006323_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006324 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006325 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006326esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006327{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6328echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006329if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006330 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006331else
6332 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6333fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006334{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6335echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006336
6337fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006338if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006339
6340cat >>confdefs.h <<\_ACEOF
6341#define MAJOR_IN_SYSMACROS 1
6342_ACEOF
6343
6344fi
6345
6346
6347 fi
6348fi
6349
Michael W. Hudson54241132001-12-07 15:38:26 +00006350
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006352
6353for ac_header in term.h
6354do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006355as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6356{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6357echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006358if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006359 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360else
6361 cat >conftest.$ac_ext <<_ACEOF
6362/* confdefs.h. */
6363_ACEOF
6364cat confdefs.h >>conftest.$ac_ext
6365cat >>conftest.$ac_ext <<_ACEOF
6366/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006367
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006368#ifdef HAVE_CURSES_H
6369#include <curses.h>
6370#endif
6371
6372
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006373#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374_ACEOF
6375rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006376if { (ac_try="$ac_compile"
6377case "(($ac_try" in
6378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6379 *) ac_try_echo=$ac_try;;
6380esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006383 ac_status=$?
6384 grep -v '^ *+' conftest.er1 >conftest.err
6385 rm -f conftest.er1
6386 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006388 (exit $ac_status); } && {
6389 test -z "$ac_c_werror_flag" ||
6390 test ! -s conftest.err
6391 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006392 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006393else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006394 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006395sed 's/^/| /' conftest.$ac_ext >&5
6396
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006399
6400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006401fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006402ac_res=`eval echo '${'$as_ac_Header'}'`
6403 { echo "$as_me:$LINENO: result: $ac_res" >&5
6404echo "${ECHO_T}$ac_res" >&6; }
6405if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006406 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006407#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006408_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006409
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006410fi
6411
6412done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006413
6414
Martin v. Löwis11017b12006-01-14 18:12:57 +00006415# On Linux, netlink.h requires asm/types.h
6416
6417for ac_header in linux/netlink.h
6418do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006419as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6420{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6421echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006422if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006424else
6425 cat >conftest.$ac_ext <<_ACEOF
6426/* confdefs.h. */
6427_ACEOF
6428cat confdefs.h >>conftest.$ac_ext
6429cat >>conftest.$ac_ext <<_ACEOF
6430/* end confdefs.h. */
6431
6432#ifdef HAVE_ASM_TYPES_H
6433#include <asm/types.h>
6434#endif
6435#ifdef HAVE_SYS_SOCKET_H
6436#include <sys/socket.h>
6437#endif
6438
6439
6440#include <$ac_header>
6441_ACEOF
6442rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006443if { (ac_try="$ac_compile"
6444case "(($ac_try" in
6445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6446 *) ac_try_echo=$ac_try;;
6447esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006450 ac_status=$?
6451 grep -v '^ *+' conftest.er1 >conftest.err
6452 rm -f conftest.er1
6453 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006455 (exit $ac_status); } && {
6456 test -z "$ac_c_werror_flag" ||
6457 test ! -s conftest.err
6458 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006459 eval "$as_ac_Header=yes"
6460else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006461 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006462sed 's/^/| /' conftest.$ac_ext >&5
6463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006464 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006466
6467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006468fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006469ac_res=`eval echo '${'$as_ac_Header'}'`
6470 { echo "$as_me:$LINENO: result: $ac_res" >&5
6471echo "${ECHO_T}$ac_res" >&6; }
6472if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006473 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006474#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006475_ACEOF
6476
6477fi
6478
6479done
6480
6481
Guido van Rossum627b2d71993-12-24 10:39:16 +00006482# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006483was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006484{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6485echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006486cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006487/* confdefs.h. */
6488_ACEOF
6489cat confdefs.h >>conftest.$ac_ext
6490cat >>conftest.$ac_ext <<_ACEOF
6491/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006493
6494_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006496 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006497 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006498else
Martin v. Löwis11437992002-04-12 09:54:03 +00006499
6500
6501cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006502#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006503_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006504
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006505
Guido van Rossum627b2d71993-12-24 10:39:16 +00006506fi
Ronald Oussoren095d2822010-03-08 07:03:14 +00006507rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006508
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006509{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6510echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006511
Neal Norwitz11690112002-07-30 01:08:28 +00006512# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006513{ echo "$as_me:$LINENO: checking for makedev" >&5
6514echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006515cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006516/* confdefs.h. */
6517_ACEOF
6518cat confdefs.h >>conftest.$ac_ext
6519cat >>conftest.$ac_ext <<_ACEOF
6520/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006521#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006522int
6523main ()
6524{
6525 makedev(0, 0)
6526 ;
6527 return 0;
6528}
6529_ACEOF
6530rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006531if { (ac_try="$ac_link"
6532case "(($ac_try" in
6533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6534 *) ac_try_echo=$ac_try;;
6535esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006537 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006539 grep -v '^ *+' conftest.er1 >conftest.err
6540 rm -f conftest.er1
6541 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006543 (exit $ac_status); } && {
6544 test -z "$ac_c_werror_flag" ||
6545 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006546 } && test -s conftest$ac_exeext &&
6547 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006548 ac_cv_has_makedev=yes
6549else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006551sed 's/^/| /' conftest.$ac_ext >&5
6552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006553 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555
6556rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006557 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006558if test "$ac_cv_has_makedev" = "no"; then
6559 # we didn't link, try if _OSF_SOURCE will allow us to link
6560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006561/* confdefs.h. */
6562_ACEOF
6563cat confdefs.h >>conftest.$ac_ext
6564cat >>conftest.$ac_ext <<_ACEOF
6565/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006566
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006567#define _OSF_SOURCE 1
6568#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006569
Neal Norwitz11690112002-07-30 01:08:28 +00006570int
6571main ()
6572{
6573 makedev(0, 0)
6574 ;
6575 return 0;
6576}
6577_ACEOF
6578rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006579if { (ac_try="$ac_link"
6580case "(($ac_try" in
6581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6582 *) ac_try_echo=$ac_try;;
6583esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006585 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006587 grep -v '^ *+' conftest.er1 >conftest.err
6588 rm -f conftest.er1
6589 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006591 (exit $ac_status); } && {
6592 test -z "$ac_c_werror_flag" ||
6593 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006594 } && test -s conftest$ac_exeext &&
6595 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006596 ac_cv_has_makedev=yes
6597else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006599sed 's/^/| /' conftest.$ac_ext >&5
6600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006601 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006603
6604rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006605 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006606 if test "$ac_cv_has_makedev" = "yes"; then
6607
6608cat >>confdefs.h <<\_ACEOF
6609#define _OSF_SOURCE 1
6610_ACEOF
6611
6612 fi
6613fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006614{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6615echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006616if test "$ac_cv_has_makedev" = "yes"; then
6617
6618cat >>confdefs.h <<\_ACEOF
6619#define HAVE_MAKEDEV 1
6620_ACEOF
6621
6622fi
6623
Martin v. Löwis399a6892002-10-04 10:22:02 +00006624# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6625# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6626# defined, but the compiler does not support pragma redefine_extname,
6627# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6628# structures (such as rlimit64) without declaring them. As a
6629# work-around, disable LFS on such configurations
6630
6631use_lfs=yes
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006632{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6633echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006635/* confdefs.h. */
6636_ACEOF
6637cat confdefs.h >>conftest.$ac_ext
6638cat >>conftest.$ac_ext <<_ACEOF
6639/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006640
6641#define _LARGEFILE_SOURCE 1
6642#define _FILE_OFFSET_BITS 64
6643#include <sys/resource.h>
6644
Martin v. Löwis399a6892002-10-04 10:22:02 +00006645int
6646main ()
6647{
6648struct rlimit foo;
6649 ;
6650 return 0;
6651}
6652_ACEOF
6653rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006654if { (ac_try="$ac_compile"
6655case "(($ac_try" in
6656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6657 *) ac_try_echo=$ac_try;;
6658esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006660 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006662 grep -v '^ *+' conftest.er1 >conftest.err
6663 rm -f conftest.er1
6664 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006666 (exit $ac_status); } && {
6667 test -z "$ac_c_werror_flag" ||
6668 test ! -s conftest.err
6669 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006670 sol_lfs_bug=no
6671else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006673sed 's/^/| /' conftest.$ac_ext >&5
6674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006677
6678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006679{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6680echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006681if test "$sol_lfs_bug" = "yes"; then
6682 use_lfs=no
6683fi
6684
6685if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006686# Two defines needed to enable largefile support on various platforms
6687# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689cat >>confdefs.h <<\_ACEOF
6690#define _LARGEFILE_SOURCE 1
6691_ACEOF
6692
6693
6694cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006695#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006696_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006697
Martin v. Löwis399a6892002-10-04 10:22:02 +00006698fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006699
Guido van Rossum84e7b241996-08-19 21:59:00 +00006700# Add some code to confdefs.h so that the test for off_t works on SCO
6701cat >> confdefs.h <<\EOF
6702#if defined(SCO_DS)
6703#undef _OFF_T
6704#endif
6705EOF
6706
Guido van Rossumef2255b2000-03-10 22:30:29 +00006707# Type availability checks
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006708{ echo "$as_me:$LINENO: checking for mode_t" >&5
6709echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006710if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006712else
Benjamin Petersona8332062009-09-11 22:36:27 +00006713 cat >conftest.$ac_ext <<_ACEOF
6714/* confdefs.h. */
6715_ACEOF
6716cat confdefs.h >>conftest.$ac_ext
6717cat >>conftest.$ac_ext <<_ACEOF
6718/* end confdefs.h. */
6719$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006720typedef mode_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006721int
6722main ()
6723{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006724if ((ac__type_new_ *) 0)
6725 return 0;
6726if (sizeof (ac__type_new_))
6727 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006728 ;
6729 return 0;
6730}
6731_ACEOF
6732rm -f conftest.$ac_objext
6733if { (ac_try="$ac_compile"
6734case "(($ac_try" in
6735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6736 *) ac_try_echo=$ac_try;;
6737esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006739 (eval "$ac_compile") 2>conftest.er1
6740 ac_status=$?
6741 grep -v '^ *+' conftest.er1 >conftest.err
6742 rm -f conftest.er1
6743 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006745 (exit $ac_status); } && {
6746 test -z "$ac_c_werror_flag" ||
6747 test ! -s conftest.err
6748 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006749 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006750else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006752sed 's/^/| /' conftest.$ac_ext >&5
6753
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006754 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006756
6757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006758fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006759{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6760echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6761if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006762 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006763else
Martin v. Löwis11437992002-04-12 09:54:03 +00006764
6765cat >>confdefs.h <<_ACEOF
6766#define mode_t int
6767_ACEOF
6768
6769fi
6770
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006771{ echo "$as_me:$LINENO: checking for off_t" >&5
6772echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006773if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006774 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006775else
Benjamin Petersona8332062009-09-11 22:36:27 +00006776 cat >conftest.$ac_ext <<_ACEOF
6777/* confdefs.h. */
6778_ACEOF
6779cat confdefs.h >>conftest.$ac_ext
6780cat >>conftest.$ac_ext <<_ACEOF
6781/* end confdefs.h. */
6782$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006783typedef off_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006784int
6785main ()
6786{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006787if ((ac__type_new_ *) 0)
6788 return 0;
6789if (sizeof (ac__type_new_))
6790 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006791 ;
6792 return 0;
6793}
6794_ACEOF
6795rm -f conftest.$ac_objext
6796if { (ac_try="$ac_compile"
6797case "(($ac_try" in
6798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6799 *) ac_try_echo=$ac_try;;
6800esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006802 (eval "$ac_compile") 2>conftest.er1
6803 ac_status=$?
6804 grep -v '^ *+' conftest.er1 >conftest.err
6805 rm -f conftest.er1
6806 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006808 (exit $ac_status); } && {
6809 test -z "$ac_c_werror_flag" ||
6810 test ! -s conftest.err
6811 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006812 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006813else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006815sed 's/^/| /' conftest.$ac_ext >&5
6816
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006817 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006819
6820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006821fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006822{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6823echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6824if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006825 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006826else
Martin v. Löwis11437992002-04-12 09:54:03 +00006827
6828cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006829#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006830_ACEOF
6831
6832fi
6833
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006834{ echo "$as_me:$LINENO: checking for pid_t" >&5
6835echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006836if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006837 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006838else
Benjamin Petersona8332062009-09-11 22:36:27 +00006839 cat >conftest.$ac_ext <<_ACEOF
6840/* confdefs.h. */
6841_ACEOF
6842cat confdefs.h >>conftest.$ac_ext
6843cat >>conftest.$ac_ext <<_ACEOF
6844/* end confdefs.h. */
6845$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006846typedef pid_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006847int
6848main ()
6849{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006850if ((ac__type_new_ *) 0)
6851 return 0;
6852if (sizeof (ac__type_new_))
6853 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006854 ;
6855 return 0;
6856}
6857_ACEOF
6858rm -f conftest.$ac_objext
6859if { (ac_try="$ac_compile"
6860case "(($ac_try" in
6861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6862 *) ac_try_echo=$ac_try;;
6863esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006865 (eval "$ac_compile") 2>conftest.er1
6866 ac_status=$?
6867 grep -v '^ *+' conftest.er1 >conftest.err
6868 rm -f conftest.er1
6869 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006871 (exit $ac_status); } && {
6872 test -z "$ac_c_werror_flag" ||
6873 test ! -s conftest.err
6874 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006875 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006876else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006878sed 's/^/| /' conftest.$ac_ext >&5
6879
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006880 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006882
6883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006884fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006885{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6886echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6887if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006888 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006889else
Martin v. Löwis11437992002-04-12 09:54:03 +00006890
6891cat >>confdefs.h <<_ACEOF
6892#define pid_t int
6893_ACEOF
6894
6895fi
6896
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006897{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6898echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006899if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006900 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006901else
6902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006903/* confdefs.h. */
6904_ACEOF
6905cat confdefs.h >>conftest.$ac_ext
6906cat >>conftest.$ac_ext <<_ACEOF
6907/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006908#include <sys/types.h>
6909#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006910
Martin v. Löwis11437992002-04-12 09:54:03 +00006911int
6912main ()
6913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006914return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006915 ;
6916 return 0;
6917}
6918_ACEOF
6919rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920if { (ac_try="$ac_compile"
6921case "(($ac_try" in
6922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6923 *) ac_try_echo=$ac_try;;
6924esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006928 grep -v '^ *+' conftest.er1 >conftest.err
6929 rm -f conftest.er1
6930 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006932 (exit $ac_status); } && {
6933 test -z "$ac_c_werror_flag" ||
6934 test ! -s conftest.err
6935 } && test -s conftest.$ac_objext; then
6936 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006937else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006939sed 's/^/| /' conftest.$ac_ext >&5
6940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006941 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006943
6944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006945fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006946{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6947echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006948
Martin v. Löwis11437992002-04-12 09:54:03 +00006949cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006950#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006951_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006952
Michael W. Hudson54241132001-12-07 15:38:26 +00006953
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006954{ echo "$as_me:$LINENO: checking for size_t" >&5
6955echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006956if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006958else
Benjamin Petersona8332062009-09-11 22:36:27 +00006959 cat >conftest.$ac_ext <<_ACEOF
6960/* confdefs.h. */
6961_ACEOF
6962cat confdefs.h >>conftest.$ac_ext
6963cat >>conftest.$ac_ext <<_ACEOF
6964/* end confdefs.h. */
6965$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006966typedef size_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006967int
6968main ()
6969{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006970if ((ac__type_new_ *) 0)
6971 return 0;
6972if (sizeof (ac__type_new_))
6973 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006974 ;
6975 return 0;
6976}
6977_ACEOF
6978rm -f conftest.$ac_objext
6979if { (ac_try="$ac_compile"
6980case "(($ac_try" in
6981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6982 *) ac_try_echo=$ac_try;;
6983esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006985 (eval "$ac_compile") 2>conftest.er1
6986 ac_status=$?
6987 grep -v '^ *+' conftest.er1 >conftest.err
6988 rm -f conftest.er1
6989 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006991 (exit $ac_status); } && {
6992 test -z "$ac_c_werror_flag" ||
6993 test ! -s conftest.err
6994 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006995 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006996else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006998sed 's/^/| /' conftest.$ac_ext >&5
6999
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007000 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007002
7003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007004fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007005{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7006echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7007if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007008 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007009else
Martin v. Löwis11437992002-04-12 09:54:03 +00007010
7011cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007013_ACEOF
7014
7015fi
7016
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007017{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7018echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007019if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007020 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007021else
7022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007023/* confdefs.h. */
7024_ACEOF
7025cat confdefs.h >>conftest.$ac_ext
7026cat >>conftest.$ac_ext <<_ACEOF
7027/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007028#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007029
7030_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007032 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007033 ac_cv_type_uid_t=yes
7034else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007035 ac_cv_type_uid_t=no
7036fi
Ronald Oussoren095d2822010-03-08 07:03:14 +00007037rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007039fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007040{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7041echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007042if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007043
Martin v. Löwis11437992002-04-12 09:54:03 +00007044cat >>confdefs.h <<\_ACEOF
7045#define uid_t int
7046_ACEOF
7047
7048
7049cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007050#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007051_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007052
7053fi
7054
Mark Dickinsonbd792642009-03-18 20:06:12 +00007055
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007056 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7057echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007058if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007059 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007060else
7061 ac_cv_c_uint32_t=no
7062 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7063 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7064 cat >conftest.$ac_ext <<_ACEOF
7065/* confdefs.h. */
7066_ACEOF
7067cat confdefs.h >>conftest.$ac_ext
7068cat >>conftest.$ac_ext <<_ACEOF
7069/* end confdefs.h. */
7070$ac_includes_default
7071int
7072main ()
7073{
7074static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7075test_array [0] = 0
7076
7077 ;
7078 return 0;
7079}
7080_ACEOF
7081rm -f conftest.$ac_objext
7082if { (ac_try="$ac_compile"
7083case "(($ac_try" in
7084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7085 *) ac_try_echo=$ac_try;;
7086esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007088 (eval "$ac_compile") 2>conftest.er1
7089 ac_status=$?
7090 grep -v '^ *+' conftest.er1 >conftest.err
7091 rm -f conftest.er1
7092 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007094 (exit $ac_status); } && {
7095 test -z "$ac_c_werror_flag" ||
7096 test ! -s conftest.err
7097 } && test -s conftest.$ac_objext; then
7098 case $ac_type in
7099 uint32_t) ac_cv_c_uint32_t=yes ;;
7100 *) ac_cv_c_uint32_t=$ac_type ;;
7101esac
7102
7103else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007104 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007105sed 's/^/| /' conftest.$ac_ext >&5
7106
7107
7108fi
7109
7110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7111 test "$ac_cv_c_uint32_t" != no && break
7112 done
7113fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007114{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7115echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007116 case $ac_cv_c_uint32_t in #(
7117 no|yes) ;; #(
7118 *)
7119
7120cat >>confdefs.h <<\_ACEOF
7121#define _UINT32_T 1
7122_ACEOF
7123
7124
7125cat >>confdefs.h <<_ACEOF
7126#define uint32_t $ac_cv_c_uint32_t
7127_ACEOF
7128;;
7129 esac
7130
7131
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007132 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7133echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007134if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007135 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007136else
7137 ac_cv_c_uint64_t=no
7138 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7139 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7140 cat >conftest.$ac_ext <<_ACEOF
7141/* confdefs.h. */
7142_ACEOF
7143cat confdefs.h >>conftest.$ac_ext
7144cat >>conftest.$ac_ext <<_ACEOF
7145/* end confdefs.h. */
7146$ac_includes_default
7147int
7148main ()
7149{
7150static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7151test_array [0] = 0
7152
7153 ;
7154 return 0;
7155}
7156_ACEOF
7157rm -f conftest.$ac_objext
7158if { (ac_try="$ac_compile"
7159case "(($ac_try" in
7160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7161 *) ac_try_echo=$ac_try;;
7162esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007164 (eval "$ac_compile") 2>conftest.er1
7165 ac_status=$?
7166 grep -v '^ *+' conftest.er1 >conftest.err
7167 rm -f conftest.er1
7168 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007170 (exit $ac_status); } && {
7171 test -z "$ac_c_werror_flag" ||
7172 test ! -s conftest.err
7173 } && test -s conftest.$ac_objext; then
7174 case $ac_type in
7175 uint64_t) ac_cv_c_uint64_t=yes ;;
7176 *) ac_cv_c_uint64_t=$ac_type ;;
7177esac
7178
7179else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007180 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007181sed 's/^/| /' conftest.$ac_ext >&5
7182
7183
7184fi
7185
7186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7187 test "$ac_cv_c_uint64_t" != no && break
7188 done
7189fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007190{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7191echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007192 case $ac_cv_c_uint64_t in #(
7193 no|yes) ;; #(
7194 *)
7195
7196cat >>confdefs.h <<\_ACEOF
7197#define _UINT64_T 1
7198_ACEOF
7199
7200
7201cat >>confdefs.h <<_ACEOF
7202#define uint64_t $ac_cv_c_uint64_t
7203_ACEOF
7204;;
7205 esac
7206
7207
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007208 { echo "$as_me:$LINENO: checking for int32_t" >&5
7209echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007210if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007211 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007212else
7213 ac_cv_c_int32_t=no
7214 for ac_type in 'int32_t' 'int' 'long int' \
7215 'long long int' 'short int' 'signed char'; do
7216 cat >conftest.$ac_ext <<_ACEOF
7217/* confdefs.h. */
7218_ACEOF
7219cat confdefs.h >>conftest.$ac_ext
7220cat >>conftest.$ac_ext <<_ACEOF
7221/* end confdefs.h. */
7222$ac_includes_default
7223int
7224main ()
7225{
7226static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7227test_array [0] = 0
7228
7229 ;
7230 return 0;
7231}
7232_ACEOF
7233rm -f conftest.$ac_objext
7234if { (ac_try="$ac_compile"
7235case "(($ac_try" in
7236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7237 *) ac_try_echo=$ac_try;;
7238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007240 (eval "$ac_compile") 2>conftest.er1
7241 ac_status=$?
7242 grep -v '^ *+' conftest.er1 >conftest.err
7243 rm -f conftest.er1
7244 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007246 (exit $ac_status); } && {
7247 test -z "$ac_c_werror_flag" ||
7248 test ! -s conftest.err
7249 } && test -s conftest.$ac_objext; then
7250 cat >conftest.$ac_ext <<_ACEOF
7251/* confdefs.h. */
7252_ACEOF
7253cat confdefs.h >>conftest.$ac_ext
7254cat >>conftest.$ac_ext <<_ACEOF
7255/* end confdefs.h. */
7256$ac_includes_default
7257int
7258main ()
7259{
7260static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007261 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007262test_array [0] = 0
7263
7264 ;
7265 return 0;
7266}
7267_ACEOF
7268rm -f conftest.$ac_objext
7269if { (ac_try="$ac_compile"
7270case "(($ac_try" in
7271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7272 *) ac_try_echo=$ac_try;;
7273esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007275 (eval "$ac_compile") 2>conftest.er1
7276 ac_status=$?
7277 grep -v '^ *+' conftest.er1 >conftest.err
7278 rm -f conftest.er1
7279 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007281 (exit $ac_status); } && {
7282 test -z "$ac_c_werror_flag" ||
7283 test ! -s conftest.err
7284 } && test -s conftest.$ac_objext; then
7285 :
7286else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007287 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007288sed 's/^/| /' conftest.$ac_ext >&5
7289
7290 case $ac_type in
7291 int32_t) ac_cv_c_int32_t=yes ;;
7292 *) ac_cv_c_int32_t=$ac_type ;;
7293esac
7294
7295fi
7296
7297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7298else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007299 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007300sed 's/^/| /' conftest.$ac_ext >&5
7301
7302
7303fi
7304
7305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7306 test "$ac_cv_c_int32_t" != no && break
7307 done
7308fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007309{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7310echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007311 case $ac_cv_c_int32_t in #(
7312 no|yes) ;; #(
7313 *)
7314
7315cat >>confdefs.h <<_ACEOF
7316#define int32_t $ac_cv_c_int32_t
7317_ACEOF
7318;;
7319 esac
7320
7321
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007322 { echo "$as_me:$LINENO: checking for int64_t" >&5
7323echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007324if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007325 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007326else
7327 ac_cv_c_int64_t=no
7328 for ac_type in 'int64_t' 'int' 'long int' \
7329 'long long int' 'short int' 'signed char'; do
7330 cat >conftest.$ac_ext <<_ACEOF
7331/* confdefs.h. */
7332_ACEOF
7333cat confdefs.h >>conftest.$ac_ext
7334cat >>conftest.$ac_ext <<_ACEOF
7335/* end confdefs.h. */
7336$ac_includes_default
7337int
7338main ()
7339{
7340static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7341test_array [0] = 0
7342
7343 ;
7344 return 0;
7345}
7346_ACEOF
7347rm -f conftest.$ac_objext
7348if { (ac_try="$ac_compile"
7349case "(($ac_try" in
7350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7351 *) ac_try_echo=$ac_try;;
7352esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007354 (eval "$ac_compile") 2>conftest.er1
7355 ac_status=$?
7356 grep -v '^ *+' conftest.er1 >conftest.err
7357 rm -f conftest.er1
7358 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007360 (exit $ac_status); } && {
7361 test -z "$ac_c_werror_flag" ||
7362 test ! -s conftest.err
7363 } && test -s conftest.$ac_objext; then
7364 cat >conftest.$ac_ext <<_ACEOF
7365/* confdefs.h. */
7366_ACEOF
7367cat confdefs.h >>conftest.$ac_ext
7368cat >>conftest.$ac_ext <<_ACEOF
7369/* end confdefs.h. */
7370$ac_includes_default
7371int
7372main ()
7373{
7374static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007375 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007376test_array [0] = 0
7377
7378 ;
7379 return 0;
7380}
7381_ACEOF
7382rm -f conftest.$ac_objext
7383if { (ac_try="$ac_compile"
7384case "(($ac_try" in
7385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7386 *) ac_try_echo=$ac_try;;
7387esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007389 (eval "$ac_compile") 2>conftest.er1
7390 ac_status=$?
7391 grep -v '^ *+' conftest.er1 >conftest.err
7392 rm -f conftest.er1
7393 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007395 (exit $ac_status); } && {
7396 test -z "$ac_c_werror_flag" ||
7397 test ! -s conftest.err
7398 } && test -s conftest.$ac_objext; then
7399 :
7400else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007401 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007402sed 's/^/| /' conftest.$ac_ext >&5
7403
7404 case $ac_type in
7405 int64_t) ac_cv_c_int64_t=yes ;;
7406 *) ac_cv_c_int64_t=$ac_type ;;
7407esac
7408
7409fi
7410
7411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7412else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007413 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007414sed 's/^/| /' conftest.$ac_ext >&5
7415
7416
7417fi
7418
7419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7420 test "$ac_cv_c_int64_t" != no && break
7421 done
7422fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007423{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7424echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007425 case $ac_cv_c_int64_t in #(
7426 no|yes) ;; #(
7427 *)
7428
7429cat >>confdefs.h <<_ACEOF
7430#define int64_t $ac_cv_c_int64_t
7431_ACEOF
7432;;
7433 esac
7434
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007435{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7436echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007437if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007438 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007439else
Benjamin Petersona8332062009-09-11 22:36:27 +00007440 cat >conftest.$ac_ext <<_ACEOF
7441/* confdefs.h. */
7442_ACEOF
7443cat confdefs.h >>conftest.$ac_ext
7444cat >>conftest.$ac_ext <<_ACEOF
7445/* end confdefs.h. */
7446$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007447typedef ssize_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007448int
7449main ()
7450{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007451if ((ac__type_new_ *) 0)
7452 return 0;
7453if (sizeof (ac__type_new_))
7454 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007455 ;
7456 return 0;
7457}
7458_ACEOF
7459rm -f conftest.$ac_objext
7460if { (ac_try="$ac_compile"
7461case "(($ac_try" in
7462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7463 *) ac_try_echo=$ac_try;;
7464esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007466 (eval "$ac_compile") 2>conftest.er1
7467 ac_status=$?
7468 grep -v '^ *+' conftest.er1 >conftest.err
7469 rm -f conftest.er1
7470 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007472 (exit $ac_status); } && {
7473 test -z "$ac_c_werror_flag" ||
7474 test ! -s conftest.err
7475 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007476 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007477else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007478 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007479sed 's/^/| /' conftest.$ac_ext >&5
7480
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007481 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007483
7484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007485fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007486{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7487echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7488if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007489
7490cat >>confdefs.h <<\_ACEOF
7491#define HAVE_SSIZE_T 1
7492_ACEOF
7493
7494fi
7495
Jack Jansendd19cf82001-12-06 22:36:17 +00007496
Michael W. Hudson54241132001-12-07 15:38:26 +00007497# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007498# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007499{ echo "$as_me:$LINENO: checking for int" >&5
7500echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7501if test "${ac_cv_type_int+set}" = set; then
7502 echo $ECHO_N "(cached) $ECHO_C" >&6
7503else
7504 cat >conftest.$ac_ext <<_ACEOF
7505/* confdefs.h. */
7506_ACEOF
7507cat confdefs.h >>conftest.$ac_ext
7508cat >>conftest.$ac_ext <<_ACEOF
7509/* end confdefs.h. */
7510$ac_includes_default
7511typedef int ac__type_new_;
7512int
7513main ()
7514{
7515if ((ac__type_new_ *) 0)
7516 return 0;
7517if (sizeof (ac__type_new_))
7518 return 0;
7519 ;
7520 return 0;
7521}
7522_ACEOF
7523rm -f conftest.$ac_objext
7524if { (ac_try="$ac_compile"
7525case "(($ac_try" in
7526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7527 *) ac_try_echo=$ac_try;;
7528esac
7529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7530 (eval "$ac_compile") 2>conftest.er1
7531 ac_status=$?
7532 grep -v '^ *+' conftest.er1 >conftest.err
7533 rm -f conftest.er1
7534 cat conftest.err >&5
7535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7536 (exit $ac_status); } && {
7537 test -z "$ac_c_werror_flag" ||
7538 test ! -s conftest.err
7539 } && test -s conftest.$ac_objext; then
7540 ac_cv_type_int=yes
7541else
7542 echo "$as_me: failed program was:" >&5
7543sed 's/^/| /' conftest.$ac_ext >&5
7544
7545 ac_cv_type_int=no
7546fi
7547
7548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7549fi
7550{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7551echo "${ECHO_T}$ac_cv_type_int" >&6; }
7552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007553# The cast to long int works around a bug in the HP C Compiler
7554# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7555# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7556# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007557{ echo "$as_me:$LINENO: checking size of int" >&5
7558echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007559if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007560 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007561else
Martin v. Löwis11437992002-04-12 09:54:03 +00007562 if test "$cross_compiling" = yes; then
7563 # Depending upon the size, compute the lo and hi bounds.
7564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007565/* confdefs.h. */
7566_ACEOF
7567cat confdefs.h >>conftest.$ac_ext
7568cat >>conftest.$ac_ext <<_ACEOF
7569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007570$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007571 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007572int
7573main ()
7574{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007576test_array [0] = 0
7577
7578 ;
7579 return 0;
7580}
7581_ACEOF
7582rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007583if { (ac_try="$ac_compile"
7584case "(($ac_try" in
7585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7586 *) ac_try_echo=$ac_try;;
7587esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007591 grep -v '^ *+' conftest.er1 >conftest.err
7592 rm -f conftest.er1
7593 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595 (exit $ac_status); } && {
7596 test -z "$ac_c_werror_flag" ||
7597 test ! -s conftest.err
7598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 ac_lo=0 ac_mid=0
7600 while :; do
7601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007602/* confdefs.h. */
7603_ACEOF
7604cat confdefs.h >>conftest.$ac_ext
7605cat >>conftest.$ac_ext <<_ACEOF
7606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007607$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007608 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007609int
7610main ()
7611{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007612static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007613test_array [0] = 0
7614
7615 ;
7616 return 0;
7617}
7618_ACEOF
7619rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620if { (ac_try="$ac_compile"
7621case "(($ac_try" in
7622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7623 *) ac_try_echo=$ac_try;;
7624esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007628 grep -v '^ *+' conftest.er1 >conftest.err
7629 rm -f conftest.er1
7630 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007632 (exit $ac_status); } && {
7633 test -z "$ac_c_werror_flag" ||
7634 test ! -s conftest.err
7635 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007636 ac_hi=$ac_mid; break
7637else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007639sed 's/^/| /' conftest.$ac_ext >&5
7640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007641 ac_lo=`expr $ac_mid + 1`
7642 if test $ac_lo -le $ac_mid; then
7643 ac_lo= ac_hi=
7644 break
7645 fi
7646 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648
7649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 done
7651else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007653sed 's/^/| /' conftest.$ac_ext >&5
7654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007656/* confdefs.h. */
7657_ACEOF
7658cat confdefs.h >>conftest.$ac_ext
7659cat >>conftest.$ac_ext <<_ACEOF
7660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007661$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007662 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007663int
7664main ()
7665{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007666static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007667test_array [0] = 0
7668
7669 ;
7670 return 0;
7671}
7672_ACEOF
7673rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007674if { (ac_try="$ac_compile"
7675case "(($ac_try" in
7676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7677 *) ac_try_echo=$ac_try;;
7678esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007682 grep -v '^ *+' conftest.er1 >conftest.err
7683 rm -f conftest.er1
7684 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686 (exit $ac_status); } && {
7687 test -z "$ac_c_werror_flag" ||
7688 test ! -s conftest.err
7689 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007690 ac_hi=-1 ac_mid=-1
7691 while :; do
7692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007693/* confdefs.h. */
7694_ACEOF
7695cat confdefs.h >>conftest.$ac_ext
7696cat >>conftest.$ac_ext <<_ACEOF
7697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007698$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007699 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007700int
7701main ()
7702{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007703static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007704test_array [0] = 0
7705
7706 ;
7707 return 0;
7708}
7709_ACEOF
7710rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711if { (ac_try="$ac_compile"
7712case "(($ac_try" in
7713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7714 *) ac_try_echo=$ac_try;;
7715esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007719 grep -v '^ *+' conftest.er1 >conftest.err
7720 rm -f conftest.er1
7721 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723 (exit $ac_status); } && {
7724 test -z "$ac_c_werror_flag" ||
7725 test ! -s conftest.err
7726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 ac_lo=$ac_mid; break
7728else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007730sed 's/^/| /' conftest.$ac_ext >&5
7731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732 ac_hi=`expr '(' $ac_mid ')' - 1`
7733 if test $ac_mid -le $ac_hi; then
7734 ac_lo= ac_hi=
7735 break
7736 fi
7737 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739
7740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 done
7742else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007744sed 's/^/| /' conftest.$ac_ext >&5
7745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748
7749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751
7752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007753# Binary search between lo and hi bounds.
7754while test "x$ac_lo" != "x$ac_hi"; do
7755 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007757/* confdefs.h. */
7758_ACEOF
7759cat confdefs.h >>conftest.$ac_ext
7760cat >>conftest.$ac_ext <<_ACEOF
7761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007762$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007763 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007764int
7765main ()
7766{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007767static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007768test_array [0] = 0
7769
7770 ;
7771 return 0;
7772}
7773_ACEOF
7774rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007775if { (ac_try="$ac_compile"
7776case "(($ac_try" in
7777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7778 *) ac_try_echo=$ac_try;;
7779esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007783 grep -v '^ *+' conftest.er1 >conftest.err
7784 rm -f conftest.er1
7785 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787 (exit $ac_status); } && {
7788 test -z "$ac_c_werror_flag" ||
7789 test ! -s conftest.err
7790 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007791 ac_hi=$ac_mid
7792else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007794sed 's/^/| /' conftest.$ac_ext >&5
7795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798
7799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007800done
7801case $ac_lo in
7802?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007804 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007805See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007806echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007807See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007808 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809 else
7810 ac_cv_sizeof_int=0
7811 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007812esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007813else
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007815/* confdefs.h. */
7816_ACEOF
7817cat confdefs.h >>conftest.$ac_ext
7818cat >>conftest.$ac_ext <<_ACEOF
7819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007820$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007821 typedef int ac__type_sizeof_;
7822static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7823static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007824#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007825#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007826int
7827main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007828{
Martin v. Löwis11437992002-04-12 09:54:03 +00007829
7830 FILE *f = fopen ("conftest.val", "w");
7831 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007833 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007834 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007836 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007837 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007838 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007839 }
7840 else
7841 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007843 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007845 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007848
7849 ;
7850 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007851}
Martin v. Löwis11437992002-04-12 09:54:03 +00007852_ACEOF
7853rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854if { (ac_try="$ac_link"
7855case "(($ac_try" in
7856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7857 *) ac_try_echo=$ac_try;;
7858esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864 { (case "(($ac_try" in
7865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7866 *) ac_try_echo=$ac_try;;
7867esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 (exit $ac_status); }; }; then
7873 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007874else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007875 echo "$as_me: program exited with status $ac_status" >&5
7876echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007877sed 's/^/| /' conftest.$ac_ext >&5
7878
Martin v. Löwis11437992002-04-12 09:54:03 +00007879( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007881 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007882See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007883echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007884See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007885 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886 else
7887 ac_cv_sizeof_int=0
7888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890rm -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 +00007891fi
7892rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007893fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007894{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7895echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896
7897
7898
Martin v. Löwis11437992002-04-12 09:54:03 +00007899cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007900#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007901_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007902
7903
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007904{ echo "$as_me:$LINENO: checking for long" >&5
7905echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7906if test "${ac_cv_type_long+set}" = set; then
7907 echo $ECHO_N "(cached) $ECHO_C" >&6
7908else
7909 cat >conftest.$ac_ext <<_ACEOF
7910/* confdefs.h. */
7911_ACEOF
7912cat confdefs.h >>conftest.$ac_ext
7913cat >>conftest.$ac_ext <<_ACEOF
7914/* end confdefs.h. */
7915$ac_includes_default
7916typedef long ac__type_new_;
7917int
7918main ()
7919{
7920if ((ac__type_new_ *) 0)
7921 return 0;
7922if (sizeof (ac__type_new_))
7923 return 0;
7924 ;
7925 return 0;
7926}
7927_ACEOF
7928rm -f conftest.$ac_objext
7929if { (ac_try="$ac_compile"
7930case "(($ac_try" in
7931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7932 *) ac_try_echo=$ac_try;;
7933esac
7934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7935 (eval "$ac_compile") 2>conftest.er1
7936 ac_status=$?
7937 grep -v '^ *+' conftest.er1 >conftest.err
7938 rm -f conftest.er1
7939 cat conftest.err >&5
7940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7941 (exit $ac_status); } && {
7942 test -z "$ac_c_werror_flag" ||
7943 test ! -s conftest.err
7944 } && test -s conftest.$ac_objext; then
7945 ac_cv_type_long=yes
7946else
7947 echo "$as_me: failed program was:" >&5
7948sed 's/^/| /' conftest.$ac_ext >&5
7949
7950 ac_cv_type_long=no
7951fi
7952
7953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7954fi
7955{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7956echo "${ECHO_T}$ac_cv_type_long" >&6; }
7957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958# The cast to long int works around a bug in the HP C Compiler
7959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7961# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007962{ echo "$as_me:$LINENO: checking size of long" >&5
7963echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007964if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007965 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007966else
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 if test "$cross_compiling" = yes; then
7968 # Depending upon the size, compute the lo and hi bounds.
7969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007970/* confdefs.h. */
7971_ACEOF
7972cat confdefs.h >>conftest.$ac_ext
7973cat >>conftest.$ac_ext <<_ACEOF
7974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007975$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007976 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007977int
7978main ()
7979{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007980static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007981test_array [0] = 0
7982
7983 ;
7984 return 0;
7985}
7986_ACEOF
7987rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988if { (ac_try="$ac_compile"
7989case "(($ac_try" in
7990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7991 *) ac_try_echo=$ac_try;;
7992esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007996 grep -v '^ *+' conftest.er1 >conftest.err
7997 rm -f conftest.er1
7998 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 (exit $ac_status); } && {
8001 test -z "$ac_c_werror_flag" ||
8002 test ! -s conftest.err
8003 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 ac_lo=0 ac_mid=0
8005 while :; do
8006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008007/* confdefs.h. */
8008_ACEOF
8009cat confdefs.h >>conftest.$ac_ext
8010cat >>conftest.$ac_ext <<_ACEOF
8011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008012$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008013 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008014int
8015main ()
8016{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008017static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008018test_array [0] = 0
8019
8020 ;
8021 return 0;
8022}
8023_ACEOF
8024rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025if { (ac_try="$ac_compile"
8026case "(($ac_try" in
8027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8028 *) ac_try_echo=$ac_try;;
8029esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008033 grep -v '^ *+' conftest.er1 >conftest.err
8034 rm -f conftest.er1
8035 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037 (exit $ac_status); } && {
8038 test -z "$ac_c_werror_flag" ||
8039 test ! -s conftest.err
8040 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 ac_hi=$ac_mid; break
8042else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008044sed 's/^/| /' conftest.$ac_ext >&5
8045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 ac_lo=`expr $ac_mid + 1`
8047 if test $ac_lo -le $ac_mid; then
8048 ac_lo= ac_hi=
8049 break
8050 fi
8051 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008053
8054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 done
8056else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008058sed 's/^/| /' conftest.$ac_ext >&5
8059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008061/* confdefs.h. */
8062_ACEOF
8063cat confdefs.h >>conftest.$ac_ext
8064cat >>conftest.$ac_ext <<_ACEOF
8065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008066$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008067 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008068int
8069main ()
8070{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008071static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008072test_array [0] = 0
8073
8074 ;
8075 return 0;
8076}
8077_ACEOF
8078rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079if { (ac_try="$ac_compile"
8080case "(($ac_try" in
8081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8082 *) ac_try_echo=$ac_try;;
8083esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008087 grep -v '^ *+' conftest.er1 >conftest.err
8088 rm -f conftest.er1
8089 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091 (exit $ac_status); } && {
8092 test -z "$ac_c_werror_flag" ||
8093 test ! -s conftest.err
8094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 ac_hi=-1 ac_mid=-1
8096 while :; do
8097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008098/* confdefs.h. */
8099_ACEOF
8100cat confdefs.h >>conftest.$ac_ext
8101cat >>conftest.$ac_ext <<_ACEOF
8102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008103$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008104 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008105int
8106main ()
8107{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008108static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008109test_array [0] = 0
8110
8111 ;
8112 return 0;
8113}
8114_ACEOF
8115rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116if { (ac_try="$ac_compile"
8117case "(($ac_try" in
8118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8119 *) ac_try_echo=$ac_try;;
8120esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008124 grep -v '^ *+' conftest.er1 >conftest.err
8125 rm -f conftest.er1
8126 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008128 (exit $ac_status); } && {
8129 test -z "$ac_c_werror_flag" ||
8130 test ! -s conftest.err
8131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 ac_lo=$ac_mid; break
8133else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008135sed 's/^/| /' conftest.$ac_ext >&5
8136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137 ac_hi=`expr '(' $ac_mid ')' - 1`
8138 if test $ac_mid -le $ac_hi; then
8139 ac_lo= ac_hi=
8140 break
8141 fi
8142 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144
8145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008146 done
8147else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008149sed 's/^/| /' conftest.$ac_ext >&5
8150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153
8154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008156
8157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008158# Binary search between lo and hi bounds.
8159while test "x$ac_lo" != "x$ac_hi"; do
8160 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008162/* confdefs.h. */
8163_ACEOF
8164cat confdefs.h >>conftest.$ac_ext
8165cat >>conftest.$ac_ext <<_ACEOF
8166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008167$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008168 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008169int
8170main ()
8171{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008172static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008173test_array [0] = 0
8174
8175 ;
8176 return 0;
8177}
8178_ACEOF
8179rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180if { (ac_try="$ac_compile"
8181case "(($ac_try" in
8182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8183 *) ac_try_echo=$ac_try;;
8184esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008188 grep -v '^ *+' conftest.er1 >conftest.err
8189 rm -f conftest.er1
8190 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192 (exit $ac_status); } && {
8193 test -z "$ac_c_werror_flag" ||
8194 test ! -s conftest.err
8195 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008196 ac_hi=$ac_mid
8197else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008199sed 's/^/| /' conftest.$ac_ext >&5
8200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203
8204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008205done
8206case $ac_lo in
8207?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008209 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008210See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008211echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008212See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008213 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214 else
8215 ac_cv_sizeof_long=0
8216 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008217esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008218else
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008220/* confdefs.h. */
8221_ACEOF
8222cat confdefs.h >>conftest.$ac_ext
8223cat >>conftest.$ac_ext <<_ACEOF
8224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008225$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008226 typedef long ac__type_sizeof_;
8227static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8228static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008229#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008230#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008231int
8232main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008233{
Martin v. Löwis11437992002-04-12 09:54:03 +00008234
8235 FILE *f = fopen ("conftest.val", "w");
8236 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008238 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008239 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008241 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008243 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008244 }
8245 else
8246 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008248 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008250 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008251 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008253
8254 ;
8255 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008256}
Martin v. Löwis11437992002-04-12 09:54:03 +00008257_ACEOF
8258rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259if { (ac_try="$ac_link"
8260case "(($ac_try" in
8261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8262 *) ac_try_echo=$ac_try;;
8263esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269 { (case "(($ac_try" in
8270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8271 *) ac_try_echo=$ac_try;;
8272esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008277 (exit $ac_status); }; }; then
8278 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008279else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008280 echo "$as_me: program exited with status $ac_status" >&5
8281echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008282sed 's/^/| /' conftest.$ac_ext >&5
8283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008286 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008287See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008288echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008289See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008290 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291 else
8292 ac_cv_sizeof_long=0
8293 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295rm -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 +00008296fi
8297rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008298fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008299{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8300echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301
8302
8303
Martin v. Löwis11437992002-04-12 09:54:03 +00008304cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008305#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008306_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008307
8308
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008309{ echo "$as_me:$LINENO: checking for void *" >&5
8310echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8311if test "${ac_cv_type_void_p+set}" = set; then
8312 echo $ECHO_N "(cached) $ECHO_C" >&6
8313else
8314 cat >conftest.$ac_ext <<_ACEOF
8315/* confdefs.h. */
8316_ACEOF
8317cat confdefs.h >>conftest.$ac_ext
8318cat >>conftest.$ac_ext <<_ACEOF
8319/* end confdefs.h. */
8320$ac_includes_default
8321typedef void * ac__type_new_;
8322int
8323main ()
8324{
8325if ((ac__type_new_ *) 0)
8326 return 0;
8327if (sizeof (ac__type_new_))
8328 return 0;
8329 ;
8330 return 0;
8331}
8332_ACEOF
8333rm -f conftest.$ac_objext
8334if { (ac_try="$ac_compile"
8335case "(($ac_try" in
8336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8337 *) ac_try_echo=$ac_try;;
8338esac
8339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8340 (eval "$ac_compile") 2>conftest.er1
8341 ac_status=$?
8342 grep -v '^ *+' conftest.er1 >conftest.err
8343 rm -f conftest.er1
8344 cat conftest.err >&5
8345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8346 (exit $ac_status); } && {
8347 test -z "$ac_c_werror_flag" ||
8348 test ! -s conftest.err
8349 } && test -s conftest.$ac_objext; then
8350 ac_cv_type_void_p=yes
8351else
8352 echo "$as_me: failed program was:" >&5
8353sed 's/^/| /' conftest.$ac_ext >&5
8354
8355 ac_cv_type_void_p=no
8356fi
8357
8358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8359fi
8360{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8361echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363# The cast to long int works around a bug in the HP C Compiler
8364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8366# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008367{ echo "$as_me:$LINENO: checking size of void *" >&5
8368echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008369if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008370 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008371else
Martin v. Löwis11437992002-04-12 09:54:03 +00008372 if test "$cross_compiling" = yes; then
8373 # Depending upon the size, compute the lo and hi bounds.
8374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008375/* confdefs.h. */
8376_ACEOF
8377cat confdefs.h >>conftest.$ac_ext
8378cat >>conftest.$ac_ext <<_ACEOF
8379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008380$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008381 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008382int
8383main ()
8384{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008385static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008386test_array [0] = 0
8387
8388 ;
8389 return 0;
8390}
8391_ACEOF
8392rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008393if { (ac_try="$ac_compile"
8394case "(($ac_try" in
8395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8396 *) ac_try_echo=$ac_try;;
8397esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008401 grep -v '^ *+' conftest.er1 >conftest.err
8402 rm -f conftest.er1
8403 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405 (exit $ac_status); } && {
8406 test -z "$ac_c_werror_flag" ||
8407 test ! -s conftest.err
8408 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 ac_lo=0 ac_mid=0
8410 while :; do
8411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008412/* confdefs.h. */
8413_ACEOF
8414cat confdefs.h >>conftest.$ac_ext
8415cat >>conftest.$ac_ext <<_ACEOF
8416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008417$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008418 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008419int
8420main ()
8421{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008423test_array [0] = 0
8424
8425 ;
8426 return 0;
8427}
8428_ACEOF
8429rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430if { (ac_try="$ac_compile"
8431case "(($ac_try" in
8432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8433 *) ac_try_echo=$ac_try;;
8434esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008438 grep -v '^ *+' conftest.er1 >conftest.err
8439 rm -f conftest.er1
8440 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442 (exit $ac_status); } && {
8443 test -z "$ac_c_werror_flag" ||
8444 test ! -s conftest.err
8445 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008446 ac_hi=$ac_mid; break
8447else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008449sed 's/^/| /' conftest.$ac_ext >&5
8450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008451 ac_lo=`expr $ac_mid + 1`
8452 if test $ac_lo -le $ac_mid; then
8453 ac_lo= ac_hi=
8454 break
8455 fi
8456 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458
8459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 done
8461else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008463sed 's/^/| /' conftest.$ac_ext >&5
8464
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008466/* confdefs.h. */
8467_ACEOF
8468cat confdefs.h >>conftest.$ac_ext
8469cat >>conftest.$ac_ext <<_ACEOF
8470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008471$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008472 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008473int
8474main ()
8475{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008476static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008477test_array [0] = 0
8478
8479 ;
8480 return 0;
8481}
8482_ACEOF
8483rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484if { (ac_try="$ac_compile"
8485case "(($ac_try" in
8486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8487 *) ac_try_echo=$ac_try;;
8488esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008492 grep -v '^ *+' conftest.er1 >conftest.err
8493 rm -f conftest.er1
8494 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496 (exit $ac_status); } && {
8497 test -z "$ac_c_werror_flag" ||
8498 test ! -s conftest.err
8499 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 ac_hi=-1 ac_mid=-1
8501 while :; do
8502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008503/* confdefs.h. */
8504_ACEOF
8505cat confdefs.h >>conftest.$ac_ext
8506cat >>conftest.$ac_ext <<_ACEOF
8507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008508$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008509 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008510int
8511main ()
8512{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008513static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008514test_array [0] = 0
8515
8516 ;
8517 return 0;
8518}
8519_ACEOF
8520rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521if { (ac_try="$ac_compile"
8522case "(($ac_try" in
8523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8524 *) ac_try_echo=$ac_try;;
8525esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008529 grep -v '^ *+' conftest.er1 >conftest.err
8530 rm -f conftest.er1
8531 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008533 (exit $ac_status); } && {
8534 test -z "$ac_c_werror_flag" ||
8535 test ! -s conftest.err
8536 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 ac_lo=$ac_mid; break
8538else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008540sed 's/^/| /' conftest.$ac_ext >&5
8541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542 ac_hi=`expr '(' $ac_mid ')' - 1`
8543 if test $ac_mid -le $ac_hi; then
8544 ac_lo= ac_hi=
8545 break
8546 fi
8547 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549
8550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 done
8552else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008554sed 's/^/| /' conftest.$ac_ext >&5
8555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558
8559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561
8562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008563# Binary search between lo and hi bounds.
8564while test "x$ac_lo" != "x$ac_hi"; do
8565 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008567/* confdefs.h. */
8568_ACEOF
8569cat confdefs.h >>conftest.$ac_ext
8570cat >>conftest.$ac_ext <<_ACEOF
8571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008572$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008573 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008574int
8575main ()
8576{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008578test_array [0] = 0
8579
8580 ;
8581 return 0;
8582}
8583_ACEOF
8584rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585if { (ac_try="$ac_compile"
8586case "(($ac_try" in
8587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8588 *) ac_try_echo=$ac_try;;
8589esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008593 grep -v '^ *+' conftest.er1 >conftest.err
8594 rm -f conftest.er1
8595 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597 (exit $ac_status); } && {
8598 test -z "$ac_c_werror_flag" ||
8599 test ! -s conftest.err
8600 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 ac_hi=$ac_mid
8602else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008604sed 's/^/| /' conftest.$ac_ext >&5
8605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608
8609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008610done
8611case $ac_lo in
8612?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008614 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008615See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008616echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008617See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008618 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619 else
8620 ac_cv_sizeof_void_p=0
8621 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008622esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008623else
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008625/* confdefs.h. */
8626_ACEOF
8627cat confdefs.h >>conftest.$ac_ext
8628cat >>conftest.$ac_ext <<_ACEOF
8629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008630$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008631 typedef void * ac__type_sizeof_;
8632static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8633static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008634#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008635#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008636int
8637main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008638{
Martin v. Löwis11437992002-04-12 09:54:03 +00008639
8640 FILE *f = fopen ("conftest.val", "w");
8641 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008643 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008646 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008648 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008649 }
8650 else
8651 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008653 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008655 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
8659 ;
8660 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008661}
Martin v. Löwis11437992002-04-12 09:54:03 +00008662_ACEOF
8663rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664if { (ac_try="$ac_link"
8665case "(($ac_try" in
8666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8667 *) ac_try_echo=$ac_try;;
8668esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674 { (case "(($ac_try" in
8675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8676 *) ac_try_echo=$ac_try;;
8677esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 (exit $ac_status); }; }; then
8683 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008684else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008685 echo "$as_me: program exited with status $ac_status" >&5
8686echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008687sed 's/^/| /' conftest.$ac_ext >&5
8688
Martin v. Löwis11437992002-04-12 09:54:03 +00008689( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008691 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008692See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008693echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008694See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008695 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696 else
8697 ac_cv_sizeof_void_p=0
8698 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700rm -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 +00008701fi
8702rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008703fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008704{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8705echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706
8707
8708
Martin v. Löwis11437992002-04-12 09:54:03 +00008709cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008710#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008711_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008712
8713
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008714{ echo "$as_me:$LINENO: checking for short" >&5
8715echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8716if test "${ac_cv_type_short+set}" = set; then
8717 echo $ECHO_N "(cached) $ECHO_C" >&6
8718else
8719 cat >conftest.$ac_ext <<_ACEOF
8720/* confdefs.h. */
8721_ACEOF
8722cat confdefs.h >>conftest.$ac_ext
8723cat >>conftest.$ac_ext <<_ACEOF
8724/* end confdefs.h. */
8725$ac_includes_default
8726typedef short ac__type_new_;
8727int
8728main ()
8729{
8730if ((ac__type_new_ *) 0)
8731 return 0;
8732if (sizeof (ac__type_new_))
8733 return 0;
8734 ;
8735 return 0;
8736}
8737_ACEOF
8738rm -f conftest.$ac_objext
8739if { (ac_try="$ac_compile"
8740case "(($ac_try" in
8741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8742 *) ac_try_echo=$ac_try;;
8743esac
8744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8745 (eval "$ac_compile") 2>conftest.er1
8746 ac_status=$?
8747 grep -v '^ *+' conftest.er1 >conftest.err
8748 rm -f conftest.er1
8749 cat conftest.err >&5
8750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751 (exit $ac_status); } && {
8752 test -z "$ac_c_werror_flag" ||
8753 test ! -s conftest.err
8754 } && test -s conftest.$ac_objext; then
8755 ac_cv_type_short=yes
8756else
8757 echo "$as_me: failed program was:" >&5
8758sed 's/^/| /' conftest.$ac_ext >&5
8759
8760 ac_cv_type_short=no
8761fi
8762
8763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8764fi
8765{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8766echo "${ECHO_T}$ac_cv_type_short" >&6; }
8767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008768# The cast to long int works around a bug in the HP C Compiler
8769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8771# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008772{ echo "$as_me:$LINENO: checking size of short" >&5
8773echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008774if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008775 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008776else
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 if test "$cross_compiling" = yes; then
8778 # Depending upon the size, compute the lo and hi bounds.
8779cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008780/* confdefs.h. */
8781_ACEOF
8782cat confdefs.h >>conftest.$ac_ext
8783cat >>conftest.$ac_ext <<_ACEOF
8784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008785$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008786 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008787int
8788main ()
8789{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008791test_array [0] = 0
8792
8793 ;
8794 return 0;
8795}
8796_ACEOF
8797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798if { (ac_try="$ac_compile"
8799case "(($ac_try" in
8800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8801 *) ac_try_echo=$ac_try;;
8802esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008806 grep -v '^ *+' conftest.er1 >conftest.err
8807 rm -f conftest.er1
8808 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810 (exit $ac_status); } && {
8811 test -z "$ac_c_werror_flag" ||
8812 test ! -s conftest.err
8813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 ac_lo=0 ac_mid=0
8815 while :; do
8816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008817/* confdefs.h. */
8818_ACEOF
8819cat confdefs.h >>conftest.$ac_ext
8820cat >>conftest.$ac_ext <<_ACEOF
8821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008822$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008823 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008824int
8825main ()
8826{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008827static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008828test_array [0] = 0
8829
8830 ;
8831 return 0;
8832}
8833_ACEOF
8834rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835if { (ac_try="$ac_compile"
8836case "(($ac_try" in
8837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8838 *) ac_try_echo=$ac_try;;
8839esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008843 grep -v '^ *+' conftest.er1 >conftest.err
8844 rm -f conftest.er1
8845 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847 (exit $ac_status); } && {
8848 test -z "$ac_c_werror_flag" ||
8849 test ! -s conftest.err
8850 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ac_hi=$ac_mid; break
8852else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008854sed 's/^/| /' conftest.$ac_ext >&5
8855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856 ac_lo=`expr $ac_mid + 1`
8857 if test $ac_lo -le $ac_mid; then
8858 ac_lo= ac_hi=
8859 break
8860 fi
8861 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008863
8864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 done
8866else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008868sed 's/^/| /' conftest.$ac_ext >&5
8869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008871/* confdefs.h. */
8872_ACEOF
8873cat confdefs.h >>conftest.$ac_ext
8874cat >>conftest.$ac_ext <<_ACEOF
8875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008876$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008877 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008878int
8879main ()
8880{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008882test_array [0] = 0
8883
8884 ;
8885 return 0;
8886}
8887_ACEOF
8888rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889if { (ac_try="$ac_compile"
8890case "(($ac_try" in
8891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8892 *) ac_try_echo=$ac_try;;
8893esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008897 grep -v '^ *+' conftest.er1 >conftest.err
8898 rm -f conftest.er1
8899 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901 (exit $ac_status); } && {
8902 test -z "$ac_c_werror_flag" ||
8903 test ! -s conftest.err
8904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ac_hi=-1 ac_mid=-1
8906 while :; do
8907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008908/* confdefs.h. */
8909_ACEOF
8910cat confdefs.h >>conftest.$ac_ext
8911cat >>conftest.$ac_ext <<_ACEOF
8912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008913$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008914 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008918static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008919test_array [0] = 0
8920
8921 ;
8922 return 0;
8923}
8924_ACEOF
8925rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926if { (ac_try="$ac_compile"
8927case "(($ac_try" in
8928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8929 *) ac_try_echo=$ac_try;;
8930esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008932 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008934 grep -v '^ *+' conftest.er1 >conftest.err
8935 rm -f conftest.er1
8936 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938 (exit $ac_status); } && {
8939 test -z "$ac_c_werror_flag" ||
8940 test ! -s conftest.err
8941 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 ac_lo=$ac_mid; break
8943else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008945sed 's/^/| /' conftest.$ac_ext >&5
8946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947 ac_hi=`expr '(' $ac_mid ')' - 1`
8948 if test $ac_mid -le $ac_hi; then
8949 ac_lo= ac_hi=
8950 break
8951 fi
8952 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954
8955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 done
8957else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008959sed 's/^/| /' conftest.$ac_ext >&5
8960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963
8964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966
8967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008968# Binary search between lo and hi bounds.
8969while test "x$ac_lo" != "x$ac_hi"; do
8970 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008972/* confdefs.h. */
8973_ACEOF
8974cat confdefs.h >>conftest.$ac_ext
8975cat >>conftest.$ac_ext <<_ACEOF
8976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008977$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008978 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008979int
8980main ()
8981{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008982static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008983test_array [0] = 0
8984
8985 ;
8986 return 0;
8987}
8988_ACEOF
8989rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990if { (ac_try="$ac_compile"
8991case "(($ac_try" in
8992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8993 *) ac_try_echo=$ac_try;;
8994esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008998 grep -v '^ *+' conftest.er1 >conftest.err
8999 rm -f conftest.er1
9000 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002 (exit $ac_status); } && {
9003 test -z "$ac_c_werror_flag" ||
9004 test ! -s conftest.err
9005 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 ac_hi=$ac_mid
9007else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009009sed 's/^/| /' conftest.$ac_ext >&5
9010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013
9014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009015done
9016case $ac_lo in
9017?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009018'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009019 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009020See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009021echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009022See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009023 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024 else
9025 ac_cv_sizeof_short=0
9026 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009027esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009028else
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009030/* confdefs.h. */
9031_ACEOF
9032cat confdefs.h >>conftest.$ac_ext
9033cat >>conftest.$ac_ext <<_ACEOF
9034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009035$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009036 typedef short ac__type_sizeof_;
9037static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9038static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009039#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009040#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009041int
9042main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009043{
Martin v. Löwis11437992002-04-12 09:54:03 +00009044
9045 FILE *f = fopen ("conftest.val", "w");
9046 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009048 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009049 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009050 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009051 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009052 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009053 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 }
9055 else
9056 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009058 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009060 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009061 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009062 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009063
9064 ;
9065 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009066}
Martin v. Löwis11437992002-04-12 09:54:03 +00009067_ACEOF
9068rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009069if { (ac_try="$ac_link"
9070case "(($ac_try" in
9071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9072 *) ac_try_echo=$ac_try;;
9073esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009075 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009079 { (case "(($ac_try" in
9080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9081 *) ac_try_echo=$ac_try;;
9082esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 (exit $ac_status); }; }; then
9088 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009089else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009090 echo "$as_me: program exited with status $ac_status" >&5
9091echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009092sed 's/^/| /' conftest.$ac_ext >&5
9093
Martin v. Löwis11437992002-04-12 09:54:03 +00009094( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009095if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009096 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009097See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009098echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009099See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009100 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009101 else
9102 ac_cv_sizeof_short=0
9103 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009105rm -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 +00009106fi
9107rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009108fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009109{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9110echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009111
9112
9113
Martin v. Löwis11437992002-04-12 09:54:03 +00009114cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009115#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009116_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009117
9118
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009119{ echo "$as_me:$LINENO: checking for float" >&5
9120echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9121if test "${ac_cv_type_float+set}" = set; then
9122 echo $ECHO_N "(cached) $ECHO_C" >&6
9123else
9124 cat >conftest.$ac_ext <<_ACEOF
9125/* confdefs.h. */
9126_ACEOF
9127cat confdefs.h >>conftest.$ac_ext
9128cat >>conftest.$ac_ext <<_ACEOF
9129/* end confdefs.h. */
9130$ac_includes_default
9131typedef float ac__type_new_;
9132int
9133main ()
9134{
9135if ((ac__type_new_ *) 0)
9136 return 0;
9137if (sizeof (ac__type_new_))
9138 return 0;
9139 ;
9140 return 0;
9141}
9142_ACEOF
9143rm -f conftest.$ac_objext
9144if { (ac_try="$ac_compile"
9145case "(($ac_try" in
9146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9147 *) ac_try_echo=$ac_try;;
9148esac
9149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9150 (eval "$ac_compile") 2>conftest.er1
9151 ac_status=$?
9152 grep -v '^ *+' conftest.er1 >conftest.err
9153 rm -f conftest.er1
9154 cat conftest.err >&5
9155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9156 (exit $ac_status); } && {
9157 test -z "$ac_c_werror_flag" ||
9158 test ! -s conftest.err
9159 } && test -s conftest.$ac_objext; then
9160 ac_cv_type_float=yes
9161else
9162 echo "$as_me: failed program was:" >&5
9163sed 's/^/| /' conftest.$ac_ext >&5
9164
9165 ac_cv_type_float=no
9166fi
9167
9168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9169fi
9170{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9171echo "${ECHO_T}$ac_cv_type_float" >&6; }
9172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009173# The cast to long int works around a bug in the HP C Compiler
9174# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9175# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9176# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009177{ echo "$as_me:$LINENO: checking size of float" >&5
9178echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009179if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009180 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009181else
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 if test "$cross_compiling" = yes; then
9183 # Depending upon the size, compute the lo and hi bounds.
9184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009185/* confdefs.h. */
9186_ACEOF
9187cat confdefs.h >>conftest.$ac_ext
9188cat >>conftest.$ac_ext <<_ACEOF
9189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009190$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009191 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009192int
9193main ()
9194{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009196test_array [0] = 0
9197
9198 ;
9199 return 0;
9200}
9201_ACEOF
9202rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203if { (ac_try="$ac_compile"
9204case "(($ac_try" in
9205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9206 *) ac_try_echo=$ac_try;;
9207esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009211 grep -v '^ *+' conftest.er1 >conftest.err
9212 rm -f conftest.er1
9213 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215 (exit $ac_status); } && {
9216 test -z "$ac_c_werror_flag" ||
9217 test ! -s conftest.err
9218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 ac_lo=0 ac_mid=0
9220 while :; do
9221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009222/* confdefs.h. */
9223_ACEOF
9224cat confdefs.h >>conftest.$ac_ext
9225cat >>conftest.$ac_ext <<_ACEOF
9226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009227$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009228 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009229int
9230main ()
9231{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009232static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009233test_array [0] = 0
9234
9235 ;
9236 return 0;
9237}
9238_ACEOF
9239rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240if { (ac_try="$ac_compile"
9241case "(($ac_try" in
9242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9243 *) ac_try_echo=$ac_try;;
9244esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009248 grep -v '^ *+' conftest.er1 >conftest.err
9249 rm -f conftest.er1
9250 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252 (exit $ac_status); } && {
9253 test -z "$ac_c_werror_flag" ||
9254 test ! -s conftest.err
9255 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009256 ac_hi=$ac_mid; break
9257else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009259sed 's/^/| /' conftest.$ac_ext >&5
9260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261 ac_lo=`expr $ac_mid + 1`
9262 if test $ac_lo -le $ac_mid; then
9263 ac_lo= ac_hi=
9264 break
9265 fi
9266 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268
9269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 done
9271else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009273sed 's/^/| /' conftest.$ac_ext >&5
9274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009276/* confdefs.h. */
9277_ACEOF
9278cat confdefs.h >>conftest.$ac_ext
9279cat >>conftest.$ac_ext <<_ACEOF
9280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009281$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009282 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009283int
9284main ()
9285{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009286static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009287test_array [0] = 0
9288
9289 ;
9290 return 0;
9291}
9292_ACEOF
9293rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009294if { (ac_try="$ac_compile"
9295case "(($ac_try" in
9296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9297 *) ac_try_echo=$ac_try;;
9298esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009300 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009302 grep -v '^ *+' conftest.er1 >conftest.err
9303 rm -f conftest.er1
9304 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306 (exit $ac_status); } && {
9307 test -z "$ac_c_werror_flag" ||
9308 test ! -s conftest.err
9309 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ac_hi=-1 ac_mid=-1
9311 while :; do
9312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009313/* confdefs.h. */
9314_ACEOF
9315cat confdefs.h >>conftest.$ac_ext
9316cat >>conftest.$ac_ext <<_ACEOF
9317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009318$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009319 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009320int
9321main ()
9322{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009323static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009324test_array [0] = 0
9325
9326 ;
9327 return 0;
9328}
9329_ACEOF
9330rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331if { (ac_try="$ac_compile"
9332case "(($ac_try" in
9333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9334 *) ac_try_echo=$ac_try;;
9335esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009337 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009339 grep -v '^ *+' conftest.er1 >conftest.err
9340 rm -f conftest.er1
9341 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009343 (exit $ac_status); } && {
9344 test -z "$ac_c_werror_flag" ||
9345 test ! -s conftest.err
9346 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 ac_lo=$ac_mid; break
9348else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009350sed 's/^/| /' conftest.$ac_ext >&5
9351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009352 ac_hi=`expr '(' $ac_mid ')' - 1`
9353 if test $ac_mid -le $ac_hi; then
9354 ac_lo= ac_hi=
9355 break
9356 fi
9357 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009359
9360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 done
9362else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009364sed 's/^/| /' conftest.$ac_ext >&5
9365
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368
9369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371
9372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009373# Binary search between lo and hi bounds.
9374while test "x$ac_lo" != "x$ac_hi"; do
9375 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009377/* confdefs.h. */
9378_ACEOF
9379cat confdefs.h >>conftest.$ac_ext
9380cat >>conftest.$ac_ext <<_ACEOF
9381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009382$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009383 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009384int
9385main ()
9386{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009387static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009388test_array [0] = 0
9389
9390 ;
9391 return 0;
9392}
9393_ACEOF
9394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009395if { (ac_try="$ac_compile"
9396case "(($ac_try" in
9397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9398 *) ac_try_echo=$ac_try;;
9399esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009403 grep -v '^ *+' conftest.er1 >conftest.err
9404 rm -f conftest.er1
9405 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009407 (exit $ac_status); } && {
9408 test -z "$ac_c_werror_flag" ||
9409 test ! -s conftest.err
9410 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009411 ac_hi=$ac_mid
9412else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009414sed 's/^/| /' conftest.$ac_ext >&5
9415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418
9419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009420done
9421case $ac_lo in
9422?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009424 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009425See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009426echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009427See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009428 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009429 else
9430 ac_cv_sizeof_float=0
9431 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009432esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009433else
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009435/* confdefs.h. */
9436_ACEOF
9437cat confdefs.h >>conftest.$ac_ext
9438cat >>conftest.$ac_ext <<_ACEOF
9439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009440$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009441 typedef float ac__type_sizeof_;
9442static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9443static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009444#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009445#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009446int
9447main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009448{
Martin v. Löwis11437992002-04-12 09:54:03 +00009449
9450 FILE *f = fopen ("conftest.val", "w");
9451 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009453 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009456 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009458 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 }
9460 else
9461 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009463 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009465 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009468
9469 ;
9470 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009471}
Martin v. Löwis11437992002-04-12 09:54:03 +00009472_ACEOF
9473rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474if { (ac_try="$ac_link"
9475case "(($ac_try" in
9476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9477 *) ac_try_echo=$ac_try;;
9478esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009484 { (case "(($ac_try" in
9485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9486 *) ac_try_echo=$ac_try;;
9487esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 (exit $ac_status); }; }; then
9493 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009494else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009495 echo "$as_me: program exited with status $ac_status" >&5
9496echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009497sed 's/^/| /' conftest.$ac_ext >&5
9498
Martin v. Löwis11437992002-04-12 09:54:03 +00009499( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009500if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009501 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009502See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009503echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009504See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009505 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506 else
9507 ac_cv_sizeof_float=0
9508 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510rm -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 +00009511fi
9512rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009513fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009514{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9515echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009516
9517
9518
Martin v. Löwis11437992002-04-12 09:54:03 +00009519cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009520#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009521_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009522
9523
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009524{ echo "$as_me:$LINENO: checking for double" >&5
9525echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9526if test "${ac_cv_type_double+set}" = set; then
9527 echo $ECHO_N "(cached) $ECHO_C" >&6
9528else
9529 cat >conftest.$ac_ext <<_ACEOF
9530/* confdefs.h. */
9531_ACEOF
9532cat confdefs.h >>conftest.$ac_ext
9533cat >>conftest.$ac_ext <<_ACEOF
9534/* end confdefs.h. */
9535$ac_includes_default
9536typedef double ac__type_new_;
9537int
9538main ()
9539{
9540if ((ac__type_new_ *) 0)
9541 return 0;
9542if (sizeof (ac__type_new_))
9543 return 0;
9544 ;
9545 return 0;
9546}
9547_ACEOF
9548rm -f conftest.$ac_objext
9549if { (ac_try="$ac_compile"
9550case "(($ac_try" in
9551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9552 *) ac_try_echo=$ac_try;;
9553esac
9554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9555 (eval "$ac_compile") 2>conftest.er1
9556 ac_status=$?
9557 grep -v '^ *+' conftest.er1 >conftest.err
9558 rm -f conftest.er1
9559 cat conftest.err >&5
9560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9561 (exit $ac_status); } && {
9562 test -z "$ac_c_werror_flag" ||
9563 test ! -s conftest.err
9564 } && test -s conftest.$ac_objext; then
9565 ac_cv_type_double=yes
9566else
9567 echo "$as_me: failed program was:" >&5
9568sed 's/^/| /' conftest.$ac_ext >&5
9569
9570 ac_cv_type_double=no
9571fi
9572
9573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9574fi
9575{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9576echo "${ECHO_T}$ac_cv_type_double" >&6; }
9577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578# The cast to long int works around a bug in the HP C Compiler
9579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9581# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009582{ echo "$as_me:$LINENO: checking size of double" >&5
9583echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009584if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009585 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009586else
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 if test "$cross_compiling" = yes; then
9588 # Depending upon the size, compute the lo and hi bounds.
9589cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009590/* confdefs.h. */
9591_ACEOF
9592cat confdefs.h >>conftest.$ac_ext
9593cat >>conftest.$ac_ext <<_ACEOF
9594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009595$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009596 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009597int
9598main ()
9599{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009601test_array [0] = 0
9602
9603 ;
9604 return 0;
9605}
9606_ACEOF
9607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608if { (ac_try="$ac_compile"
9609case "(($ac_try" in
9610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9611 *) ac_try_echo=$ac_try;;
9612esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009616 grep -v '^ *+' conftest.er1 >conftest.err
9617 rm -f conftest.er1
9618 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620 (exit $ac_status); } && {
9621 test -z "$ac_c_werror_flag" ||
9622 test ! -s conftest.err
9623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 ac_lo=0 ac_mid=0
9625 while :; do
9626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009627/* confdefs.h. */
9628_ACEOF
9629cat confdefs.h >>conftest.$ac_ext
9630cat >>conftest.$ac_ext <<_ACEOF
9631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009632$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009633 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009634int
9635main ()
9636{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009637static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009638test_array [0] = 0
9639
9640 ;
9641 return 0;
9642}
9643_ACEOF
9644rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645if { (ac_try="$ac_compile"
9646case "(($ac_try" in
9647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9648 *) ac_try_echo=$ac_try;;
9649esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009653 grep -v '^ *+' conftest.er1 >conftest.err
9654 rm -f conftest.er1
9655 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657 (exit $ac_status); } && {
9658 test -z "$ac_c_werror_flag" ||
9659 test ! -s conftest.err
9660 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 ac_hi=$ac_mid; break
9662else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009664sed 's/^/| /' conftest.$ac_ext >&5
9665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666 ac_lo=`expr $ac_mid + 1`
9667 if test $ac_lo -le $ac_mid; then
9668 ac_lo= ac_hi=
9669 break
9670 fi
9671 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673
9674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 done
9676else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009678sed 's/^/| /' conftest.$ac_ext >&5
9679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* confdefs.h. */
9682_ACEOF
9683cat confdefs.h >>conftest.$ac_ext
9684cat >>conftest.$ac_ext <<_ACEOF
9685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009686$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009687 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009688int
9689main ()
9690{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009691static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009692test_array [0] = 0
9693
9694 ;
9695 return 0;
9696}
9697_ACEOF
9698rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699if { (ac_try="$ac_compile"
9700case "(($ac_try" in
9701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9702 *) ac_try_echo=$ac_try;;
9703esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009705 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009707 grep -v '^ *+' conftest.er1 >conftest.err
9708 rm -f conftest.er1
9709 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711 (exit $ac_status); } && {
9712 test -z "$ac_c_werror_flag" ||
9713 test ! -s conftest.err
9714 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ac_hi=-1 ac_mid=-1
9716 while :; do
9717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009718/* confdefs.h. */
9719_ACEOF
9720cat confdefs.h >>conftest.$ac_ext
9721cat >>conftest.$ac_ext <<_ACEOF
9722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009723$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009724 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009725int
9726main ()
9727{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009729test_array [0] = 0
9730
9731 ;
9732 return 0;
9733}
9734_ACEOF
9735rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736if { (ac_try="$ac_compile"
9737case "(($ac_try" in
9738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9739 *) ac_try_echo=$ac_try;;
9740esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009744 grep -v '^ *+' conftest.er1 >conftest.err
9745 rm -f conftest.er1
9746 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748 (exit $ac_status); } && {
9749 test -z "$ac_c_werror_flag" ||
9750 test ! -s conftest.err
9751 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ac_lo=$ac_mid; break
9753else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009755sed 's/^/| /' conftest.$ac_ext >&5
9756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757 ac_hi=`expr '(' $ac_mid ')' - 1`
9758 if test $ac_mid -le $ac_hi; then
9759 ac_lo= ac_hi=
9760 break
9761 fi
9762 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764
9765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 done
9767else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009769sed 's/^/| /' conftest.$ac_ext >&5
9770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773
9774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776
9777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009778# Binary search between lo and hi bounds.
9779while test "x$ac_lo" != "x$ac_hi"; do
9780 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009782/* confdefs.h. */
9783_ACEOF
9784cat confdefs.h >>conftest.$ac_ext
9785cat >>conftest.$ac_ext <<_ACEOF
9786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009787$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009788 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009789int
9790main ()
9791{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009793test_array [0] = 0
9794
9795 ;
9796 return 0;
9797}
9798_ACEOF
9799rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009800if { (ac_try="$ac_compile"
9801case "(($ac_try" in
9802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9803 *) ac_try_echo=$ac_try;;
9804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009808 grep -v '^ *+' conftest.er1 >conftest.err
9809 rm -f conftest.er1
9810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812 (exit $ac_status); } && {
9813 test -z "$ac_c_werror_flag" ||
9814 test ! -s conftest.err
9815 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 ac_hi=$ac_mid
9817else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009819sed 's/^/| /' conftest.$ac_ext >&5
9820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823
9824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009825done
9826case $ac_lo in
9827?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009829 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009830See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009831echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009832See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009833 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834 else
9835 ac_cv_sizeof_double=0
9836 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009837esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009838else
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009840/* confdefs.h. */
9841_ACEOF
9842cat confdefs.h >>conftest.$ac_ext
9843cat >>conftest.$ac_ext <<_ACEOF
9844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009845$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009846 typedef double ac__type_sizeof_;
9847static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9848static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009849#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009850#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009851int
9852main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009853{
Martin v. Löwis11437992002-04-12 09:54:03 +00009854
9855 FILE *f = fopen ("conftest.val", "w");
9856 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009858 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009861 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009863 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 }
9865 else
9866 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009868 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009870 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009873
9874 ;
9875 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009876}
Martin v. Löwis11437992002-04-12 09:54:03 +00009877_ACEOF
9878rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879if { (ac_try="$ac_link"
9880case "(($ac_try" in
9881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9882 *) ac_try_echo=$ac_try;;
9883esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889 { (case "(($ac_try" in
9890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9891 *) ac_try_echo=$ac_try;;
9892esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009897 (exit $ac_status); }; }; then
9898 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009899else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009900 echo "$as_me: program exited with status $ac_status" >&5
9901echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009902sed 's/^/| /' conftest.$ac_ext >&5
9903
Martin v. Löwis11437992002-04-12 09:54:03 +00009904( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009906 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009907See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009908echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009909See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009910 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009911 else
9912 ac_cv_sizeof_double=0
9913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915rm -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 +00009916fi
9917rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009918fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009919{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9920echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009921
9922
9923
Martin v. Löwis11437992002-04-12 09:54:03 +00009924cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009925#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009926_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009927
9928
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009929{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9930echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9931if test "${ac_cv_type_fpos_t+set}" = set; then
9932 echo $ECHO_N "(cached) $ECHO_C" >&6
9933else
9934 cat >conftest.$ac_ext <<_ACEOF
9935/* confdefs.h. */
9936_ACEOF
9937cat confdefs.h >>conftest.$ac_ext
9938cat >>conftest.$ac_ext <<_ACEOF
9939/* end confdefs.h. */
9940$ac_includes_default
9941typedef fpos_t ac__type_new_;
9942int
9943main ()
9944{
9945if ((ac__type_new_ *) 0)
9946 return 0;
9947if (sizeof (ac__type_new_))
9948 return 0;
9949 ;
9950 return 0;
9951}
9952_ACEOF
9953rm -f conftest.$ac_objext
9954if { (ac_try="$ac_compile"
9955case "(($ac_try" in
9956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9957 *) ac_try_echo=$ac_try;;
9958esac
9959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9960 (eval "$ac_compile") 2>conftest.er1
9961 ac_status=$?
9962 grep -v '^ *+' conftest.er1 >conftest.err
9963 rm -f conftest.er1
9964 cat conftest.err >&5
9965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9966 (exit $ac_status); } && {
9967 test -z "$ac_c_werror_flag" ||
9968 test ! -s conftest.err
9969 } && test -s conftest.$ac_objext; then
9970 ac_cv_type_fpos_t=yes
9971else
9972 echo "$as_me: failed program was:" >&5
9973sed 's/^/| /' conftest.$ac_ext >&5
9974
9975 ac_cv_type_fpos_t=no
9976fi
9977
9978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9979fi
9980{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9981echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009983# The cast to long int works around a bug in the HP C Compiler
9984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9986# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009987{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9988echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009989if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009990 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009991else
Martin v. Löwis11437992002-04-12 09:54:03 +00009992 if test "$cross_compiling" = yes; then
9993 # Depending upon the size, compute the lo and hi bounds.
9994cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009995/* confdefs.h. */
9996_ACEOF
9997cat confdefs.h >>conftest.$ac_ext
9998cat >>conftest.$ac_ext <<_ACEOF
9999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010000$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010001 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010002int
10003main ()
10004{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010006test_array [0] = 0
10007
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013if { (ac_try="$ac_compile"
10014case "(($ac_try" in
10015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10016 *) ac_try_echo=$ac_try;;
10017esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010021 grep -v '^ *+' conftest.er1 >conftest.err
10022 rm -f conftest.er1
10023 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025 (exit $ac_status); } && {
10026 test -z "$ac_c_werror_flag" ||
10027 test ! -s conftest.err
10028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 ac_lo=0 ac_mid=0
10030 while :; do
10031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010032/* confdefs.h. */
10033_ACEOF
10034cat confdefs.h >>conftest.$ac_ext
10035cat >>conftest.$ac_ext <<_ACEOF
10036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010037$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010038 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010039int
10040main ()
10041{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010042static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010043test_array [0] = 0
10044
10045 ;
10046 return 0;
10047}
10048_ACEOF
10049rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050if { (ac_try="$ac_compile"
10051case "(($ac_try" in
10052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10053 *) ac_try_echo=$ac_try;;
10054esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010058 grep -v '^ *+' conftest.er1 >conftest.err
10059 rm -f conftest.er1
10060 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062 (exit $ac_status); } && {
10063 test -z "$ac_c_werror_flag" ||
10064 test ! -s conftest.err
10065 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 ac_hi=$ac_mid; break
10067else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010069sed 's/^/| /' conftest.$ac_ext >&5
10070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071 ac_lo=`expr $ac_mid + 1`
10072 if test $ac_lo -le $ac_mid; then
10073 ac_lo= ac_hi=
10074 break
10075 fi
10076 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078
10079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 done
10081else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010083sed 's/^/| /' conftest.$ac_ext >&5
10084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010086/* confdefs.h. */
10087_ACEOF
10088cat confdefs.h >>conftest.$ac_ext
10089cat >>conftest.$ac_ext <<_ACEOF
10090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010091$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010092 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010093int
10094main ()
10095{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010096static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010097test_array [0] = 0
10098
10099 ;
10100 return 0;
10101}
10102_ACEOF
10103rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010104if { (ac_try="$ac_compile"
10105case "(($ac_try" in
10106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10107 *) ac_try_echo=$ac_try;;
10108esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010112 grep -v '^ *+' conftest.er1 >conftest.err
10113 rm -f conftest.er1
10114 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116 (exit $ac_status); } && {
10117 test -z "$ac_c_werror_flag" ||
10118 test ! -s conftest.err
10119 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ac_hi=-1 ac_mid=-1
10121 while :; do
10122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* confdefs.h. */
10124_ACEOF
10125cat confdefs.h >>conftest.$ac_ext
10126cat >>conftest.$ac_ext <<_ACEOF
10127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010129 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010130int
10131main ()
10132{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010133static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010134test_array [0] = 0
10135
10136 ;
10137 return 0;
10138}
10139_ACEOF
10140rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141if { (ac_try="$ac_compile"
10142case "(($ac_try" in
10143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10144 *) ac_try_echo=$ac_try;;
10145esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010149 grep -v '^ *+' conftest.er1 >conftest.err
10150 rm -f conftest.er1
10151 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153 (exit $ac_status); } && {
10154 test -z "$ac_c_werror_flag" ||
10155 test ! -s conftest.err
10156 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 ac_lo=$ac_mid; break
10158else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010160sed 's/^/| /' conftest.$ac_ext >&5
10161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162 ac_hi=`expr '(' $ac_mid ')' - 1`
10163 if test $ac_mid -le $ac_hi; then
10164 ac_lo= ac_hi=
10165 break
10166 fi
10167 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010169
10170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 done
10172else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010174sed 's/^/| /' conftest.$ac_ext >&5
10175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178
10179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181
10182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010183# Binary search between lo and hi bounds.
10184while test "x$ac_lo" != "x$ac_hi"; do
10185 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010187/* confdefs.h. */
10188_ACEOF
10189cat confdefs.h >>conftest.$ac_ext
10190cat >>conftest.$ac_ext <<_ACEOF
10191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010192$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010193 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010194int
10195main ()
10196{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010197static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010198test_array [0] = 0
10199
10200 ;
10201 return 0;
10202}
10203_ACEOF
10204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205if { (ac_try="$ac_compile"
10206case "(($ac_try" in
10207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10208 *) ac_try_echo=$ac_try;;
10209esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010213 grep -v '^ *+' conftest.er1 >conftest.err
10214 rm -f conftest.er1
10215 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217 (exit $ac_status); } && {
10218 test -z "$ac_c_werror_flag" ||
10219 test ! -s conftest.err
10220 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 ac_hi=$ac_mid
10222else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010224sed 's/^/| /' conftest.$ac_ext >&5
10225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228
10229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010230done
10231case $ac_lo in
10232?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010233'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010234 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010235See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010236echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010237See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010238 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239 else
10240 ac_cv_sizeof_fpos_t=0
10241 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010242esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010243else
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010245/* confdefs.h. */
10246_ACEOF
10247cat confdefs.h >>conftest.$ac_ext
10248cat >>conftest.$ac_ext <<_ACEOF
10249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010250$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010251 typedef fpos_t ac__type_sizeof_;
10252static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10253static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010254#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010255#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010256int
10257main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010258{
Martin v. Löwis11437992002-04-12 09:54:03 +000010259
10260 FILE *f = fopen ("conftest.val", "w");
10261 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010263 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010266 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010268 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 }
10270 else
10271 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010273 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010274 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010275 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010278
10279 ;
10280 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010281}
Martin v. Löwis11437992002-04-12 09:54:03 +000010282_ACEOF
10283rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284if { (ac_try="$ac_link"
10285case "(($ac_try" in
10286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10287 *) ac_try_echo=$ac_try;;
10288esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010294 { (case "(($ac_try" in
10295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10296 *) ac_try_echo=$ac_try;;
10297esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 (exit $ac_status); }; }; then
10303 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010304else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010305 echo "$as_me: program exited with status $ac_status" >&5
10306echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010307sed 's/^/| /' conftest.$ac_ext >&5
10308
Martin v. Löwis11437992002-04-12 09:54:03 +000010309( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010310if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010311 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010312See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010313echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010314See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010315 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010316 else
10317 ac_cv_sizeof_fpos_t=0
10318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320rm -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 +000010321fi
10322rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010323fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010324{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10325echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010326
10327
10328
Martin v. Löwis11437992002-04-12 09:54:03 +000010329cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010330#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010331_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010332
Michael W. Hudson54241132001-12-07 15:38:26 +000010333
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010334{ echo "$as_me:$LINENO: checking for size_t" >&5
10335echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10336if test "${ac_cv_type_size_t+set}" = set; then
10337 echo $ECHO_N "(cached) $ECHO_C" >&6
10338else
10339 cat >conftest.$ac_ext <<_ACEOF
10340/* confdefs.h. */
10341_ACEOF
10342cat confdefs.h >>conftest.$ac_ext
10343cat >>conftest.$ac_ext <<_ACEOF
10344/* end confdefs.h. */
10345$ac_includes_default
10346typedef size_t ac__type_new_;
10347int
10348main ()
10349{
10350if ((ac__type_new_ *) 0)
10351 return 0;
10352if (sizeof (ac__type_new_))
10353 return 0;
10354 ;
10355 return 0;
10356}
10357_ACEOF
10358rm -f conftest.$ac_objext
10359if { (ac_try="$ac_compile"
10360case "(($ac_try" in
10361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10362 *) ac_try_echo=$ac_try;;
10363esac
10364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10365 (eval "$ac_compile") 2>conftest.er1
10366 ac_status=$?
10367 grep -v '^ *+' conftest.er1 >conftest.err
10368 rm -f conftest.er1
10369 cat conftest.err >&5
10370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10371 (exit $ac_status); } && {
10372 test -z "$ac_c_werror_flag" ||
10373 test ! -s conftest.err
10374 } && test -s conftest.$ac_objext; then
10375 ac_cv_type_size_t=yes
10376else
10377 echo "$as_me: failed program was:" >&5
10378sed 's/^/| /' conftest.$ac_ext >&5
10379
10380 ac_cv_type_size_t=no
10381fi
10382
10383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10384fi
10385{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10386echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388# The cast to long int works around a bug in the HP C Compiler
10389# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10390# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10391# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010392{ echo "$as_me:$LINENO: checking size of size_t" >&5
10393echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010394if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010395 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010396else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010397 if test "$cross_compiling" = yes; then
10398 # Depending upon the size, compute the lo and hi bounds.
10399cat >conftest.$ac_ext <<_ACEOF
10400/* confdefs.h. */
10401_ACEOF
10402cat confdefs.h >>conftest.$ac_ext
10403cat >>conftest.$ac_ext <<_ACEOF
10404/* end confdefs.h. */
10405$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010406 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010407int
10408main ()
10409{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010411test_array [0] = 0
10412
10413 ;
10414 return 0;
10415}
10416_ACEOF
10417rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418if { (ac_try="$ac_compile"
10419case "(($ac_try" in
10420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10421 *) ac_try_echo=$ac_try;;
10422esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425 ac_status=$?
10426 grep -v '^ *+' conftest.er1 >conftest.err
10427 rm -f conftest.er1
10428 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430 (exit $ac_status); } && {
10431 test -z "$ac_c_werror_flag" ||
10432 test ! -s conftest.err
10433 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434 ac_lo=0 ac_mid=0
10435 while :; do
10436 cat >conftest.$ac_ext <<_ACEOF
10437/* confdefs.h. */
10438_ACEOF
10439cat confdefs.h >>conftest.$ac_ext
10440cat >>conftest.$ac_ext <<_ACEOF
10441/* end confdefs.h. */
10442$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010443 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444int
10445main ()
10446{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010447static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448test_array [0] = 0
10449
10450 ;
10451 return 0;
10452}
10453_ACEOF
10454rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455if { (ac_try="$ac_compile"
10456case "(($ac_try" in
10457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10458 *) ac_try_echo=$ac_try;;
10459esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010462 ac_status=$?
10463 grep -v '^ *+' conftest.er1 >conftest.err
10464 rm -f conftest.er1
10465 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010467 (exit $ac_status); } && {
10468 test -z "$ac_c_werror_flag" ||
10469 test ! -s conftest.err
10470 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471 ac_hi=$ac_mid; break
10472else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010473 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010474sed 's/^/| /' conftest.$ac_ext >&5
10475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476 ac_lo=`expr $ac_mid + 1`
10477 if test $ac_lo -le $ac_mid; then
10478 ac_lo= ac_hi=
10479 break
10480 fi
10481 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010483
10484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485 done
10486else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010487 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010488sed 's/^/| /' conftest.$ac_ext >&5
10489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491/* confdefs.h. */
10492_ACEOF
10493cat confdefs.h >>conftest.$ac_ext
10494cat >>conftest.$ac_ext <<_ACEOF
10495/* end confdefs.h. */
10496$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010497 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010498int
10499main ()
10500{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010501static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010502test_array [0] = 0
10503
10504 ;
10505 return 0;
10506}
10507_ACEOF
10508rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010509if { (ac_try="$ac_compile"
10510case "(($ac_try" in
10511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10512 *) ac_try_echo=$ac_try;;
10513esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516 ac_status=$?
10517 grep -v '^ *+' conftest.er1 >conftest.err
10518 rm -f conftest.er1
10519 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521 (exit $ac_status); } && {
10522 test -z "$ac_c_werror_flag" ||
10523 test ! -s conftest.err
10524 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525 ac_hi=-1 ac_mid=-1
10526 while :; do
10527 cat >conftest.$ac_ext <<_ACEOF
10528/* confdefs.h. */
10529_ACEOF
10530cat confdefs.h >>conftest.$ac_ext
10531cat >>conftest.$ac_ext <<_ACEOF
10532/* end confdefs.h. */
10533$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010534 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535int
10536main ()
10537{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010538static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539test_array [0] = 0
10540
10541 ;
10542 return 0;
10543}
10544_ACEOF
10545rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546if { (ac_try="$ac_compile"
10547case "(($ac_try" in
10548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10549 *) ac_try_echo=$ac_try;;
10550esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553 ac_status=$?
10554 grep -v '^ *+' conftest.er1 >conftest.err
10555 rm -f conftest.er1
10556 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010558 (exit $ac_status); } && {
10559 test -z "$ac_c_werror_flag" ||
10560 test ! -s conftest.err
10561 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562 ac_lo=$ac_mid; break
10563else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010564 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010565sed 's/^/| /' conftest.$ac_ext >&5
10566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010567 ac_hi=`expr '(' $ac_mid ')' - 1`
10568 if test $ac_mid -le $ac_hi; then
10569 ac_lo= ac_hi=
10570 break
10571 fi
10572 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010574
10575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576 done
10577else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010578 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579sed 's/^/| /' conftest.$ac_ext >&5
10580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583
10584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586
10587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588# Binary search between lo and hi bounds.
10589while test "x$ac_lo" != "x$ac_hi"; do
10590 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10591 cat >conftest.$ac_ext <<_ACEOF
10592/* confdefs.h. */
10593_ACEOF
10594cat confdefs.h >>conftest.$ac_ext
10595cat >>conftest.$ac_ext <<_ACEOF
10596/* end confdefs.h. */
10597$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010598 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599int
10600main ()
10601{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603test_array [0] = 0
10604
10605 ;
10606 return 0;
10607}
10608_ACEOF
10609rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010610if { (ac_try="$ac_compile"
10611case "(($ac_try" in
10612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10613 *) ac_try_echo=$ac_try;;
10614esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617 ac_status=$?
10618 grep -v '^ *+' conftest.er1 >conftest.err
10619 rm -f conftest.er1
10620 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622 (exit $ac_status); } && {
10623 test -z "$ac_c_werror_flag" ||
10624 test ! -s conftest.err
10625 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626 ac_hi=$ac_mid
10627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010628 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010629sed 's/^/| /' conftest.$ac_ext >&5
10630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633
10634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635done
10636case $ac_lo in
10637?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010639 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010641echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010642See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010643 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644 else
10645 ac_cv_sizeof_size_t=0
10646 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010647esac
10648else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649 cat >conftest.$ac_ext <<_ACEOF
10650/* confdefs.h. */
10651_ACEOF
10652cat confdefs.h >>conftest.$ac_ext
10653cat >>conftest.$ac_ext <<_ACEOF
10654/* end confdefs.h. */
10655$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010656 typedef size_t ac__type_sizeof_;
10657static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10658static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659#include <stdio.h>
10660#include <stdlib.h>
10661int
10662main ()
10663{
10664
10665 FILE *f = fopen ("conftest.val", "w");
10666 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010668 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010671 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010673 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010674 }
10675 else
10676 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010678 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010680 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010681 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010683
10684 ;
10685 return 0;
10686}
10687_ACEOF
10688rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689if { (ac_try="$ac_link"
10690case "(($ac_try" in
10691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10692 *) ac_try_echo=$ac_try;;
10693esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010699 { (case "(($ac_try" in
10700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10701 *) ac_try_echo=$ac_try;;
10702esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010705 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010707 (exit $ac_status); }; }; then
10708 ac_cv_sizeof_size_t=`cat conftest.val`
10709else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010710 echo "$as_me: program exited with status $ac_status" >&5
10711echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010712sed 's/^/| /' conftest.$ac_ext >&5
10713
10714( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010716 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010717See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010718echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010720 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721 else
10722 ac_cv_sizeof_size_t=0
10723 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010725rm -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 +000010726fi
10727rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010728fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010729{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10730echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731
10732
10733
Martin v. Löwis18e16552006-02-15 17:27:45 +000010734cat >>confdefs.h <<_ACEOF
10735#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10736_ACEOF
10737
10738
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010739{ echo "$as_me:$LINENO: checking for pid_t" >&5
10740echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10741if test "${ac_cv_type_pid_t+set}" = set; then
10742 echo $ECHO_N "(cached) $ECHO_C" >&6
10743else
10744 cat >conftest.$ac_ext <<_ACEOF
10745/* confdefs.h. */
10746_ACEOF
10747cat confdefs.h >>conftest.$ac_ext
10748cat >>conftest.$ac_ext <<_ACEOF
10749/* end confdefs.h. */
10750$ac_includes_default
10751typedef pid_t ac__type_new_;
10752int
10753main ()
10754{
10755if ((ac__type_new_ *) 0)
10756 return 0;
10757if (sizeof (ac__type_new_))
10758 return 0;
10759 ;
10760 return 0;
10761}
10762_ACEOF
10763rm -f conftest.$ac_objext
10764if { (ac_try="$ac_compile"
10765case "(($ac_try" in
10766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10767 *) ac_try_echo=$ac_try;;
10768esac
10769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10770 (eval "$ac_compile") 2>conftest.er1
10771 ac_status=$?
10772 grep -v '^ *+' conftest.er1 >conftest.err
10773 rm -f conftest.er1
10774 cat conftest.err >&5
10775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776 (exit $ac_status); } && {
10777 test -z "$ac_c_werror_flag" ||
10778 test ! -s conftest.err
10779 } && test -s conftest.$ac_objext; then
10780 ac_cv_type_pid_t=yes
10781else
10782 echo "$as_me: failed program was:" >&5
10783sed 's/^/| /' conftest.$ac_ext >&5
10784
10785 ac_cv_type_pid_t=no
10786fi
10787
10788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10789fi
10790{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10791echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10792
Christian Heimes400adb02008-02-01 08:12:03 +000010793# The cast to long int works around a bug in the HP C Compiler
10794# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10795# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10796# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010797{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10798echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010799if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010800 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010801else
10802 if test "$cross_compiling" = yes; then
10803 # Depending upon the size, compute the lo and hi bounds.
10804cat >conftest.$ac_ext <<_ACEOF
10805/* confdefs.h. */
10806_ACEOF
10807cat confdefs.h >>conftest.$ac_ext
10808cat >>conftest.$ac_ext <<_ACEOF
10809/* end confdefs.h. */
10810$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010811 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010812int
10813main ()
10814{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010816test_array [0] = 0
10817
10818 ;
10819 return 0;
10820}
10821_ACEOF
10822rm -f conftest.$ac_objext
10823if { (ac_try="$ac_compile"
10824case "(($ac_try" in
10825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10826 *) ac_try_echo=$ac_try;;
10827esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010829 (eval "$ac_compile") 2>conftest.er1
10830 ac_status=$?
10831 grep -v '^ *+' conftest.er1 >conftest.err
10832 rm -f conftest.er1
10833 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010835 (exit $ac_status); } && {
10836 test -z "$ac_c_werror_flag" ||
10837 test ! -s conftest.err
10838 } && test -s conftest.$ac_objext; then
10839 ac_lo=0 ac_mid=0
10840 while :; do
10841 cat >conftest.$ac_ext <<_ACEOF
10842/* confdefs.h. */
10843_ACEOF
10844cat confdefs.h >>conftest.$ac_ext
10845cat >>conftest.$ac_ext <<_ACEOF
10846/* end confdefs.h. */
10847$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010848 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010849int
10850main ()
10851{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010853test_array [0] = 0
10854
10855 ;
10856 return 0;
10857}
10858_ACEOF
10859rm -f conftest.$ac_objext
10860if { (ac_try="$ac_compile"
10861case "(($ac_try" in
10862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10863 *) ac_try_echo=$ac_try;;
10864esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010866 (eval "$ac_compile") 2>conftest.er1
10867 ac_status=$?
10868 grep -v '^ *+' conftest.er1 >conftest.err
10869 rm -f conftest.er1
10870 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010872 (exit $ac_status); } && {
10873 test -z "$ac_c_werror_flag" ||
10874 test ! -s conftest.err
10875 } && test -s conftest.$ac_objext; then
10876 ac_hi=$ac_mid; break
10877else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010878 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010879sed 's/^/| /' conftest.$ac_ext >&5
10880
10881 ac_lo=`expr $ac_mid + 1`
10882 if test $ac_lo -le $ac_mid; then
10883 ac_lo= ac_hi=
10884 break
10885 fi
10886 ac_mid=`expr 2 '*' $ac_mid + 1`
10887fi
10888
10889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10890 done
10891else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010892 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010893sed 's/^/| /' conftest.$ac_ext >&5
10894
10895 cat >conftest.$ac_ext <<_ACEOF
10896/* confdefs.h. */
10897_ACEOF
10898cat confdefs.h >>conftest.$ac_ext
10899cat >>conftest.$ac_ext <<_ACEOF
10900/* end confdefs.h. */
10901$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010902 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010903int
10904main ()
10905{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010906static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010907test_array [0] = 0
10908
10909 ;
10910 return 0;
10911}
10912_ACEOF
10913rm -f conftest.$ac_objext
10914if { (ac_try="$ac_compile"
10915case "(($ac_try" in
10916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10917 *) ac_try_echo=$ac_try;;
10918esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010920 (eval "$ac_compile") 2>conftest.er1
10921 ac_status=$?
10922 grep -v '^ *+' conftest.er1 >conftest.err
10923 rm -f conftest.er1
10924 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010926 (exit $ac_status); } && {
10927 test -z "$ac_c_werror_flag" ||
10928 test ! -s conftest.err
10929 } && test -s conftest.$ac_objext; then
10930 ac_hi=-1 ac_mid=-1
10931 while :; do
10932 cat >conftest.$ac_ext <<_ACEOF
10933/* confdefs.h. */
10934_ACEOF
10935cat confdefs.h >>conftest.$ac_ext
10936cat >>conftest.$ac_ext <<_ACEOF
10937/* end confdefs.h. */
10938$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010939 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010940int
10941main ()
10942{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010943static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010944test_array [0] = 0
10945
10946 ;
10947 return 0;
10948}
10949_ACEOF
10950rm -f conftest.$ac_objext
10951if { (ac_try="$ac_compile"
10952case "(($ac_try" in
10953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10954 *) ac_try_echo=$ac_try;;
10955esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010957 (eval "$ac_compile") 2>conftest.er1
10958 ac_status=$?
10959 grep -v '^ *+' conftest.er1 >conftest.err
10960 rm -f conftest.er1
10961 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010963 (exit $ac_status); } && {
10964 test -z "$ac_c_werror_flag" ||
10965 test ! -s conftest.err
10966 } && test -s conftest.$ac_objext; then
10967 ac_lo=$ac_mid; break
10968else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010969 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010970sed 's/^/| /' conftest.$ac_ext >&5
10971
10972 ac_hi=`expr '(' $ac_mid ')' - 1`
10973 if test $ac_mid -le $ac_hi; then
10974 ac_lo= ac_hi=
10975 break
10976 fi
10977 ac_mid=`expr 2 '*' $ac_mid`
10978fi
10979
10980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10981 done
10982else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010983 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010984sed 's/^/| /' conftest.$ac_ext >&5
10985
10986 ac_lo= ac_hi=
10987fi
10988
10989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10990fi
10991
10992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10993# Binary search between lo and hi bounds.
10994while test "x$ac_lo" != "x$ac_hi"; do
10995 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10996 cat >conftest.$ac_ext <<_ACEOF
10997/* confdefs.h. */
10998_ACEOF
10999cat confdefs.h >>conftest.$ac_ext
11000cat >>conftest.$ac_ext <<_ACEOF
11001/* end confdefs.h. */
11002$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011003 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011004int
11005main ()
11006{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011007static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011008test_array [0] = 0
11009
11010 ;
11011 return 0;
11012}
11013_ACEOF
11014rm -f conftest.$ac_objext
11015if { (ac_try="$ac_compile"
11016case "(($ac_try" in
11017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11018 *) ac_try_echo=$ac_try;;
11019esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011021 (eval "$ac_compile") 2>conftest.er1
11022 ac_status=$?
11023 grep -v '^ *+' conftest.er1 >conftest.err
11024 rm -f conftest.er1
11025 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011027 (exit $ac_status); } && {
11028 test -z "$ac_c_werror_flag" ||
11029 test ! -s conftest.err
11030 } && test -s conftest.$ac_objext; then
11031 ac_hi=$ac_mid
11032else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011033 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011034sed 's/^/| /' conftest.$ac_ext >&5
11035
11036 ac_lo=`expr '(' $ac_mid ')' + 1`
11037fi
11038
11039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11040done
11041case $ac_lo in
11042?*) ac_cv_sizeof_pid_t=$ac_lo;;
11043'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011044 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011045See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011046echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011047See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011048 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011049 else
11050 ac_cv_sizeof_pid_t=0
11051 fi ;;
11052esac
11053else
11054 cat >conftest.$ac_ext <<_ACEOF
11055/* confdefs.h. */
11056_ACEOF
11057cat confdefs.h >>conftest.$ac_ext
11058cat >>conftest.$ac_ext <<_ACEOF
11059/* end confdefs.h. */
11060$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011061 typedef pid_t ac__type_sizeof_;
11062static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11063static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011064#include <stdio.h>
11065#include <stdlib.h>
11066int
11067main ()
11068{
11069
11070 FILE *f = fopen ("conftest.val", "w");
11071 if (! f)
11072 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011073 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011074 {
11075 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011076 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011077 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011078 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011079 }
11080 else
11081 {
11082 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011083 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011084 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011085 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011086 }
11087 return ferror (f) || fclose (f) != 0;
11088
11089 ;
11090 return 0;
11091}
11092_ACEOF
11093rm -f conftest$ac_exeext
11094if { (ac_try="$ac_link"
11095case "(($ac_try" in
11096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11097 *) ac_try_echo=$ac_try;;
11098esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011100 (eval "$ac_link") 2>&5
11101 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11104 { (case "(($ac_try" in
11105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11106 *) ac_try_echo=$ac_try;;
11107esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011109 (eval "$ac_try") 2>&5
11110 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011112 (exit $ac_status); }; }; then
11113 ac_cv_sizeof_pid_t=`cat conftest.val`
11114else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011115 echo "$as_me: program exited with status $ac_status" >&5
11116echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011117sed 's/^/| /' conftest.$ac_ext >&5
11118
11119( exit $ac_status )
11120if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011121 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011122See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011123echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011124See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011125 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011126 else
11127 ac_cv_sizeof_pid_t=0
11128 fi
11129fi
11130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11131fi
11132rm -f conftest.val
11133fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011134{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11135echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011136
11137
11138
11139cat >>confdefs.h <<_ACEOF
11140#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11141_ACEOF
11142
11143
Michael W. Hudson54241132001-12-07 15:38:26 +000011144
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011145{ echo "$as_me:$LINENO: checking for long long support" >&5
11146echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011147have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011149/* confdefs.h. */
11150_ACEOF
11151cat confdefs.h >>conftest.$ac_ext
11152cat >>conftest.$ac_ext <<_ACEOF
11153/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011154
Martin v. Löwis11437992002-04-12 09:54:03 +000011155int
11156main ()
11157{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011158long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 ;
11160 return 0;
11161}
11162_ACEOF
11163rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164if { (ac_try="$ac_compile"
11165case "(($ac_try" in
11166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11167 *) ac_try_echo=$ac_try;;
11168esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011172 grep -v '^ *+' conftest.er1 >conftest.err
11173 rm -f conftest.er1
11174 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011176 (exit $ac_status); } && {
11177 test -z "$ac_c_werror_flag" ||
11178 test ! -s conftest.err
11179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011180
11181
11182cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011183#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011184_ACEOF
11185
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011186 have_long_long=yes
11187
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011188else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011190sed 's/^/| /' conftest.$ac_ext >&5
11191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011192
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194
11195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011196{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11197echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011198if test "$have_long_long" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011199{ echo "$as_me:$LINENO: checking for long long" >&5
11200echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11201if test "${ac_cv_type_long_long+set}" = set; then
11202 echo $ECHO_N "(cached) $ECHO_C" >&6
11203else
11204 cat >conftest.$ac_ext <<_ACEOF
11205/* confdefs.h. */
11206_ACEOF
11207cat confdefs.h >>conftest.$ac_ext
11208cat >>conftest.$ac_ext <<_ACEOF
11209/* end confdefs.h. */
11210$ac_includes_default
11211typedef long long ac__type_new_;
11212int
11213main ()
11214{
11215if ((ac__type_new_ *) 0)
11216 return 0;
11217if (sizeof (ac__type_new_))
11218 return 0;
11219 ;
11220 return 0;
11221}
11222_ACEOF
11223rm -f conftest.$ac_objext
11224if { (ac_try="$ac_compile"
11225case "(($ac_try" in
11226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11227 *) ac_try_echo=$ac_try;;
11228esac
11229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11230 (eval "$ac_compile") 2>conftest.er1
11231 ac_status=$?
11232 grep -v '^ *+' conftest.er1 >conftest.err
11233 rm -f conftest.er1
11234 cat conftest.err >&5
11235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11236 (exit $ac_status); } && {
11237 test -z "$ac_c_werror_flag" ||
11238 test ! -s conftest.err
11239 } && test -s conftest.$ac_objext; then
11240 ac_cv_type_long_long=yes
11241else
11242 echo "$as_me: failed program was:" >&5
11243sed 's/^/| /' conftest.$ac_ext >&5
11244
11245 ac_cv_type_long_long=no
11246fi
11247
11248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11249fi
11250{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11251echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011253# The cast to long int works around a bug in the HP C Compiler
11254# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11255# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11256# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011257{ echo "$as_me:$LINENO: checking size of long long" >&5
11258echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011259if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011260 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011261else
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 if test "$cross_compiling" = yes; then
11263 # Depending upon the size, compute the lo and hi bounds.
11264cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011265/* confdefs.h. */
11266_ACEOF
11267cat confdefs.h >>conftest.$ac_ext
11268cat >>conftest.$ac_ext <<_ACEOF
11269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011270$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011271 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011272int
11273main ()
11274{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011275static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011276test_array [0] = 0
11277
11278 ;
11279 return 0;
11280}
11281_ACEOF
11282rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011283if { (ac_try="$ac_compile"
11284case "(($ac_try" in
11285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11286 *) ac_try_echo=$ac_try;;
11287esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011291 grep -v '^ *+' conftest.er1 >conftest.err
11292 rm -f conftest.er1
11293 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295 (exit $ac_status); } && {
11296 test -z "$ac_c_werror_flag" ||
11297 test ! -s conftest.err
11298 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 ac_lo=0 ac_mid=0
11300 while :; do
11301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* confdefs.h. */
11303_ACEOF
11304cat confdefs.h >>conftest.$ac_ext
11305cat >>conftest.$ac_ext <<_ACEOF
11306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011307$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011308 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011309int
11310main ()
11311{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011313test_array [0] = 0
11314
11315 ;
11316 return 0;
11317}
11318_ACEOF
11319rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320if { (ac_try="$ac_compile"
11321case "(($ac_try" in
11322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11323 *) ac_try_echo=$ac_try;;
11324esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011328 grep -v '^ *+' conftest.er1 >conftest.err
11329 rm -f conftest.er1
11330 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332 (exit $ac_status); } && {
11333 test -z "$ac_c_werror_flag" ||
11334 test ! -s conftest.err
11335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 ac_hi=$ac_mid; break
11337else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011339sed 's/^/| /' conftest.$ac_ext >&5
11340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011341 ac_lo=`expr $ac_mid + 1`
11342 if test $ac_lo -le $ac_mid; then
11343 ac_lo= ac_hi=
11344 break
11345 fi
11346 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011348
11349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 done
11351else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011353sed 's/^/| /' conftest.$ac_ext >&5
11354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011356/* confdefs.h. */
11357_ACEOF
11358cat confdefs.h >>conftest.$ac_ext
11359cat >>conftest.$ac_ext <<_ACEOF
11360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011361$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011362 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011363int
11364main ()
11365{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011366static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011367test_array [0] = 0
11368
11369 ;
11370 return 0;
11371}
11372_ACEOF
11373rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374if { (ac_try="$ac_compile"
11375case "(($ac_try" in
11376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11377 *) ac_try_echo=$ac_try;;
11378esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011382 grep -v '^ *+' conftest.er1 >conftest.err
11383 rm -f conftest.er1
11384 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386 (exit $ac_status); } && {
11387 test -z "$ac_c_werror_flag" ||
11388 test ! -s conftest.err
11389 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 ac_hi=-1 ac_mid=-1
11391 while :; do
11392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011393/* confdefs.h. */
11394_ACEOF
11395cat confdefs.h >>conftest.$ac_ext
11396cat >>conftest.$ac_ext <<_ACEOF
11397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011398$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011399 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011400int
11401main ()
11402{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011403static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011404test_array [0] = 0
11405
11406 ;
11407 return 0;
11408}
11409_ACEOF
11410rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411if { (ac_try="$ac_compile"
11412case "(($ac_try" in
11413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11414 *) ac_try_echo=$ac_try;;
11415esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011419 grep -v '^ *+' conftest.er1 >conftest.err
11420 rm -f conftest.er1
11421 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423 (exit $ac_status); } && {
11424 test -z "$ac_c_werror_flag" ||
11425 test ! -s conftest.err
11426 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 ac_lo=$ac_mid; break
11428else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011430sed 's/^/| /' conftest.$ac_ext >&5
11431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432 ac_hi=`expr '(' $ac_mid ')' - 1`
11433 if test $ac_mid -le $ac_hi; then
11434 ac_lo= ac_hi=
11435 break
11436 fi
11437 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439
11440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 done
11442else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011444sed 's/^/| /' conftest.$ac_ext >&5
11445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448
11449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451
11452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011453# Binary search between lo and hi bounds.
11454while test "x$ac_lo" != "x$ac_hi"; do
11455 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011457/* confdefs.h. */
11458_ACEOF
11459cat confdefs.h >>conftest.$ac_ext
11460cat >>conftest.$ac_ext <<_ACEOF
11461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011462$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011463 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011464int
11465main ()
11466{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011467static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011468test_array [0] = 0
11469
11470 ;
11471 return 0;
11472}
11473_ACEOF
11474rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011475if { (ac_try="$ac_compile"
11476case "(($ac_try" in
11477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11478 *) ac_try_echo=$ac_try;;
11479esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011483 grep -v '^ *+' conftest.er1 >conftest.err
11484 rm -f conftest.er1
11485 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487 (exit $ac_status); } && {
11488 test -z "$ac_c_werror_flag" ||
11489 test ! -s conftest.err
11490 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 ac_hi=$ac_mid
11492else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011494sed 's/^/| /' conftest.$ac_ext >&5
11495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498
11499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011500done
11501case $ac_lo in
11502?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011504 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011505See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011506echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011507See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011508 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509 else
11510 ac_cv_sizeof_long_long=0
11511 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011512esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011513else
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011515/* confdefs.h. */
11516_ACEOF
11517cat confdefs.h >>conftest.$ac_ext
11518cat >>conftest.$ac_ext <<_ACEOF
11519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011520$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011521 typedef long long ac__type_sizeof_;
11522static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11523static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011524#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011525#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011526int
11527main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011528{
Martin v. Löwis11437992002-04-12 09:54:03 +000011529
11530 FILE *f = fopen ("conftest.val", "w");
11531 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011533 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011536 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011537 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011538 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011539 }
11540 else
11541 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011543 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011545 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011547 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011548
11549 ;
11550 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011551}
Martin v. Löwis11437992002-04-12 09:54:03 +000011552_ACEOF
11553rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554if { (ac_try="$ac_link"
11555case "(($ac_try" in
11556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11557 *) ac_try_echo=$ac_try;;
11558esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011564 { (case "(($ac_try" in
11565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11566 *) ac_try_echo=$ac_try;;
11567esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 (exit $ac_status); }; }; then
11573 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011574else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011575 echo "$as_me: program exited with status $ac_status" >&5
11576echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011577sed 's/^/| /' conftest.$ac_ext >&5
11578
Martin v. Löwis11437992002-04-12 09:54:03 +000011579( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011580if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011581 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011582See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011583echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011584See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011585 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586 else
11587 ac_cv_sizeof_long_long=0
11588 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590rm -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 +000011591fi
11592rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011593fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011594{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11595echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596
11597
11598
Martin v. Löwis11437992002-04-12 09:54:03 +000011599cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011600#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011601_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011602
Michael W. Hudson54241132001-12-07 15:38:26 +000011603
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011604fi
11605
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011606{ echo "$as_me:$LINENO: checking for long double support" >&5
11607echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011608have_long_double=no
11609cat >conftest.$ac_ext <<_ACEOF
11610/* confdefs.h. */
11611_ACEOF
11612cat confdefs.h >>conftest.$ac_ext
11613cat >>conftest.$ac_ext <<_ACEOF
11614/* end confdefs.h. */
11615
11616int
11617main ()
11618{
11619long double x; x = (long double)0;
11620 ;
11621 return 0;
11622}
11623_ACEOF
11624rm -f conftest.$ac_objext
11625if { (ac_try="$ac_compile"
11626case "(($ac_try" in
11627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11628 *) ac_try_echo=$ac_try;;
11629esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011631 (eval "$ac_compile") 2>conftest.er1
11632 ac_status=$?
11633 grep -v '^ *+' conftest.er1 >conftest.err
11634 rm -f conftest.er1
11635 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011637 (exit $ac_status); } && {
11638 test -z "$ac_c_werror_flag" ||
11639 test ! -s conftest.err
11640 } && test -s conftest.$ac_objext; then
11641
11642
11643cat >>confdefs.h <<\_ACEOF
11644#define HAVE_LONG_DOUBLE 1
11645_ACEOF
11646
11647 have_long_double=yes
11648
11649else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011650 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011651sed 's/^/| /' conftest.$ac_ext >&5
11652
11653
11654fi
11655
11656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011657{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11658echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011659if test "$have_long_double" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011660{ echo "$as_me:$LINENO: checking for long double" >&5
11661echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11662if test "${ac_cv_type_long_double+set}" = set; then
11663 echo $ECHO_N "(cached) $ECHO_C" >&6
11664else
11665 cat >conftest.$ac_ext <<_ACEOF
11666/* confdefs.h. */
11667_ACEOF
11668cat confdefs.h >>conftest.$ac_ext
11669cat >>conftest.$ac_ext <<_ACEOF
11670/* end confdefs.h. */
11671$ac_includes_default
11672typedef long double ac__type_new_;
11673int
11674main ()
11675{
11676if ((ac__type_new_ *) 0)
11677 return 0;
11678if (sizeof (ac__type_new_))
11679 return 0;
11680 ;
11681 return 0;
11682}
11683_ACEOF
11684rm -f conftest.$ac_objext
11685if { (ac_try="$ac_compile"
11686case "(($ac_try" in
11687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11688 *) ac_try_echo=$ac_try;;
11689esac
11690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11691 (eval "$ac_compile") 2>conftest.er1
11692 ac_status=$?
11693 grep -v '^ *+' conftest.er1 >conftest.err
11694 rm -f conftest.er1
11695 cat conftest.err >&5
11696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11697 (exit $ac_status); } && {
11698 test -z "$ac_c_werror_flag" ||
11699 test ! -s conftest.err
11700 } && test -s conftest.$ac_objext; then
11701 ac_cv_type_long_double=yes
11702else
11703 echo "$as_me: failed program was:" >&5
11704sed 's/^/| /' conftest.$ac_ext >&5
11705
11706 ac_cv_type_long_double=no
11707fi
11708
11709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11710fi
11711{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11712echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11713
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011714# The cast to long int works around a bug in the HP C Compiler
11715# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11716# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11717# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011718{ echo "$as_me:$LINENO: checking size of long double" >&5
11719echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011720if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011721 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011722else
11723 if test "$cross_compiling" = yes; then
11724 # Depending upon the size, compute the lo and hi bounds.
11725cat >conftest.$ac_ext <<_ACEOF
11726/* confdefs.h. */
11727_ACEOF
11728cat confdefs.h >>conftest.$ac_ext
11729cat >>conftest.$ac_ext <<_ACEOF
11730/* end confdefs.h. */
11731$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011732 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011733int
11734main ()
11735{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011736static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011737test_array [0] = 0
11738
11739 ;
11740 return 0;
11741}
11742_ACEOF
11743rm -f conftest.$ac_objext
11744if { (ac_try="$ac_compile"
11745case "(($ac_try" in
11746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11747 *) ac_try_echo=$ac_try;;
11748esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011750 (eval "$ac_compile") 2>conftest.er1
11751 ac_status=$?
11752 grep -v '^ *+' conftest.er1 >conftest.err
11753 rm -f conftest.er1
11754 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011756 (exit $ac_status); } && {
11757 test -z "$ac_c_werror_flag" ||
11758 test ! -s conftest.err
11759 } && test -s conftest.$ac_objext; then
11760 ac_lo=0 ac_mid=0
11761 while :; do
11762 cat >conftest.$ac_ext <<_ACEOF
11763/* confdefs.h. */
11764_ACEOF
11765cat confdefs.h >>conftest.$ac_ext
11766cat >>conftest.$ac_ext <<_ACEOF
11767/* end confdefs.h. */
11768$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011769 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011770int
11771main ()
11772{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011773static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011774test_array [0] = 0
11775
11776 ;
11777 return 0;
11778}
11779_ACEOF
11780rm -f conftest.$ac_objext
11781if { (ac_try="$ac_compile"
11782case "(($ac_try" in
11783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11784 *) ac_try_echo=$ac_try;;
11785esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011787 (eval "$ac_compile") 2>conftest.er1
11788 ac_status=$?
11789 grep -v '^ *+' conftest.er1 >conftest.err
11790 rm -f conftest.er1
11791 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793 (exit $ac_status); } && {
11794 test -z "$ac_c_werror_flag" ||
11795 test ! -s conftest.err
11796 } && test -s conftest.$ac_objext; then
11797 ac_hi=$ac_mid; break
11798else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011799 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011800sed 's/^/| /' conftest.$ac_ext >&5
11801
11802 ac_lo=`expr $ac_mid + 1`
11803 if test $ac_lo -le $ac_mid; then
11804 ac_lo= ac_hi=
11805 break
11806 fi
11807 ac_mid=`expr 2 '*' $ac_mid + 1`
11808fi
11809
11810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11811 done
11812else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011813 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011814sed 's/^/| /' conftest.$ac_ext >&5
11815
11816 cat >conftest.$ac_ext <<_ACEOF
11817/* confdefs.h. */
11818_ACEOF
11819cat confdefs.h >>conftest.$ac_ext
11820cat >>conftest.$ac_ext <<_ACEOF
11821/* end confdefs.h. */
11822$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011823 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011824int
11825main ()
11826{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011827static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011828test_array [0] = 0
11829
11830 ;
11831 return 0;
11832}
11833_ACEOF
11834rm -f conftest.$ac_objext
11835if { (ac_try="$ac_compile"
11836case "(($ac_try" in
11837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11838 *) ac_try_echo=$ac_try;;
11839esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011841 (eval "$ac_compile") 2>conftest.er1
11842 ac_status=$?
11843 grep -v '^ *+' conftest.er1 >conftest.err
11844 rm -f conftest.er1
11845 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011847 (exit $ac_status); } && {
11848 test -z "$ac_c_werror_flag" ||
11849 test ! -s conftest.err
11850 } && test -s conftest.$ac_objext; then
11851 ac_hi=-1 ac_mid=-1
11852 while :; do
11853 cat >conftest.$ac_ext <<_ACEOF
11854/* confdefs.h. */
11855_ACEOF
11856cat confdefs.h >>conftest.$ac_ext
11857cat >>conftest.$ac_ext <<_ACEOF
11858/* end confdefs.h. */
11859$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011860 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011861int
11862main ()
11863{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011864static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011865test_array [0] = 0
11866
11867 ;
11868 return 0;
11869}
11870_ACEOF
11871rm -f conftest.$ac_objext
11872if { (ac_try="$ac_compile"
11873case "(($ac_try" in
11874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11875 *) ac_try_echo=$ac_try;;
11876esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011878 (eval "$ac_compile") 2>conftest.er1
11879 ac_status=$?
11880 grep -v '^ *+' conftest.er1 >conftest.err
11881 rm -f conftest.er1
11882 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011884 (exit $ac_status); } && {
11885 test -z "$ac_c_werror_flag" ||
11886 test ! -s conftest.err
11887 } && test -s conftest.$ac_objext; then
11888 ac_lo=$ac_mid; break
11889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011890 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011891sed 's/^/| /' conftest.$ac_ext >&5
11892
11893 ac_hi=`expr '(' $ac_mid ')' - 1`
11894 if test $ac_mid -le $ac_hi; then
11895 ac_lo= ac_hi=
11896 break
11897 fi
11898 ac_mid=`expr 2 '*' $ac_mid`
11899fi
11900
11901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11902 done
11903else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011904 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011905sed 's/^/| /' conftest.$ac_ext >&5
11906
11907 ac_lo= ac_hi=
11908fi
11909
11910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11911fi
11912
11913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11914# Binary search between lo and hi bounds.
11915while test "x$ac_lo" != "x$ac_hi"; do
11916 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11917 cat >conftest.$ac_ext <<_ACEOF
11918/* confdefs.h. */
11919_ACEOF
11920cat confdefs.h >>conftest.$ac_ext
11921cat >>conftest.$ac_ext <<_ACEOF
11922/* end confdefs.h. */
11923$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011924 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011925int
11926main ()
11927{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011928static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011929test_array [0] = 0
11930
11931 ;
11932 return 0;
11933}
11934_ACEOF
11935rm -f conftest.$ac_objext
11936if { (ac_try="$ac_compile"
11937case "(($ac_try" in
11938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11939 *) ac_try_echo=$ac_try;;
11940esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011942 (eval "$ac_compile") 2>conftest.er1
11943 ac_status=$?
11944 grep -v '^ *+' conftest.er1 >conftest.err
11945 rm -f conftest.er1
11946 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948 (exit $ac_status); } && {
11949 test -z "$ac_c_werror_flag" ||
11950 test ! -s conftest.err
11951 } && test -s conftest.$ac_objext; then
11952 ac_hi=$ac_mid
11953else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011954 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011955sed 's/^/| /' conftest.$ac_ext >&5
11956
11957 ac_lo=`expr '(' $ac_mid ')' + 1`
11958fi
11959
11960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11961done
11962case $ac_lo in
11963?*) ac_cv_sizeof_long_double=$ac_lo;;
11964'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011965 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011966See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011967echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011968See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011969 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011970 else
11971 ac_cv_sizeof_long_double=0
11972 fi ;;
11973esac
11974else
11975 cat >conftest.$ac_ext <<_ACEOF
11976/* confdefs.h. */
11977_ACEOF
11978cat confdefs.h >>conftest.$ac_ext
11979cat >>conftest.$ac_ext <<_ACEOF
11980/* end confdefs.h. */
11981$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011982 typedef long double ac__type_sizeof_;
11983static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11984static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011985#include <stdio.h>
11986#include <stdlib.h>
11987int
11988main ()
11989{
11990
11991 FILE *f = fopen ("conftest.val", "w");
11992 if (! f)
11993 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011994 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995 {
11996 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011997 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011998 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011999 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012000 }
12001 else
12002 {
12003 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012004 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012005 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012006 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012007 }
12008 return ferror (f) || fclose (f) != 0;
12009
12010 ;
12011 return 0;
12012}
12013_ACEOF
12014rm -f conftest$ac_exeext
12015if { (ac_try="$ac_link"
12016case "(($ac_try" in
12017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12018 *) ac_try_echo=$ac_try;;
12019esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012021 (eval "$ac_link") 2>&5
12022 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12025 { (case "(($ac_try" in
12026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12027 *) ac_try_echo=$ac_try;;
12028esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012030 (eval "$ac_try") 2>&5
12031 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012033 (exit $ac_status); }; }; then
12034 ac_cv_sizeof_long_double=`cat conftest.val`
12035else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012036 echo "$as_me: program exited with status $ac_status" >&5
12037echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012038sed 's/^/| /' conftest.$ac_ext >&5
12039
12040( exit $ac_status )
12041if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012042 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012043See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012044echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012045See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012046 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012047 else
12048 ac_cv_sizeof_long_double=0
12049 fi
12050fi
12051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12052fi
12053rm -f conftest.val
12054fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012055{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12056echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012057
12058
12059
12060cat >>confdefs.h <<_ACEOF
12061#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12062_ACEOF
12063
12064
12065fi
12066
12067
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012068{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12069echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012070have_c99_bool=no
12071cat >conftest.$ac_ext <<_ACEOF
12072/* confdefs.h. */
12073_ACEOF
12074cat confdefs.h >>conftest.$ac_ext
12075cat >>conftest.$ac_ext <<_ACEOF
12076/* end confdefs.h. */
12077
12078int
12079main ()
12080{
12081_Bool x; x = (_Bool)0;
12082 ;
12083 return 0;
12084}
12085_ACEOF
12086rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087if { (ac_try="$ac_compile"
12088case "(($ac_try" in
12089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12090 *) ac_try_echo=$ac_try;;
12091esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012094 ac_status=$?
12095 grep -v '^ *+' conftest.er1 >conftest.err
12096 rm -f conftest.er1
12097 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012099 (exit $ac_status); } && {
12100 test -z "$ac_c_werror_flag" ||
12101 test ! -s conftest.err
12102 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012103
12104
12105cat >>confdefs.h <<\_ACEOF
12106#define HAVE_C99_BOOL 1
12107_ACEOF
12108
12109 have_c99_bool=yes
12110
12111else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012112 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012113sed 's/^/| /' conftest.$ac_ext >&5
12114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012115
Thomas Woutersb2137042007-02-01 18:02:27 +000012116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117
12118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012119{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12120echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012121if test "$have_c99_bool" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012122{ echo "$as_me:$LINENO: checking for _Bool" >&5
12123echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12124if test "${ac_cv_type__Bool+set}" = set; then
12125 echo $ECHO_N "(cached) $ECHO_C" >&6
12126else
12127 cat >conftest.$ac_ext <<_ACEOF
12128/* confdefs.h. */
12129_ACEOF
12130cat confdefs.h >>conftest.$ac_ext
12131cat >>conftest.$ac_ext <<_ACEOF
12132/* end confdefs.h. */
12133$ac_includes_default
12134typedef _Bool ac__type_new_;
12135int
12136main ()
12137{
12138if ((ac__type_new_ *) 0)
12139 return 0;
12140if (sizeof (ac__type_new_))
12141 return 0;
12142 ;
12143 return 0;
12144}
12145_ACEOF
12146rm -f conftest.$ac_objext
12147if { (ac_try="$ac_compile"
12148case "(($ac_try" in
12149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12150 *) ac_try_echo=$ac_try;;
12151esac
12152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12153 (eval "$ac_compile") 2>conftest.er1
12154 ac_status=$?
12155 grep -v '^ *+' conftest.er1 >conftest.err
12156 rm -f conftest.er1
12157 cat conftest.err >&5
12158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12159 (exit $ac_status); } && {
12160 test -z "$ac_c_werror_flag" ||
12161 test ! -s conftest.err
12162 } && test -s conftest.$ac_objext; then
12163 ac_cv_type__Bool=yes
12164else
12165 echo "$as_me: failed program was:" >&5
12166sed 's/^/| /' conftest.$ac_ext >&5
12167
12168 ac_cv_type__Bool=no
12169fi
12170
12171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12172fi
12173{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12174echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176# The cast to long int works around a bug in the HP C Compiler
12177# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12178# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12179# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012180{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12181echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012182if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012183 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012184else
12185 if test "$cross_compiling" = yes; then
12186 # Depending upon the size, compute the lo and hi bounds.
12187cat >conftest.$ac_ext <<_ACEOF
12188/* confdefs.h. */
12189_ACEOF
12190cat confdefs.h >>conftest.$ac_ext
12191cat >>conftest.$ac_ext <<_ACEOF
12192/* end confdefs.h. */
12193$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012194 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012195int
12196main ()
12197{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012198static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012199test_array [0] = 0
12200
12201 ;
12202 return 0;
12203}
12204_ACEOF
12205rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206if { (ac_try="$ac_compile"
12207case "(($ac_try" in
12208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12209 *) ac_try_echo=$ac_try;;
12210esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012213 ac_status=$?
12214 grep -v '^ *+' conftest.er1 >conftest.err
12215 rm -f conftest.er1
12216 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218 (exit $ac_status); } && {
12219 test -z "$ac_c_werror_flag" ||
12220 test ! -s conftest.err
12221 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012222 ac_lo=0 ac_mid=0
12223 while :; do
12224 cat >conftest.$ac_ext <<_ACEOF
12225/* confdefs.h. */
12226_ACEOF
12227cat confdefs.h >>conftest.$ac_ext
12228cat >>conftest.$ac_ext <<_ACEOF
12229/* end confdefs.h. */
12230$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012231 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012232int
12233main ()
12234{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012235static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012236test_array [0] = 0
12237
12238 ;
12239 return 0;
12240}
12241_ACEOF
12242rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243if { (ac_try="$ac_compile"
12244case "(($ac_try" in
12245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12246 *) ac_try_echo=$ac_try;;
12247esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012250 ac_status=$?
12251 grep -v '^ *+' conftest.er1 >conftest.err
12252 rm -f conftest.er1
12253 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012255 (exit $ac_status); } && {
12256 test -z "$ac_c_werror_flag" ||
12257 test ! -s conftest.err
12258 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012259 ac_hi=$ac_mid; break
12260else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012261 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012262sed 's/^/| /' conftest.$ac_ext >&5
12263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012264 ac_lo=`expr $ac_mid + 1`
12265 if test $ac_lo -le $ac_mid; then
12266 ac_lo= ac_hi=
12267 break
12268 fi
12269 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012271
12272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012273 done
12274else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012275 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012276sed 's/^/| /' conftest.$ac_ext >&5
12277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012279/* confdefs.h. */
12280_ACEOF
12281cat confdefs.h >>conftest.$ac_ext
12282cat >>conftest.$ac_ext <<_ACEOF
12283/* end confdefs.h. */
12284$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012285 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012286int
12287main ()
12288{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012289static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012290test_array [0] = 0
12291
12292 ;
12293 return 0;
12294}
12295_ACEOF
12296rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012297if { (ac_try="$ac_compile"
12298case "(($ac_try" in
12299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12300 *) ac_try_echo=$ac_try;;
12301esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012304 ac_status=$?
12305 grep -v '^ *+' conftest.er1 >conftest.err
12306 rm -f conftest.er1
12307 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309 (exit $ac_status); } && {
12310 test -z "$ac_c_werror_flag" ||
12311 test ! -s conftest.err
12312 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012313 ac_hi=-1 ac_mid=-1
12314 while :; do
12315 cat >conftest.$ac_ext <<_ACEOF
12316/* confdefs.h. */
12317_ACEOF
12318cat confdefs.h >>conftest.$ac_ext
12319cat >>conftest.$ac_ext <<_ACEOF
12320/* end confdefs.h. */
12321$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012322 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012323int
12324main ()
12325{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012326static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012327test_array [0] = 0
12328
12329 ;
12330 return 0;
12331}
12332_ACEOF
12333rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334if { (ac_try="$ac_compile"
12335case "(($ac_try" in
12336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12337 *) ac_try_echo=$ac_try;;
12338esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012341 ac_status=$?
12342 grep -v '^ *+' conftest.er1 >conftest.err
12343 rm -f conftest.er1
12344 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346 (exit $ac_status); } && {
12347 test -z "$ac_c_werror_flag" ||
12348 test ! -s conftest.err
12349 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012350 ac_lo=$ac_mid; break
12351else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012352 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012353sed 's/^/| /' conftest.$ac_ext >&5
12354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355 ac_hi=`expr '(' $ac_mid ')' - 1`
12356 if test $ac_mid -le $ac_hi; then
12357 ac_lo= ac_hi=
12358 break
12359 fi
12360 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012362
12363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012364 done
12365else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012366 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012367sed 's/^/| /' conftest.$ac_ext >&5
12368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371
12372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374
12375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012376# Binary search between lo and hi bounds.
12377while test "x$ac_lo" != "x$ac_hi"; do
12378 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12379 cat >conftest.$ac_ext <<_ACEOF
12380/* confdefs.h. */
12381_ACEOF
12382cat confdefs.h >>conftest.$ac_ext
12383cat >>conftest.$ac_ext <<_ACEOF
12384/* end confdefs.h. */
12385$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012386 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012387int
12388main ()
12389{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012390static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012391test_array [0] = 0
12392
12393 ;
12394 return 0;
12395}
12396_ACEOF
12397rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012398if { (ac_try="$ac_compile"
12399case "(($ac_try" in
12400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12401 *) ac_try_echo=$ac_try;;
12402esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012404 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012405 ac_status=$?
12406 grep -v '^ *+' conftest.er1 >conftest.err
12407 rm -f conftest.er1
12408 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410 (exit $ac_status); } && {
12411 test -z "$ac_c_werror_flag" ||
12412 test ! -s conftest.err
12413 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012414 ac_hi=$ac_mid
12415else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012416 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012417sed 's/^/| /' conftest.$ac_ext >&5
12418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421
12422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012423done
12424case $ac_lo in
12425?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012427 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012428See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012429echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012430See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012431 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432 else
12433 ac_cv_sizeof__Bool=0
12434 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012435esac
12436else
12437 cat >conftest.$ac_ext <<_ACEOF
12438/* confdefs.h. */
12439_ACEOF
12440cat confdefs.h >>conftest.$ac_ext
12441cat >>conftest.$ac_ext <<_ACEOF
12442/* end confdefs.h. */
12443$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012444 typedef _Bool ac__type_sizeof_;
12445static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12446static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012447#include <stdio.h>
12448#include <stdlib.h>
12449int
12450main ()
12451{
12452
12453 FILE *f = fopen ("conftest.val", "w");
12454 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012456 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012457 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012459 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012460 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012461 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012462 }
12463 else
12464 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012466 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012468 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012469 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012471
12472 ;
12473 return 0;
12474}
12475_ACEOF
12476rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477if { (ac_try="$ac_link"
12478case "(($ac_try" in
12479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12480 *) ac_try_echo=$ac_try;;
12481esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012484 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012486 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012487 { (case "(($ac_try" in
12488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12489 *) ac_try_echo=$ac_try;;
12490esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012493 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012495 (exit $ac_status); }; }; then
12496 ac_cv_sizeof__Bool=`cat conftest.val`
12497else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012498 echo "$as_me: program exited with status $ac_status" >&5
12499echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012500sed 's/^/| /' conftest.$ac_ext >&5
12501
12502( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012503if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012504 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012505See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012506echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012507See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012508 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509 else
12510 ac_cv_sizeof__Bool=0
12511 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012513rm -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 +000012514fi
12515rm -f conftest.val
12516fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012517{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12518echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012519
12520
12521
Thomas Woutersb2137042007-02-01 18:02:27 +000012522cat >>confdefs.h <<_ACEOF
12523#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12524_ACEOF
12525
12526
12527fi
12528
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012529{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12530echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012531if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012532 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012533else
12534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012535/* confdefs.h. */
12536_ACEOF
12537cat confdefs.h >>conftest.$ac_ext
12538cat >>conftest.$ac_ext <<_ACEOF
12539/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012540#ifdef HAVE_STDINT_H
12541 #include <stdint.h>
12542 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012543
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012544typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012545int
12546main ()
12547{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012548if ((ac__type_new_ *) 0)
12549 return 0;
12550if (sizeof (ac__type_new_))
12551 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 ;
12553 return 0;
12554}
12555_ACEOF
12556rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012557if { (ac_try="$ac_compile"
12558case "(($ac_try" in
12559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12560 *) ac_try_echo=$ac_try;;
12561esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012565 grep -v '^ *+' conftest.er1 >conftest.err
12566 rm -f conftest.er1
12567 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569 (exit $ac_status); } && {
12570 test -z "$ac_c_werror_flag" ||
12571 test ! -s conftest.err
12572 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012573 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012574else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012576sed 's/^/| /' conftest.$ac_ext >&5
12577
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012578 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580
12581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012582fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012583{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12584echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12585if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012586
12587cat >>confdefs.h <<_ACEOF
12588#define HAVE_UINTPTR_T 1
12589_ACEOF
12590
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012591{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12592echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12593if test "${ac_cv_type_uintptr_t+set}" = set; then
12594 echo $ECHO_N "(cached) $ECHO_C" >&6
12595else
12596 cat >conftest.$ac_ext <<_ACEOF
12597/* confdefs.h. */
12598_ACEOF
12599cat confdefs.h >>conftest.$ac_ext
12600cat >>conftest.$ac_ext <<_ACEOF
12601/* end confdefs.h. */
12602$ac_includes_default
12603typedef uintptr_t ac__type_new_;
12604int
12605main ()
12606{
12607if ((ac__type_new_ *) 0)
12608 return 0;
12609if (sizeof (ac__type_new_))
12610 return 0;
12611 ;
12612 return 0;
12613}
12614_ACEOF
12615rm -f conftest.$ac_objext
12616if { (ac_try="$ac_compile"
12617case "(($ac_try" in
12618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12619 *) ac_try_echo=$ac_try;;
12620esac
12621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12622 (eval "$ac_compile") 2>conftest.er1
12623 ac_status=$?
12624 grep -v '^ *+' conftest.er1 >conftest.err
12625 rm -f conftest.er1
12626 cat conftest.err >&5
12627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12628 (exit $ac_status); } && {
12629 test -z "$ac_c_werror_flag" ||
12630 test ! -s conftest.err
12631 } && test -s conftest.$ac_objext; then
12632 ac_cv_type_uintptr_t=yes
12633else
12634 echo "$as_me: failed program was:" >&5
12635sed 's/^/| /' conftest.$ac_ext >&5
12636
12637 ac_cv_type_uintptr_t=no
12638fi
12639
12640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12641fi
12642{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12643echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645# The cast to long int works around a bug in the HP C Compiler
12646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12648# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012649{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12650echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012651if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012652 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012653else
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 if test "$cross_compiling" = yes; then
12655 # Depending upon the size, compute the lo and hi bounds.
12656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012657/* confdefs.h. */
12658_ACEOF
12659cat confdefs.h >>conftest.$ac_ext
12660cat >>conftest.$ac_ext <<_ACEOF
12661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012662$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012663 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012664int
12665main ()
12666{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012667static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012668test_array [0] = 0
12669
12670 ;
12671 return 0;
12672}
12673_ACEOF
12674rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675if { (ac_try="$ac_compile"
12676case "(($ac_try" in
12677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12678 *) ac_try_echo=$ac_try;;
12679esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012683 grep -v '^ *+' conftest.er1 >conftest.err
12684 rm -f conftest.er1
12685 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687 (exit $ac_status); } && {
12688 test -z "$ac_c_werror_flag" ||
12689 test ! -s conftest.err
12690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 ac_lo=0 ac_mid=0
12692 while :; do
12693 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012694/* confdefs.h. */
12695_ACEOF
12696cat confdefs.h >>conftest.$ac_ext
12697cat >>conftest.$ac_ext <<_ACEOF
12698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012699$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012700 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012701int
12702main ()
12703{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012704static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012705test_array [0] = 0
12706
12707 ;
12708 return 0;
12709}
12710_ACEOF
12711rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712if { (ac_try="$ac_compile"
12713case "(($ac_try" in
12714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12715 *) ac_try_echo=$ac_try;;
12716esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012720 grep -v '^ *+' conftest.er1 >conftest.err
12721 rm -f conftest.er1
12722 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724 (exit $ac_status); } && {
12725 test -z "$ac_c_werror_flag" ||
12726 test ! -s conftest.err
12727 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ac_hi=$ac_mid; break
12729else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012731sed 's/^/| /' conftest.$ac_ext >&5
12732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733 ac_lo=`expr $ac_mid + 1`
12734 if test $ac_lo -le $ac_mid; then
12735 ac_lo= ac_hi=
12736 break
12737 fi
12738 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012740
12741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 done
12743else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012745sed 's/^/| /' conftest.$ac_ext >&5
12746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012748/* confdefs.h. */
12749_ACEOF
12750cat confdefs.h >>conftest.$ac_ext
12751cat >>conftest.$ac_ext <<_ACEOF
12752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012753$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012754 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012755int
12756main ()
12757{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012758static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012759test_array [0] = 0
12760
12761 ;
12762 return 0;
12763}
12764_ACEOF
12765rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766if { (ac_try="$ac_compile"
12767case "(($ac_try" in
12768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12769 *) ac_try_echo=$ac_try;;
12770esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012774 grep -v '^ *+' conftest.er1 >conftest.err
12775 rm -f conftest.er1
12776 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778 (exit $ac_status); } && {
12779 test -z "$ac_c_werror_flag" ||
12780 test ! -s conftest.err
12781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012782 ac_hi=-1 ac_mid=-1
12783 while :; do
12784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012785/* confdefs.h. */
12786_ACEOF
12787cat confdefs.h >>conftest.$ac_ext
12788cat >>conftest.$ac_ext <<_ACEOF
12789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012790$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012791 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012792int
12793main ()
12794{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012796test_array [0] = 0
12797
12798 ;
12799 return 0;
12800}
12801_ACEOF
12802rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803if { (ac_try="$ac_compile"
12804case "(($ac_try" in
12805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12806 *) ac_try_echo=$ac_try;;
12807esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012811 grep -v '^ *+' conftest.er1 >conftest.err
12812 rm -f conftest.er1
12813 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815 (exit $ac_status); } && {
12816 test -z "$ac_c_werror_flag" ||
12817 test ! -s conftest.err
12818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 ac_lo=$ac_mid; break
12820else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012822sed 's/^/| /' conftest.$ac_ext >&5
12823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012824 ac_hi=`expr '(' $ac_mid ')' - 1`
12825 if test $ac_mid -le $ac_hi; then
12826 ac_lo= ac_hi=
12827 break
12828 fi
12829 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831
12832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 done
12834else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012836sed 's/^/| /' conftest.$ac_ext >&5
12837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840
12841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843
12844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012845# Binary search between lo and hi bounds.
12846while test "x$ac_lo" != "x$ac_hi"; do
12847 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012849/* confdefs.h. */
12850_ACEOF
12851cat confdefs.h >>conftest.$ac_ext
12852cat >>conftest.$ac_ext <<_ACEOF
12853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012854$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012855 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012856int
12857main ()
12858{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012859static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012860test_array [0] = 0
12861
12862 ;
12863 return 0;
12864}
12865_ACEOF
12866rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867if { (ac_try="$ac_compile"
12868case "(($ac_try" in
12869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12870 *) ac_try_echo=$ac_try;;
12871esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012875 grep -v '^ *+' conftest.er1 >conftest.err
12876 rm -f conftest.er1
12877 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879 (exit $ac_status); } && {
12880 test -z "$ac_c_werror_flag" ||
12881 test ! -s conftest.err
12882 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 ac_hi=$ac_mid
12884else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012886sed 's/^/| /' conftest.$ac_ext >&5
12887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890
12891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012892done
12893case $ac_lo in
12894?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012896 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012897See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012898echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012899See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012900 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901 else
12902 ac_cv_sizeof_uintptr_t=0
12903 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012904esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012905else
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012907/* confdefs.h. */
12908_ACEOF
12909cat confdefs.h >>conftest.$ac_ext
12910cat >>conftest.$ac_ext <<_ACEOF
12911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012912$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012913 typedef uintptr_t ac__type_sizeof_;
12914static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12915static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012916#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012917#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012918int
12919main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012920{
Martin v. Löwis11437992002-04-12 09:54:03 +000012921
12922 FILE *f = fopen ("conftest.val", "w");
12923 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012925 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012928 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012930 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 }
12932 else
12933 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012935 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012937 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012938 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012940
12941 ;
12942 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012943}
Martin v. Löwis11437992002-04-12 09:54:03 +000012944_ACEOF
12945rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946if { (ac_try="$ac_link"
12947case "(($ac_try" in
12948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12949 *) ac_try_echo=$ac_try;;
12950esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012956 { (case "(($ac_try" in
12957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12958 *) ac_try_echo=$ac_try;;
12959esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 (exit $ac_status); }; }; then
12965 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012966else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012967 echo "$as_me: program exited with status $ac_status" >&5
12968echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012969sed 's/^/| /' conftest.$ac_ext >&5
12970
Martin v. Löwis11437992002-04-12 09:54:03 +000012971( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012972if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012973 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012974See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012975echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012976See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012977 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978 else
12979 ac_cv_sizeof_uintptr_t=0
12980 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982rm -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 +000012983fi
12984rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012985fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012986{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12987echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012988
12989
12990
Martin v. Löwis11437992002-04-12 09:54:03 +000012991cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012992#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012993_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012994
Michael W. Hudson54241132001-12-07 15:38:26 +000012995
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012996fi
12997
Thomas Wouters89f507f2006-12-13 04:49:30 +000012998
12999
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013000# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013001{ echo "$as_me:$LINENO: checking size of off_t" >&5
13002echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013003if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013005else
13006 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013007 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013008else
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013010/* confdefs.h. */
13011_ACEOF
13012cat confdefs.h >>conftest.$ac_ext
13013cat >>conftest.$ac_ext <<_ACEOF
13014/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013015#include <stdio.h>
13016#include <sys/types.h>
13017main()
13018{
13019 FILE *f=fopen("conftestval", "w");
13020 if (!f) exit(1);
13021 fprintf(f, "%d\n", sizeof(off_t));
13022 exit(0);
13023}
Martin v. Löwis11437992002-04-12 09:54:03 +000013024_ACEOF
13025rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026if { (ac_try="$ac_link"
13027case "(($ac_try" in
13028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13029 *) ac_try_echo=$ac_try;;
13030esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013032 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013035 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013036 { (case "(($ac_try" in
13037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13038 *) ac_try_echo=$ac_try;;
13039esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013045 ac_cv_sizeof_off_t=`cat conftestval`
13046else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013047 echo "$as_me: program exited with status $ac_status" >&5
13048echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013049sed 's/^/| /' conftest.$ac_ext >&5
13050
Martin v. Löwis11437992002-04-12 09:54:03 +000013051( exit $ac_status )
13052ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054rm -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 +000013055fi
13056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013057
13058
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013059fi
13060
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013061{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13062echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013063
13064cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013065#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013066_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013067
Michael W. Hudson54241132001-12-07 15:38:26 +000013068
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013069{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13070echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013071if test "$have_long_long" = yes
13072then
13073if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013074 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013075
Martin v. Löwis11437992002-04-12 09:54:03 +000013076cat >>confdefs.h <<\_ACEOF
13077#define HAVE_LARGEFILE_SUPPORT 1
13078_ACEOF
13079
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013080 { echo "$as_me:$LINENO: result: yes" >&5
13081echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013082else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013083 { echo "$as_me:$LINENO: result: no" >&5
13084echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013085fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013086else
13087 { echo "$as_me:$LINENO: result: no" >&5
13088echo "${ECHO_T}no" >&6; }
13089fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013090
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013091# AC_CHECK_SIZEOF() doesn't include <time.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013092{ echo "$as_me:$LINENO: checking size of time_t" >&5
13093echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013094if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013095 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013096else
13097 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013098 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013099else
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013101/* confdefs.h. */
13102_ACEOF
13103cat confdefs.h >>conftest.$ac_ext
13104cat >>conftest.$ac_ext <<_ACEOF
13105/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013106#include <stdio.h>
13107#include <time.h>
13108main()
13109{
13110 FILE *f=fopen("conftestval", "w");
13111 if (!f) exit(1);
13112 fprintf(f, "%d\n", sizeof(time_t));
13113 exit(0);
13114}
Martin v. Löwis11437992002-04-12 09:54:03 +000013115_ACEOF
13116rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117if { (ac_try="$ac_link"
13118case "(($ac_try" in
13119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13120 *) ac_try_echo=$ac_try;;
13121esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013123 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013127 { (case "(($ac_try" in
13128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13129 *) ac_try_echo=$ac_try;;
13130esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013132 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013133 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013136 ac_cv_sizeof_time_t=`cat conftestval`
13137else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013138 echo "$as_me: program exited with status $ac_status" >&5
13139echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013140sed 's/^/| /' conftest.$ac_ext >&5
13141
Martin v. Löwis11437992002-04-12 09:54:03 +000013142( exit $ac_status )
13143ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145rm -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 +000013146fi
13147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013148
13149
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013150fi
13151
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013152{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13153echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
13155cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013156#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013157_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013158
Michael W. Hudson54241132001-12-07 15:38:26 +000013159
13160
Trent Mick635f6fb2000-08-23 21:33:05 +000013161# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013162ac_save_cc="$CC"
13163if test "$ac_cv_kpthread" = "yes"
13164then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013165elif test "$ac_cv_kthread" = "yes"
13166then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013167elif test "$ac_cv_pthread" = "yes"
13168then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013169fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013170{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13171echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013172have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013174/* confdefs.h. */
13175_ACEOF
13176cat confdefs.h >>conftest.$ac_ext
13177cat >>conftest.$ac_ext <<_ACEOF
13178/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013179#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013180int
13181main ()
13182{
Guido van Rossum12580492000-09-24 16:47:19 +000013183pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013184 ;
13185 return 0;
13186}
13187_ACEOF
13188rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013189if { (ac_try="$ac_compile"
13190case "(($ac_try" in
13191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13192 *) ac_try_echo=$ac_try;;
13193esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013197 grep -v '^ *+' conftest.er1 >conftest.err
13198 rm -f conftest.er1
13199 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013201 (exit $ac_status); } && {
13202 test -z "$ac_c_werror_flag" ||
13203 test ! -s conftest.err
13204 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013205 have_pthread_t=yes
13206else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013208sed 's/^/| /' conftest.$ac_ext >&5
13209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013210
Trent Mick635f6fb2000-08-23 21:33:05 +000013211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013212
13213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013214{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13215echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013216if test "$have_pthread_t" = yes ; then
13217 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013218 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13219echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013221 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013222else
13223 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013224 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013225else
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013227/* confdefs.h. */
13228_ACEOF
13229cat confdefs.h >>conftest.$ac_ext
13230cat >>conftest.$ac_ext <<_ACEOF
13231/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013232#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013233#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013234 main()
13235 {
13236 FILE *f=fopen("conftestval", "w");
13237 if (!f) exit(1);
13238 fprintf(f, "%d\n", sizeof(pthread_t));
13239 exit(0);
13240 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013241_ACEOF
13242rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013243if { (ac_try="$ac_link"
13244case "(($ac_try" in
13245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13246 *) ac_try_echo=$ac_try;;
13247esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013250 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013253 { (case "(($ac_try" in
13254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13255 *) ac_try_echo=$ac_try;;
13256esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013258 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013262 ac_cv_sizeof_pthread_t=`cat conftestval`
13263else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013264 echo "$as_me: program exited with status $ac_status" >&5
13265echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013266sed 's/^/| /' conftest.$ac_ext >&5
13267
Martin v. Löwis11437992002-04-12 09:54:03 +000013268( exit $ac_status )
13269ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013271rm -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 +000013272fi
13273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013274
13275
Trent Mick635f6fb2000-08-23 21:33:05 +000013276fi
13277
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013278 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13279echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013280
13281cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013282#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013283_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013284
13285fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013286CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013287
Michael W. Hudson54241132001-12-07 15:38:26 +000013288
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013289
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013290
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013291case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013292 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013293 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13294 ;;
13295 Darwin/*)
13296 OTHER_LIBTOOL_OPT=""
13297 ;;
13298esac
13299
13300
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013301ARCH_RUN_32BIT=""
13302
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013303case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013304 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013305 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13306 if test "${enable_universalsdk}"; then
13307 :
13308 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013309 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013310 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013311 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013312 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013313 Darwin/*)
Ronald Oussoren652f4de2010-02-07 11:54:03 +000013314 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013315 if test ${gcc_version} '<' 4.0
13316 then
13317 LIBTOOL_CRUFT="-lcc_dynamic"
13318 else
13319 LIBTOOL_CRUFT=""
13320 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013321 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013322 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013323else
13324 cat >conftest.$ac_ext <<_ACEOF
13325/* confdefs.h. */
13326_ACEOF
13327cat confdefs.h >>conftest.$ac_ext
13328cat >>conftest.$ac_ext <<_ACEOF
13329/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013330
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013331 #include <unistd.h>
13332 int main(int argc, char*argv[])
13333 {
13334 if (sizeof(long) == 4) {
13335 return 0;
13336 } else {
13337 return 1;
13338 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013339 }
13340
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013341_ACEOF
13342rm -f conftest$ac_exeext
13343if { (ac_try="$ac_link"
13344case "(($ac_try" in
13345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13346 *) ac_try_echo=$ac_try;;
13347esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013349 (eval "$ac_link") 2>&5
13350 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13353 { (case "(($ac_try" in
13354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13355 *) ac_try_echo=$ac_try;;
13356esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013358 (eval "$ac_try") 2>&5
13359 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013361 (exit $ac_status); }; }; then
13362 ac_osx_32bit=yes
13363else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013364 echo "$as_me: program exited with status $ac_status" >&5
13365echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013366sed 's/^/| /' conftest.$ac_ext >&5
13367
13368( exit $ac_status )
13369ac_osx_32bit=no
13370fi
13371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13372fi
13373
13374
13375
13376 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussoren175a8842010-02-11 13:40:06 +000013377 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013378 i386)
13379 MACOSX_DEFAULT_ARCH="i386"
13380 ;;
13381 ppc)
13382 MACOSX_DEFAULT_ARCH="ppc"
13383 ;;
13384 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013385 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13386echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013387 { (exit 1); exit 1; }; }
13388 ;;
13389 esac
13390 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013391 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013392 i386)
13393 MACOSX_DEFAULT_ARCH="x86_64"
13394 ;;
13395 ppc)
13396 MACOSX_DEFAULT_ARCH="ppc64"
13397 ;;
13398 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013399 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13400echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013401 { (exit 1); exit 1; }; }
13402 ;;
13403 esac
13404
13405 #ARCH_RUN_32BIT="true"
13406 fi
13407
13408 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013409 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013410 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013411esac
13412
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013413{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13414echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013415if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013416then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013417 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013419 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013420
Martin v. Löwis11437992002-04-12 09:54:03 +000013421cat >>confdefs.h <<\_ACEOF
13422#define WITH_NEXT_FRAMEWORK 1
13423_ACEOF
13424
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013425 { echo "$as_me:$LINENO: result: yes" >&5
13426echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013427 if test $enable_shared = "yes"
13428 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013429 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13430echo "$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 +000013431 { (exit 1); exit 1; }; }
13432 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013433else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013434 { echo "$as_me:$LINENO: result: no" >&5
13435echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013436fi
13437
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013438{ echo "$as_me:$LINENO: checking for dyld" >&5
13439echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013440case $ac_sys_system/$ac_sys_release in
13441 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013442
Martin v. Löwis11437992002-04-12 09:54:03 +000013443cat >>confdefs.h <<\_ACEOF
13444#define WITH_DYLD 1
13445_ACEOF
13446
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013447 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13448echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013449 ;;
13450 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013451 { echo "$as_me:$LINENO: result: no" >&5
13452echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013453 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013454esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013455
Guido van Rossum0a516c91994-09-12 10:58:40 +000013456# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013457
Michael W. Hudson54241132001-12-07 15:38:26 +000013458
13459
13460
13461
Guido van Rossum0a516c91994-09-12 10:58:40 +000013462# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013463# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013464{ echo "$as_me:$LINENO: checking SO" >&5
13465echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013466if test -z "$SO"
13467then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013468 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013469 hp*|HP*)
13470 case `uname -m` in
13471 ia64) SO=.so;;
13472 *) SO=.sl;;
13473 esac
13474 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013475 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013476 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013477 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013478else
13479 # this might also be a termcap variable, see #610332
13480 echo
13481 echo '====================================================================='
13482 echo '+ +'
13483 echo '+ WARNING: You have set SO in your environment. +'
13484 echo '+ Do you really mean to change the extension for shared libraries? +'
13485 echo '+ Continuing in 10 seconds to let you to ponder. +'
13486 echo '+ +'
13487 echo '====================================================================='
13488 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013489fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013490{ echo "$as_me:$LINENO: result: $SO" >&5
13491echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013492
Georg Brandlb1441c72009-01-03 22:33:39 +000013493
Thomas Wouters477c8d52006-05-27 19:21:47 +000013494cat >>confdefs.h <<_ACEOF
13495#define SHLIB_EXT "$SO"
13496_ACEOF
13497
Guido van Rossum0a516c91994-09-12 10:58:40 +000013498# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013499# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013500# (Shared libraries in this instance are shared modules to be loaded into
13501# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013502{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13503echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013504if test -z "$LDSHARED"
13505then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013506 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013507 AIX*)
13508 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013509 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013510 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013511 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013512 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013514 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013515 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013516 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013517 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013518 hp*|HP*)
13519 if test "$GCC" = "yes"
13520 then LDSHARED='$(CC) -shared'
13521 else LDSHARED='ld -b';
13522 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013523 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013524 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013525 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13526 if test "$enable_framework" ; then
13527 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013528 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13529 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013530 else
13531 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013532 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013533 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013534 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013535 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13536 if test "$enable_framework" ; then
13537 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013538 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13539 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013540 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013541 # No framework, use the Python app as bundle-loader
13542 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013543 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013544 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013545 Darwin/*)
13546 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13547 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013548
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013549 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013550 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013551 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013552 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013553 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013554 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13555 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013556 else
13557 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13558 if test "$enable_framework" ; then
13559 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013560 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13561 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013562 else
13563 # No framework, use the Python app as bundle-loader
13564 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13565 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13566 fi
13567 fi
13568 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013569 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013570 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013571 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013572 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013573 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013574 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013575 else
13576 LDSHARED="ld -Bshareable ${LDFLAGS}"
13577 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013578 OpenBSD*)
13579 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13580 then
13581 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13582 else
13583 case `uname -r` in
13584 [01].* | 2.[0-7] | 2.[0-7].*)
13585 LDSHARED="ld -Bshareable ${LDFLAGS}"
13586 ;;
13587 *)
13588 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13589 ;;
13590 esac
13591 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013592 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013593 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013594 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013595 then LDSHARED='$(CC) -shared'
13596 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013597 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013598 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013599 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013600 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013601 *) LDSHARED="ld";;
13602 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013603fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013604{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13605echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013606BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013607# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013608# library (module) -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013609{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13610echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013611if test -z "$CCSHARED"
13612then
Guido van Rossum07397971997-04-29 21:49:50 +000013613 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013614 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013615 then CCSHARED="-fPIC";
13616 elif test `uname -p` = sparc;
13617 then CCSHARED="-xcode=pic32";
13618 else CCSHARED="-Kpic";
13619 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013620 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013621 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013622 else CCSHARED="+z";
13623 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013624 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013625 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013626 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013627 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013628 if test "$GCC" = "yes"
13629 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013630 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013631 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013632 SCO_SV*)
13633 if test "$GCC" = "yes"
13634 then CCSHARED="-fPIC"
13635 else CCSHARED="-Kpic -belf"
13636 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013637 IRIX*/6*) case $CC in
13638 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013639 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013640 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013641 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013642 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013643fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013644{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13645echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013646# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013647# the python executable -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013648{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13649echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013650if test -z "$LINKFORSHARED"
13651then
Guido van Rossum07397971997-04-29 21:49:50 +000013652 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013653 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013654 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013655 LINKFORSHARED="-Wl,-E -Wl,+s";;
13656# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013657 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013658 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013659 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013660 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013661 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013662 if test "$enable_framework"
13663 then
Jack Jansenda49e192005-01-07 13:08:22 +000013664 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013665 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013666 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013667 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013668 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013669 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013670 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013671 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13672 then
13673 LINKFORSHARED="-Wl,--export-dynamic"
13674 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013675 SunOS/5*) case $CC in
13676 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013677 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013678 then
13679 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013680 fi;;
13681 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013682 CYGWIN*)
13683 if test $enable_shared = "no"
13684 then
13685 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13686 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013687 QNX*)
13688 # -Wl,-E causes the symbols to be added to the dynamic
13689 # symbol table so that they can be found when a module
13690 # is loaded. -N 2048K causes the stack size to be set
13691 # to 2048 kilobytes so that the stack doesn't overflow
13692 # when running test_compile.py.
13693 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013694 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013695fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013696{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13697echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013698
Michael W. Hudson54241132001-12-07 15:38:26 +000013699
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013700
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013701{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13702echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013703if test ! "$LIBRARY" = "$LDLIBRARY"
13704then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013705 case $ac_sys_system in
13706 CYGWIN*)
13707 # Cygwin needs CCSHARED when building extension DLLs
13708 # but not when building the interpreter DLL.
13709 CFLAGSFORSHARED='';;
13710 *)
13711 CFLAGSFORSHARED='$(CCSHARED)'
13712 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013713fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013714{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13715echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013716
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013717# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13718# library (with --enable-shared).
13719# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013720# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13721# if it is not required, since it creates a dependency of the shared library
13722# to LIBS. This, in turn, means that applications linking the shared libpython
13723# don't need to link LIBS explicitly. The default should be only changed
13724# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013725
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013726{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13727echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013728case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013729 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013730 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013731esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013732{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13733echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013734
13735
Guido van Rossum627b2d71993-12-24 10:39:16 +000013736# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013737
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013738{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13739echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013740if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013741 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742else
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013744LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013745cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013746/* confdefs.h. */
13747_ACEOF
13748cat confdefs.h >>conftest.$ac_ext
13749cat >>conftest.$ac_ext <<_ACEOF
13750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013752/* Override any GCC internal prototype to avoid an error.
13753 Use char because int might match the return type of a GCC
13754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013755#ifdef __cplusplus
13756extern "C"
13757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013758char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013759int
13760main ()
13761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 ;
13764 return 0;
13765}
13766_ACEOF
13767rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768if { (ac_try="$ac_link"
13769case "(($ac_try" in
13770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13771 *) ac_try_echo=$ac_try;;
13772esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013776 grep -v '^ *+' conftest.er1 >conftest.err
13777 rm -f conftest.er1
13778 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780 (exit $ac_status); } && {
13781 test -z "$ac_c_werror_flag" ||
13782 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013783 } && test -s conftest$ac_exeext &&
13784 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013788sed 's/^/| /' conftest.$ac_ext >&5
13789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792
13793rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013796fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013797{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13798echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13799if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 cat >>confdefs.h <<_ACEOF
13801#define HAVE_LIBDL 1
13802_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013803
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013804 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013805
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013806fi
13807 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013808
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013809{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13810echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013811if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013812 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013813else
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013815LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013817/* confdefs.h. */
13818_ACEOF
13819cat confdefs.h >>conftest.$ac_ext
13820cat >>conftest.$ac_ext <<_ACEOF
13821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823/* Override any GCC internal prototype to avoid an error.
13824 Use char because int might match the return type of a GCC
13825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013826#ifdef __cplusplus
13827extern "C"
13828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013829char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013830int
13831main ()
13832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
13838rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839if { (ac_try="$ac_link"
13840case "(($ac_try" in
13841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13842 *) ac_try_echo=$ac_try;;
13843esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013847 grep -v '^ *+' conftest.er1 >conftest.err
13848 rm -f conftest.er1
13849 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013851 (exit $ac_status); } && {
13852 test -z "$ac_c_werror_flag" ||
13853 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013854 } && test -s conftest$ac_exeext &&
13855 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013859sed 's/^/| /' conftest.$ac_ext >&5
13860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863
13864rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013866LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013867fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013868{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13869echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13870if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013871 cat >>confdefs.h <<_ACEOF
13872#define HAVE_LIBDLD 1
13873_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013874
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013875 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013876
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013877fi
13878 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013879
Georg Brandlb1441c72009-01-03 22:33:39 +000013880# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013881if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013882 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13883echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013884if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013885 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013886else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013887 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013889/* confdefs.h. */
13890_ACEOF
13891cat confdefs.h >>conftest.$ac_ext
13892cat >>conftest.$ac_ext <<_ACEOF
13893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895/* Override any GCC internal prototype to avoid an error.
13896 Use char because int might match the return type of a GCC
13897 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013898#ifdef __cplusplus
13899extern "C"
13900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013901char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013902int
13903main ()
13904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 ;
13907 return 0;
13908}
13909_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910for ac_lib in '' pthread rt posix4; do
13911 if test -z "$ac_lib"; then
13912 ac_res="none required"
13913 else
13914 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013915 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916 fi
13917 rm -f conftest.$ac_objext conftest$ac_exeext
13918if { (ac_try="$ac_link"
13919case "(($ac_try" in
13920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13921 *) ac_try_echo=$ac_try;;
13922esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013925 ac_status=$?
13926 grep -v '^ *+' conftest.er1 >conftest.err
13927 rm -f conftest.er1
13928 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930 (exit $ac_status); } && {
13931 test -z "$ac_c_werror_flag" ||
13932 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013933 } && test -s conftest$ac_exeext &&
13934 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013936else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013937 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013938sed 's/^/| /' conftest.$ac_ext >&5
13939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940
Thomas Wouters477c8d52006-05-27 19:21:47 +000013941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942
13943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13944 conftest$ac_exeext
13945 if test "${ac_cv_search_sem_init+set}" = set; then
13946 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948done
13949if test "${ac_cv_search_sem_init+set}" = set; then
13950 :
13951else
13952 ac_cv_search_sem_init=no
13953fi
13954rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013955LIBS=$ac_func_search_save_LIBS
13956fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013957{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13958echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013959ac_res=$ac_cv_search_sem_init
13960if test "$ac_res" != no; then
13961 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013962
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013963fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013964 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013965 # posix4 on Solaris 2.6
13966 # pthread (first!) on Linux
13967fi
13968
Martin v. Löwis19d17342003-06-14 21:03:05 +000013969# check if we need libintl for locale functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013970{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13971echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013972if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013973 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013974else
13975 ac_check_lib_save_LIBS=$LIBS
13976LIBS="-lintl $LIBS"
13977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013978/* confdefs.h. */
13979_ACEOF
13980cat confdefs.h >>conftest.$ac_ext
13981cat >>conftest.$ac_ext <<_ACEOF
13982/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984/* Override any GCC internal prototype to avoid an error.
13985 Use char because int might match the return type of a GCC
13986 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013987#ifdef __cplusplus
13988extern "C"
13989#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013990char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013991int
13992main ()
13993{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013994return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013995 ;
13996 return 0;
13997}
13998_ACEOF
13999rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014000if { (ac_try="$ac_link"
14001case "(($ac_try" in
14002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14003 *) ac_try_echo=$ac_try;;
14004esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014006 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000014007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014008 grep -v '^ *+' conftest.er1 >conftest.err
14009 rm -f conftest.er1
14010 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012 (exit $ac_status); } && {
14013 test -z "$ac_c_werror_flag" ||
14014 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014015 } && test -s conftest$ac_exeext &&
14016 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014017 ac_cv_lib_intl_textdomain=yes
14018else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014020sed 's/^/| /' conftest.$ac_ext >&5
14021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014024
14025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014026 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014027LIBS=$ac_check_lib_save_LIBS
14028fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014029{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14030echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
14031if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014032
14033cat >>confdefs.h <<\_ACEOF
14034#define WITH_LIBINTL 1
14035_ACEOF
14036
Brett Cannonc6d936e2009-06-07 20:09:53 +000014037 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014038fi
14039
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014040
14041# checks for system dependent C++ extensions support
14042case "$ac_sys_system" in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014043 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14044echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014046/* confdefs.h. */
14047_ACEOF
14048cat confdefs.h >>conftest.$ac_ext
14049cat >>conftest.$ac_ext <<_ACEOF
14050/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014051#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014052int
14053main ()
14054{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014055loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014056 ;
14057 return 0;
14058}
14059_ACEOF
14060rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014061if { (ac_try="$ac_link"
14062case "(($ac_try" in
14063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14064 *) ac_try_echo=$ac_try;;
14065esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014067 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014069 grep -v '^ *+' conftest.er1 >conftest.err
14070 rm -f conftest.er1
14071 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014073 (exit $ac_status); } && {
14074 test -z "$ac_c_werror_flag" ||
14075 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014076 } && test -s conftest$ac_exeext &&
14077 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014078
Martin v. Löwis11437992002-04-12 09:54:03 +000014079cat >>confdefs.h <<\_ACEOF
14080#define AIX_GENUINE_CPLUSPLUS 1
14081_ACEOF
14082
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014083 { echo "$as_me:$LINENO: result: yes" >&5
14084echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014085else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014087sed 's/^/| /' conftest.$ac_ext >&5
14088
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014089 { echo "$as_me:$LINENO: result: no" >&5
14090echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092
14093rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014094 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014095 *) ;;
14096esac
14097
Guido van Rossum70c7f481998-03-26 18:44:10 +000014098# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014099{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14100echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014101if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014103else
Martin v. Löwis11437992002-04-12 09:54:03 +000014104 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014105LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014107/* confdefs.h. */
14108_ACEOF
14109cat confdefs.h >>conftest.$ac_ext
14110cat >>conftest.$ac_ext <<_ACEOF
14111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113/* Override any GCC internal prototype to avoid an error.
14114 Use char because int might match the return type of a GCC
14115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014116#ifdef __cplusplus
14117extern "C"
14118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014119char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014120int
14121main ()
14122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 ;
14125 return 0;
14126}
14127_ACEOF
14128rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129if { (ac_try="$ac_link"
14130case "(($ac_try" in
14131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14132 *) ac_try_echo=$ac_try;;
14133esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014137 grep -v '^ *+' conftest.er1 >conftest.err
14138 rm -f conftest.er1
14139 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014141 (exit $ac_status); } && {
14142 test -z "$ac_c_werror_flag" ||
14143 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014144 } && test -s conftest$ac_exeext &&
14145 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014146 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014147else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014149sed 's/^/| /' conftest.$ac_ext >&5
14150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153
14154rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014155 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014156LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014157fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014158{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14159echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14160if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014161 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014162fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014163 # SVR4
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014164{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14165echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014166if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014167 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014168else
Martin v. Löwis11437992002-04-12 09:54:03 +000014169 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014170LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014172/* confdefs.h. */
14173_ACEOF
14174cat confdefs.h >>conftest.$ac_ext
14175cat >>conftest.$ac_ext <<_ACEOF
14176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178/* Override any GCC internal prototype to avoid an error.
14179 Use char because int might match the return type of a GCC
14180 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014181#ifdef __cplusplus
14182extern "C"
14183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014184char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014185int
14186main ()
14187{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 ;
14190 return 0;
14191}
14192_ACEOF
14193rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014194if { (ac_try="$ac_link"
14195case "(($ac_try" in
14196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14197 *) ac_try_echo=$ac_try;;
14198esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014202 grep -v '^ *+' conftest.er1 >conftest.err
14203 rm -f conftest.er1
14204 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206 (exit $ac_status); } && {
14207 test -z "$ac_c_werror_flag" ||
14208 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014209 } && test -s conftest$ac_exeext &&
14210 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014211 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014212else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014214sed 's/^/| /' conftest.$ac_ext >&5
14215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014216 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218
14219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014221LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014222fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014223{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14224echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14225if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014226 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014227fi
14228 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014229
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014230{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14231echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014234if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235 withval=$with_libs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014236{ echo "$as_me:$LINENO: result: $withval" >&5
14237echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014238LIBS="$withval $LIBS"
14239
14240else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014241 { echo "$as_me:$LINENO: result: no" >&5
14242echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243fi
14244
Guido van Rossum7f43da71994-08-01 12:15:30 +000014245
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014246# Check for use of the system libffi library
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014247{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14248echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014251if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252 withval=$with_system_ffi;
14253fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014254
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014255
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014256{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14257echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014258
Matthias Klose55708cc2009-04-30 08:06:49 +000014259# Check for --with-dbmliborder
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014260{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14261echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014262
14263# Check whether --with-dbmliborder was given.
14264if test "${with_dbmliborder+set}" = set; then
14265 withval=$with_dbmliborder;
14266if test x$with_dbmliborder = xyes
14267then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014268{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14269echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014270 { (exit 1); exit 1; }; }
14271else
14272 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14273 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14274 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014275 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14276echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014277 { (exit 1); exit 1; }; }
14278 fi
14279 done
14280fi
14281fi
14282
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014283{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14284echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014285
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014286# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014287
14288
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014289{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14290echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014293if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294 withval=$with_signal_module;
14295fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014296
14297
14298if test -z "$with_signal_module"
14299then with_signal_module="yes"
14300fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014301{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14302echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014303
14304if test "${with_signal_module}" = "yes"; then
14305 USE_SIGNAL_MODULE=""
14306 SIGNAL_OBJS=""
14307else
14308 USE_SIGNAL_MODULE="#"
14309 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14310fi
14311
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014312# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014313
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014314USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014315
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014316{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14317echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014318
Guido van Rossumec2f0731997-01-22 20:54:01 +000014319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014320# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014321if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322 withval=$with_dec_threads;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014323{ echo "$as_me:$LINENO: result: $withval" >&5
14324echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014325LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014326if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014327 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014328fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014329else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014330 { echo "$as_me:$LINENO: result: no" >&5
14331echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332fi
14333
Martin v. Löwis11437992002-04-12 09:54:03 +000014334
14335# Templates for things AC_DEFINEd more than once.
14336# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014337
14338
Martin v. Löwis11437992002-04-12 09:54:03 +000014339
14340
14341
14342
14343
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014344{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14345echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014347# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014348if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349 withval=$with_threads;
14350fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014351
14352
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014353# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014356if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014357 withval=$with_thread; with_threads=$with_thread
14358fi
14359
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014360
14361if test -z "$with_threads"
14362then with_threads="yes"
14363fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014364{ echo "$as_me:$LINENO: result: $with_threads" >&5
14365echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014366
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014367
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014368if test "$with_threads" = "no"
14369then
14370 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014371elif test "$ac_cv_pthread_is_default" = yes
14372then
Martin v. Löwis11437992002-04-12 09:54:03 +000014373 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014374#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014375_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014376
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014377 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014378 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014379#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014380_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014381
14382 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014384elif test "$ac_cv_kpthread" = "yes"
14385then
14386 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014387 if test "$ac_cv_cxx_thread" = "yes"; then
14388 CXX="$CXX -Kpthread"
14389 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014390 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014391#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014392_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014393
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014394 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014395 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014396elif test "$ac_cv_kthread" = "yes"
14397then
14398 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014399 if test "$ac_cv_cxx_thread" = "yes"; then
14400 CXX="$CXX -Kthread"
14401 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014402 cat >>confdefs.h <<\_ACEOF
14403#define WITH_THREAD 1
14404_ACEOF
14405
14406 posix_threads=yes
14407 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014408elif test "$ac_cv_pthread" = "yes"
14409then
14410 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014411 if test "$ac_cv_cxx_thread" = "yes"; then
14412 CXX="$CXX -pthread"
14413 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014414 cat >>confdefs.h <<\_ACEOF
14415#define WITH_THREAD 1
14416_ACEOF
14417
14418 posix_threads=yes
14419 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014420else
14421 if test ! -z "$with_threads" -a -d "$with_threads"
14422 then LDFLAGS="$LDFLAGS -L$with_threads"
14423 fi
14424 if test ! -z "$withval" -a -d "$withval"
14425 then LDFLAGS="$LDFLAGS -L$withval"
14426 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014427
14428 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014429 # define _POSIX_THREADS in unistd.h. Some apparently don't
14430 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014431 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14432echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014434/* confdefs.h. */
14435_ACEOF
14436cat confdefs.h >>conftest.$ac_ext
14437cat >>conftest.$ac_ext <<_ACEOF
14438/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014439
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014440#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014441#ifdef _POSIX_THREADS
14442yes
14443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014444
14445_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014447 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014448 unistd_defines_pthreads=yes
14449else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014450 unistd_defines_pthreads=no
14451fi
Ronald Oussoren095d2822010-03-08 07:03:14 +000014452rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014453
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014454 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14455echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014456
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014458#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014459_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014460
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014462 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14463echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014464if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014466fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014467{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14468echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014469else
Martin v. Löwis11437992002-04-12 09:54:03 +000014470 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014471{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14472echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014473cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014474/* confdefs.h. */
14475_ACEOF
14476cat confdefs.h >>conftest.$ac_ext
14477cat >>conftest.$ac_ext <<_ACEOF
14478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014479$ac_includes_default
14480#include <cthreads.h>
14481_ACEOF
14482rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483if { (ac_try="$ac_compile"
14484case "(($ac_try" in
14485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14486 *) ac_try_echo=$ac_try;;
14487esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014491 grep -v '^ *+' conftest.er1 >conftest.err
14492 rm -f conftest.er1
14493 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495 (exit $ac_status); } && {
14496 test -z "$ac_c_werror_flag" ||
14497 test ! -s conftest.err
14498 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 ac_header_compiler=yes
14500else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014502sed 's/^/| /' conftest.$ac_ext >&5
14503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506
14507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014508{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14509echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014510
14511# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014512{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14513echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014514cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014515/* confdefs.h. */
14516_ACEOF
14517cat confdefs.h >>conftest.$ac_ext
14518cat >>conftest.$ac_ext <<_ACEOF
14519/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014520#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014521_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522if { (ac_try="$ac_cpp conftest.$ac_ext"
14523case "(($ac_try" in
14524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14525 *) ac_try_echo=$ac_try;;
14526esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014530 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 rm -f conftest.er1
14532 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534 (exit $ac_status); } >/dev/null && {
14535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14536 test ! -s conftest.err
14537 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014538 ac_header_preproc=yes
14539else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014541sed 's/^/| /' conftest.$ac_ext >&5
14542
Martin v. Löwis11437992002-04-12 09:54:03 +000014543 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545
Martin v. Löwis11437992002-04-12 09:54:03 +000014546rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014547{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14548echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
14550# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014551case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14552 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014553 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14554echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14555 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14556echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014557 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014558 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014559 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014560 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14561echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14562 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14563echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14564 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14565echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14566 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14567echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14568 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14569echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14570 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14571echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014573## -------------------------------------- ##
14574## Report this to http://bugs.python.org/ ##
14575## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014576_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014578 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014580{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14581echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014582if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014584else
14585 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014586fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014587{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14588echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014589
14590fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014591if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014593#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014594_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014595
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014597#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014598_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
14601cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014602#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014603_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014604
14605 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014606 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014607else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014608
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014610 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14611echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014612if test "${ac_cv_header_mach_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 +000014614fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014615{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14616echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014617else
Martin v. Löwis11437992002-04-12 09:54:03 +000014618 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014619{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14620echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014622/* confdefs.h. */
14623_ACEOF
14624cat confdefs.h >>conftest.$ac_ext
14625cat >>conftest.$ac_ext <<_ACEOF
14626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014627$ac_includes_default
14628#include <mach/cthreads.h>
14629_ACEOF
14630rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631if { (ac_try="$ac_compile"
14632case "(($ac_try" in
14633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14634 *) ac_try_echo=$ac_try;;
14635esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014639 grep -v '^ *+' conftest.er1 >conftest.err
14640 rm -f conftest.er1
14641 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643 (exit $ac_status); } && {
14644 test -z "$ac_c_werror_flag" ||
14645 test ! -s conftest.err
14646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 ac_header_compiler=yes
14648else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014650sed 's/^/| /' conftest.$ac_ext >&5
14651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014652 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654
14655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014656{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14657echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014658
14659# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014660{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14661echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014663/* confdefs.h. */
14664_ACEOF
14665cat confdefs.h >>conftest.$ac_ext
14666cat >>conftest.$ac_ext <<_ACEOF
14667/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014668#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014669_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670if { (ac_try="$ac_cpp conftest.$ac_ext"
14671case "(($ac_try" in
14672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14673 *) ac_try_echo=$ac_try;;
14674esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014677 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014678 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014679 rm -f conftest.er1
14680 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682 (exit $ac_status); } >/dev/null && {
14683 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14684 test ! -s conftest.err
14685 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 ac_header_preproc=yes
14687else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014689sed 's/^/| /' conftest.$ac_ext >&5
14690
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014693
Martin v. Löwis11437992002-04-12 09:54:03 +000014694rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014695{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14696echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014697
14698# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014699case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14700 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014701 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14702echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14703 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14704echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014705 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014706 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014707 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014708 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14709echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14710 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14711echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14712 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14713echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14714 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14715echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14716 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14717echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14718 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14719echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014720 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014721## -------------------------------------- ##
14722## Report this to http://bugs.python.org/ ##
14723## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014724_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014725 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014726 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014727esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014728{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14729echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014730if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014731 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014732else
14733 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014734fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014735{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14736echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014737
14738fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014739if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014741#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014742_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014743
Martin v. Löwis11437992002-04-12 09:54:03 +000014744 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014745#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014746_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014747
Martin v. Löwis11437992002-04-12 09:54:03 +000014748
14749cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014750#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014751_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014752
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014753 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014754else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014755
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014756 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14757echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014760if test "${with_pth+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014761 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14762echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014763 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014764#define WITH_THREAD 1
14765_ACEOF
14766
14767
14768cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014769#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014770_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014771
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014772 LIBS="-lpth $LIBS"
14773 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014774else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014775 { echo "$as_me:$LINENO: result: no" >&5
14776echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014777
14778 # Just looking for pthread_create in libpthread is not enough:
14779 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14780 # So we really have to include pthread.h, and then link.
14781 _libs=$LIBS
14782 LIBS="$LIBS -lpthread"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014783 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14784echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014786/* confdefs.h. */
14787_ACEOF
14788cat confdefs.h >>conftest.$ac_ext
14789cat >>conftest.$ac_ext <<_ACEOF
14790/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014791#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014792
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014793void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014794int
14795main ()
14796{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014797
14798pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014799 ;
14800 return 0;
14801}
14802_ACEOF
14803rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804if { (ac_try="$ac_link"
14805case "(($ac_try" in
14806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14807 *) ac_try_echo=$ac_try;;
14808esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014812 grep -v '^ *+' conftest.er1 >conftest.err
14813 rm -f conftest.er1
14814 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816 (exit $ac_status); } && {
14817 test -z "$ac_c_werror_flag" ||
14818 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014819 } && test -s conftest$ac_exeext &&
14820 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014821
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014822 { echo "$as_me:$LINENO: result: yes" >&5
14823echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014824 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014825#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014826_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014827
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014828 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014829 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014830else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014832sed 's/^/| /' conftest.$ac_ext >&5
14833
Martin v. Löwis11437992002-04-12 09:54:03 +000014834
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014835 LIBS=$_libs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014836 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14837echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014838if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014839 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014840else
Martin v. Löwis11437992002-04-12 09:54:03 +000014841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014842/* confdefs.h. */
14843_ACEOF
14844cat confdefs.h >>conftest.$ac_ext
14845cat >>conftest.$ac_ext <<_ACEOF
14846/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014847/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14848 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14849#define pthread_detach innocuous_pthread_detach
14850
Guido van Rossumad678af1998-10-02 14:42:15 +000014851/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014852 which can conflict with char pthread_detach (); below.
14853 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014854 <limits.h> exists even on freestanding compilers. */
14855
14856#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014857# include <limits.h>
14858#else
14859# include <assert.h>
14860#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014861
14862#undef pthread_detach
14863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864/* Override any GCC internal prototype to avoid an error.
14865 Use char because int might match the return type of a GCC
14866 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014867#ifdef __cplusplus
14868extern "C"
14869#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014870char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014871/* The GNU C library defines this for functions which it implements
14872 to always fail with ENOSYS. Some functions are actually named
14873 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014875choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014876#endif
14877
Skip Montanaro6dead952003-09-25 14:50:04 +000014878int
14879main ()
14880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014882 ;
14883 return 0;
14884}
14885_ACEOF
14886rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887if { (ac_try="$ac_link"
14888case "(($ac_try" in
14889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14890 *) ac_try_echo=$ac_try;;
14891esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014895 grep -v '^ *+' conftest.er1 >conftest.err
14896 rm -f conftest.er1
14897 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899 (exit $ac_status); } && {
14900 test -z "$ac_c_werror_flag" ||
14901 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014902 } && test -s conftest$ac_exeext &&
14903 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014905else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014907sed 's/^/| /' conftest.$ac_ext >&5
14908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911
14912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014913 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014914fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014915{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14916echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14917if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014918 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014919#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014920_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014921
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014922 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014923 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014924else
Guido van Rossumad678af1998-10-02 14:42:15 +000014925
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014926 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014927 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14928echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014929if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014930 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014931fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014932{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14933echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014934else
14935 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014936{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14937echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014938cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014939/* confdefs.h. */
14940_ACEOF
14941cat confdefs.h >>conftest.$ac_ext
14942cat >>conftest.$ac_ext <<_ACEOF
14943/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014944$ac_includes_default
14945#include <atheos/threads.h>
14946_ACEOF
14947rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948if { (ac_try="$ac_compile"
14949case "(($ac_try" in
14950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14951 *) ac_try_echo=$ac_try;;
14952esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014956 grep -v '^ *+' conftest.er1 >conftest.err
14957 rm -f conftest.er1
14958 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960 (exit $ac_status); } && {
14961 test -z "$ac_c_werror_flag" ||
14962 test ! -s conftest.err
14963 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014964 ac_header_compiler=yes
14965else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014967sed 's/^/| /' conftest.$ac_ext >&5
14968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971
14972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014973{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14974echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014975
14976# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014977{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14978echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014979cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014980/* confdefs.h. */
14981_ACEOF
14982cat confdefs.h >>conftest.$ac_ext
14983cat >>conftest.$ac_ext <<_ACEOF
14984/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014985#include <atheos/threads.h>
14986_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987if { (ac_try="$ac_cpp conftest.$ac_ext"
14988case "(($ac_try" in
14989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14990 *) ac_try_echo=$ac_try;;
14991esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014994 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014995 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014996 rm -f conftest.er1
14997 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999 (exit $ac_status); } >/dev/null && {
15000 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15001 test ! -s conftest.err
15002 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015003 ac_header_preproc=yes
15004else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015006sed 's/^/| /' conftest.$ac_ext >&5
15007
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015008 ac_header_preproc=no
15009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015011rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015012{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15013echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015014
15015# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015016case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15017 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015018 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15019echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15020 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15021echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015022 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015023 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015024 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015025 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15026echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15027 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15028echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15029 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15030echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15031 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15032echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15033 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15034echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15035 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15036echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015038## -------------------------------------- ##
15039## Report this to http://bugs.python.org/ ##
15040## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015041_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015043 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015044esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015045{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15046echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015047if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015048 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015049else
15050 ac_cv_header_atheos_threads_h=$ac_header_preproc
15051fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015052{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15053echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015054
15055fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015056if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015057 cat >>confdefs.h <<\_ACEOF
15058#define WITH_THREAD 1
15059_ACEOF
15060
15061
15062cat >>confdefs.h <<\_ACEOF
15063#define ATHEOS_THREADS 1
15064_ACEOF
15065
15066 THREADOBJ="Python/thread.o"
15067else
15068
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015069 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15070echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015071if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015073else
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015075LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015077/* confdefs.h. */
15078_ACEOF
15079cat confdefs.h >>conftest.$ac_ext
15080cat >>conftest.$ac_ext <<_ACEOF
15081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083/* Override any GCC internal prototype to avoid an error.
15084 Use char because int might match the return type of a GCC
15085 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015086#ifdef __cplusplus
15087extern "C"
15088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015089char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015090int
15091main ()
15092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 ;
15095 return 0;
15096}
15097_ACEOF
15098rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099if { (ac_try="$ac_link"
15100case "(($ac_try" in
15101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15102 *) ac_try_echo=$ac_try;;
15103esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015107 grep -v '^ *+' conftest.er1 >conftest.err
15108 rm -f conftest.er1
15109 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111 (exit $ac_status); } && {
15112 test -z "$ac_c_werror_flag" ||
15113 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015114 } && test -s conftest$ac_exeext &&
15115 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015117else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015119sed 's/^/| /' conftest.$ac_ext >&5
15120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123
15124rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015126LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015127fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015128{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15129echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
15130if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015132#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015133_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015134
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015135 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015136 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015137 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015138else
Greg Steinadf63d62000-07-05 10:38:09 +000015139
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015140 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15141echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015142if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015143 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015144else
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015146LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015148/* confdefs.h. */
15149_ACEOF
15150cat confdefs.h >>conftest.$ac_ext
15151cat >>conftest.$ac_ext <<_ACEOF
15152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154/* Override any GCC internal prototype to avoid an error.
15155 Use char because int might match the return type of a GCC
15156 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015157#ifdef __cplusplus
15158extern "C"
15159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015160char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015161int
15162main ()
15163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 ;
15166 return 0;
15167}
15168_ACEOF
15169rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170if { (ac_try="$ac_link"
15171case "(($ac_try" in
15172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15173 *) ac_try_echo=$ac_try;;
15174esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015178 grep -v '^ *+' conftest.er1 >conftest.err
15179 rm -f conftest.er1
15180 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182 (exit $ac_status); } && {
15183 test -z "$ac_c_werror_flag" ||
15184 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015185 } && test -s conftest$ac_exeext &&
15186 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015188else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015190sed 's/^/| /' conftest.$ac_ext >&5
15191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194
15195rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015197LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015198fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015199{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15200echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15201if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015203#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015204_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015206 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015207 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015208 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015209else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015210
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015211 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15212echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015213if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015214 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015215else
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015217LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015219/* confdefs.h. */
15220_ACEOF
15221cat confdefs.h >>conftest.$ac_ext
15222cat >>conftest.$ac_ext <<_ACEOF
15223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225/* Override any GCC internal prototype to avoid an error.
15226 Use char because int might match the return type of a GCC
15227 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015228#ifdef __cplusplus
15229extern "C"
15230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015231char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015232int
15233main ()
15234{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 ;
15237 return 0;
15238}
15239_ACEOF
15240rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015241if { (ac_try="$ac_link"
15242case "(($ac_try" in
15243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15244 *) ac_try_echo=$ac_try;;
15245esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015249 grep -v '^ *+' conftest.er1 >conftest.err
15250 rm -f conftest.er1
15251 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253 (exit $ac_status); } && {
15254 test -z "$ac_c_werror_flag" ||
15255 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015256 } && test -s conftest$ac_exeext &&
15257 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015259else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015261sed 's/^/| /' conftest.$ac_ext >&5
15262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265
15266rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015268LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015269fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015270{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15271echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15272if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015274#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015275_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015276
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015277 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015278 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015279 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015280else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015281
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015282 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15283echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015284if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015286else
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015288LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015290/* confdefs.h. */
15291_ACEOF
15292cat confdefs.h >>conftest.$ac_ext
15293cat >>conftest.$ac_ext <<_ACEOF
15294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296/* Override any GCC internal prototype to avoid an error.
15297 Use char because int might match the return type of a GCC
15298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015299#ifdef __cplusplus
15300extern "C"
15301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015302char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015303int
15304main ()
15305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 ;
15308 return 0;
15309}
15310_ACEOF
15311rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312if { (ac_try="$ac_link"
15313case "(($ac_try" in
15314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15315 *) ac_try_echo=$ac_try;;
15316esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015318 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015320 grep -v '^ *+' conftest.er1 >conftest.err
15321 rm -f conftest.er1
15322 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015324 (exit $ac_status); } && {
15325 test -z "$ac_c_werror_flag" ||
15326 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015327 } && test -s conftest$ac_exeext &&
15328 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015330else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015332sed 's/^/| /' conftest.$ac_ext >&5
15333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336
15337rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015339LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015340fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015341{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15342echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15343if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015345#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015346_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015347
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015348 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015349 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015350 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015351else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015352
Martin v. Löwis130fb172001-07-19 11:00:41 +000015353 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015354fi
15355
Guido van Rossum627b2d71993-12-24 10:39:16 +000015356
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015357fi
15358
Guido van Rossum0be3e491997-05-22 20:33:33 +000015359fi
15360
Guido van Rossum49545951997-12-02 19:28:29 +000015361fi
15362
Guido van Rossumb93a8621998-05-07 13:27:32 +000015363fi
15364
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015365
Michael W. Hudson54241132001-12-07 15:38:26 +000015366fi
15367
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369
15370rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015371 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372fi
15373
Martin v. Löwis11437992002-04-12 09:54:03 +000015374fi
15375
15376
15377fi
15378
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015379
Michael W. Hudson54241132001-12-07 15:38:26 +000015380
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015381 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15382echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015383if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015385else
Martin v. Löwis11437992002-04-12 09:54:03 +000015386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015387LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015389/* confdefs.h. */
15390_ACEOF
15391cat confdefs.h >>conftest.$ac_ext
15392cat >>conftest.$ac_ext <<_ACEOF
15393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395/* Override any GCC internal prototype to avoid an error.
15396 Use char because int might match the return type of a GCC
15397 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015398#ifdef __cplusplus
15399extern "C"
15400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015401char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015402int
15403main ()
15404{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015405return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015406 ;
15407 return 0;
15408}
15409_ACEOF
15410rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411if { (ac_try="$ac_link"
15412case "(($ac_try" in
15413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15414 *) ac_try_echo=$ac_try;;
15415esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015417 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015419 grep -v '^ *+' conftest.er1 >conftest.err
15420 rm -f conftest.er1
15421 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015423 (exit $ac_status); } && {
15424 test -z "$ac_c_werror_flag" ||
15425 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015426 } && test -s conftest$ac_exeext &&
15427 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015428 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015429else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015431sed 's/^/| /' conftest.$ac_ext >&5
15432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015433 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435
15436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015438LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015439fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015440{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15441echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15442if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015443 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015444#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015445_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015446
Martin v. Löwis130fb172001-07-19 11:00:41 +000015447 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015448 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015449 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015450fi
15451
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015452
Neal Norwitza978ab02002-11-02 16:58:05 +000015453 if test "$posix_threads" != "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015454 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15455echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015456if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015457 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015458else
Martin v. Löwis11437992002-04-12 09:54:03 +000015459 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015460LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015462/* confdefs.h. */
15463_ACEOF
15464cat confdefs.h >>conftest.$ac_ext
15465cat >>conftest.$ac_ext <<_ACEOF
15466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015468/* Override any GCC internal prototype to avoid an error.
15469 Use char because int might match the return type of a GCC
15470 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015471#ifdef __cplusplus
15472extern "C"
15473#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015474char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015475int
15476main ()
15477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015478return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 ;
15480 return 0;
15481}
15482_ACEOF
15483rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015484if { (ac_try="$ac_link"
15485case "(($ac_try" in
15486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15487 *) ac_try_echo=$ac_try;;
15488esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015490 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015492 grep -v '^ *+' conftest.er1 >conftest.err
15493 rm -f conftest.er1
15494 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496 (exit $ac_status); } && {
15497 test -z "$ac_c_werror_flag" ||
15498 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015499 } && test -s conftest$ac_exeext &&
15500 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015501 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015502else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015504sed 's/^/| /' conftest.$ac_ext >&5
15505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015506 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508
15509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015510 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015511LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015512fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015513{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15514echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15515if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015517#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015518_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015519
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015520 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015521 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015522 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015523fi
15524
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015525 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015526
Martin v. Löwis130fb172001-07-19 11:00:41 +000015527 if test "$USE_THREAD_MODULE" != "#"
15528 then
15529 # If the above checks didn't disable threads, (at least) OSF1
15530 # needs this '-threads' argument during linking.
15531 case $ac_sys_system in
15532 OSF1) LDLAST=-threads;;
15533 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015534 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015535fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015536
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015537if test "$posix_threads" = "yes"; then
15538 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015539
15540cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015541#define _POSIX_THREADS 1
15542_ACEOF
15543
15544 fi
15545
15546 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15547 case $ac_sys_system/$ac_sys_release in
15548 SunOS/5.6)
15549cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015550#define HAVE_PTHREAD_DESTRUCTOR 1
15551_ACEOF
15552
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015553 ;;
15554 SunOS/5.8)
15555cat >>confdefs.h <<\_ACEOF
15556#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15557_ACEOF
15558
15559 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015560 AIX/5)
15561cat >>confdefs.h <<\_ACEOF
15562#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15563_ACEOF
15564
15565 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015566 esac
15567
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015568 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15569echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015570 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015571 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015572else
15573 if test "$cross_compiling" = yes; then
15574 ac_cv_pthread_system_supported=no
15575else
15576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015577/* confdefs.h. */
15578_ACEOF
15579cat confdefs.h >>conftest.$ac_ext
15580cat >>conftest.$ac_ext <<_ACEOF
15581/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015582#include <pthread.h>
15583 void *foo(void *parm) {
15584 return NULL;
15585 }
15586 main() {
15587 pthread_attr_t attr;
15588 pthread_t id;
15589 if (pthread_attr_init(&attr)) exit(-1);
15590 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15591 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15592 exit(0);
15593 }
15594_ACEOF
15595rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596if { (ac_try="$ac_link"
15597case "(($ac_try" in
15598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15599 *) ac_try_echo=$ac_try;;
15600esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015603 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015605 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015606 { (case "(($ac_try" in
15607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15608 *) ac_try_echo=$ac_try;;
15609esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015612 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015614 (exit $ac_status); }; }; then
15615 ac_cv_pthread_system_supported=yes
15616else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015617 echo "$as_me: program exited with status $ac_status" >&5
15618echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015619sed 's/^/| /' conftest.$ac_ext >&5
15620
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015621( exit $ac_status )
15622ac_cv_pthread_system_supported=no
15623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624rm -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 +000015625fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627
15628
Guido van Rossum627b2d71993-12-24 10:39:16 +000015629fi
15630
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015631 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15632echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015633 if test "$ac_cv_pthread_system_supported" = "yes"; then
15634
15635cat >>confdefs.h <<\_ACEOF
15636#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15637_ACEOF
15638
15639 fi
15640
15641for ac_func in pthread_sigmask
15642do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15644{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015646if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015647 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015648else
15649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015650/* confdefs.h. */
15651_ACEOF
15652cat confdefs.h >>conftest.$ac_ext
15653cat >>conftest.$ac_ext <<_ACEOF
15654/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015655/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15657#define $ac_func innocuous_$ac_func
15658
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015659/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015660 which can conflict with char $ac_func (); below.
15661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015662 <limits.h> exists even on freestanding compilers. */
15663
15664#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015665# include <limits.h>
15666#else
15667# include <assert.h>
15668#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015669
15670#undef $ac_func
15671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015672/* Override any GCC internal prototype to avoid an error.
15673 Use char because int might match the return type of a GCC
15674 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015675#ifdef __cplusplus
15676extern "C"
15677#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015678char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015679/* The GNU C library defines this for functions which it implements
15680 to always fail with ENOSYS. Some functions are actually named
15681 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015683choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015684#endif
15685
Skip Montanaro6dead952003-09-25 14:50:04 +000015686int
15687main ()
15688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015689return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015690 ;
15691 return 0;
15692}
15693_ACEOF
15694rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015695if { (ac_try="$ac_link"
15696case "(($ac_try" in
15697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15698 *) ac_try_echo=$ac_try;;
15699esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015703 grep -v '^ *+' conftest.er1 >conftest.err
15704 rm -f conftest.er1
15705 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707 (exit $ac_status); } && {
15708 test -z "$ac_c_werror_flag" ||
15709 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015710 } && test -s conftest$ac_exeext &&
15711 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015712 eval "$as_ac_var=yes"
15713else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015715sed 's/^/| /' conftest.$ac_ext >&5
15716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015719
15720rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015722fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015723ac_res=`eval echo '${'$as_ac_var'}'`
15724 { echo "$as_me:$LINENO: result: $ac_res" >&5
15725echo "${ECHO_T}$ac_res" >&6; }
15726if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015727 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015728#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015729_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015730 case $ac_sys_system in
15731 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015732
Jason Tishlerfac083d2003-07-22 15:20:49 +000015733cat >>confdefs.h <<\_ACEOF
15734#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15735_ACEOF
15736
15737 ;;
15738 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015739fi
15740done
15741
15742fi
15743
15744
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015745# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015746
15747
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015748{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15749echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015751if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015753 no)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015754 { echo "$as_me:$LINENO: result: no" >&5
15755echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015756 ipv6=no
15757 ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015758 *) { echo "$as_me:$LINENO: result: yes" >&5
15759echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015761#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015762_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015763
15764 ipv6=yes
15765 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015767else
Martin v. Löwis11437992002-04-12 09:54:03 +000015768
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015769 if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015770 { echo "$as_me:$LINENO: result: no" >&5
15771echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015772 ipv6=no
15773
15774else
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015776/* confdefs.h. */
15777_ACEOF
15778cat confdefs.h >>conftest.$ac_ext
15779cat >>conftest.$ac_ext <<_ACEOF
15780/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015781 /* AF_INET6 available check */
15782#include <sys/types.h>
15783#include <sys/socket.h>
15784main()
15785{
15786 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15787 exit(1);
15788 else
15789 exit(0);
15790}
15791
Martin v. Löwis11437992002-04-12 09:54:03 +000015792_ACEOF
15793rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794if { (ac_try="$ac_link"
15795case "(($ac_try" in
15796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15797 *) ac_try_echo=$ac_try;;
15798esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015801 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015804 { (case "(($ac_try" in
15805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15806 *) ac_try_echo=$ac_try;;
15807esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015813 { echo "$as_me:$LINENO: result: yes" >&5
15814echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015815 ipv6=yes
15816else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015817 echo "$as_me: program exited with status $ac_status" >&5
15818echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015819sed 's/^/| /' conftest.$ac_ext >&5
15820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015822{ echo "$as_me:$LINENO: result: no" >&5
15823echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015824 ipv6=no
15825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015826rm -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 +000015827fi
15828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829
15830
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015831if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015832 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15833echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015835/* confdefs.h. */
15836_ACEOF
15837cat confdefs.h >>conftest.$ac_ext
15838cat >>conftest.$ac_ext <<_ACEOF
15839/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015840#include <sys/types.h>
15841#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015842int
15843main ()
15844{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015845struct sockaddr_in6 x;
15846x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015847 ;
15848 return 0;
15849}
15850_ACEOF
15851rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852if { (ac_try="$ac_compile"
15853case "(($ac_try" in
15854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15855 *) ac_try_echo=$ac_try;;
15856esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015858 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015860 grep -v '^ *+' conftest.er1 >conftest.err
15861 rm -f conftest.er1
15862 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864 (exit $ac_status); } && {
15865 test -z "$ac_c_werror_flag" ||
15866 test ! -s conftest.err
15867 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015868 { echo "$as_me:$LINENO: result: yes" >&5
15869echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015870 ipv6=yes
15871else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015873sed 's/^/| /' conftest.$ac_ext >&5
15874
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015875 { echo "$as_me:$LINENO: result: no" >&5
15876echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015877 ipv6=no
15878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879
15880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015881fi
15882
15883if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015885#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015886_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015887
15888fi
15889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015890fi
15891
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015892
15893ipv6type=unknown
15894ipv6lib=none
15895ipv6trylibc=no
15896
15897if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015898 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15899echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015900 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15901 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015902 case $i in
15903 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015905/* confdefs.h. */
15906_ACEOF
15907cat confdefs.h >>conftest.$ac_ext
15908cat >>conftest.$ac_ext <<_ACEOF
15909/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015911#include <netinet/in.h>
15912#ifdef IPV6_INRIA_VERSION
15913yes
15914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015917 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015918 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015919fi
Ronald Oussoren095d2822010-03-08 07:03:14 +000015920rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015921
15922 ;;
15923 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015924 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015925/* confdefs.h. */
15926_ACEOF
15927cat confdefs.h >>conftest.$ac_ext
15928cat >>conftest.$ac_ext <<_ACEOF
15929/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015930
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015931#include <netinet/in.h>
15932#ifdef __KAME__
15933yes
15934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015935_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015937 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015938 ipv6type=$i;
15939 ipv6lib=inet6
15940 ipv6libdir=/usr/local/v6/lib
15941 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015942fi
Ronald Oussoren095d2822010-03-08 07:03:14 +000015943rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015944
15945 ;;
15946 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015948/* confdefs.h. */
15949_ACEOF
15950cat confdefs.h >>conftest.$ac_ext
15951cat >>conftest.$ac_ext <<_ACEOF
15952/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015953
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015954#include <features.h>
15955#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15956yes
15957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015958_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015960 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015961 ipv6type=$i;
15962 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015963fi
Ronald Oussoren095d2822010-03-08 07:03:14 +000015964rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015965
15966 ;;
15967 linux-inet6)
15968 if test -d /usr/inet6; then
15969 ipv6type=$i
15970 ipv6lib=inet6
15971 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015972 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015973 fi
15974 ;;
15975 solaris)
15976 if test -f /etc/netconfig; then
15977 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15978 ipv6type=$i
15979 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015980 fi
15981 fi
15982 ;;
15983 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015985/* confdefs.h. */
15986_ACEOF
15987cat confdefs.h >>conftest.$ac_ext
15988cat >>conftest.$ac_ext <<_ACEOF
15989/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015991#include <sys/param.h>
15992#ifdef _TOSHIBA_INET6
15993yes
15994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015995_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015997 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015998 ipv6type=$i;
15999 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016000 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016001fi
Ronald Oussoren095d2822010-03-08 07:03:14 +000016002rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016003
16004 ;;
16005 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016007/* confdefs.h. */
16008_ACEOF
16009cat confdefs.h >>conftest.$ac_ext
16010cat >>conftest.$ac_ext <<_ACEOF
16011/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016012
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016013#include </usr/local/v6/include/sys/v6config.h>
16014#ifdef __V6D__
16015yes
16016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016017_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016019 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016020 ipv6type=$i;
16021 ipv6lib=v6;
16022 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016023 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016024fi
Ronald Oussoren095d2822010-03-08 07:03:14 +000016025rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016026
16027 ;;
16028 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016030/* confdefs.h. */
16031_ACEOF
16032cat confdefs.h >>conftest.$ac_ext
16033cat >>conftest.$ac_ext <<_ACEOF
16034/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016035
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016036#include <sys/param.h>
16037#ifdef _ZETA_MINAMI_INET6
16038yes
16039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016040_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016042 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016043 ipv6type=$i;
16044 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016045 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016046fi
Ronald Oussoren095d2822010-03-08 07:03:14 +000016047rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016048
16049 ;;
16050 esac
16051 if test "$ipv6type" != "unknown"; then
16052 break
16053 fi
16054 done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016055 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16056echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016057fi
16058
16059if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16060 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16061 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16062 echo "using lib$ipv6lib"
16063 else
16064 if test $ipv6trylibc = "yes"; then
16065 echo "using libc"
16066 else
16067 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16068 echo "You need to fetch lib$ipv6lib.a from appropriate"
16069 echo 'ipv6 kit and compile beforehand.'
16070 exit 1
16071 fi
16072 fi
16073fi
16074
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016075{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16076echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016077cat >conftest.$ac_ext <<_ACEOF
16078/* confdefs.h. */
16079_ACEOF
16080cat confdefs.h >>conftest.$ac_ext
16081cat >>conftest.$ac_ext <<_ACEOF
16082/* end confdefs.h. */
16083#include <Carbon/Carbon.h>
16084int
16085main ()
16086{
16087FSIORefNum fRef = 0
16088 ;
16089 return 0;
16090}
16091_ACEOF
16092rm -f conftest.$ac_objext
16093if { (ac_try="$ac_compile"
16094case "(($ac_try" in
16095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16096 *) ac_try_echo=$ac_try;;
16097esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016099 (eval "$ac_compile") 2>conftest.er1
16100 ac_status=$?
16101 grep -v '^ *+' conftest.er1 >conftest.err
16102 rm -f conftest.er1
16103 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016105 (exit $ac_status); } && {
16106 test -z "$ac_c_werror_flag" ||
16107 test ! -s conftest.err
16108 } && test -s conftest.$ac_objext; then
16109
16110cat >>confdefs.h <<\_ACEOF
16111#define HAVE_OSX105_SDK 1
16112_ACEOF
16113
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016114 { echo "$as_me:$LINENO: result: yes" >&5
16115echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016116else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016117 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016118sed 's/^/| /' conftest.$ac_ext >&5
16119
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016120 { echo "$as_me:$LINENO: result: no" >&5
16121echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016122
16123fi
16124
16125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16126
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016127# Check for --with-doc-strings
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016128{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16129echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016131# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016132if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016133 withval=$with_doc_strings;
16134fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016135
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016136
16137if test -z "$with_doc_strings"
16138then with_doc_strings="yes"
16139fi
16140if test "$with_doc_strings" != "no"
16141then
16142
16143cat >>confdefs.h <<\_ACEOF
16144#define WITH_DOC_STRINGS 1
16145_ACEOF
16146
16147fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016148{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16149echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016150
Neil Schemenauera35c6882001-02-27 04:45:05 +000016151# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016152{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16153echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016155# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016156if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016158if test "$withval" != no
16159then
16160
16161cat >>confdefs.h <<\_ACEOF
16162#define WITH_TSC 1
16163_ACEOF
16164
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016165 { echo "$as_me:$LINENO: result: yes" >&5
16166echo "${ECHO_T}yes" >&6; }
16167else { echo "$as_me:$LINENO: result: no" >&5
16168echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016169fi
16170else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016171 { echo "$as_me:$LINENO: result: no" >&5
16172echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016173fi
16174
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016175
16176# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016177{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16178echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016181if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016182 withval=$with_pymalloc;
16183fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016184
Neil Schemenauera35c6882001-02-27 04:45:05 +000016185
Neil Schemenauer16c22972002-03-22 15:34:49 +000016186if test -z "$with_pymalloc"
16187then with_pymalloc="yes"
16188fi
16189if test "$with_pymalloc" != "no"
16190then
Martin v. Löwis11437992002-04-12 09:54:03 +000016191
16192cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016193#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016194_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016195
16196fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016197{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16198echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016199
Barry Warsawef82cd72000-06-30 16:21:01 +000016200# Check for --with-wctype-functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016201{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16202echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016205if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016207if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016208then
16209
16210cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016211#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016212_ACEOF
16213
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016214 { echo "$as_me:$LINENO: result: yes" >&5
16215echo "${ECHO_T}yes" >&6; }
16216else { echo "$as_me:$LINENO: result: no" >&5
16217echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016218fi
16219else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016220 { echo "$as_me:$LINENO: result: no" >&5
16221echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222fi
16223
Barry Warsawef82cd72000-06-30 16:21:01 +000016224
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016225# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016226
Guido van Rossum98935bf2001-09-05 19:13:16 +000016227DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016228
Guido van Rossume97ee181999-12-20 21:27:22 +000016229# the dlopen() function means we might want to use dynload_shlib.o. some
16230# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016231
Thomas Wouters3a584202000-08-05 23:28:51 +000016232for ac_func in dlopen
16233do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016234as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16235{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16236echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016238 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016239else
Martin v. Löwis11437992002-04-12 09:54:03 +000016240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016241/* confdefs.h. */
16242_ACEOF
16243cat confdefs.h >>conftest.$ac_ext
16244cat >>conftest.$ac_ext <<_ACEOF
16245/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016246/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16247 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16248#define $ac_func innocuous_$ac_func
16249
Guido van Rossume97ee181999-12-20 21:27:22 +000016250/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016251 which can conflict with char $ac_func (); below.
16252 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016253 <limits.h> exists even on freestanding compilers. */
16254
16255#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016256# include <limits.h>
16257#else
16258# include <assert.h>
16259#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016260
16261#undef $ac_func
16262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263/* Override any GCC internal prototype to avoid an error.
16264 Use char because int might match the return type of a GCC
16265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016266#ifdef __cplusplus
16267extern "C"
16268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016269char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016270/* The GNU C library defines this for functions which it implements
16271 to always fail with ENOSYS. Some functions are actually named
16272 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016274choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016275#endif
16276
Skip Montanaro6dead952003-09-25 14:50:04 +000016277int
16278main ()
16279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 ;
16282 return 0;
16283}
16284_ACEOF
16285rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016286if { (ac_try="$ac_link"
16287case "(($ac_try" in
16288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16289 *) ac_try_echo=$ac_try;;
16290esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016294 grep -v '^ *+' conftest.er1 >conftest.err
16295 rm -f conftest.er1
16296 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298 (exit $ac_status); } && {
16299 test -z "$ac_c_werror_flag" ||
16300 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016301 } && test -s conftest$ac_exeext &&
16302 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016304else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016306sed 's/^/| /' conftest.$ac_ext >&5
16307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310
16311rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016312 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016313fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016314ac_res=`eval echo '${'$as_ac_var'}'`
16315 { echo "$as_me:$LINENO: result: $ac_res" >&5
16316echo "${ECHO_T}$ac_res" >&6; }
16317if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016318 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016319#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016320_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016321
Guido van Rossume97ee181999-12-20 21:27:22 +000016322fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016323done
Guido van Rossume97ee181999-12-20 21:27:22 +000016324
Michael W. Hudson54241132001-12-07 15:38:26 +000016325
Guido van Rossume97ee181999-12-20 21:27:22 +000016326# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16327# loading of modules.
16328
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016329{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16330echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016331if test -z "$DYNLOADFILE"
16332then
16333 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016334 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16335 if test "$ac_cv_func_dlopen" = yes
16336 then DYNLOADFILE="dynload_shlib.o"
16337 else DYNLOADFILE="dynload_aix.o"
16338 fi
16339 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016340 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016341 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16342 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016343 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016344 *)
16345 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16346 # out any dynamic loading
16347 if test "$ac_cv_func_dlopen" = yes
16348 then DYNLOADFILE="dynload_shlib.o"
16349 else DYNLOADFILE="dynload_stub.o"
16350 fi
16351 ;;
16352 esac
16353fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016354{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16355echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016356if test "$DYNLOADFILE" != "dynload_stub.o"
16357then
Martin v. Löwis11437992002-04-12 09:54:03 +000016358
16359cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016360#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016361_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016362
16363fi
16364
Neil Schemenauer4e425612001-06-19 15:44:15 +000016365# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16366
Michael W. Hudson54241132001-12-07 15:38:26 +000016367
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016368{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16369echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016370if test -z "$MACHDEP_OBJS"
16371then
Jack Jansene578a632001-08-15 01:27:14 +000016372 MACHDEP_OBJS=$extra_machdep_objs
16373else
16374 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016375fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016376{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16377echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016378
Guido van Rossum627b2d71993-12-24 10:39:16 +000016379# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
Martin v. Löwisd6320502004-08-12 13:45:08 +000016451
Martin v. Löwisc3001752005-01-23 09:27:24 +000016452
16453
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016454
16455
Thomas Wouterscf297e42007-02-23 15:07:44 +000016456
16457
Gregory P. Smith25523d22007-09-03 16:44:55 +000016458
Christian Heimes4e30a842007-11-30 22:12:06 +000016459
Martin v. Löwis92fab752008-03-08 10:40:41 +000016460
Martin v. Löwis823725e2008-03-24 13:39:54 +000016461
16462
Benjamin Peterson965ce872009-04-05 21:24:58 +000016463
16464
16465
16466
Martin v. Löwis011e8422009-05-05 04:43:17 +000016467
Martin v. Löwis113a0852009-05-29 17:25:39 +000016468
Martin v. Löwis823725e2008-03-24 13:39:54 +000016469for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16470 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016471 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016472 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016473 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016474 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016475 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016476 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16477 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016478 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016479 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016480 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016481 truncate uname unsetenv utimes waitpid wait3 wait4 \
16482 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016483do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016484as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16485{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16486echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016487if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016489else
Martin v. Löwis11437992002-04-12 09:54:03 +000016490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016491/* confdefs.h. */
16492_ACEOF
16493cat confdefs.h >>conftest.$ac_ext
16494cat >>conftest.$ac_ext <<_ACEOF
16495/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016496/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16497 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16498#define $ac_func innocuous_$ac_func
16499
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016500/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016501 which can conflict with char $ac_func (); below.
16502 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016503 <limits.h> exists even on freestanding compilers. */
16504
16505#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016506# include <limits.h>
16507#else
16508# include <assert.h>
16509#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016510
16511#undef $ac_func
16512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513/* Override any GCC internal prototype to avoid an error.
16514 Use char because int might match the return type of a GCC
16515 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016516#ifdef __cplusplus
16517extern "C"
16518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016519char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016520/* The GNU C library defines this for functions which it implements
16521 to always fail with ENOSYS. Some functions are actually named
16522 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016523#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016524choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016525#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016526
Skip Montanaro6dead952003-09-25 14:50:04 +000016527int
16528main ()
16529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016530return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016531 ;
16532 return 0;
16533}
16534_ACEOF
16535rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016536if { (ac_try="$ac_link"
16537case "(($ac_try" in
16538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16539 *) ac_try_echo=$ac_try;;
16540esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016544 grep -v '^ *+' conftest.er1 >conftest.err
16545 rm -f conftest.er1
16546 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548 (exit $ac_status); } && {
16549 test -z "$ac_c_werror_flag" ||
16550 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016551 } && test -s conftest$ac_exeext &&
16552 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016553 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016554else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016556sed 's/^/| /' conftest.$ac_ext >&5
16557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016558 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560
16561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016562 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016563fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016564ac_res=`eval echo '${'$as_ac_var'}'`
16565 { echo "$as_me:$LINENO: result: $ac_res" >&5
16566echo "${ECHO_T}$ac_res" >&6; }
16567if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016568 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016569#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016570_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016571
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016572fi
16573done
16574
Michael W. Hudson54241132001-12-07 15:38:26 +000016575
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016576# For some functions, having a definition is not sufficient, since
16577# we want to take their address.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016578{ echo "$as_me:$LINENO: checking for chroot" >&5
16579echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016580cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016581/* confdefs.h. */
16582_ACEOF
16583cat confdefs.h >>conftest.$ac_ext
16584cat >>conftest.$ac_ext <<_ACEOF
16585/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016586#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016587int
16588main ()
16589{
16590void *x=chroot
16591 ;
16592 return 0;
16593}
16594_ACEOF
16595rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016596if { (ac_try="$ac_compile"
16597case "(($ac_try" in
16598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16599 *) ac_try_echo=$ac_try;;
16600esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016604 grep -v '^ *+' conftest.er1 >conftest.err
16605 rm -f conftest.er1
16606 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608 (exit $ac_status); } && {
16609 test -z "$ac_c_werror_flag" ||
16610 test ! -s conftest.err
16611 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016612
16613cat >>confdefs.h <<\_ACEOF
16614#define HAVE_CHROOT 1
16615_ACEOF
16616
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016617 { echo "$as_me:$LINENO: result: yes" >&5
16618echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016619else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016621sed 's/^/| /' conftest.$ac_ext >&5
16622
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016623 { echo "$as_me:$LINENO: result: no" >&5
16624echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016625
16626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627
16628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016629{ echo "$as_me:$LINENO: checking for link" >&5
16630echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016631cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016632/* confdefs.h. */
16633_ACEOF
16634cat confdefs.h >>conftest.$ac_ext
16635cat >>conftest.$ac_ext <<_ACEOF
16636/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016637#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016638int
16639main ()
16640{
16641void *x=link
16642 ;
16643 return 0;
16644}
16645_ACEOF
16646rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647if { (ac_try="$ac_compile"
16648case "(($ac_try" in
16649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16650 *) ac_try_echo=$ac_try;;
16651esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016655 grep -v '^ *+' conftest.er1 >conftest.err
16656 rm -f conftest.er1
16657 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659 (exit $ac_status); } && {
16660 test -z "$ac_c_werror_flag" ||
16661 test ! -s conftest.err
16662 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016663
16664cat >>confdefs.h <<\_ACEOF
16665#define HAVE_LINK 1
16666_ACEOF
16667
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016668 { echo "$as_me:$LINENO: result: yes" >&5
16669echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016670else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016672sed 's/^/| /' conftest.$ac_ext >&5
16673
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016674 { echo "$as_me:$LINENO: result: no" >&5
16675echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016676
16677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016678
16679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016680{ echo "$as_me:$LINENO: checking for symlink" >&5
16681echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016683/* confdefs.h. */
16684_ACEOF
16685cat confdefs.h >>conftest.$ac_ext
16686cat >>conftest.$ac_ext <<_ACEOF
16687/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016688#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016689int
16690main ()
16691{
16692void *x=symlink
16693 ;
16694 return 0;
16695}
16696_ACEOF
16697rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016698if { (ac_try="$ac_compile"
16699case "(($ac_try" in
16700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16701 *) ac_try_echo=$ac_try;;
16702esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016706 grep -v '^ *+' conftest.er1 >conftest.err
16707 rm -f conftest.er1
16708 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 (exit $ac_status); } && {
16711 test -z "$ac_c_werror_flag" ||
16712 test ! -s conftest.err
16713 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016714
16715cat >>confdefs.h <<\_ACEOF
16716#define HAVE_SYMLINK 1
16717_ACEOF
16718
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016719 { echo "$as_me:$LINENO: result: yes" >&5
16720echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016721else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016723sed 's/^/| /' conftest.$ac_ext >&5
16724
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016725 { echo "$as_me:$LINENO: result: no" >&5
16726echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016727
16728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016729
16730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016731{ echo "$as_me:$LINENO: checking for fchdir" >&5
16732echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016734/* confdefs.h. */
16735_ACEOF
16736cat confdefs.h >>conftest.$ac_ext
16737cat >>conftest.$ac_ext <<_ACEOF
16738/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016739#include <unistd.h>
16740int
16741main ()
16742{
16743void *x=fchdir
16744 ;
16745 return 0;
16746}
16747_ACEOF
16748rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016749if { (ac_try="$ac_compile"
16750case "(($ac_try" in
16751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16752 *) ac_try_echo=$ac_try;;
16753esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016757 grep -v '^ *+' conftest.er1 >conftest.err
16758 rm -f conftest.er1
16759 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016761 (exit $ac_status); } && {
16762 test -z "$ac_c_werror_flag" ||
16763 test ! -s conftest.err
16764 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016765
16766cat >>confdefs.h <<\_ACEOF
16767#define HAVE_FCHDIR 1
16768_ACEOF
16769
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016770 { echo "$as_me:$LINENO: result: yes" >&5
16771echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016772else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016774sed 's/^/| /' conftest.$ac_ext >&5
16775
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016776 { echo "$as_me:$LINENO: result: no" >&5
16777echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016778
16779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016780
16781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016782{ echo "$as_me:$LINENO: checking for fsync" >&5
16783echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016784cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016785/* confdefs.h. */
16786_ACEOF
16787cat confdefs.h >>conftest.$ac_ext
16788cat >>conftest.$ac_ext <<_ACEOF
16789/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016790#include <unistd.h>
16791int
16792main ()
16793{
16794void *x=fsync
16795 ;
16796 return 0;
16797}
16798_ACEOF
16799rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016800if { (ac_try="$ac_compile"
16801case "(($ac_try" in
16802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16803 *) ac_try_echo=$ac_try;;
16804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016808 grep -v '^ *+' conftest.er1 >conftest.err
16809 rm -f conftest.er1
16810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812 (exit $ac_status); } && {
16813 test -z "$ac_c_werror_flag" ||
16814 test ! -s conftest.err
16815 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016816
16817cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016818#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016819_ACEOF
16820
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016821 { echo "$as_me:$LINENO: result: yes" >&5
16822echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016823else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016825sed 's/^/| /' conftest.$ac_ext >&5
16826
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016827 { echo "$as_me:$LINENO: result: no" >&5
16828echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016829
16830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016831
16832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016833{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16834echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016835cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016836/* confdefs.h. */
16837_ACEOF
16838cat confdefs.h >>conftest.$ac_ext
16839cat >>conftest.$ac_ext <<_ACEOF
16840/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016841#include <unistd.h>
16842int
16843main ()
16844{
16845void *x=fdatasync
16846 ;
16847 return 0;
16848}
16849_ACEOF
16850rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851if { (ac_try="$ac_compile"
16852case "(($ac_try" in
16853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16854 *) ac_try_echo=$ac_try;;
16855esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016859 grep -v '^ *+' conftest.er1 >conftest.err
16860 rm -f conftest.er1
16861 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863 (exit $ac_status); } && {
16864 test -z "$ac_c_werror_flag" ||
16865 test ! -s conftest.err
16866 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016867
16868cat >>confdefs.h <<\_ACEOF
16869#define HAVE_FDATASYNC 1
16870_ACEOF
16871
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016872 { echo "$as_me:$LINENO: result: yes" >&5
16873echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016874else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016876sed 's/^/| /' conftest.$ac_ext >&5
16877
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016878 { echo "$as_me:$LINENO: result: no" >&5
16879echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016880
16881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016882
16883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016884{ echo "$as_me:$LINENO: checking for epoll" >&5
16885echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016886cat >conftest.$ac_ext <<_ACEOF
16887/* confdefs.h. */
16888_ACEOF
16889cat confdefs.h >>conftest.$ac_ext
16890cat >>conftest.$ac_ext <<_ACEOF
16891/* end confdefs.h. */
16892#include <sys/epoll.h>
16893int
16894main ()
16895{
16896void *x=epoll_create
16897 ;
16898 return 0;
16899}
16900_ACEOF
16901rm -f conftest.$ac_objext
16902if { (ac_try="$ac_compile"
16903case "(($ac_try" in
16904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16905 *) ac_try_echo=$ac_try;;
16906esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016908 (eval "$ac_compile") 2>conftest.er1
16909 ac_status=$?
16910 grep -v '^ *+' conftest.er1 >conftest.err
16911 rm -f conftest.er1
16912 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016914 (exit $ac_status); } && {
16915 test -z "$ac_c_werror_flag" ||
16916 test ! -s conftest.err
16917 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016918
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016919cat >>confdefs.h <<\_ACEOF
16920#define HAVE_EPOLL 1
16921_ACEOF
16922
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016923 { echo "$as_me:$LINENO: result: yes" >&5
16924echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016925else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016926 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016927sed 's/^/| /' conftest.$ac_ext >&5
16928
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016929 { echo "$as_me:$LINENO: result: no" >&5
16930echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016931
16932fi
16933
16934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016935{ echo "$as_me:$LINENO: checking for kqueue" >&5
16936echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016937cat >conftest.$ac_ext <<_ACEOF
16938/* confdefs.h. */
16939_ACEOF
16940cat confdefs.h >>conftest.$ac_ext
16941cat >>conftest.$ac_ext <<_ACEOF
16942/* end confdefs.h. */
16943
16944#include <sys/types.h>
16945#include <sys/event.h>
16946
16947int
16948main ()
16949{
16950int x=kqueue()
16951 ;
16952 return 0;
16953}
16954_ACEOF
16955rm -f conftest.$ac_objext
16956if { (ac_try="$ac_compile"
16957case "(($ac_try" in
16958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16959 *) ac_try_echo=$ac_try;;
16960esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016962 (eval "$ac_compile") 2>conftest.er1
16963 ac_status=$?
16964 grep -v '^ *+' conftest.er1 >conftest.err
16965 rm -f conftest.er1
16966 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016968 (exit $ac_status); } && {
16969 test -z "$ac_c_werror_flag" ||
16970 test ! -s conftest.err
16971 } && test -s conftest.$ac_objext; then
16972
16973cat >>confdefs.h <<\_ACEOF
16974#define HAVE_KQUEUE 1
16975_ACEOF
16976
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016977 { echo "$as_me:$LINENO: result: yes" >&5
16978echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016979else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016980 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016981sed 's/^/| /' conftest.$ac_ext >&5
16982
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016983 { echo "$as_me:$LINENO: result: no" >&5
16984echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016985
16986fi
16987
16988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016989# On some systems (eg. FreeBSD 5), we would find a definition of the
16990# functions ctermid_r, setgroups in the library, but no prototype
16991# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16992# address to avoid compiler warnings and potential miscompilations
16993# because of the missing prototypes.
16994
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016995{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16996echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016998/* confdefs.h. */
16999_ACEOF
17000cat confdefs.h >>conftest.$ac_ext
17001cat >>conftest.$ac_ext <<_ACEOF
17002/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017003
17004#include "confdefs.h"
17005#include <stdio.h>
17006
Martin v. Löwisd5843682002-11-21 20:41:28 +000017007int
17008main ()
17009{
17010void* p = ctermid_r
17011 ;
17012 return 0;
17013}
17014_ACEOF
17015rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016if { (ac_try="$ac_compile"
17017case "(($ac_try" in
17018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17019 *) ac_try_echo=$ac_try;;
17020esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017024 grep -v '^ *+' conftest.er1 >conftest.err
17025 rm -f conftest.er1
17026 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028 (exit $ac_status); } && {
17029 test -z "$ac_c_werror_flag" ||
17030 test ! -s conftest.err
17031 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017032
17033cat >>confdefs.h <<\_ACEOF
17034#define HAVE_CTERMID_R 1
17035_ACEOF
17036
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017037 { echo "$as_me:$LINENO: result: yes" >&5
17038echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017039else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017041sed 's/^/| /' conftest.$ac_ext >&5
17042
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017043 { echo "$as_me:$LINENO: result: no" >&5
17044echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017045
17046fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17049
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017050{ echo "$as_me:$LINENO: checking for flock" >&5
17051echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017053/* confdefs.h. */
17054_ACEOF
17055cat confdefs.h >>conftest.$ac_ext
17056cat >>conftest.$ac_ext <<_ACEOF
17057/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017058
17059#include "confdefs.h"
17060#include <sys/file.h>
17061
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017062int
17063main ()
17064{
17065void* p = flock
17066 ;
17067 return 0;
17068}
17069_ACEOF
17070rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017071if { (ac_try="$ac_compile"
17072case "(($ac_try" in
17073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17074 *) ac_try_echo=$ac_try;;
17075esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017079 grep -v '^ *+' conftest.er1 >conftest.err
17080 rm -f conftest.er1
17081 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017083 (exit $ac_status); } && {
17084 test -z "$ac_c_werror_flag" ||
17085 test ! -s conftest.err
17086 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017087
17088cat >>confdefs.h <<\_ACEOF
17089#define HAVE_FLOCK 1
17090_ACEOF
17091
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017092 { echo "$as_me:$LINENO: result: yes" >&5
17093echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017094else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017096sed 's/^/| /' conftest.$ac_ext >&5
17097
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017098 { echo "$as_me:$LINENO: result: no" >&5
17099echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017100
17101fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17104
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017105{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17106echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017108/* confdefs.h. */
17109_ACEOF
17110cat confdefs.h >>conftest.$ac_ext
17111cat >>conftest.$ac_ext <<_ACEOF
17112/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017113
17114#include "confdefs.h"
17115#include <unistd.h>
17116
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017117int
17118main ()
17119{
17120void* p = getpagesize
17121 ;
17122 return 0;
17123}
17124_ACEOF
17125rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017126if { (ac_try="$ac_compile"
17127case "(($ac_try" in
17128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17129 *) ac_try_echo=$ac_try;;
17130esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017134 grep -v '^ *+' conftest.er1 >conftest.err
17135 rm -f conftest.er1
17136 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017138 (exit $ac_status); } && {
17139 test -z "$ac_c_werror_flag" ||
17140 test ! -s conftest.err
17141 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017142
17143cat >>confdefs.h <<\_ACEOF
17144#define HAVE_GETPAGESIZE 1
17145_ACEOF
17146
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017147 { echo "$as_me:$LINENO: result: yes" >&5
17148echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017149else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017151sed 's/^/| /' conftest.$ac_ext >&5
17152
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017153 { echo "$as_me:$LINENO: result: no" >&5
17154echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017155
17156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017157
17158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017159
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017160for ac_prog in true
17161do
17162 # Extract the first word of "$ac_prog", so it can be a program name with args.
17163set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017164{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17165echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017166if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017167 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017168else
17169 if test -n "$TRUE"; then
17170 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17171else
17172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17173for as_dir in $PATH
17174do
17175 IFS=$as_save_IFS
17176 test -z "$as_dir" && as_dir=.
17177 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017178 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 +000017179 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017180 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017181 break 2
17182 fi
17183done
17184done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017186
17187fi
17188fi
17189TRUE=$ac_cv_prog_TRUE
17190if test -n "$TRUE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017191 { echo "$as_me:$LINENO: result: $TRUE" >&5
17192echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017193else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017194 { echo "$as_me:$LINENO: result: no" >&5
17195echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017196fi
17197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017199 test -n "$TRUE" && break
17200done
17201test -n "$TRUE" || TRUE="/bin/true"
17202
17203
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017204{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17205echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017206if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017207 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017208else
17209 ac_check_lib_save_LIBS=$LIBS
17210LIBS="-lc $LIBS"
17211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017212/* confdefs.h. */
17213_ACEOF
17214cat confdefs.h >>conftest.$ac_ext
17215cat >>conftest.$ac_ext <<_ACEOF
17216/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218/* Override any GCC internal prototype to avoid an error.
17219 Use char because int might match the return type of a GCC
17220 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017221#ifdef __cplusplus
17222extern "C"
17223#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017224char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017225int
17226main ()
17227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017229 ;
17230 return 0;
17231}
17232_ACEOF
17233rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017234if { (ac_try="$ac_link"
17235case "(($ac_try" in
17236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17237 *) ac_try_echo=$ac_try;;
17238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017242 grep -v '^ *+' conftest.er1 >conftest.err
17243 rm -f conftest.er1
17244 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246 (exit $ac_status); } && {
17247 test -z "$ac_c_werror_flag" ||
17248 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017249 } && test -s conftest$ac_exeext &&
17250 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017251 ac_cv_lib_c_inet_aton=yes
17252else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017254sed 's/^/| /' conftest.$ac_ext >&5
17255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258
17259rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017261LIBS=$ac_check_lib_save_LIBS
17262fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017263{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17264echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17265if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017266 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017267else
17268
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017269{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17270echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017271if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017272 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017273else
17274 ac_check_lib_save_LIBS=$LIBS
17275LIBS="-lresolv $LIBS"
17276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017277/* confdefs.h. */
17278_ACEOF
17279cat confdefs.h >>conftest.$ac_ext
17280cat >>conftest.$ac_ext <<_ACEOF
17281/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283/* Override any GCC internal prototype to avoid an error.
17284 Use char because int might match the return type of a GCC
17285 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017286#ifdef __cplusplus
17287extern "C"
17288#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017289char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017290int
17291main ()
17292{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017294 ;
17295 return 0;
17296}
17297_ACEOF
17298rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299if { (ac_try="$ac_link"
17300case "(($ac_try" in
17301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17302 *) ac_try_echo=$ac_try;;
17303esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017307 grep -v '^ *+' conftest.er1 >conftest.err
17308 rm -f conftest.er1
17309 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311 (exit $ac_status); } && {
17312 test -z "$ac_c_werror_flag" ||
17313 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017314 } && test -s conftest$ac_exeext &&
17315 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017316 ac_cv_lib_resolv_inet_aton=yes
17317else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017319sed 's/^/| /' conftest.$ac_ext >&5
17320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323
17324rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017325 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017326LIBS=$ac_check_lib_save_LIBS
17327fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017328{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17329echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17330if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017331 cat >>confdefs.h <<_ACEOF
17332#define HAVE_LIBRESOLV 1
17333_ACEOF
17334
17335 LIBS="-lresolv $LIBS"
17336
17337fi
17338
17339
17340fi
17341
17342
Christian Heimesd0764e22007-12-04 15:00:33 +000017343# On Tru64, chflags seems to be present, but calling it will
17344# exit Python
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017345{ echo "$as_me:$LINENO: checking for chflags" >&5
17346echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017347if test "${ac_cv_have_chflags+set}" = set; then
17348 echo $ECHO_N "(cached) $ECHO_C" >&6
17349else
17350 if test "$cross_compiling" = yes; then
17351 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000017352else
17353 cat >conftest.$ac_ext <<_ACEOF
17354/* confdefs.h. */
17355_ACEOF
17356cat confdefs.h >>conftest.$ac_ext
17357cat >>conftest.$ac_ext <<_ACEOF
17358/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017359[
Christian Heimesd0764e22007-12-04 15:00:33 +000017360#include <sys/stat.h>
17361#include <unistd.h>
17362int main(int argc, char*argv[])
17363{
17364 if(chflags(argv[0], 0) != 0)
17365 return 1;
17366 return 0;
17367}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017368]
Christian Heimesd0764e22007-12-04 15:00:33 +000017369_ACEOF
17370rm -f conftest$ac_exeext
17371if { (ac_try="$ac_link"
17372case "(($ac_try" in
17373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17374 *) ac_try_echo=$ac_try;;
17375esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017377 (eval "$ac_link") 2>&5
17378 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017380 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17381 { (case "(($ac_try" in
17382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17383 *) ac_try_echo=$ac_try;;
17384esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017386 (eval "$ac_try") 2>&5
17387 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017389 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017390 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017391else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017392 echo "$as_me: program exited with status $ac_status" >&5
17393echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017394sed 's/^/| /' conftest.$ac_ext >&5
17395
17396( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017397ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017398fi
17399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17400fi
17401
17402
17403
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017404fi
17405{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
17406echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
17407if test "$ac_cv_have_chflags" = cross ; then
17408 { echo "$as_me:$LINENO: checking for chflags" >&5
17409echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17410if test "${ac_cv_func_chflags+set}" = set; then
17411 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesd0764e22007-12-04 15:00:33 +000017412else
17413 cat >conftest.$ac_ext <<_ACEOF
17414/* confdefs.h. */
17415_ACEOF
17416cat confdefs.h >>conftest.$ac_ext
17417cat >>conftest.$ac_ext <<_ACEOF
17418/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017419/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
17420 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17421#define chflags innocuous_chflags
Christian Heimesd0764e22007-12-04 15:00:33 +000017422
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017423/* System header to define __stub macros and hopefully few prototypes,
17424 which can conflict with char chflags (); below.
17425 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17426 <limits.h> exists even on freestanding compilers. */
17427
17428#ifdef __STDC__
17429# include <limits.h>
17430#else
17431# include <assert.h>
17432#endif
17433
17434#undef chflags
17435
17436/* Override any GCC internal prototype to avoid an error.
17437 Use char because int might match the return type of a GCC
17438 builtin and then its argument prototype would still apply. */
17439#ifdef __cplusplus
17440extern "C"
17441#endif
17442char chflags ();
17443/* The GNU C library defines this for functions which it implements
17444 to always fail with ENOSYS. Some functions are actually named
17445 something starting with __ and the normal name is an alias. */
17446#if defined __stub_chflags || defined __stub___chflags
17447choke me
17448#endif
17449
17450int
17451main ()
17452{
17453return chflags ();
17454 ;
17455 return 0;
17456}
17457_ACEOF
17458rm -f conftest.$ac_objext conftest$ac_exeext
17459if { (ac_try="$ac_link"
17460case "(($ac_try" in
17461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17462 *) ac_try_echo=$ac_try;;
17463esac
17464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17465 (eval "$ac_link") 2>conftest.er1
17466 ac_status=$?
17467 grep -v '^ *+' conftest.er1 >conftest.err
17468 rm -f conftest.er1
17469 cat conftest.err >&5
17470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17471 (exit $ac_status); } && {
17472 test -z "$ac_c_werror_flag" ||
17473 test ! -s conftest.err
17474 } && test -s conftest$ac_exeext &&
17475 $as_test_x conftest$ac_exeext; then
17476 ac_cv_func_chflags=yes
17477else
17478 echo "$as_me: failed program was:" >&5
17479sed 's/^/| /' conftest.$ac_ext >&5
17480
17481 ac_cv_func_chflags=no
17482fi
17483
17484rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17485 conftest$ac_exeext conftest.$ac_ext
17486fi
17487{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
17488echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
17489if test $ac_cv_func_chflags = yes; then
17490 ac_cv_have_chflags="yes"
17491else
17492 ac_cv_have_chflags="no"
17493fi
17494
17495fi
17496if test "$ac_cv_have_chflags" = yes ; then
17497
17498cat >>confdefs.h <<\_ACEOF
17499#define HAVE_CHFLAGS 1
17500_ACEOF
17501
17502fi
17503
17504{ echo "$as_me:$LINENO: checking for lchflags" >&5
17505echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17506if test "${ac_cv_have_lchflags+set}" = set; then
17507 echo $ECHO_N "(cached) $ECHO_C" >&6
17508else
17509 if test "$cross_compiling" = yes; then
17510 ac_cv_have_lchflags=cross
17511else
17512 cat >conftest.$ac_ext <<_ACEOF
17513/* confdefs.h. */
17514_ACEOF
17515cat confdefs.h >>conftest.$ac_ext
17516cat >>conftest.$ac_ext <<_ACEOF
17517/* end confdefs.h. */
17518[
Christian Heimesd0764e22007-12-04 15:00:33 +000017519#include <sys/stat.h>
17520#include <unistd.h>
17521int main(int argc, char*argv[])
17522{
17523 if(lchflags(argv[0], 0) != 0)
17524 return 1;
17525 return 0;
17526}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017527]
Christian Heimesd0764e22007-12-04 15:00:33 +000017528_ACEOF
17529rm -f conftest$ac_exeext
17530if { (ac_try="$ac_link"
17531case "(($ac_try" in
17532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17533 *) ac_try_echo=$ac_try;;
17534esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017536 (eval "$ac_link") 2>&5
17537 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017539 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17540 { (case "(($ac_try" in
17541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17542 *) ac_try_echo=$ac_try;;
17543esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017545 (eval "$ac_try") 2>&5
17546 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017548 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017549 ac_cv_have_lchflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017550else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017551 echo "$as_me: program exited with status $ac_status" >&5
17552echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017553sed 's/^/| /' conftest.$ac_ext >&5
17554
17555( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017556ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017557fi
17558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17559fi
17560
17561
17562
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017563fi
17564{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
17565echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
17566if test "$ac_cv_have_lchflags" = cross ; then
17567 { echo "$as_me:$LINENO: checking for lchflags" >&5
17568echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17569if test "${ac_cv_func_lchflags+set}" = set; then
17570 echo $ECHO_N "(cached) $ECHO_C" >&6
17571else
17572 cat >conftest.$ac_ext <<_ACEOF
17573/* confdefs.h. */
17574_ACEOF
17575cat confdefs.h >>conftest.$ac_ext
17576cat >>conftest.$ac_ext <<_ACEOF
17577/* end confdefs.h. */
17578/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
17579 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17580#define lchflags innocuous_lchflags
17581
17582/* System header to define __stub macros and hopefully few prototypes,
17583 which can conflict with char lchflags (); below.
17584 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17585 <limits.h> exists even on freestanding compilers. */
17586
17587#ifdef __STDC__
17588# include <limits.h>
17589#else
17590# include <assert.h>
17591#endif
17592
17593#undef lchflags
17594
17595/* Override any GCC internal prototype to avoid an error.
17596 Use char because int might match the return type of a GCC
17597 builtin and then its argument prototype would still apply. */
17598#ifdef __cplusplus
17599extern "C"
17600#endif
17601char lchflags ();
17602/* The GNU C library defines this for functions which it implements
17603 to always fail with ENOSYS. Some functions are actually named
17604 something starting with __ and the normal name is an alias. */
17605#if defined __stub_lchflags || defined __stub___lchflags
17606choke me
17607#endif
17608
17609int
17610main ()
17611{
17612return lchflags ();
17613 ;
17614 return 0;
17615}
17616_ACEOF
17617rm -f conftest.$ac_objext conftest$ac_exeext
17618if { (ac_try="$ac_link"
17619case "(($ac_try" in
17620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17621 *) ac_try_echo=$ac_try;;
17622esac
17623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17624 (eval "$ac_link") 2>conftest.er1
17625 ac_status=$?
17626 grep -v '^ *+' conftest.er1 >conftest.err
17627 rm -f conftest.er1
17628 cat conftest.err >&5
17629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17630 (exit $ac_status); } && {
17631 test -z "$ac_c_werror_flag" ||
17632 test ! -s conftest.err
17633 } && test -s conftest$ac_exeext &&
17634 $as_test_x conftest$ac_exeext; then
17635 ac_cv_func_lchflags=yes
17636else
17637 echo "$as_me: failed program was:" >&5
17638sed 's/^/| /' conftest.$ac_ext >&5
17639
17640 ac_cv_func_lchflags=no
17641fi
17642
17643rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17644 conftest$ac_exeext conftest.$ac_ext
17645fi
17646{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
17647echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
17648if test $ac_cv_func_lchflags = yes; then
17649 ac_cv_have_lchflags="yes"
17650else
17651 ac_cv_have_lchflags="no"
17652fi
17653
17654fi
17655if test "$ac_cv_have_lchflags" = yes ; then
17656
17657cat >>confdefs.h <<\_ACEOF
17658#define HAVE_LCHFLAGS 1
17659_ACEOF
17660
17661fi
17662
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017663case $ac_sys_system/$ac_sys_release in
17664Darwin/*)
17665 _CUR_CFLAGS="${CFLAGS}"
17666 _CUR_LDFLAGS="${LDFLAGS}"
17667 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17668 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17669 ;;
17670esac
17671
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017672{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17673echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017674if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017675 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017676else
17677 ac_check_lib_save_LIBS=$LIBS
17678LIBS="-lz $LIBS"
17679cat >conftest.$ac_ext <<_ACEOF
17680/* confdefs.h. */
17681_ACEOF
17682cat confdefs.h >>conftest.$ac_ext
17683cat >>conftest.$ac_ext <<_ACEOF
17684/* end confdefs.h. */
17685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686/* Override any GCC internal prototype to avoid an error.
17687 Use char because int might match the return type of a GCC
17688 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017689#ifdef __cplusplus
17690extern "C"
17691#endif
17692char inflateCopy ();
17693int
17694main ()
17695{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017696return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017697 ;
17698 return 0;
17699}
17700_ACEOF
17701rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702if { (ac_try="$ac_link"
17703case "(($ac_try" in
17704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17705 *) ac_try_echo=$ac_try;;
17706esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017708 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017709 ac_status=$?
17710 grep -v '^ *+' conftest.er1 >conftest.err
17711 rm -f conftest.er1
17712 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017714 (exit $ac_status); } && {
17715 test -z "$ac_c_werror_flag" ||
17716 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017717 } && test -s conftest$ac_exeext &&
17718 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017719 ac_cv_lib_z_inflateCopy=yes
17720else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017721 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017722sed 's/^/| /' conftest.$ac_ext >&5
17723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726
17727rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017728 conftest$ac_exeext conftest.$ac_ext
17729LIBS=$ac_check_lib_save_LIBS
17730fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017731{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17732echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17733if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017734
17735cat >>confdefs.h <<\_ACEOF
17736#define HAVE_ZLIB_COPY 1
17737_ACEOF
17738
17739fi
17740
17741
17742case $ac_sys_system/$ac_sys_release in
17743Darwin/*)
17744 CFLAGS="${_CUR_CFLAGS}"
17745 LDFLAGS="${_CUR_LDFLAGS}"
17746 ;;
17747esac
17748
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017749{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17750echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017751cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017752/* confdefs.h. */
17753_ACEOF
17754cat confdefs.h >>conftest.$ac_ext
17755cat >>conftest.$ac_ext <<_ACEOF
17756/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017757
17758#include "confdefs.h"
17759#include <netdb.h>
17760
Martin v. Löwise9416172003-05-03 10:12:45 +000017761int
17762main ()
17763{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017764void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017765 ;
17766 return 0;
17767}
17768_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017769rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770if { (ac_try="$ac_link"
17771case "(($ac_try" in
17772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17773 *) ac_try_echo=$ac_try;;
17774esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017778 grep -v '^ *+' conftest.er1 >conftest.err
17779 rm -f conftest.er1
17780 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782 (exit $ac_status); } && {
17783 test -z "$ac_c_werror_flag" ||
17784 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017785 } && test -s conftest$ac_exeext &&
17786 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017787
17788cat >>confdefs.h <<\_ACEOF
17789#define HAVE_HSTRERROR 1
17790_ACEOF
17791
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017792 { echo "$as_me:$LINENO: result: yes" >&5
17793echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017794else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017796sed 's/^/| /' conftest.$ac_ext >&5
17797
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017798 { echo "$as_me:$LINENO: result: no" >&5
17799echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017800
17801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017802
17803rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017805
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017806{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17807echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017809/* confdefs.h. */
17810_ACEOF
17811cat confdefs.h >>conftest.$ac_ext
17812cat >>conftest.$ac_ext <<_ACEOF
17813/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017814
17815#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017816#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017817#include <sys/socket.h>
17818#include <netinet/in.h>
17819#include <arpa/inet.h>
17820
Martin v. Löwise9416172003-05-03 10:12:45 +000017821int
17822main ()
17823{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017824void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017825 ;
17826 return 0;
17827}
17828_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017829rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017830if { (ac_try="$ac_link"
17831case "(($ac_try" in
17832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17833 *) ac_try_echo=$ac_try;;
17834esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017836 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017838 grep -v '^ *+' conftest.er1 >conftest.err
17839 rm -f conftest.er1
17840 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842 (exit $ac_status); } && {
17843 test -z "$ac_c_werror_flag" ||
17844 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017845 } && test -s conftest$ac_exeext &&
17846 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017847
17848cat >>confdefs.h <<\_ACEOF
17849#define HAVE_INET_ATON 1
17850_ACEOF
17851
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017852 { echo "$as_me:$LINENO: result: yes" >&5
17853echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017854else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017856sed 's/^/| /' conftest.$ac_ext >&5
17857
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017858 { echo "$as_me:$LINENO: result: no" >&5
17859echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017860
17861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017862
17863rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017865
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017866{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17867echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017868cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017869/* confdefs.h. */
17870_ACEOF
17871cat confdefs.h >>conftest.$ac_ext
17872cat >>conftest.$ac_ext <<_ACEOF
17873/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017874
17875#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017876#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017877#include <sys/socket.h>
17878#include <netinet/in.h>
17879#include <arpa/inet.h>
17880
Martin v. Löwise9416172003-05-03 10:12:45 +000017881int
17882main ()
17883{
17884void* p = inet_pton
17885 ;
17886 return 0;
17887}
17888_ACEOF
17889rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017890if { (ac_try="$ac_compile"
17891case "(($ac_try" in
17892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17893 *) ac_try_echo=$ac_try;;
17894esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017898 grep -v '^ *+' conftest.er1 >conftest.err
17899 rm -f conftest.er1
17900 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 (exit $ac_status); } && {
17903 test -z "$ac_c_werror_flag" ||
17904 test ! -s conftest.err
17905 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017906
17907cat >>confdefs.h <<\_ACEOF
17908#define HAVE_INET_PTON 1
17909_ACEOF
17910
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017911 { echo "$as_me:$LINENO: result: yes" >&5
17912echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017913else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017915sed 's/^/| /' conftest.$ac_ext >&5
17916
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017917 { echo "$as_me:$LINENO: result: no" >&5
17918echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017919
17920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921
17922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017923
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017924# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017925{ echo "$as_me:$LINENO: checking for setgroups" >&5
17926echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017927cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017928/* confdefs.h. */
17929_ACEOF
17930cat confdefs.h >>conftest.$ac_ext
17931cat >>conftest.$ac_ext <<_ACEOF
17932/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017933
17934#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017935#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017936#ifdef HAVE_GRP_H
17937#include <grp.h>
17938#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017939
Martin v. Löwisd5843682002-11-21 20:41:28 +000017940int
17941main ()
17942{
17943void* p = setgroups
17944 ;
17945 return 0;
17946}
17947_ACEOF
17948rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949if { (ac_try="$ac_compile"
17950case "(($ac_try" in
17951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17952 *) ac_try_echo=$ac_try;;
17953esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017957 grep -v '^ *+' conftest.er1 >conftest.err
17958 rm -f conftest.er1
17959 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017961 (exit $ac_status); } && {
17962 test -z "$ac_c_werror_flag" ||
17963 test ! -s conftest.err
17964 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017965
17966cat >>confdefs.h <<\_ACEOF
17967#define HAVE_SETGROUPS 1
17968_ACEOF
17969
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017970 { echo "$as_me:$LINENO: result: yes" >&5
17971echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017972else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017974sed 's/^/| /' conftest.$ac_ext >&5
17975
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017976 { echo "$as_me:$LINENO: result: no" >&5
17977echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017978
17979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980
17981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017982
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017983# check for openpty and forkpty
17984
Martin v. Löwis11437992002-04-12 09:54:03 +000017985
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017986for ac_func in openpty
17987do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017988as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17989{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17990echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017992 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017993else
Martin v. Löwis11437992002-04-12 09:54:03 +000017994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017995/* confdefs.h. */
17996_ACEOF
17997cat confdefs.h >>conftest.$ac_ext
17998cat >>conftest.$ac_ext <<_ACEOF
17999/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018000/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18001 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18002#define $ac_func innocuous_$ac_func
18003
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018004/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018005 which can conflict with char $ac_func (); below.
18006 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018007 <limits.h> exists even on freestanding compilers. */
18008
18009#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018010# include <limits.h>
18011#else
18012# include <assert.h>
18013#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018014
18015#undef $ac_func
18016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017/* Override any GCC internal prototype to avoid an error.
18018 Use char because int might match the return type of a GCC
18019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018020#ifdef __cplusplus
18021extern "C"
18022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018023char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018024/* The GNU C library defines this for functions which it implements
18025 to always fail with ENOSYS. Some functions are actually named
18026 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018028choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018029#endif
18030
Skip Montanaro6dead952003-09-25 14:50:04 +000018031int
18032main ()
18033{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018034return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018035 ;
18036 return 0;
18037}
18038_ACEOF
18039rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018040if { (ac_try="$ac_link"
18041case "(($ac_try" in
18042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18043 *) ac_try_echo=$ac_try;;
18044esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018048 grep -v '^ *+' conftest.er1 >conftest.err
18049 rm -f conftest.er1
18050 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052 (exit $ac_status); } && {
18053 test -z "$ac_c_werror_flag" ||
18054 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018055 } && test -s conftest$ac_exeext &&
18056 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018057 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018058else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018060sed 's/^/| /' conftest.$ac_ext >&5
18061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018062 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064
18065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018066 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018067fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018068ac_res=`eval echo '${'$as_ac_var'}'`
18069 { echo "$as_me:$LINENO: result: $ac_res" >&5
18070echo "${ECHO_T}$ac_res" >&6; }
18071if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018072 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018073#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018074_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018075
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018076else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018077 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18078echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018079if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018080 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018081else
Martin v. Löwis11437992002-04-12 09:54:03 +000018082 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018083LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018084cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018085/* confdefs.h. */
18086_ACEOF
18087cat confdefs.h >>conftest.$ac_ext
18088cat >>conftest.$ac_ext <<_ACEOF
18089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091/* Override any GCC internal prototype to avoid an error.
18092 Use char because int might match the return type of a GCC
18093 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018094#ifdef __cplusplus
18095extern "C"
18096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018097char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018098int
18099main ()
18100{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018101return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 ;
18103 return 0;
18104}
18105_ACEOF
18106rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107if { (ac_try="$ac_link"
18108case "(($ac_try" in
18109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18110 *) ac_try_echo=$ac_try;;
18111esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018115 grep -v '^ *+' conftest.er1 >conftest.err
18116 rm -f conftest.er1
18117 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119 (exit $ac_status); } && {
18120 test -z "$ac_c_werror_flag" ||
18121 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018122 } && test -s conftest$ac_exeext &&
18123 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018124 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018125else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018127sed 's/^/| /' conftest.$ac_ext >&5
18128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018129 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131
18132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018134LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018135fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018136{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18137echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18138if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018139 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018140#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018141_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018142 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018143else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018144 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18145echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018146if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018147 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018148else
18149 ac_check_lib_save_LIBS=$LIBS
18150LIBS="-lbsd $LIBS"
18151cat >conftest.$ac_ext <<_ACEOF
18152/* confdefs.h. */
18153_ACEOF
18154cat confdefs.h >>conftest.$ac_ext
18155cat >>conftest.$ac_ext <<_ACEOF
18156/* end confdefs.h. */
18157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158/* Override any GCC internal prototype to avoid an error.
18159 Use char because int might match the return type of a GCC
18160 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018161#ifdef __cplusplus
18162extern "C"
18163#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018164char openpty ();
18165int
18166main ()
18167{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018169 ;
18170 return 0;
18171}
18172_ACEOF
18173rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018174if { (ac_try="$ac_link"
18175case "(($ac_try" in
18176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18177 *) ac_try_echo=$ac_try;;
18178esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018180 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018181 ac_status=$?
18182 grep -v '^ *+' conftest.er1 >conftest.err
18183 rm -f conftest.er1
18184 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018186 (exit $ac_status); } && {
18187 test -z "$ac_c_werror_flag" ||
18188 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018189 } && test -s conftest$ac_exeext &&
18190 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018191 ac_cv_lib_bsd_openpty=yes
18192else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018193 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018194sed 's/^/| /' conftest.$ac_ext >&5
18195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018196 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018198
18199rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018200 conftest$ac_exeext conftest.$ac_ext
18201LIBS=$ac_check_lib_save_LIBS
18202fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018203{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18204echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18205if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018206 cat >>confdefs.h <<\_ACEOF
18207#define HAVE_OPENPTY 1
18208_ACEOF
18209 LIBS="$LIBS -lbsd"
18210fi
18211
18212
18213fi
18214
Fred Drake8cef4cf2000-06-28 16:40:38 +000018215
18216fi
18217done
18218
Martin v. Löwis11437992002-04-12 09:54:03 +000018219
Fred Drake8cef4cf2000-06-28 16:40:38 +000018220for ac_func in forkpty
18221do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018222as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18223{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18224echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018225if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018226 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018227else
Martin v. Löwis11437992002-04-12 09:54:03 +000018228 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018229/* confdefs.h. */
18230_ACEOF
18231cat confdefs.h >>conftest.$ac_ext
18232cat >>conftest.$ac_ext <<_ACEOF
18233/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018234/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18235 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18236#define $ac_func innocuous_$ac_func
18237
Fred Drake8cef4cf2000-06-28 16:40:38 +000018238/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018239 which can conflict with char $ac_func (); below.
18240 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018241 <limits.h> exists even on freestanding compilers. */
18242
18243#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018244# include <limits.h>
18245#else
18246# include <assert.h>
18247#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018248
18249#undef $ac_func
18250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018251/* Override any GCC internal prototype to avoid an error.
18252 Use char because int might match the return type of a GCC
18253 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018254#ifdef __cplusplus
18255extern "C"
18256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018257char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018258/* The GNU C library defines this for functions which it implements
18259 to always fail with ENOSYS. Some functions are actually named
18260 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018262choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018263#endif
18264
Skip Montanaro6dead952003-09-25 14:50:04 +000018265int
18266main ()
18267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018268return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018269 ;
18270 return 0;
18271}
18272_ACEOF
18273rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018274if { (ac_try="$ac_link"
18275case "(($ac_try" in
18276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18277 *) ac_try_echo=$ac_try;;
18278esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018282 grep -v '^ *+' conftest.er1 >conftest.err
18283 rm -f conftest.er1
18284 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018286 (exit $ac_status); } && {
18287 test -z "$ac_c_werror_flag" ||
18288 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018289 } && test -s conftest$ac_exeext &&
18290 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018291 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018292else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018294sed 's/^/| /' conftest.$ac_ext >&5
18295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018296 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018298
18299rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018300 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018301fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018302ac_res=`eval echo '${'$as_ac_var'}'`
18303 { echo "$as_me:$LINENO: result: $ac_res" >&5
18304echo "${ECHO_T}$ac_res" >&6; }
18305if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018306 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018307#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018308_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018309
Fred Drake8cef4cf2000-06-28 16:40:38 +000018310else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018311 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18312echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018313if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018314 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018315else
Martin v. Löwis11437992002-04-12 09:54:03 +000018316 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018317LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018318cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018319/* confdefs.h. */
18320_ACEOF
18321cat confdefs.h >>conftest.$ac_ext
18322cat >>conftest.$ac_ext <<_ACEOF
18323/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018325/* Override any GCC internal prototype to avoid an error.
18326 Use char because int might match the return type of a GCC
18327 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018328#ifdef __cplusplus
18329extern "C"
18330#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018331char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018332int
18333main ()
18334{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018335return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018336 ;
18337 return 0;
18338}
18339_ACEOF
18340rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018341if { (ac_try="$ac_link"
18342case "(($ac_try" in
18343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18344 *) ac_try_echo=$ac_try;;
18345esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018349 grep -v '^ *+' conftest.er1 >conftest.err
18350 rm -f conftest.er1
18351 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018353 (exit $ac_status); } && {
18354 test -z "$ac_c_werror_flag" ||
18355 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018356 } && test -s conftest$ac_exeext &&
18357 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018358 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018359else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018361sed 's/^/| /' conftest.$ac_ext >&5
18362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018363 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018365
18366rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018367 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018368LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018369fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018370{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18371echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18372if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018373 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018374#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018375_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018376 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018377else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018378 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18379echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018380if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018381 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018382else
18383 ac_check_lib_save_LIBS=$LIBS
18384LIBS="-lbsd $LIBS"
18385cat >conftest.$ac_ext <<_ACEOF
18386/* confdefs.h. */
18387_ACEOF
18388cat confdefs.h >>conftest.$ac_ext
18389cat >>conftest.$ac_ext <<_ACEOF
18390/* end confdefs.h. */
18391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392/* Override any GCC internal prototype to avoid an error.
18393 Use char because int might match the return type of a GCC
18394 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018395#ifdef __cplusplus
18396extern "C"
18397#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018398char forkpty ();
18399int
18400main ()
18401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018403 ;
18404 return 0;
18405}
18406_ACEOF
18407rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018408if { (ac_try="$ac_link"
18409case "(($ac_try" in
18410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18411 *) ac_try_echo=$ac_try;;
18412esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018414 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018415 ac_status=$?
18416 grep -v '^ *+' conftest.er1 >conftest.err
18417 rm -f conftest.er1
18418 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420 (exit $ac_status); } && {
18421 test -z "$ac_c_werror_flag" ||
18422 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018423 } && test -s conftest$ac_exeext &&
18424 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018425 ac_cv_lib_bsd_forkpty=yes
18426else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018427 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018428sed 's/^/| /' conftest.$ac_ext >&5
18429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018432
18433rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018434 conftest$ac_exeext conftest.$ac_ext
18435LIBS=$ac_check_lib_save_LIBS
18436fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018437{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18438echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18439if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018440 cat >>confdefs.h <<\_ACEOF
18441#define HAVE_FORKPTY 1
18442_ACEOF
18443 LIBS="$LIBS -lbsd"
18444fi
18445
18446
18447fi
18448
Fred Drake8cef4cf2000-06-28 16:40:38 +000018449
18450fi
18451done
18452
Jack Jansendd19cf82001-12-06 22:36:17 +000018453
Christian Heimesb186d002008-03-18 15:15:01 +000018454# Stuff for expat.
18455
18456for ac_func in memmove
18457do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018458as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18459{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18460echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018461if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018462 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018463else
18464 cat >conftest.$ac_ext <<_ACEOF
18465/* confdefs.h. */
18466_ACEOF
18467cat confdefs.h >>conftest.$ac_ext
18468cat >>conftest.$ac_ext <<_ACEOF
18469/* end confdefs.h. */
18470/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18471 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18472#define $ac_func innocuous_$ac_func
18473
18474/* System header to define __stub macros and hopefully few prototypes,
18475 which can conflict with char $ac_func (); below.
18476 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18477 <limits.h> exists even on freestanding compilers. */
18478
18479#ifdef __STDC__
18480# include <limits.h>
18481#else
18482# include <assert.h>
18483#endif
18484
18485#undef $ac_func
18486
18487/* Override any GCC internal prototype to avoid an error.
18488 Use char because int might match the return type of a GCC
18489 builtin and then its argument prototype would still apply. */
18490#ifdef __cplusplus
18491extern "C"
18492#endif
18493char $ac_func ();
18494/* The GNU C library defines this for functions which it implements
18495 to always fail with ENOSYS. Some functions are actually named
18496 something starting with __ and the normal name is an alias. */
18497#if defined __stub_$ac_func || defined __stub___$ac_func
18498choke me
18499#endif
18500
18501int
18502main ()
18503{
18504return $ac_func ();
18505 ;
18506 return 0;
18507}
18508_ACEOF
18509rm -f conftest.$ac_objext conftest$ac_exeext
18510if { (ac_try="$ac_link"
18511case "(($ac_try" in
18512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18513 *) ac_try_echo=$ac_try;;
18514esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018516 (eval "$ac_link") 2>conftest.er1
18517 ac_status=$?
18518 grep -v '^ *+' conftest.er1 >conftest.err
18519 rm -f conftest.er1
18520 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018522 (exit $ac_status); } && {
18523 test -z "$ac_c_werror_flag" ||
18524 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018525 } && test -s conftest$ac_exeext &&
18526 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018527 eval "$as_ac_var=yes"
18528else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018529 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018530sed 's/^/| /' conftest.$ac_ext >&5
18531
18532 eval "$as_ac_var=no"
18533fi
18534
18535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18536 conftest$ac_exeext conftest.$ac_ext
18537fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018538ac_res=`eval echo '${'$as_ac_var'}'`
18539 { echo "$as_me:$LINENO: result: $ac_res" >&5
18540echo "${ECHO_T}$ac_res" >&6; }
18541if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018542 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018543#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018544_ACEOF
18545
18546fi
18547done
18548
18549
Michael W. Hudson54241132001-12-07 15:38:26 +000018550# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018551
18552
18553
18554
18555
18556
Fred Drake8cef4cf2000-06-28 16:40:38 +000018557for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18558do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018559as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18560{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18561echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018563 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018564else
Martin v. Löwis11437992002-04-12 09:54:03 +000018565 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018566/* confdefs.h. */
18567_ACEOF
18568cat confdefs.h >>conftest.$ac_ext
18569cat >>conftest.$ac_ext <<_ACEOF
18570/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018571/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18572 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18573#define $ac_func innocuous_$ac_func
18574
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018575/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018576 which can conflict with char $ac_func (); below.
18577 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018578 <limits.h> exists even on freestanding compilers. */
18579
18580#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018581# include <limits.h>
18582#else
18583# include <assert.h>
18584#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018585
18586#undef $ac_func
18587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018588/* Override any GCC internal prototype to avoid an error.
18589 Use char because int might match the return type of a GCC
18590 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018591#ifdef __cplusplus
18592extern "C"
18593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018594char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018595/* The GNU C library defines this for functions which it implements
18596 to always fail with ENOSYS. Some functions are actually named
18597 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018598#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018599choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018600#endif
18601
Skip Montanaro6dead952003-09-25 14:50:04 +000018602int
18603main ()
18604{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018605return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018606 ;
18607 return 0;
18608}
18609_ACEOF
18610rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611if { (ac_try="$ac_link"
18612case "(($ac_try" in
18613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18614 *) ac_try_echo=$ac_try;;
18615esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018617 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018619 grep -v '^ *+' conftest.er1 >conftest.err
18620 rm -f conftest.er1
18621 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018623 (exit $ac_status); } && {
18624 test -z "$ac_c_werror_flag" ||
18625 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018626 } && test -s conftest$ac_exeext &&
18627 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018628 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018629else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018631sed 's/^/| /' conftest.$ac_ext >&5
18632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018633 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635
18636rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018637 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018638fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018639ac_res=`eval echo '${'$as_ac_var'}'`
18640 { echo "$as_me:$LINENO: result: $ac_res" >&5
18641echo "${ECHO_T}$ac_res" >&6; }
18642if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018643 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018644#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018645_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018646
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018647fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018648done
18649
Michael W. Hudson54241132001-12-07 15:38:26 +000018650
Martin v. Löwis11437992002-04-12 09:54:03 +000018651
18652
18653
Christian Heimesb186d002008-03-18 15:15:01 +000018654for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018655do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018656as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18657{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18658echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018659if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018660 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018661else
Martin v. Löwis11437992002-04-12 09:54:03 +000018662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018663/* confdefs.h. */
18664_ACEOF
18665cat confdefs.h >>conftest.$ac_ext
18666cat >>conftest.$ac_ext <<_ACEOF
18667/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018668/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18669 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18670#define $ac_func innocuous_$ac_func
18671
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018672/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018673 which can conflict with char $ac_func (); below.
18674 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018675 <limits.h> exists even on freestanding compilers. */
18676
18677#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018678# include <limits.h>
18679#else
18680# include <assert.h>
18681#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018682
18683#undef $ac_func
18684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018685/* Override any GCC internal prototype to avoid an error.
18686 Use char because int might match the return type of a GCC
18687 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018688#ifdef __cplusplus
18689extern "C"
18690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018691char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018692/* The GNU C library defines this for functions which it implements
18693 to always fail with ENOSYS. Some functions are actually named
18694 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018695#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018696choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018697#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018698
Skip Montanaro6dead952003-09-25 14:50:04 +000018699int
18700main ()
18701{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018702return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018703 ;
18704 return 0;
18705}
18706_ACEOF
18707rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018708if { (ac_try="$ac_link"
18709case "(($ac_try" in
18710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18711 *) ac_try_echo=$ac_try;;
18712esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018714 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018716 grep -v '^ *+' conftest.er1 >conftest.err
18717 rm -f conftest.er1
18718 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018720 (exit $ac_status); } && {
18721 test -z "$ac_c_werror_flag" ||
18722 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018723 } && test -s conftest$ac_exeext &&
18724 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018725 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018726else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018728sed 's/^/| /' conftest.$ac_ext >&5
18729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018730 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018732
18733rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018735fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018736ac_res=`eval echo '${'$as_ac_var'}'`
18737 { echo "$as_me:$LINENO: result: $ac_res" >&5
18738echo "${ECHO_T}$ac_res" >&6; }
18739if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018740 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018741#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018742_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018743
Martin v. Löwis1142de32002-03-29 16:28:31 +000018744else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018745 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018746 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018747 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18748 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018749esac
18750
Martin v. Löwis1142de32002-03-29 16:28:31 +000018751fi
18752done
18753
18754
Martin v. Löwis11437992002-04-12 09:54:03 +000018755
Martin v. Löwis1142de32002-03-29 16:28:31 +000018756for ac_func in getpgrp
18757do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018758as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18759{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18760echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018761if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018762 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018763else
Martin v. Löwis11437992002-04-12 09:54:03 +000018764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018765/* confdefs.h. */
18766_ACEOF
18767cat confdefs.h >>conftest.$ac_ext
18768cat >>conftest.$ac_ext <<_ACEOF
18769/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018770/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18771 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18772#define $ac_func innocuous_$ac_func
18773
Martin v. Löwis1142de32002-03-29 16:28:31 +000018774/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018775 which can conflict with char $ac_func (); below.
18776 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018777 <limits.h> exists even on freestanding compilers. */
18778
18779#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018780# include <limits.h>
18781#else
18782# include <assert.h>
18783#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018784
18785#undef $ac_func
18786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018787/* Override any GCC internal prototype to avoid an error.
18788 Use char because int might match the return type of a GCC
18789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018790#ifdef __cplusplus
18791extern "C"
18792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018793char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018794/* The GNU C library defines this for functions which it implements
18795 to always fail with ENOSYS. Some functions are actually named
18796 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018797#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018798choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018799#endif
18800
Skip Montanaro6dead952003-09-25 14:50:04 +000018801int
18802main ()
18803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018804return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018805 ;
18806 return 0;
18807}
18808_ACEOF
18809rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018810if { (ac_try="$ac_link"
18811case "(($ac_try" in
18812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18813 *) ac_try_echo=$ac_try;;
18814esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018816 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018818 grep -v '^ *+' conftest.er1 >conftest.err
18819 rm -f conftest.er1
18820 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018822 (exit $ac_status); } && {
18823 test -z "$ac_c_werror_flag" ||
18824 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018825 } && test -s conftest$ac_exeext &&
18826 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018827 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018828else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018830sed 's/^/| /' conftest.$ac_ext >&5
18831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018832 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018834
18835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018836 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018837fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018838ac_res=`eval echo '${'$as_ac_var'}'`
18839 { echo "$as_me:$LINENO: result: $ac_res" >&5
18840echo "${ECHO_T}$ac_res" >&6; }
18841if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018842 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018843#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018844_ACEOF
18845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018846/* confdefs.h. */
18847_ACEOF
18848cat confdefs.h >>conftest.$ac_ext
18849cat >>conftest.$ac_ext <<_ACEOF
18850/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018851#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018852int
18853main ()
18854{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018855getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018856 ;
18857 return 0;
18858}
18859_ACEOF
18860rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018861if { (ac_try="$ac_compile"
18862case "(($ac_try" in
18863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18864 *) ac_try_echo=$ac_try;;
18865esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018867 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018869 grep -v '^ *+' conftest.er1 >conftest.err
18870 rm -f conftest.er1
18871 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018873 (exit $ac_status); } && {
18874 test -z "$ac_c_werror_flag" ||
18875 test ! -s conftest.err
18876 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018877
18878cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018879#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018880_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018881
Martin v. Löwis11437992002-04-12 09:54:03 +000018882
Guido van Rossumf78abae1997-01-21 22:02:36 +000018883else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018885sed 's/^/| /' conftest.$ac_ext >&5
18886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018887
Guido van Rossum627b2d71993-12-24 10:39:16 +000018888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018889
18890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018891
Guido van Rossum627b2d71993-12-24 10:39:16 +000018892fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018893done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018894
Jack Jansen150753c2003-03-29 22:07:47 +000018895
18896for ac_func in setpgrp
18897do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018898as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18899{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18900echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018901if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018902 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018903else
Martin v. Löwis11437992002-04-12 09:54:03 +000018904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018905/* confdefs.h. */
18906_ACEOF
18907cat confdefs.h >>conftest.$ac_ext
18908cat >>conftest.$ac_ext <<_ACEOF
18909/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018910/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18911 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18912#define $ac_func innocuous_$ac_func
18913
Jack Jansen150753c2003-03-29 22:07:47 +000018914/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018915 which can conflict with char $ac_func (); below.
18916 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018917 <limits.h> exists even on freestanding compilers. */
18918
18919#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018920# include <limits.h>
18921#else
18922# include <assert.h>
18923#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018924
18925#undef $ac_func
18926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018927/* Override any GCC internal prototype to avoid an error.
18928 Use char because int might match the return type of a GCC
18929 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018930#ifdef __cplusplus
18931extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018932#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018933char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018934/* The GNU C library defines this for functions which it implements
18935 to always fail with ENOSYS. Some functions are actually named
18936 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018937#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018938choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018939#endif
18940
Skip Montanaro6dead952003-09-25 14:50:04 +000018941int
18942main ()
18943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018944return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018945 ;
18946 return 0;
18947}
18948_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018949rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018950if { (ac_try="$ac_link"
18951case "(($ac_try" in
18952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18953 *) ac_try_echo=$ac_try;;
18954esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018956 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018958 grep -v '^ *+' conftest.er1 >conftest.err
18959 rm -f conftest.er1
18960 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018962 (exit $ac_status); } && {
18963 test -z "$ac_c_werror_flag" ||
18964 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018965 } && test -s conftest$ac_exeext &&
18966 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018967 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018968else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018970sed 's/^/| /' conftest.$ac_ext >&5
18971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018972 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018974
18975rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018976 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018977fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018978ac_res=`eval echo '${'$as_ac_var'}'`
18979 { echo "$as_me:$LINENO: result: $ac_res" >&5
18980echo "${ECHO_T}$ac_res" >&6; }
18981if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000018982 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018983#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000018984_ACEOF
18985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018986/* confdefs.h. */
18987_ACEOF
18988cat confdefs.h >>conftest.$ac_ext
18989cat >>conftest.$ac_ext <<_ACEOF
18990/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018991#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018992int
18993main ()
18994{
18995setpgrp(0,0);
18996 ;
18997 return 0;
18998}
18999_ACEOF
19000rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019001if { (ac_try="$ac_compile"
19002case "(($ac_try" in
19003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19004 *) ac_try_echo=$ac_try;;
19005esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019007 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019009 grep -v '^ *+' conftest.er1 >conftest.err
19010 rm -f conftest.er1
19011 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019013 (exit $ac_status); } && {
19014 test -z "$ac_c_werror_flag" ||
19015 test ! -s conftest.err
19016 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019017
19018cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019019#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019020_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019021
Jack Jansen150753c2003-03-29 22:07:47 +000019022
19023else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019025sed 's/^/| /' conftest.$ac_ext >&5
19026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019027
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019029
19030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019031
19032fi
19033done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019034
Martin v. Löwis11437992002-04-12 09:54:03 +000019035
Thomas Wouters3a584202000-08-05 23:28:51 +000019036for ac_func in gettimeofday
19037do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019038as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19039{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19040echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019041if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019042 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019043else
Martin v. Löwis11437992002-04-12 09:54:03 +000019044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019045/* confdefs.h. */
19046_ACEOF
19047cat confdefs.h >>conftest.$ac_ext
19048cat >>conftest.$ac_ext <<_ACEOF
19049/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019050/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19051 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19052#define $ac_func innocuous_$ac_func
19053
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019054/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019055 which can conflict with char $ac_func (); below.
19056 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019057 <limits.h> exists even on freestanding compilers. */
19058
19059#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019060# include <limits.h>
19061#else
19062# include <assert.h>
19063#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019064
19065#undef $ac_func
19066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019067/* Override any GCC internal prototype to avoid an error.
19068 Use char because int might match the return type of a GCC
19069 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019070#ifdef __cplusplus
19071extern "C"
19072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019073char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019074/* The GNU C library defines this for functions which it implements
19075 to always fail with ENOSYS. Some functions are actually named
19076 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019077#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019078choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019079#endif
19080
Skip Montanaro6dead952003-09-25 14:50:04 +000019081int
19082main ()
19083{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019084return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019085 ;
19086 return 0;
19087}
19088_ACEOF
19089rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019090if { (ac_try="$ac_link"
19091case "(($ac_try" in
19092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19093 *) ac_try_echo=$ac_try;;
19094esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019096 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019098 grep -v '^ *+' conftest.er1 >conftest.err
19099 rm -f conftest.er1
19100 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019102 (exit $ac_status); } && {
19103 test -z "$ac_c_werror_flag" ||
19104 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019105 } && test -s conftest$ac_exeext &&
19106 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019107 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019108else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019110sed 's/^/| /' conftest.$ac_ext >&5
19111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019112 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019114
19115rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019116 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019117fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019118ac_res=`eval echo '${'$as_ac_var'}'`
19119 { echo "$as_me:$LINENO: result: $ac_res" >&5
19120echo "${ECHO_T}$ac_res" >&6; }
19121if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019122 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019123#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019124_ACEOF
19125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019126/* confdefs.h. */
19127_ACEOF
19128cat confdefs.h >>conftest.$ac_ext
19129cat >>conftest.$ac_ext <<_ACEOF
19130/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019131#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019132int
19133main ()
19134{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019135gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019136 ;
19137 return 0;
19138}
19139_ACEOF
19140rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019141if { (ac_try="$ac_compile"
19142case "(($ac_try" in
19143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19144 *) ac_try_echo=$ac_try;;
19145esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019149 grep -v '^ *+' conftest.er1 >conftest.err
19150 rm -f conftest.er1
19151 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019153 (exit $ac_status); } && {
19154 test -z "$ac_c_werror_flag" ||
19155 test ! -s conftest.err
19156 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019157 :
19158else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019160sed 's/^/| /' conftest.$ac_ext >&5
19161
Martin v. Löwis11437992002-04-12 09:54:03 +000019162
19163cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019164#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019165_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019166
Martin v. Löwis11437992002-04-12 09:54:03 +000019167
Guido van Rossum627b2d71993-12-24 10:39:16 +000019168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019169
19170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019171
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019172fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019173done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019174
Michael W. Hudson54241132001-12-07 15:38:26 +000019175
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019176{ echo "$as_me:$LINENO: checking for major" >&5
19177echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019178cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019179/* confdefs.h. */
19180_ACEOF
19181cat confdefs.h >>conftest.$ac_ext
19182cat >>conftest.$ac_ext <<_ACEOF
19183/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019184
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019185#if defined(MAJOR_IN_MKDEV)
19186#include <sys/mkdev.h>
19187#elif defined(MAJOR_IN_SYSMACROS)
19188#include <sys/sysmacros.h>
19189#else
19190#include <sys/types.h>
19191#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019192
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019193int
19194main ()
19195{
19196
19197 makedev(major(0),minor(0));
19198
19199 ;
19200 return 0;
19201}
19202_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019203rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019204if { (ac_try="$ac_link"
19205case "(($ac_try" in
19206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19207 *) ac_try_echo=$ac_try;;
19208esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019210 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019212 grep -v '^ *+' conftest.er1 >conftest.err
19213 rm -f conftest.er1
19214 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019216 (exit $ac_status); } && {
19217 test -z "$ac_c_werror_flag" ||
19218 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019219 } && test -s conftest$ac_exeext &&
19220 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019221
19222
19223cat >>confdefs.h <<\_ACEOF
19224#define HAVE_DEVICE_MACROS 1
19225_ACEOF
19226
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019227 { echo "$as_me:$LINENO: result: yes" >&5
19228echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019229
19230else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019232sed 's/^/| /' conftest.$ac_ext >&5
19233
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019234
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019235 { echo "$as_me:$LINENO: result: no" >&5
19236echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019237
19238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019239
19240rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019241 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019242
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019243# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019244# for [no]getaddrinfo in netdb.h.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019245{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19246echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019248/* confdefs.h. */
19249_ACEOF
19250cat confdefs.h >>conftest.$ac_ext
19251cat >>conftest.$ac_ext <<_ACEOF
19252/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019253
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019254#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019255#include <sys/socket.h>
19256#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019257#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019258
Martin v. Löwis11437992002-04-12 09:54:03 +000019259int
19260main ()
19261{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019262
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019263getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019264
Martin v. Löwis11437992002-04-12 09:54:03 +000019265 ;
19266 return 0;
19267}
19268_ACEOF
19269rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019270if { (ac_try="$ac_link"
19271case "(($ac_try" in
19272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19273 *) ac_try_echo=$ac_try;;
19274esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019276 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019278 grep -v '^ *+' conftest.er1 >conftest.err
19279 rm -f conftest.er1
19280 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019282 (exit $ac_status); } && {
19283 test -z "$ac_c_werror_flag" ||
19284 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019285 } && test -s conftest$ac_exeext &&
19286 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019287
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019288{ echo "$as_me:$LINENO: result: yes" >&5
19289echo "${ECHO_T}yes" >&6; }
19290{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19291echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019292if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019293 { echo "$as_me:$LINENO: result: buggy" >&5
19294echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019295buggygetaddrinfo=yes
19296else
Martin v. Löwis11437992002-04-12 09:54:03 +000019297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019298/* confdefs.h. */
19299_ACEOF
19300cat confdefs.h >>conftest.$ac_ext
19301cat >>conftest.$ac_ext <<_ACEOF
19302/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019303
19304#include <sys/types.h>
19305#include <netdb.h>
19306#include <string.h>
19307#include <sys/socket.h>
19308#include <netinet/in.h>
19309
19310main()
19311{
19312 int passive, gaierr, inet4 = 0, inet6 = 0;
19313 struct addrinfo hints, *ai, *aitop;
19314 char straddr[INET6_ADDRSTRLEN], strport[16];
19315
19316 for (passive = 0; passive <= 1; passive++) {
19317 memset(&hints, 0, sizeof(hints));
19318 hints.ai_family = AF_UNSPEC;
19319 hints.ai_flags = passive ? AI_PASSIVE : 0;
19320 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019321 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019322 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19323 (void)gai_strerror(gaierr);
19324 goto bad;
19325 }
19326 for (ai = aitop; ai; ai = ai->ai_next) {
19327 if (ai->ai_addr == NULL ||
19328 ai->ai_addrlen == 0 ||
19329 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19330 straddr, sizeof(straddr), strport, sizeof(strport),
19331 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19332 goto bad;
19333 }
19334 switch (ai->ai_family) {
19335 case AF_INET:
19336 if (strcmp(strport, "54321") != 0) {
19337 goto bad;
19338 }
19339 if (passive) {
19340 if (strcmp(straddr, "0.0.0.0") != 0) {
19341 goto bad;
19342 }
19343 } else {
19344 if (strcmp(straddr, "127.0.0.1") != 0) {
19345 goto bad;
19346 }
19347 }
19348 inet4++;
19349 break;
19350 case AF_INET6:
19351 if (strcmp(strport, "54321") != 0) {
19352 goto bad;
19353 }
19354 if (passive) {
19355 if (strcmp(straddr, "::") != 0) {
19356 goto bad;
19357 }
19358 } else {
19359 if (strcmp(straddr, "::1") != 0) {
19360 goto bad;
19361 }
19362 }
19363 inet6++;
19364 break;
19365 case AF_UNSPEC:
19366 goto bad;
19367 break;
19368 default:
19369 /* another family support? */
19370 break;
19371 }
19372 }
19373 }
19374
19375 if (!(inet4 == 0 || inet4 == 2))
19376 goto bad;
19377 if (!(inet6 == 0 || inet6 == 2))
19378 goto bad;
19379
19380 if (aitop)
19381 freeaddrinfo(aitop);
19382 exit(0);
19383
19384 bad:
19385 if (aitop)
19386 freeaddrinfo(aitop);
19387 exit(1);
19388}
19389
Martin v. Löwis11437992002-04-12 09:54:03 +000019390_ACEOF
19391rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019392if { (ac_try="$ac_link"
19393case "(($ac_try" in
19394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19395 *) ac_try_echo=$ac_try;;
19396esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019398 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019399 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019401 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019402 { (case "(($ac_try" in
19403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19404 *) ac_try_echo=$ac_try;;
19405esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019407 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019408 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019410 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019411 { echo "$as_me:$LINENO: result: good" >&5
19412echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019413buggygetaddrinfo=no
19414else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019415 echo "$as_me: program exited with status $ac_status" >&5
19416echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019417sed 's/^/| /' conftest.$ac_ext >&5
19418
Martin v. Löwis11437992002-04-12 09:54:03 +000019419( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019420{ echo "$as_me:$LINENO: result: buggy" >&5
19421echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019422buggygetaddrinfo=yes
19423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019424rm -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 +000019425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019426
19427
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019428else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019430sed 's/^/| /' conftest.$ac_ext >&5
19431
Martin v. Löwis11437992002-04-12 09:54:03 +000019432
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019433{ echo "$as_me:$LINENO: result: no" >&5
19434echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019435buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019436
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019438
19439rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019440 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019441
19442if test "$buggygetaddrinfo" = "yes"; then
19443 if test "$ipv6" = "yes"; then
19444 echo 'Fatal: You must get working getaddrinfo() function.'
19445 echo ' or you can specify "--disable-ipv6"'.
19446 exit 1
19447 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019448else
Martin v. Löwis11437992002-04-12 09:54:03 +000019449
19450cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019451#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019452_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019453
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019454fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019455
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019456for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019457do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019458as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19459{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19460echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019461if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019462 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019463else
Martin v. Löwis11437992002-04-12 09:54:03 +000019464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019465/* confdefs.h. */
19466_ACEOF
19467cat confdefs.h >>conftest.$ac_ext
19468cat >>conftest.$ac_ext <<_ACEOF
19469/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019470/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19471 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19472#define $ac_func innocuous_$ac_func
19473
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019474/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019475 which can conflict with char $ac_func (); below.
19476 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019477 <limits.h> exists even on freestanding compilers. */
19478
19479#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019480# include <limits.h>
19481#else
19482# include <assert.h>
19483#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019484
19485#undef $ac_func
19486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019487/* Override any GCC internal prototype to avoid an error.
19488 Use char because int might match the return type of a GCC
19489 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019490#ifdef __cplusplus
19491extern "C"
19492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019493char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019494/* The GNU C library defines this for functions which it implements
19495 to always fail with ENOSYS. Some functions are actually named
19496 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019497#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019498choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019499#endif
19500
Skip Montanaro6dead952003-09-25 14:50:04 +000019501int
19502main ()
19503{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019504return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019505 ;
19506 return 0;
19507}
19508_ACEOF
19509rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019510if { (ac_try="$ac_link"
19511case "(($ac_try" in
19512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19513 *) ac_try_echo=$ac_try;;
19514esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019516 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019518 grep -v '^ *+' conftest.er1 >conftest.err
19519 rm -f conftest.er1
19520 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019522 (exit $ac_status); } && {
19523 test -z "$ac_c_werror_flag" ||
19524 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019525 } && test -s conftest$ac_exeext &&
19526 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019527 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019528else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019530sed 's/^/| /' conftest.$ac_ext >&5
19531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019532 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019534
19535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019536 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019537fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019538ac_res=`eval echo '${'$as_ac_var'}'`
19539 { echo "$as_me:$LINENO: result: $ac_res" >&5
19540echo "${ECHO_T}$ac_res" >&6; }
19541if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019542 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019543#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019544_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019545
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019546fi
19547done
19548
Michael W. Hudson54241132001-12-07 15:38:26 +000019549
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019550# checks for structures
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019551{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19552echo $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 +000019553if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019554 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019555else
Martin v. Löwis11437992002-04-12 09:54:03 +000019556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019557/* confdefs.h. */
19558_ACEOF
19559cat confdefs.h >>conftest.$ac_ext
19560cat >>conftest.$ac_ext <<_ACEOF
19561/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019562#include <sys/types.h>
19563#include <sys/time.h>
19564#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019565
Martin v. Löwis11437992002-04-12 09:54:03 +000019566int
19567main ()
19568{
19569if ((struct tm *) 0)
19570return 0;
19571 ;
19572 return 0;
19573}
19574_ACEOF
19575rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019576if { (ac_try="$ac_compile"
19577case "(($ac_try" in
19578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19579 *) ac_try_echo=$ac_try;;
19580esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019584 grep -v '^ *+' conftest.er1 >conftest.err
19585 rm -f conftest.er1
19586 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019588 (exit $ac_status); } && {
19589 test -z "$ac_c_werror_flag" ||
19590 test ! -s conftest.err
19591 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019592 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019593else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019595sed 's/^/| /' conftest.$ac_ext >&5
19596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019597 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019599
19600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019601fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019602{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19603echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019604if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019605
19606cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019607#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019608_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019609
19610fi
19611
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019612{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19613echo $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 +000019614if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019615 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019616else
Martin v. Löwis11437992002-04-12 09:54:03 +000019617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019618/* confdefs.h. */
19619_ACEOF
19620cat confdefs.h >>conftest.$ac_ext
19621cat >>conftest.$ac_ext <<_ACEOF
19622/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019623#include <sys/types.h>
19624#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019625
Martin v. Löwis11437992002-04-12 09:54:03 +000019626int
19627main ()
19628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019629struct tm tm;
19630 int *p = &tm.tm_sec;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019631 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019632 ;
19633 return 0;
19634}
19635_ACEOF
19636rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019637if { (ac_try="$ac_compile"
19638case "(($ac_try" in
19639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19640 *) ac_try_echo=$ac_try;;
19641esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019645 grep -v '^ *+' conftest.er1 >conftest.err
19646 rm -f conftest.er1
19647 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019649 (exit $ac_status); } && {
19650 test -z "$ac_c_werror_flag" ||
19651 test ! -s conftest.err
19652 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019653 ac_cv_struct_tm=time.h
19654else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019656sed 's/^/| /' conftest.$ac_ext >&5
19657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019658 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019660
19661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019662fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019663{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19664echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019665if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019666
19667cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019668#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019669_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019670
19671fi
19672
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019673{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19674echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019675if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019677else
Martin v. Löwis11437992002-04-12 09:54:03 +000019678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019679/* confdefs.h. */
19680_ACEOF
19681cat confdefs.h >>conftest.$ac_ext
19682cat >>conftest.$ac_ext <<_ACEOF
19683/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019684#include <sys/types.h>
19685#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019686
19687
Martin v. Löwis11437992002-04-12 09:54:03 +000019688int
19689main ()
19690{
19691static struct tm ac_aggr;
19692if (ac_aggr.tm_zone)
19693return 0;
19694 ;
19695 return 0;
19696}
19697_ACEOF
19698rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019699if { (ac_try="$ac_compile"
19700case "(($ac_try" in
19701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19702 *) ac_try_echo=$ac_try;;
19703esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019705 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019707 grep -v '^ *+' conftest.er1 >conftest.err
19708 rm -f conftest.er1
19709 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019711 (exit $ac_status); } && {
19712 test -z "$ac_c_werror_flag" ||
19713 test ! -s conftest.err
19714 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019715 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019716else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019718sed 's/^/| /' conftest.$ac_ext >&5
19719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019721/* confdefs.h. */
19722_ACEOF
19723cat confdefs.h >>conftest.$ac_ext
19724cat >>conftest.$ac_ext <<_ACEOF
19725/* end confdefs.h. */
19726#include <sys/types.h>
19727#include <$ac_cv_struct_tm>
19728
19729
19730int
19731main ()
19732{
19733static struct tm ac_aggr;
19734if (sizeof ac_aggr.tm_zone)
19735return 0;
19736 ;
19737 return 0;
19738}
19739_ACEOF
19740rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019741if { (ac_try="$ac_compile"
19742case "(($ac_try" in
19743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19744 *) ac_try_echo=$ac_try;;
19745esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019747 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019749 grep -v '^ *+' conftest.er1 >conftest.err
19750 rm -f conftest.er1
19751 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019753 (exit $ac_status); } && {
19754 test -z "$ac_c_werror_flag" ||
19755 test ! -s conftest.err
19756 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019757 ac_cv_member_struct_tm_tm_zone=yes
19758else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019760sed 's/^/| /' conftest.$ac_ext >&5
19761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019762 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019764
19765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019767
19768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019769fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019770{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19771echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19772if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019773
19774cat >>confdefs.h <<_ACEOF
19775#define HAVE_STRUCT_TM_TM_ZONE 1
19776_ACEOF
19777
19778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019779fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019780
Martin v. Löwis11437992002-04-12 09:54:03 +000019781if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19782
19783cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019784#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019785_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019786
19787else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019788 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19789echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019790if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019791 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019792else
19793 cat >conftest.$ac_ext <<_ACEOF
19794/* confdefs.h. */
19795_ACEOF
19796cat confdefs.h >>conftest.$ac_ext
19797cat >>conftest.$ac_ext <<_ACEOF
19798/* end confdefs.h. */
19799#include <time.h>
19800
19801int
19802main ()
19803{
19804#ifndef tzname
19805 (void) tzname;
19806#endif
19807
19808 ;
19809 return 0;
19810}
19811_ACEOF
19812rm -f conftest.$ac_objext
19813if { (ac_try="$ac_compile"
19814case "(($ac_try" in
19815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19816 *) ac_try_echo=$ac_try;;
19817esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019819 (eval "$ac_compile") 2>conftest.er1
19820 ac_status=$?
19821 grep -v '^ *+' conftest.er1 >conftest.err
19822 rm -f conftest.er1
19823 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019825 (exit $ac_status); } && {
19826 test -z "$ac_c_werror_flag" ||
19827 test ! -s conftest.err
19828 } && test -s conftest.$ac_objext; then
19829 ac_cv_have_decl_tzname=yes
19830else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019831 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019832sed 's/^/| /' conftest.$ac_ext >&5
19833
19834 ac_cv_have_decl_tzname=no
19835fi
19836
19837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19838fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019839{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19840echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19841if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019842
19843cat >>confdefs.h <<_ACEOF
19844#define HAVE_DECL_TZNAME 1
19845_ACEOF
19846
19847
19848else
19849 cat >>confdefs.h <<_ACEOF
19850#define HAVE_DECL_TZNAME 0
19851_ACEOF
19852
19853
19854fi
19855
19856
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019857 { echo "$as_me:$LINENO: checking for tzname" >&5
19858echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019859if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019860 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019861else
Martin v. Löwis11437992002-04-12 09:54:03 +000019862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019863/* confdefs.h. */
19864_ACEOF
19865cat confdefs.h >>conftest.$ac_ext
19866cat >>conftest.$ac_ext <<_ACEOF
19867/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019868#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019869#if !HAVE_DECL_TZNAME
19870extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019872
Martin v. Löwis11437992002-04-12 09:54:03 +000019873int
19874main ()
19875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019876return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019877 ;
19878 return 0;
19879}
19880_ACEOF
19881rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019882if { (ac_try="$ac_link"
19883case "(($ac_try" in
19884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19885 *) ac_try_echo=$ac_try;;
19886esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019888 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019890 grep -v '^ *+' conftest.er1 >conftest.err
19891 rm -f conftest.er1
19892 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019894 (exit $ac_status); } && {
19895 test -z "$ac_c_werror_flag" ||
19896 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019897 } && test -s conftest$ac_exeext &&
19898 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019899 ac_cv_var_tzname=yes
19900else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019902sed 's/^/| /' conftest.$ac_ext >&5
19903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019904 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019906
19907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019908 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019909fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019910{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19911echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019912 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019913
19914cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019915#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019916_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019917
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019918 fi
19919fi
19920
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019921{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19922echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019923if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019924 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019925else
19926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019927/* confdefs.h. */
19928_ACEOF
19929cat confdefs.h >>conftest.$ac_ext
19930cat >>conftest.$ac_ext <<_ACEOF
19931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019932$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019933int
19934main ()
19935{
19936static struct stat ac_aggr;
19937if (ac_aggr.st_rdev)
19938return 0;
19939 ;
19940 return 0;
19941}
19942_ACEOF
19943rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019944if { (ac_try="$ac_compile"
19945case "(($ac_try" in
19946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19947 *) ac_try_echo=$ac_try;;
19948esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019952 grep -v '^ *+' conftest.er1 >conftest.err
19953 rm -f conftest.er1
19954 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019956 (exit $ac_status); } && {
19957 test -z "$ac_c_werror_flag" ||
19958 test ! -s conftest.err
19959 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019960 ac_cv_member_struct_stat_st_rdev=yes
19961else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019963sed 's/^/| /' conftest.$ac_ext >&5
19964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019966/* confdefs.h. */
19967_ACEOF
19968cat confdefs.h >>conftest.$ac_ext
19969cat >>conftest.$ac_ext <<_ACEOF
19970/* end confdefs.h. */
19971$ac_includes_default
19972int
19973main ()
19974{
19975static struct stat ac_aggr;
19976if (sizeof ac_aggr.st_rdev)
19977return 0;
19978 ;
19979 return 0;
19980}
19981_ACEOF
19982rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019983if { (ac_try="$ac_compile"
19984case "(($ac_try" in
19985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19986 *) ac_try_echo=$ac_try;;
19987esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019989 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019991 grep -v '^ *+' conftest.er1 >conftest.err
19992 rm -f conftest.er1
19993 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019995 (exit $ac_status); } && {
19996 test -z "$ac_c_werror_flag" ||
19997 test ! -s conftest.err
19998 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019999 ac_cv_member_struct_stat_st_rdev=yes
20000else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020002sed 's/^/| /' conftest.$ac_ext >&5
20003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020004 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020006
20007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020009
20010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020011fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020012{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20013echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20014if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020015
20016cat >>confdefs.h <<_ACEOF
20017#define HAVE_STRUCT_STAT_ST_RDEV 1
20018_ACEOF
20019
20020
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020021fi
20022
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020023{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20024echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020025if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020026 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020027else
Martin v. Löwis11437992002-04-12 09:54:03 +000020028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020029/* confdefs.h. */
20030_ACEOF
20031cat confdefs.h >>conftest.$ac_ext
20032cat >>conftest.$ac_ext <<_ACEOF
20033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020034$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020035int
20036main ()
20037{
20038static struct stat ac_aggr;
20039if (ac_aggr.st_blksize)
20040return 0;
20041 ;
20042 return 0;
20043}
20044_ACEOF
20045rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020046if { (ac_try="$ac_compile"
20047case "(($ac_try" in
20048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20049 *) ac_try_echo=$ac_try;;
20050esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020054 grep -v '^ *+' conftest.er1 >conftest.err
20055 rm -f conftest.er1
20056 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020058 (exit $ac_status); } && {
20059 test -z "$ac_c_werror_flag" ||
20060 test ! -s conftest.err
20061 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020062 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020063else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020065sed 's/^/| /' conftest.$ac_ext >&5
20066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020068/* confdefs.h. */
20069_ACEOF
20070cat confdefs.h >>conftest.$ac_ext
20071cat >>conftest.$ac_ext <<_ACEOF
20072/* end confdefs.h. */
20073$ac_includes_default
20074int
20075main ()
20076{
20077static struct stat ac_aggr;
20078if (sizeof ac_aggr.st_blksize)
20079return 0;
20080 ;
20081 return 0;
20082}
20083_ACEOF
20084rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020085if { (ac_try="$ac_compile"
20086case "(($ac_try" in
20087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20088 *) ac_try_echo=$ac_try;;
20089esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020091 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020093 grep -v '^ *+' conftest.er1 >conftest.err
20094 rm -f conftest.er1
20095 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020097 (exit $ac_status); } && {
20098 test -z "$ac_c_werror_flag" ||
20099 test ! -s conftest.err
20100 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020101 ac_cv_member_struct_stat_st_blksize=yes
20102else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020104sed 's/^/| /' conftest.$ac_ext >&5
20105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020106 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020108
20109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020111
20112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020113fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020114{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20115echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20116if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020117
Martin v. Löwis11437992002-04-12 09:54:03 +000020118cat >>confdefs.h <<_ACEOF
20119#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20120_ACEOF
20121
20122
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020123fi
20124
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020125{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20126echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020127if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020128 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020129else
20130 cat >conftest.$ac_ext <<_ACEOF
20131/* confdefs.h. */
20132_ACEOF
20133cat confdefs.h >>conftest.$ac_ext
20134cat >>conftest.$ac_ext <<_ACEOF
20135/* end confdefs.h. */
20136$ac_includes_default
20137int
20138main ()
20139{
20140static struct stat ac_aggr;
20141if (ac_aggr.st_flags)
20142return 0;
20143 ;
20144 return 0;
20145}
20146_ACEOF
20147rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020148if { (ac_try="$ac_compile"
20149case "(($ac_try" in
20150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20151 *) ac_try_echo=$ac_try;;
20152esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020154 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020155 ac_status=$?
20156 grep -v '^ *+' conftest.er1 >conftest.err
20157 rm -f conftest.er1
20158 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020160 (exit $ac_status); } && {
20161 test -z "$ac_c_werror_flag" ||
20162 test ! -s conftest.err
20163 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020164 ac_cv_member_struct_stat_st_flags=yes
20165else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020166 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020167sed 's/^/| /' conftest.$ac_ext >&5
20168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020169 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020170/* confdefs.h. */
20171_ACEOF
20172cat confdefs.h >>conftest.$ac_ext
20173cat >>conftest.$ac_ext <<_ACEOF
20174/* end confdefs.h. */
20175$ac_includes_default
20176int
20177main ()
20178{
20179static struct stat ac_aggr;
20180if (sizeof ac_aggr.st_flags)
20181return 0;
20182 ;
20183 return 0;
20184}
20185_ACEOF
20186rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020187if { (ac_try="$ac_compile"
20188case "(($ac_try" in
20189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20190 *) ac_try_echo=$ac_try;;
20191esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020193 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020194 ac_status=$?
20195 grep -v '^ *+' conftest.er1 >conftest.err
20196 rm -f conftest.er1
20197 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020199 (exit $ac_status); } && {
20200 test -z "$ac_c_werror_flag" ||
20201 test ! -s conftest.err
20202 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020203 ac_cv_member_struct_stat_st_flags=yes
20204else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020205 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020206sed 's/^/| /' conftest.$ac_ext >&5
20207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020208 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020210
20211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020213
20214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020215fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020216{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20217echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20218if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020219
20220cat >>confdefs.h <<_ACEOF
20221#define HAVE_STRUCT_STAT_ST_FLAGS 1
20222_ACEOF
20223
20224
20225fi
20226
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020227{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20228echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020229if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020230 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020231else
20232 cat >conftest.$ac_ext <<_ACEOF
20233/* confdefs.h. */
20234_ACEOF
20235cat confdefs.h >>conftest.$ac_ext
20236cat >>conftest.$ac_ext <<_ACEOF
20237/* end confdefs.h. */
20238$ac_includes_default
20239int
20240main ()
20241{
20242static struct stat ac_aggr;
20243if (ac_aggr.st_gen)
20244return 0;
20245 ;
20246 return 0;
20247}
20248_ACEOF
20249rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020250if { (ac_try="$ac_compile"
20251case "(($ac_try" in
20252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20253 *) ac_try_echo=$ac_try;;
20254esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020257 ac_status=$?
20258 grep -v '^ *+' conftest.er1 >conftest.err
20259 rm -f conftest.er1
20260 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020262 (exit $ac_status); } && {
20263 test -z "$ac_c_werror_flag" ||
20264 test ! -s conftest.err
20265 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020266 ac_cv_member_struct_stat_st_gen=yes
20267else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020268 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020269sed 's/^/| /' conftest.$ac_ext >&5
20270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020271 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020272/* confdefs.h. */
20273_ACEOF
20274cat confdefs.h >>conftest.$ac_ext
20275cat >>conftest.$ac_ext <<_ACEOF
20276/* end confdefs.h. */
20277$ac_includes_default
20278int
20279main ()
20280{
20281static struct stat ac_aggr;
20282if (sizeof ac_aggr.st_gen)
20283return 0;
20284 ;
20285 return 0;
20286}
20287_ACEOF
20288rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020289if { (ac_try="$ac_compile"
20290case "(($ac_try" in
20291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20292 *) ac_try_echo=$ac_try;;
20293esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020295 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020296 ac_status=$?
20297 grep -v '^ *+' conftest.er1 >conftest.err
20298 rm -f conftest.er1
20299 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020301 (exit $ac_status); } && {
20302 test -z "$ac_c_werror_flag" ||
20303 test ! -s conftest.err
20304 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020305 ac_cv_member_struct_stat_st_gen=yes
20306else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020307 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020308sed 's/^/| /' conftest.$ac_ext >&5
20309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020310 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020312
20313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020315
20316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020317fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020318{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20319echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20320if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020321
20322cat >>confdefs.h <<_ACEOF
20323#define HAVE_STRUCT_STAT_ST_GEN 1
20324_ACEOF
20325
20326
20327fi
20328
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020329{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20330echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020331if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020332 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020333else
20334 cat >conftest.$ac_ext <<_ACEOF
20335/* confdefs.h. */
20336_ACEOF
20337cat confdefs.h >>conftest.$ac_ext
20338cat >>conftest.$ac_ext <<_ACEOF
20339/* end confdefs.h. */
20340$ac_includes_default
20341int
20342main ()
20343{
20344static struct stat ac_aggr;
20345if (ac_aggr.st_birthtime)
20346return 0;
20347 ;
20348 return 0;
20349}
20350_ACEOF
20351rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020352if { (ac_try="$ac_compile"
20353case "(($ac_try" in
20354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20355 *) ac_try_echo=$ac_try;;
20356esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020358 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020359 ac_status=$?
20360 grep -v '^ *+' conftest.er1 >conftest.err
20361 rm -f conftest.er1
20362 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020364 (exit $ac_status); } && {
20365 test -z "$ac_c_werror_flag" ||
20366 test ! -s conftest.err
20367 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020368 ac_cv_member_struct_stat_st_birthtime=yes
20369else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020370 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020371sed 's/^/| /' conftest.$ac_ext >&5
20372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020373 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020374/* confdefs.h. */
20375_ACEOF
20376cat confdefs.h >>conftest.$ac_ext
20377cat >>conftest.$ac_ext <<_ACEOF
20378/* end confdefs.h. */
20379$ac_includes_default
20380int
20381main ()
20382{
20383static struct stat ac_aggr;
20384if (sizeof ac_aggr.st_birthtime)
20385return 0;
20386 ;
20387 return 0;
20388}
20389_ACEOF
20390rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020391if { (ac_try="$ac_compile"
20392case "(($ac_try" in
20393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20394 *) ac_try_echo=$ac_try;;
20395esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020398 ac_status=$?
20399 grep -v '^ *+' conftest.er1 >conftest.err
20400 rm -f conftest.er1
20401 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020403 (exit $ac_status); } && {
20404 test -z "$ac_c_werror_flag" ||
20405 test ! -s conftest.err
20406 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020407 ac_cv_member_struct_stat_st_birthtime=yes
20408else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020409 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020410sed 's/^/| /' conftest.$ac_ext >&5
20411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020412 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020414
20415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020417
20418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020419fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020420{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20421echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20422if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020423
20424cat >>confdefs.h <<_ACEOF
20425#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20426_ACEOF
20427
20428
20429fi
20430
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020431{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20432echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020433if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020434 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020435else
Martin v. Löwis11437992002-04-12 09:54:03 +000020436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020437/* confdefs.h. */
20438_ACEOF
20439cat confdefs.h >>conftest.$ac_ext
20440cat >>conftest.$ac_ext <<_ACEOF
20441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020442$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020443int
20444main ()
20445{
20446static struct stat ac_aggr;
20447if (ac_aggr.st_blocks)
20448return 0;
20449 ;
20450 return 0;
20451}
20452_ACEOF
20453rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020454if { (ac_try="$ac_compile"
20455case "(($ac_try" in
20456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20457 *) ac_try_echo=$ac_try;;
20458esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020462 grep -v '^ *+' conftest.er1 >conftest.err
20463 rm -f conftest.er1
20464 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020466 (exit $ac_status); } && {
20467 test -z "$ac_c_werror_flag" ||
20468 test ! -s conftest.err
20469 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020470 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020471else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020473sed 's/^/| /' conftest.$ac_ext >&5
20474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020476/* confdefs.h. */
20477_ACEOF
20478cat confdefs.h >>conftest.$ac_ext
20479cat >>conftest.$ac_ext <<_ACEOF
20480/* end confdefs.h. */
20481$ac_includes_default
20482int
20483main ()
20484{
20485static struct stat ac_aggr;
20486if (sizeof ac_aggr.st_blocks)
20487return 0;
20488 ;
20489 return 0;
20490}
20491_ACEOF
20492rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020493if { (ac_try="$ac_compile"
20494case "(($ac_try" in
20495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20496 *) ac_try_echo=$ac_try;;
20497esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020499 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020501 grep -v '^ *+' conftest.er1 >conftest.err
20502 rm -f conftest.er1
20503 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020505 (exit $ac_status); } && {
20506 test -z "$ac_c_werror_flag" ||
20507 test ! -s conftest.err
20508 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020509 ac_cv_member_struct_stat_st_blocks=yes
20510else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020512sed 's/^/| /' conftest.$ac_ext >&5
20513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020514 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020516
20517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020519
20520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020521fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020522{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20523echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20524if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020525
Martin v. Löwis11437992002-04-12 09:54:03 +000020526cat >>confdefs.h <<_ACEOF
20527#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20528_ACEOF
20529
20530
20531cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020532#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020533_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020534
20535else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020536 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020537 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020538 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20539 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020540esac
20541
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020542fi
20543
Michael W. Hudson54241132001-12-07 15:38:26 +000020544
Martin v. Löwis11437992002-04-12 09:54:03 +000020545
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020546{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20547echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020548if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020550else
Martin v. Löwis11437992002-04-12 09:54:03 +000020551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020552/* confdefs.h. */
20553_ACEOF
20554cat confdefs.h >>conftest.$ac_ext
20555cat >>conftest.$ac_ext <<_ACEOF
20556/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020557#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020558int
20559main ()
20560{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020561return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020562 ;
20563 return 0;
20564}
20565_ACEOF
20566rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020567if { (ac_try="$ac_compile"
20568case "(($ac_try" in
20569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20570 *) ac_try_echo=$ac_try;;
20571esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020575 grep -v '^ *+' conftest.er1 >conftest.err
20576 rm -f conftest.er1
20577 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020579 (exit $ac_status); } && {
20580 test -z "$ac_c_werror_flag" ||
20581 test ! -s conftest.err
20582 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020583 ac_cv_header_time_altzone=yes
20584else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020586sed 's/^/| /' conftest.$ac_ext >&5
20587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020588 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020589fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20592fi
20593
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020594{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20595echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020596if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020597
20598cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020599#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020600_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020601
20602fi
20603
Guido van Rossumda88dad1995-01-26 00:46:29 +000020604was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020605{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20606echo $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 +000020607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020608/* confdefs.h. */
20609_ACEOF
20610cat confdefs.h >>conftest.$ac_ext
20611cat >>conftest.$ac_ext <<_ACEOF
20612/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020613
20614#include <sys/types.h>
20615#include <sys/select.h>
20616#include <sys/time.h>
20617
Martin v. Löwis11437992002-04-12 09:54:03 +000020618int
20619main ()
20620{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020621;
Martin v. Löwis11437992002-04-12 09:54:03 +000020622 ;
20623 return 0;
20624}
20625_ACEOF
20626rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020627if { (ac_try="$ac_compile"
20628case "(($ac_try" in
20629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20630 *) ac_try_echo=$ac_try;;
20631esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020635 grep -v '^ *+' conftest.er1 >conftest.err
20636 rm -f conftest.er1
20637 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020639 (exit $ac_status); } && {
20640 test -z "$ac_c_werror_flag" ||
20641 test ! -s conftest.err
20642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020643
20644
20645cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020646#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020647_ACEOF
20648
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020649 was_it_defined=yes
20650
Guido van Rossumf78abae1997-01-21 22:02:36 +000020651else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020653sed 's/^/| /' conftest.$ac_ext >&5
20654
Thomas Wouters477c8d52006-05-27 19:21:47 +000020655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020656fi
20657
20658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020659{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20660echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020661
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020662{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20663echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020664if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020665 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020666else
Martin v. Löwis11437992002-04-12 09:54:03 +000020667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020668/* confdefs.h. */
20669_ACEOF
20670cat confdefs.h >>conftest.$ac_ext
20671cat >>conftest.$ac_ext <<_ACEOF
20672/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020673
20674# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020675int
20676main ()
20677{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020678struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020679 ;
20680 return 0;
20681}
20682_ACEOF
20683rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020684if { (ac_try="$ac_compile"
20685case "(($ac_try" in
20686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20687 *) ac_try_echo=$ac_try;;
20688esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020692 grep -v '^ *+' conftest.er1 >conftest.err
20693 rm -f conftest.er1
20694 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020696 (exit $ac_status); } && {
20697 test -z "$ac_c_werror_flag" ||
20698 test ! -s conftest.err
20699 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020700 ac_cv_struct_addrinfo=yes
20701else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020703sed 's/^/| /' conftest.$ac_ext >&5
20704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020705 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020706fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20709fi
20710
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020711{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20712echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020713if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020714
20715cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020716#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020717_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020718
20719fi
20720
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020721{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20722echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020723if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020724 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020725else
Martin v. Löwis11437992002-04-12 09:54:03 +000020726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020727/* confdefs.h. */
20728_ACEOF
20729cat confdefs.h >>conftest.$ac_ext
20730cat >>conftest.$ac_ext <<_ACEOF
20731/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020732
20733# include <sys/types.h>
20734# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020735int
20736main ()
20737{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020738struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020739 ;
20740 return 0;
20741}
20742_ACEOF
20743rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020744if { (ac_try="$ac_compile"
20745case "(($ac_try" in
20746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20747 *) ac_try_echo=$ac_try;;
20748esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020752 grep -v '^ *+' conftest.er1 >conftest.err
20753 rm -f conftest.er1
20754 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020756 (exit $ac_status); } && {
20757 test -z "$ac_c_werror_flag" ||
20758 test ! -s conftest.err
20759 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020760 ac_cv_struct_sockaddr_storage=yes
20761else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020763sed 's/^/| /' conftest.$ac_ext >&5
20764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020765 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020766fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20769fi
20770
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020771{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20772echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020773if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020774
20775cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020776#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020777_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020778
20779fi
20780
Guido van Rossum627b2d71993-12-24 10:39:16 +000020781# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020782
Michael W. Hudson54241132001-12-07 15:38:26 +000020783
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020784{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20785echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020786if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020787 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020788else
Martin v. Löwis11437992002-04-12 09:54:03 +000020789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020790/* confdefs.h. */
20791_ACEOF
20792cat confdefs.h >>conftest.$ac_ext
20793cat >>conftest.$ac_ext <<_ACEOF
20794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020795$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020796int
20797main ()
20798{
20799static int test_array [1 - 2 * !(((char) -1) < 0)];
20800test_array [0] = 0
20801
20802 ;
20803 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020804}
Martin v. Löwis11437992002-04-12 09:54:03 +000020805_ACEOF
20806rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020807if { (ac_try="$ac_compile"
20808case "(($ac_try" in
20809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20810 *) ac_try_echo=$ac_try;;
20811esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020815 grep -v '^ *+' conftest.er1 >conftest.err
20816 rm -f conftest.er1
20817 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020819 (exit $ac_status); } && {
20820 test -z "$ac_c_werror_flag" ||
20821 test ! -s conftest.err
20822 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020823 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020824else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020826sed 's/^/| /' conftest.$ac_ext >&5
20827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020828 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020830
20831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020832fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020833{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20834echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020835if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020836 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020837#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020838_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020839
20840fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020841
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020842{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20843echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020844if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020845 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020846else
20847 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020848/* confdefs.h. */
20849_ACEOF
20850cat confdefs.h >>conftest.$ac_ext
20851cat >>conftest.$ac_ext <<_ACEOF
20852/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020853
Martin v. Löwis11437992002-04-12 09:54:03 +000020854int
20855main ()
20856{
20857/* FIXME: Include the comments suggested by Paul. */
20858#ifndef __cplusplus
20859 /* Ultrix mips cc rejects this. */
20860 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020861 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020862 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020863 char const *const *pcpcc;
20864 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020865 /* NEC SVR4.0.2 mips cc rejects this. */
20866 struct point {int x, y;};
20867 static struct point const zero = {0,0};
20868 /* AIX XL C 1.02.0.0 rejects this.
20869 It does not let you subtract one const X* pointer from another in
20870 an arm of an if-expression whose if-part is not a constant
20871 expression */
20872 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020873 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020874 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020875 ++pcpcc;
20876 ppc = (char**) pcpcc;
20877 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020878 { /* SCO 3.2v4 cc rejects this. */
20879 char *t;
20880 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020881
Martin v. Löwis11437992002-04-12 09:54:03 +000020882 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020883 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020884 }
20885 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20886 int x[] = {25, 17};
20887 const int *foo = &x[0];
20888 ++foo;
20889 }
20890 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20891 typedef const int *iptr;
20892 iptr p = 0;
20893 ++p;
20894 }
20895 { /* AIX XL C 1.02.0.0 rejects this saying
20896 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20897 struct s { int j; const int *ap[3]; };
20898 struct s *b; b->j = 5;
20899 }
20900 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20901 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020902 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020903 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020904 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020905#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020906
Martin v. Löwis11437992002-04-12 09:54:03 +000020907 ;
20908 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020909}
Martin v. Löwis11437992002-04-12 09:54:03 +000020910_ACEOF
20911rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020912if { (ac_try="$ac_compile"
20913case "(($ac_try" in
20914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20915 *) ac_try_echo=$ac_try;;
20916esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020920 grep -v '^ *+' conftest.er1 >conftest.err
20921 rm -f conftest.er1
20922 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020924 (exit $ac_status); } && {
20925 test -z "$ac_c_werror_flag" ||
20926 test ! -s conftest.err
20927 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020928 ac_cv_c_const=yes
20929else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020931sed 's/^/| /' conftest.$ac_ext >&5
20932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020933 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020935
20936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020937fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020938{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20939echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020940if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020941
20942cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020943#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020944_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020945
20946fi
20947
Michael W. Hudson54241132001-12-07 15:38:26 +000020948
Guido van Rossumda88dad1995-01-26 00:46:29 +000020949works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020950{ echo "$as_me:$LINENO: checking for working volatile" >&5
20951echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020952cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020953/* confdefs.h. */
20954_ACEOF
20955cat confdefs.h >>conftest.$ac_ext
20956cat >>conftest.$ac_ext <<_ACEOF
20957/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020958
Martin v. Löwis11437992002-04-12 09:54:03 +000020959int
20960main ()
20961{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020962volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020963 ;
20964 return 0;
20965}
20966_ACEOF
20967rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020968if { (ac_try="$ac_compile"
20969case "(($ac_try" in
20970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20971 *) ac_try_echo=$ac_try;;
20972esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020974 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020976 grep -v '^ *+' conftest.er1 >conftest.err
20977 rm -f conftest.er1
20978 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020980 (exit $ac_status); } && {
20981 test -z "$ac_c_werror_flag" ||
20982 test ! -s conftest.err
20983 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020984 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020985else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020987sed 's/^/| /' conftest.$ac_ext >&5
20988
Martin v. Löwis11437992002-04-12 09:54:03 +000020989
20990cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020991#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000020992_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020993
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020994
Guido van Rossum627b2d71993-12-24 10:39:16 +000020995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020996
20997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020998{ echo "$as_me:$LINENO: result: $works" >&5
20999echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021000
Guido van Rossumda88dad1995-01-26 00:46:29 +000021001works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021002{ echo "$as_me:$LINENO: checking for working signed char" >&5
21003echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021004cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021005/* confdefs.h. */
21006_ACEOF
21007cat confdefs.h >>conftest.$ac_ext
21008cat >>conftest.$ac_ext <<_ACEOF
21009/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021010
Martin v. Löwis11437992002-04-12 09:54:03 +000021011int
21012main ()
21013{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021014signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021015 ;
21016 return 0;
21017}
21018_ACEOF
21019rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021020if { (ac_try="$ac_compile"
21021case "(($ac_try" in
21022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21023 *) ac_try_echo=$ac_try;;
21024esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021028 grep -v '^ *+' conftest.er1 >conftest.err
21029 rm -f conftest.er1
21030 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021032 (exit $ac_status); } && {
21033 test -z "$ac_c_werror_flag" ||
21034 test ! -s conftest.err
21035 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021036 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021037else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021039sed 's/^/| /' conftest.$ac_ext >&5
21040
Martin v. Löwis11437992002-04-12 09:54:03 +000021041
21042cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021043#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021044_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021045
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021046
Guido van Rossum7f43da71994-08-01 12:15:30 +000021047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021048
21049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021050{ echo "$as_me:$LINENO: result: $works" >&5
21051echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021052
Guido van Rossumda88dad1995-01-26 00:46:29 +000021053have_prototypes=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021054{ echo "$as_me:$LINENO: checking for prototypes" >&5
21055echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021056cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021057/* confdefs.h. */
21058_ACEOF
21059cat confdefs.h >>conftest.$ac_ext
21060cat >>conftest.$ac_ext <<_ACEOF
21061/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021062int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021063int
21064main ()
21065{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021066return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021067 ;
21068 return 0;
21069}
21070_ACEOF
21071rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021072if { (ac_try="$ac_compile"
21073case "(($ac_try" in
21074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21075 *) ac_try_echo=$ac_try;;
21076esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021080 grep -v '^ *+' conftest.er1 >conftest.err
21081 rm -f conftest.er1
21082 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021084 (exit $ac_status); } && {
21085 test -z "$ac_c_werror_flag" ||
21086 test ! -s conftest.err
21087 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021088
21089
21090cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021091#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021092_ACEOF
21093
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021094 have_prototypes=yes
21095
Guido van Rossumf78abae1997-01-21 22:02:36 +000021096else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021098sed 's/^/| /' conftest.$ac_ext >&5
21099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021100
Guido van Rossum7f43da71994-08-01 12:15:30 +000021101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021102
21103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021104{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21105echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021106
Guido van Rossumda88dad1995-01-26 00:46:29 +000021107works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021108{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21109echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021111/* confdefs.h. */
21112_ACEOF
21113cat confdefs.h >>conftest.$ac_ext
21114cat >>conftest.$ac_ext <<_ACEOF
21115/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021116
21117#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021118int foo(int x, ...) {
21119 va_list va;
21120 va_start(va, x);
21121 va_arg(va, int);
21122 va_arg(va, char *);
21123 va_arg(va, double);
21124 return 0;
21125}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021126
Martin v. Löwis11437992002-04-12 09:54:03 +000021127int
21128main ()
21129{
Guido van Rossum90eea071996-08-30 20:58:57 +000021130return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021131 ;
21132 return 0;
21133}
21134_ACEOF
21135rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021136if { (ac_try="$ac_compile"
21137case "(($ac_try" in
21138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21139 *) ac_try_echo=$ac_try;;
21140esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021144 grep -v '^ *+' conftest.er1 >conftest.err
21145 rm -f conftest.er1
21146 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021148 (exit $ac_status); } && {
21149 test -z "$ac_c_werror_flag" ||
21150 test ! -s conftest.err
21151 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021152
21153
21154cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021155#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021156_ACEOF
21157
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021158 works=yes
21159
Guido van Rossumf78abae1997-01-21 22:02:36 +000021160else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021162sed 's/^/| /' conftest.$ac_ext >&5
21163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021164
Guido van Rossum627b2d71993-12-24 10:39:16 +000021165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021166
21167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021168{ echo "$as_me:$LINENO: result: $works" >&5
21169echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021170
Martin v. Löwisd6320502004-08-12 13:45:08 +000021171# check for socketpair
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021172{ echo "$as_me:$LINENO: checking for socketpair" >&5
21173echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021174cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021175/* confdefs.h. */
21176_ACEOF
21177cat confdefs.h >>conftest.$ac_ext
21178cat >>conftest.$ac_ext <<_ACEOF
21179/* end confdefs.h. */
21180
21181#include <sys/types.h>
21182#include <sys/socket.h>
21183
21184int
21185main ()
21186{
21187void *x=socketpair
21188 ;
21189 return 0;
21190}
21191_ACEOF
21192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021193if { (ac_try="$ac_compile"
21194case "(($ac_try" in
21195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21196 *) ac_try_echo=$ac_try;;
21197esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021201 grep -v '^ *+' conftest.er1 >conftest.err
21202 rm -f conftest.er1
21203 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021205 (exit $ac_status); } && {
21206 test -z "$ac_c_werror_flag" ||
21207 test ! -s conftest.err
21208 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021209
21210cat >>confdefs.h <<\_ACEOF
21211#define HAVE_SOCKETPAIR 1
21212_ACEOF
21213
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021214 { echo "$as_me:$LINENO: result: yes" >&5
21215echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021216else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021217 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021218sed 's/^/| /' conftest.$ac_ext >&5
21219
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021220 { echo "$as_me:$LINENO: result: no" >&5
21221echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021222
21223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021224
21225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021226
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021227# check if sockaddr has sa_len member
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021228{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21229echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021230cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021231/* confdefs.h. */
21232_ACEOF
21233cat confdefs.h >>conftest.$ac_ext
21234cat >>conftest.$ac_ext <<_ACEOF
21235/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021236#include <sys/types.h>
21237#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021238int
21239main ()
21240{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021241struct sockaddr x;
21242x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021243 ;
21244 return 0;
21245}
21246_ACEOF
21247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021248if { (ac_try="$ac_compile"
21249case "(($ac_try" in
21250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21251 *) ac_try_echo=$ac_try;;
21252esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021256 grep -v '^ *+' conftest.er1 >conftest.err
21257 rm -f conftest.er1
21258 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021260 (exit $ac_status); } && {
21261 test -z "$ac_c_werror_flag" ||
21262 test ! -s conftest.err
21263 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021264 { echo "$as_me:$LINENO: result: yes" >&5
21265echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021266
21267cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021268#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021269_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021270
21271else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021273sed 's/^/| /' conftest.$ac_ext >&5
21274
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021275 { echo "$as_me:$LINENO: result: no" >&5
21276echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021278
21279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021280
Guido van Rossumda88dad1995-01-26 00:46:29 +000021281va_list_is_array=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021282{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21283echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021285/* confdefs.h. */
21286_ACEOF
21287cat confdefs.h >>conftest.$ac_ext
21288cat >>conftest.$ac_ext <<_ACEOF
21289/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021290
21291#ifdef HAVE_STDARG_PROTOTYPES
21292#include <stdarg.h>
21293#else
21294#include <varargs.h>
21295#endif
21296
Martin v. Löwis11437992002-04-12 09:54:03 +000021297int
21298main ()
21299{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021300va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021301 ;
21302 return 0;
21303}
21304_ACEOF
21305rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021306if { (ac_try="$ac_compile"
21307case "(($ac_try" in
21308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21309 *) ac_try_echo=$ac_try;;
21310esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021314 grep -v '^ *+' conftest.er1 >conftest.err
21315 rm -f conftest.er1
21316 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021318 (exit $ac_status); } && {
21319 test -z "$ac_c_werror_flag" ||
21320 test ! -s conftest.err
21321 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021322 :
21323else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021325sed 's/^/| /' conftest.$ac_ext >&5
21326
Martin v. Löwis11437992002-04-12 09:54:03 +000021327
21328
21329cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021330#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021331_ACEOF
21332
Guido van Rossumda88dad1995-01-26 00:46:29 +000021333 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021334
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021336
21337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021338{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21339echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021340
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021341# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021342
21343
21344
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021345{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21346echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021347if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021349else
Martin v. Löwis11437992002-04-12 09:54:03 +000021350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021351/* confdefs.h. */
21352_ACEOF
21353cat confdefs.h >>conftest.$ac_ext
21354cat >>conftest.$ac_ext <<_ACEOF
21355/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021356/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21357 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21358#define gethostbyname_r innocuous_gethostbyname_r
21359
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021360/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021361 which can conflict with char gethostbyname_r (); below.
21362 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021363 <limits.h> exists even on freestanding compilers. */
21364
21365#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021366# include <limits.h>
21367#else
21368# include <assert.h>
21369#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021370
21371#undef gethostbyname_r
21372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021373/* Override any GCC internal prototype to avoid an error.
21374 Use char because int might match the return type of a GCC
21375 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021376#ifdef __cplusplus
21377extern "C"
21378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021379char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021380/* The GNU C library defines this for functions which it implements
21381 to always fail with ENOSYS. Some functions are actually named
21382 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021383#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021384choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021385#endif
21386
Skip Montanaro6dead952003-09-25 14:50:04 +000021387int
21388main ()
21389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021390return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021391 ;
21392 return 0;
21393}
21394_ACEOF
21395rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021396if { (ac_try="$ac_link"
21397case "(($ac_try" in
21398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21399 *) ac_try_echo=$ac_try;;
21400esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021402 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021404 grep -v '^ *+' conftest.er1 >conftest.err
21405 rm -f conftest.er1
21406 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021408 (exit $ac_status); } && {
21409 test -z "$ac_c_werror_flag" ||
21410 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021411 } && test -s conftest$ac_exeext &&
21412 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021413 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021414else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021416sed 's/^/| /' conftest.$ac_ext >&5
21417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021418 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021420
21421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021422 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021423fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021424{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21425echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21426if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021427
Martin v. Löwis11437992002-04-12 09:54:03 +000021428 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021429#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021430_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021431
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021432 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21433echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021434 OLD_CFLAGS=$CFLAGS
21435 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021437/* confdefs.h. */
21438_ACEOF
21439cat confdefs.h >>conftest.$ac_ext
21440cat >>conftest.$ac_ext <<_ACEOF
21441/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021442
21443# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021444
Martin v. Löwis11437992002-04-12 09:54:03 +000021445int
21446main ()
21447{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021448
21449 char *name;
21450 struct hostent *he, *res;
21451 char buffer[2048];
21452 int buflen = 2048;
21453 int h_errnop;
21454
21455 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021456
21457 ;
21458 return 0;
21459}
21460_ACEOF
21461rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021462if { (ac_try="$ac_compile"
21463case "(($ac_try" in
21464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21465 *) ac_try_echo=$ac_try;;
21466esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021470 grep -v '^ *+' conftest.er1 >conftest.err
21471 rm -f conftest.er1
21472 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021474 (exit $ac_status); } && {
21475 test -z "$ac_c_werror_flag" ||
21476 test ! -s conftest.err
21477 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021478
21479 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021480#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021481_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021482
Martin v. Löwis11437992002-04-12 09:54:03 +000021483
21484cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021485#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021486_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021487
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021488 { echo "$as_me:$LINENO: result: yes" >&5
21489echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021490
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021491else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021493sed 's/^/| /' conftest.$ac_ext >&5
21494
Martin v. Löwis11437992002-04-12 09:54:03 +000021495
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021496 { echo "$as_me:$LINENO: result: no" >&5
21497echo "${ECHO_T}no" >&6; }
21498 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21499echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021501/* confdefs.h. */
21502_ACEOF
21503cat confdefs.h >>conftest.$ac_ext
21504cat >>conftest.$ac_ext <<_ACEOF
21505/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021506
21507# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021508
Martin v. Löwis11437992002-04-12 09:54:03 +000021509int
21510main ()
21511{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021512
21513 char *name;
21514 struct hostent *he;
21515 char buffer[2048];
21516 int buflen = 2048;
21517 int h_errnop;
21518
21519 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021520
21521 ;
21522 return 0;
21523}
21524_ACEOF
21525rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021526if { (ac_try="$ac_compile"
21527case "(($ac_try" in
21528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21529 *) ac_try_echo=$ac_try;;
21530esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021532 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021534 grep -v '^ *+' conftest.er1 >conftest.err
21535 rm -f conftest.er1
21536 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021538 (exit $ac_status); } && {
21539 test -z "$ac_c_werror_flag" ||
21540 test ! -s conftest.err
21541 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021542
21543 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021544#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021545_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021546
Martin v. Löwis11437992002-04-12 09:54:03 +000021547
21548cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021549#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021550_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021551
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021552 { echo "$as_me:$LINENO: result: yes" >&5
21553echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021555else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021557sed 's/^/| /' conftest.$ac_ext >&5
21558
Martin v. Löwis11437992002-04-12 09:54:03 +000021559
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021560 { echo "$as_me:$LINENO: result: no" >&5
21561echo "${ECHO_T}no" >&6; }
21562 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21563echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021565/* confdefs.h. */
21566_ACEOF
21567cat confdefs.h >>conftest.$ac_ext
21568cat >>conftest.$ac_ext <<_ACEOF
21569/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021570
21571# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021572
Martin v. Löwis11437992002-04-12 09:54:03 +000021573int
21574main ()
21575{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021576
21577 char *name;
21578 struct hostent *he;
21579 struct hostent_data data;
21580
21581 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021582
21583 ;
21584 return 0;
21585}
21586_ACEOF
21587rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021588if { (ac_try="$ac_compile"
21589case "(($ac_try" in
21590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21591 *) ac_try_echo=$ac_try;;
21592esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021594 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021596 grep -v '^ *+' conftest.er1 >conftest.err
21597 rm -f conftest.er1
21598 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021600 (exit $ac_status); } && {
21601 test -z "$ac_c_werror_flag" ||
21602 test ! -s conftest.err
21603 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021604
21605 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021606#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021607_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021608
Martin v. Löwis11437992002-04-12 09:54:03 +000021609
21610cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021611#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021612_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021613
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021614 { echo "$as_me:$LINENO: result: yes" >&5
21615echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021616
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021617else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021619sed 's/^/| /' conftest.$ac_ext >&5
21620
Martin v. Löwis11437992002-04-12 09:54:03 +000021621
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021622 { echo "$as_me:$LINENO: result: no" >&5
21623echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021624
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021626
21627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021628
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021630
21631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021632
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021634
21635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021636 CFLAGS=$OLD_CFLAGS
21637
21638else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021639
Martin v. Löwis11437992002-04-12 09:54:03 +000021640
21641for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021642do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21644{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021646if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021648else
Martin v. Löwis11437992002-04-12 09:54:03 +000021649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021650/* confdefs.h. */
21651_ACEOF
21652cat confdefs.h >>conftest.$ac_ext
21653cat >>conftest.$ac_ext <<_ACEOF
21654/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021655/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21657#define $ac_func innocuous_$ac_func
21658
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021659/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021660 which can conflict with char $ac_func (); below.
21661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021662 <limits.h> exists even on freestanding compilers. */
21663
21664#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021665# include <limits.h>
21666#else
21667# include <assert.h>
21668#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021669
21670#undef $ac_func
21671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021672/* Override any GCC internal prototype to avoid an error.
21673 Use char because int might match the return type of a GCC
21674 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021675#ifdef __cplusplus
21676extern "C"
21677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021678char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021679/* The GNU C library defines this for functions which it implements
21680 to always fail with ENOSYS. Some functions are actually named
21681 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021682#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021683choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021684#endif
21685
Skip Montanaro6dead952003-09-25 14:50:04 +000021686int
21687main ()
21688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021689return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021690 ;
21691 return 0;
21692}
21693_ACEOF
21694rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021695if { (ac_try="$ac_link"
21696case "(($ac_try" in
21697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21698 *) ac_try_echo=$ac_try;;
21699esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021701 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021703 grep -v '^ *+' conftest.er1 >conftest.err
21704 rm -f conftest.er1
21705 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021707 (exit $ac_status); } && {
21708 test -z "$ac_c_werror_flag" ||
21709 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021710 } && test -s conftest$ac_exeext &&
21711 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021712 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021713else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021715sed 's/^/| /' conftest.$ac_ext >&5
21716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021717 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021719
21720rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021721 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021722fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021723ac_res=`eval echo '${'$as_ac_var'}'`
21724 { echo "$as_me:$LINENO: result: $ac_res" >&5
21725echo "${ECHO_T}$ac_res" >&6; }
21726if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021727 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021728#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021729_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021730
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021731fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021732done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021733
Michael W. Hudson54241132001-12-07 15:38:26 +000021734
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021735fi
21736
Michael W. Hudson54241132001-12-07 15:38:26 +000021737
21738
21739
21740
21741
21742
Guido van Rossum627b2d71993-12-24 10:39:16 +000021743# checks for system services
21744# (none yet)
21745
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021746# Linux requires this for correct f.p. operations
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021747{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21748echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021749if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021750 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021751else
Martin v. Löwis11437992002-04-12 09:54:03 +000021752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021753/* confdefs.h. */
21754_ACEOF
21755cat confdefs.h >>conftest.$ac_ext
21756cat >>conftest.$ac_ext <<_ACEOF
21757/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021758/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21759 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21760#define __fpu_control innocuous___fpu_control
21761
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021762/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021763 which can conflict with char __fpu_control (); below.
21764 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021765 <limits.h> exists even on freestanding compilers. */
21766
21767#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021768# include <limits.h>
21769#else
21770# include <assert.h>
21771#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021772
21773#undef __fpu_control
21774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021775/* Override any GCC internal prototype to avoid an error.
21776 Use char because int might match the return type of a GCC
21777 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021778#ifdef __cplusplus
21779extern "C"
21780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021781char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021782/* The GNU C library defines this for functions which it implements
21783 to always fail with ENOSYS. Some functions are actually named
21784 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021785#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021786choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021787#endif
21788
Skip Montanaro6dead952003-09-25 14:50:04 +000021789int
21790main ()
21791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021792return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021793 ;
21794 return 0;
21795}
21796_ACEOF
21797rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021798if { (ac_try="$ac_link"
21799case "(($ac_try" in
21800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21801 *) ac_try_echo=$ac_try;;
21802esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021804 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021806 grep -v '^ *+' conftest.er1 >conftest.err
21807 rm -f conftest.er1
21808 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021810 (exit $ac_status); } && {
21811 test -z "$ac_c_werror_flag" ||
21812 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021813 } && test -s conftest$ac_exeext &&
21814 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021815 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021816else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021818sed 's/^/| /' conftest.$ac_ext >&5
21819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021820 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021822
21823rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021824 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021825fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021826{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21827echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21828if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021829 :
21830else
Martin v. Löwis11437992002-04-12 09:54:03 +000021831
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021832{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21833echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021834if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021835 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021836else
Martin v. Löwis11437992002-04-12 09:54:03 +000021837 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021838LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021839cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021840/* confdefs.h. */
21841_ACEOF
21842cat confdefs.h >>conftest.$ac_ext
21843cat >>conftest.$ac_ext <<_ACEOF
21844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021846/* Override any GCC internal prototype to avoid an error.
21847 Use char because int might match the return type of a GCC
21848 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021849#ifdef __cplusplus
21850extern "C"
21851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021852char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021853int
21854main ()
21855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021856return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021857 ;
21858 return 0;
21859}
21860_ACEOF
21861rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021862if { (ac_try="$ac_link"
21863case "(($ac_try" in
21864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21865 *) ac_try_echo=$ac_try;;
21866esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021868 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021870 grep -v '^ *+' conftest.er1 >conftest.err
21871 rm -f conftest.er1
21872 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021874 (exit $ac_status); } && {
21875 test -z "$ac_c_werror_flag" ||
21876 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021877 } && test -s conftest$ac_exeext &&
21878 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021879 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021880else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021882sed 's/^/| /' conftest.$ac_ext >&5
21883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021884 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021886
21887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021889LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021890fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021891{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21892echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21893if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021894 cat >>confdefs.h <<_ACEOF
21895#define HAVE_LIBIEEE 1
21896_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021897
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021898 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021899
Guido van Rossum627b2d71993-12-24 10:39:16 +000021900fi
21901
Michael W. Hudson54241132001-12-07 15:38:26 +000021902
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021903fi
21904
Michael W. Hudson54241132001-12-07 15:38:26 +000021905
Guido van Rossum7f253911997-05-09 02:42:48 +000021906# Check for --with-fpectl
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021907{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21908echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021910# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021911if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021912 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021913if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021914then
21915
21916cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021917#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021918_ACEOF
21919
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021920 { echo "$as_me:$LINENO: result: yes" >&5
21921echo "${ECHO_T}yes" >&6; }
21922else { echo "$as_me:$LINENO: result: no" >&5
21923echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021924fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021925else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021926 { echo "$as_me:$LINENO: result: no" >&5
21927echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021928fi
21929
Guido van Rossum7f253911997-05-09 02:42:48 +000021930
Guido van Rossum7f43da71994-08-01 12:15:30 +000021931# check for --with-libm=...
21932
Guido van Rossum563e7081996-09-10 18:20:48 +000021933case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021934Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021935*) LIBM=-lm
21936esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021937{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21938echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021940# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021941if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021942 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021943if test "$withval" = no
21944then LIBM=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021945 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21946echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021947elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021948then LIBM=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021949 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21950echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21951else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21952echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021953 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021954fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021955else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021956 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21957echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021958fi
21959
Guido van Rossum7f43da71994-08-01 12:15:30 +000021960
21961# check for --with-libc=...
21962
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021963{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21964echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021966# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021967if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021968 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021969if test "$withval" = no
21970then LIBC=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021971 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21972echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021973elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021974then LIBC=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021975 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21976echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
21977else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21978echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021979 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021980fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021981else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021982 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21983echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021984fi
21985
Guido van Rossum7f43da71994-08-01 12:15:30 +000021986
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021987# **************************************************
21988# * Check for various properties of floating point *
21989# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021990
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021991{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
21992echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021993if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021994 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021995else
21996
21997if test "$cross_compiling" = yes; then
21998 ac_cv_little_endian_double=no
21999else
22000 cat >conftest.$ac_ext <<_ACEOF
22001/* confdefs.h. */
22002_ACEOF
22003cat confdefs.h >>conftest.$ac_ext
22004cat >>conftest.$ac_ext <<_ACEOF
22005/* end confdefs.h. */
22006
22007#include <string.h>
22008int main() {
22009 double x = 9006104071832581.0;
22010 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22011 return 0;
22012 else
22013 return 1;
22014}
22015
22016_ACEOF
22017rm -f conftest$ac_exeext
22018if { (ac_try="$ac_link"
22019case "(($ac_try" in
22020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22021 *) ac_try_echo=$ac_try;;
22022esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022024 (eval "$ac_link") 2>&5
22025 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22028 { (case "(($ac_try" in
22029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22030 *) ac_try_echo=$ac_try;;
22031esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022033 (eval "$ac_try") 2>&5
22034 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022036 (exit $ac_status); }; }; then
22037 ac_cv_little_endian_double=yes
22038else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022039 echo "$as_me: program exited with status $ac_status" >&5
22040echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022041sed 's/^/| /' conftest.$ac_ext >&5
22042
22043( exit $ac_status )
22044ac_cv_little_endian_double=no
22045fi
22046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22047fi
22048
22049
22050fi
22051
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022052{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22053echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022054if test "$ac_cv_little_endian_double" = yes
22055then
22056
22057cat >>confdefs.h <<\_ACEOF
22058#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22059_ACEOF
22060
22061fi
22062
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022063{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22064echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022065if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022066 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022067else
22068
22069if test "$cross_compiling" = yes; then
22070 ac_cv_big_endian_double=no
22071else
22072 cat >conftest.$ac_ext <<_ACEOF
22073/* confdefs.h. */
22074_ACEOF
22075cat confdefs.h >>conftest.$ac_ext
22076cat >>conftest.$ac_ext <<_ACEOF
22077/* end confdefs.h. */
22078
22079#include <string.h>
22080int main() {
22081 double x = 9006104071832581.0;
22082 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22083 return 0;
22084 else
22085 return 1;
22086}
22087
22088_ACEOF
22089rm -f conftest$ac_exeext
22090if { (ac_try="$ac_link"
22091case "(($ac_try" in
22092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22093 *) ac_try_echo=$ac_try;;
22094esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022096 (eval "$ac_link") 2>&5
22097 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22100 { (case "(($ac_try" in
22101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22102 *) ac_try_echo=$ac_try;;
22103esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022105 (eval "$ac_try") 2>&5
22106 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022108 (exit $ac_status); }; }; then
22109 ac_cv_big_endian_double=yes
22110else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022111 echo "$as_me: program exited with status $ac_status" >&5
22112echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022113sed 's/^/| /' conftest.$ac_ext >&5
22114
22115( exit $ac_status )
22116ac_cv_big_endian_double=no
22117fi
22118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22119fi
22120
22121
22122fi
22123
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022124{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22125echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022126if test "$ac_cv_big_endian_double" = yes
22127then
22128
22129cat >>confdefs.h <<\_ACEOF
22130#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22131_ACEOF
22132
22133fi
22134
22135# Some ARM platforms use a mixed-endian representation for doubles.
22136# While Python doesn't currently have full support for these platforms
22137# (see e.g., issue 1762561), we can at least make sure that float <-> string
22138# conversions work.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022139{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22140echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022141if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022142 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022143else
22144
22145if test "$cross_compiling" = yes; then
22146 ac_cv_mixed_endian_double=no
22147else
22148 cat >conftest.$ac_ext <<_ACEOF
22149/* confdefs.h. */
22150_ACEOF
22151cat confdefs.h >>conftest.$ac_ext
22152cat >>conftest.$ac_ext <<_ACEOF
22153/* end confdefs.h. */
22154
22155#include <string.h>
22156int main() {
22157 double x = 9006104071832581.0;
22158 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22159 return 0;
22160 else
22161 return 1;
22162}
22163
22164_ACEOF
22165rm -f conftest$ac_exeext
22166if { (ac_try="$ac_link"
22167case "(($ac_try" in
22168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22169 *) ac_try_echo=$ac_try;;
22170esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022172 (eval "$ac_link") 2>&5
22173 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022175 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22176 { (case "(($ac_try" in
22177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22178 *) ac_try_echo=$ac_try;;
22179esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022181 (eval "$ac_try") 2>&5
22182 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022184 (exit $ac_status); }; }; then
22185 ac_cv_mixed_endian_double=yes
22186else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022187 echo "$as_me: program exited with status $ac_status" >&5
22188echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022189sed 's/^/| /' conftest.$ac_ext >&5
22190
22191( exit $ac_status )
22192ac_cv_mixed_endian_double=no
22193fi
22194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22195fi
22196
22197
22198fi
22199
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022200{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22201echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022202if test "$ac_cv_mixed_endian_double" = yes
22203then
22204
22205cat >>confdefs.h <<\_ACEOF
22206#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22207_ACEOF
22208
22209fi
22210
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022211# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022212# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022213# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022214# rounding; this is a problem on x86, where the x87 FPU has a default
22215# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22216# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022217if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22218then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022219 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022220 # x87 control word. It should be, but you never know...
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022221 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22222echo $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 +000022223 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022224/* confdefs.h. */
22225_ACEOF
22226cat confdefs.h >>conftest.$ac_ext
22227cat >>conftest.$ac_ext <<_ACEOF
22228/* end confdefs.h. */
22229
22230int
22231main ()
22232{
22233
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022234 unsigned short cw;
22235 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22236 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022237
22238 ;
22239 return 0;
22240}
22241_ACEOF
22242rm -f conftest.$ac_objext
22243if { (ac_try="$ac_compile"
22244case "(($ac_try" in
22245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22246 *) ac_try_echo=$ac_try;;
22247esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022249 (eval "$ac_compile") 2>conftest.er1
22250 ac_status=$?
22251 grep -v '^ *+' conftest.er1 >conftest.err
22252 rm -f conftest.er1
22253 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022255 (exit $ac_status); } && {
22256 test -z "$ac_c_werror_flag" ||
22257 test ! -s conftest.err
22258 } && test -s conftest.$ac_objext; then
22259 have_gcc_asm_for_x87=yes
22260else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022261 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022262sed 's/^/| /' conftest.$ac_ext >&5
22263
22264 have_gcc_asm_for_x87=no
22265fi
22266
22267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022268 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22269echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022270 if test "$have_gcc_asm_for_x87" = yes
22271 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022272
22273cat >>confdefs.h <<\_ACEOF
22274#define HAVE_GCC_ASM_FOR_X87 1
22275_ACEOF
22276
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022277 fi
22278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022279
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022280# Detect whether system arithmetic is subject to x87-style double
22281# rounding issues. The result of this test has little meaning on non
22282# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22283# mode is round-to-nearest and double rounding issues are present, and
22284# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022285{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22286echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022287# $BASECFLAGS may affect the result
22288ac_save_cc="$CC"
22289CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022290if test "$cross_compiling" = yes; then
22291 ac_cv_x87_double_rounding=no
22292else
22293 cat >conftest.$ac_ext <<_ACEOF
22294/* confdefs.h. */
22295_ACEOF
22296cat confdefs.h >>conftest.$ac_ext
22297cat >>conftest.$ac_ext <<_ACEOF
22298/* end confdefs.h. */
22299
22300#include <stdlib.h>
22301#include <math.h>
22302int main() {
22303 volatile double x, y, z;
22304 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22305 x = 0.99999999999999989; /* 1-2**-53 */
22306 y = 1./x;
22307 if (y != 1.)
22308 exit(0);
22309 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22310 x = 1e16;
22311 y = 2.99999;
22312 z = x + y;
22313 if (z != 1e16+4.)
22314 exit(0);
22315 /* both tests show evidence of double rounding */
22316 exit(1);
22317}
22318
22319_ACEOF
22320rm -f conftest$ac_exeext
22321if { (ac_try="$ac_link"
22322case "(($ac_try" in
22323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22324 *) ac_try_echo=$ac_try;;
22325esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022327 (eval "$ac_link") 2>&5
22328 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022330 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22331 { (case "(($ac_try" in
22332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22333 *) ac_try_echo=$ac_try;;
22334esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022336 (eval "$ac_try") 2>&5
22337 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022339 (exit $ac_status); }; }; then
22340 ac_cv_x87_double_rounding=no
22341else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022342 echo "$as_me: program exited with status $ac_status" >&5
22343echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022344sed 's/^/| /' conftest.$ac_ext >&5
22345
22346( exit $ac_status )
22347ac_cv_x87_double_rounding=yes
22348fi
22349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22350fi
22351
22352
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022353CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022354{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22355echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022356if test "$ac_cv_x87_double_rounding" = yes
22357then
22358
22359cat >>confdefs.h <<\_ACEOF
22360#define X87_DOUBLE_ROUNDING 1
22361_ACEOF
22362
22363fi
22364
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022365# ************************************
22366# * Check for mathematical functions *
22367# ************************************
22368
22369LIBS_SAVE=$LIBS
22370LIBS="$LIBS $LIBM"
22371
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022372# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22373# -0. on some architectures.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022374{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22375echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022376if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022377 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022378else
22379
22380if test "$cross_compiling" = yes; then
22381 ac_cv_tanh_preserves_zero_sign=no
22382else
22383 cat >conftest.$ac_ext <<_ACEOF
22384/* confdefs.h. */
22385_ACEOF
22386cat confdefs.h >>conftest.$ac_ext
22387cat >>conftest.$ac_ext <<_ACEOF
22388/* end confdefs.h. */
22389
22390#include <math.h>
22391#include <stdlib.h>
22392int main() {
22393 /* return 0 if either negative zeros don't exist
22394 on this platform or if negative zeros exist
22395 and tanh(-0.) == -0. */
22396 if (atan2(0., -1.) == atan2(-0., -1.) ||
22397 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22398 else exit(1);
22399}
22400
22401_ACEOF
22402rm -f conftest$ac_exeext
22403if { (ac_try="$ac_link"
22404case "(($ac_try" in
22405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22406 *) ac_try_echo=$ac_try;;
22407esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022409 (eval "$ac_link") 2>&5
22410 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22413 { (case "(($ac_try" in
22414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22415 *) ac_try_echo=$ac_try;;
22416esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022418 (eval "$ac_try") 2>&5
22419 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022421 (exit $ac_status); }; }; then
22422 ac_cv_tanh_preserves_zero_sign=yes
22423else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022424 echo "$as_me: program exited with status $ac_status" >&5
22425echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022426sed 's/^/| /' conftest.$ac_ext >&5
22427
22428( exit $ac_status )
22429ac_cv_tanh_preserves_zero_sign=no
22430fi
22431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22432fi
22433
22434
22435fi
22436
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022437{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22438echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022439if test "$ac_cv_tanh_preserves_zero_sign" = yes
22440then
22441
22442cat >>confdefs.h <<\_ACEOF
22443#define TANH_PRESERVES_ZERO_SIGN 1
22444_ACEOF
22445
22446fi
22447
22448
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022449
Michael W. Hudson54241132001-12-07 15:38:26 +000022450
Christian Heimes99170a52007-12-19 02:07:34 +000022451
22452
22453
22454
22455
Mark Dickinsonf2537862009-04-18 13:58:18 +000022456
22457for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022458do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022459as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22460{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22461echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022462if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022463 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022464else
22465 cat >conftest.$ac_ext <<_ACEOF
22466/* confdefs.h. */
22467_ACEOF
22468cat confdefs.h >>conftest.$ac_ext
22469cat >>conftest.$ac_ext <<_ACEOF
22470/* end confdefs.h. */
22471/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22472 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22473#define $ac_func innocuous_$ac_func
22474
22475/* System header to define __stub macros and hopefully few prototypes,
22476 which can conflict with char $ac_func (); below.
22477 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22478 <limits.h> exists even on freestanding compilers. */
22479
22480#ifdef __STDC__
22481# include <limits.h>
22482#else
22483# include <assert.h>
22484#endif
22485
22486#undef $ac_func
22487
22488/* Override any GCC internal prototype to avoid an error.
22489 Use char because int might match the return type of a GCC
22490 builtin and then its argument prototype would still apply. */
22491#ifdef __cplusplus
22492extern "C"
22493#endif
22494char $ac_func ();
22495/* The GNU C library defines this for functions which it implements
22496 to always fail with ENOSYS. Some functions are actually named
22497 something starting with __ and the normal name is an alias. */
22498#if defined __stub_$ac_func || defined __stub___$ac_func
22499choke me
22500#endif
22501
22502int
22503main ()
22504{
22505return $ac_func ();
22506 ;
22507 return 0;
22508}
22509_ACEOF
22510rm -f conftest.$ac_objext conftest$ac_exeext
22511if { (ac_try="$ac_link"
22512case "(($ac_try" in
22513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22514 *) ac_try_echo=$ac_try;;
22515esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022517 (eval "$ac_link") 2>conftest.er1
22518 ac_status=$?
22519 grep -v '^ *+' conftest.er1 >conftest.err
22520 rm -f conftest.er1
22521 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022523 (exit $ac_status); } && {
22524 test -z "$ac_c_werror_flag" ||
22525 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022526 } && test -s conftest$ac_exeext &&
22527 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022528 eval "$as_ac_var=yes"
22529else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022530 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022531sed 's/^/| /' conftest.$ac_ext >&5
22532
22533 eval "$as_ac_var=no"
22534fi
22535
22536rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22537 conftest$ac_exeext conftest.$ac_ext
22538fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022539ac_res=`eval echo '${'$as_ac_var'}'`
22540 { echo "$as_me:$LINENO: result: $ac_res" >&5
22541echo "${ECHO_T}$ac_res" >&6; }
22542if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022543 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022544#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022545_ACEOF
22546
22547fi
22548done
22549
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022550{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22551echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022552if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022553 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022554else
22555 cat >conftest.$ac_ext <<_ACEOF
22556/* confdefs.h. */
22557_ACEOF
22558cat confdefs.h >>conftest.$ac_ext
22559cat >>conftest.$ac_ext <<_ACEOF
22560/* end confdefs.h. */
22561#include <math.h>
22562
22563int
22564main ()
22565{
22566#ifndef isinf
22567 (void) isinf;
22568#endif
22569
22570 ;
22571 return 0;
22572}
22573_ACEOF
22574rm -f conftest.$ac_objext
22575if { (ac_try="$ac_compile"
22576case "(($ac_try" in
22577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22578 *) ac_try_echo=$ac_try;;
22579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022581 (eval "$ac_compile") 2>conftest.er1
22582 ac_status=$?
22583 grep -v '^ *+' conftest.er1 >conftest.err
22584 rm -f conftest.er1
22585 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022587 (exit $ac_status); } && {
22588 test -z "$ac_c_werror_flag" ||
22589 test ! -s conftest.err
22590 } && test -s conftest.$ac_objext; then
22591 ac_cv_have_decl_isinf=yes
22592else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022593 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022594sed 's/^/| /' conftest.$ac_ext >&5
22595
22596 ac_cv_have_decl_isinf=no
22597fi
22598
22599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22600fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022601{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22602echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22603if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022604
22605cat >>confdefs.h <<_ACEOF
22606#define HAVE_DECL_ISINF 1
22607_ACEOF
22608
22609
22610else
22611 cat >>confdefs.h <<_ACEOF
22612#define HAVE_DECL_ISINF 0
22613_ACEOF
22614
22615
22616fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022617{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22618echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022619if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022620 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022621else
22622 cat >conftest.$ac_ext <<_ACEOF
22623/* confdefs.h. */
22624_ACEOF
22625cat confdefs.h >>conftest.$ac_ext
22626cat >>conftest.$ac_ext <<_ACEOF
22627/* end confdefs.h. */
22628#include <math.h>
22629
22630int
22631main ()
22632{
22633#ifndef isnan
22634 (void) isnan;
22635#endif
22636
22637 ;
22638 return 0;
22639}
22640_ACEOF
22641rm -f conftest.$ac_objext
22642if { (ac_try="$ac_compile"
22643case "(($ac_try" in
22644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22645 *) ac_try_echo=$ac_try;;
22646esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022648 (eval "$ac_compile") 2>conftest.er1
22649 ac_status=$?
22650 grep -v '^ *+' conftest.er1 >conftest.err
22651 rm -f conftest.er1
22652 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022654 (exit $ac_status); } && {
22655 test -z "$ac_c_werror_flag" ||
22656 test ! -s conftest.err
22657 } && test -s conftest.$ac_objext; then
22658 ac_cv_have_decl_isnan=yes
22659else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022660 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022661sed 's/^/| /' conftest.$ac_ext >&5
22662
22663 ac_cv_have_decl_isnan=no
22664fi
22665
22666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22667fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022668{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22669echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22670if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022671
22672cat >>confdefs.h <<_ACEOF
22673#define HAVE_DECL_ISNAN 1
22674_ACEOF
22675
22676
22677else
22678 cat >>confdefs.h <<_ACEOF
22679#define HAVE_DECL_ISNAN 0
22680_ACEOF
22681
22682
22683fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022684{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22685echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022686if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022687 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022688else
22689 cat >conftest.$ac_ext <<_ACEOF
22690/* confdefs.h. */
22691_ACEOF
22692cat confdefs.h >>conftest.$ac_ext
22693cat >>conftest.$ac_ext <<_ACEOF
22694/* end confdefs.h. */
22695#include <math.h>
22696
22697int
22698main ()
22699{
22700#ifndef isfinite
22701 (void) isfinite;
22702#endif
22703
22704 ;
22705 return 0;
22706}
22707_ACEOF
22708rm -f conftest.$ac_objext
22709if { (ac_try="$ac_compile"
22710case "(($ac_try" in
22711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22712 *) ac_try_echo=$ac_try;;
22713esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022715 (eval "$ac_compile") 2>conftest.er1
22716 ac_status=$?
22717 grep -v '^ *+' conftest.er1 >conftest.err
22718 rm -f conftest.er1
22719 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022721 (exit $ac_status); } && {
22722 test -z "$ac_c_werror_flag" ||
22723 test ! -s conftest.err
22724 } && test -s conftest.$ac_objext; then
22725 ac_cv_have_decl_isfinite=yes
22726else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022727 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022728sed 's/^/| /' conftest.$ac_ext >&5
22729
22730 ac_cv_have_decl_isfinite=no
22731fi
22732
22733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22734fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022735{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22736echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22737if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022738
22739cat >>confdefs.h <<_ACEOF
22740#define HAVE_DECL_ISFINITE 1
22741_ACEOF
22742
22743
22744else
22745 cat >>confdefs.h <<_ACEOF
22746#define HAVE_DECL_ISFINITE 0
22747_ACEOF
22748
22749
22750fi
22751
22752
Christian Heimes99170a52007-12-19 02:07:34 +000022753
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022754LIBS=$LIBS_SAVE
22755
Mark Dickinson875ada42009-11-28 12:52:39 +000022756# For multiprocessing module, check that sem_open
22757# actually works. For FreeBSD versions <= 7.2,
22758# the kernel module that provides POSIX semaphores
22759# isn't loaded by default, so an attempt to call
22760# sem_open results in a 'Signal 12' error.
22761{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
22762echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
22763if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
22764 echo $ECHO_N "(cached) $ECHO_C" >&6
22765else
22766 if test "$cross_compiling" = yes; then
22767 ac_cv_posix_semaphores_enabled=yes
22768else
22769 cat >conftest.$ac_ext <<_ACEOF
22770/* confdefs.h. */
22771_ACEOF
22772cat confdefs.h >>conftest.$ac_ext
22773cat >>conftest.$ac_ext <<_ACEOF
22774/* end confdefs.h. */
22775
22776#include <unistd.h>
22777#include <fcntl.h>
22778#include <stdio.h>
22779#include <semaphore.h>
22780#include <sys/stat.h>
22781
22782int main(void) {
22783 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22784 if (a == SEM_FAILED) {
22785 perror("sem_open");
22786 return 1;
22787 }
22788 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022789 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000022790 return 0;
22791}
22792
22793_ACEOF
22794rm -f conftest$ac_exeext
22795if { (ac_try="$ac_link"
22796case "(($ac_try" in
22797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22798 *) ac_try_echo=$ac_try;;
22799esac
22800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22801 (eval "$ac_link") 2>&5
22802 ac_status=$?
22803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22804 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22805 { (case "(($ac_try" in
22806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22807 *) ac_try_echo=$ac_try;;
22808esac
22809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22810 (eval "$ac_try") 2>&5
22811 ac_status=$?
22812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22813 (exit $ac_status); }; }; then
22814 ac_cv_posix_semaphores_enabled=yes
22815else
22816 echo "$as_me: program exited with status $ac_status" >&5
22817echo "$as_me: failed program was:" >&5
22818sed 's/^/| /' conftest.$ac_ext >&5
22819
22820( exit $ac_status )
22821ac_cv_posix_semaphores_enabled=no
22822fi
22823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22824fi
22825
22826
22827
22828fi
22829
22830{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
22831echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
22832if test $ac_cv_posix_semaphores_enabled = no
22833then
22834
22835cat >>confdefs.h <<\_ACEOF
22836#define POSIX_SEMAPHORES_NOT_ENABLED 1
22837_ACEOF
22838
22839fi
22840
Mark Dickinson10683072009-04-18 21:18:19 +000022841# Multiprocessing check for broken sem_getvalue
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022842{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22843echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022844if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022845 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022846See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022847echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022848See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022849 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022850else
22851 cat >conftest.$ac_ext <<_ACEOF
22852/* confdefs.h. */
22853_ACEOF
22854cat confdefs.h >>conftest.$ac_ext
22855cat >>conftest.$ac_ext <<_ACEOF
22856/* end confdefs.h. */
22857
22858#include <unistd.h>
22859#include <fcntl.h>
22860#include <stdio.h>
22861#include <semaphore.h>
22862#include <sys/stat.h>
22863
22864int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022865 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000022866 int count;
22867 int res;
22868 if(a==SEM_FAILED){
22869 perror("sem_open");
22870 return 1;
22871
22872 }
22873 res = sem_getvalue(a, &count);
22874 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022875 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000022876 return res==-1 ? 1 : 0;
22877}
22878
22879
22880_ACEOF
22881rm -f conftest$ac_exeext
22882if { (ac_try="$ac_link"
22883case "(($ac_try" in
22884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22885 *) ac_try_echo=$ac_try;;
22886esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022888 (eval "$ac_link") 2>&5
22889 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22892 { (case "(($ac_try" in
22893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22894 *) ac_try_echo=$ac_try;;
22895esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022897 (eval "$ac_try") 2>&5
22898 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022900 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022901 { echo "$as_me:$LINENO: result: no" >&5
22902echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022903else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022904 echo "$as_me: program exited with status $ac_status" >&5
22905echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022906sed 's/^/| /' conftest.$ac_ext >&5
22907
22908( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022909{ echo "$as_me:$LINENO: result: yes" >&5
22910echo "${ECHO_T}yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022911
22912cat >>confdefs.h <<\_ACEOF
22913#define HAVE_BROKEN_SEM_GETVALUE 1
22914_ACEOF
22915
22916
22917fi
22918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22919fi
22920
22921
22922
Mark Dickinsonbd792642009-03-18 20:06:12 +000022923# determine what size digit to use for Python's longs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022924{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22925echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022926# Check whether --enable-big-digits was given.
22927if test "${enable_big_digits+set}" = set; then
22928 enableval=$enable_big_digits; case $enable_big_digits in
22929yes)
22930 enable_big_digits=30 ;;
22931no)
22932 enable_big_digits=15 ;;
2293315|30)
22934 ;;
22935*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022936 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22937echo "$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 +000022938 { (exit 1); exit 1; }; } ;;
22939esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022940{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22941echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022942
22943cat >>confdefs.h <<_ACEOF
22944#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22945_ACEOF
22946
22947
22948else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022949 { echo "$as_me:$LINENO: result: no value specified" >&5
22950echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022951fi
22952
22953
Guido van Rossumef2255b2000-03-10 22:30:29 +000022954# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022955if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022956 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22957echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022958if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022959 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022960fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022961{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22962echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022963else
Martin v. Löwis11437992002-04-12 09:54:03 +000022964 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022965{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22966echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022968/* confdefs.h. */
22969_ACEOF
22970cat confdefs.h >>conftest.$ac_ext
22971cat >>conftest.$ac_ext <<_ACEOF
22972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022973$ac_includes_default
22974#include <wchar.h>
22975_ACEOF
22976rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022977if { (ac_try="$ac_compile"
22978case "(($ac_try" in
22979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22980 *) ac_try_echo=$ac_try;;
22981esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022985 grep -v '^ *+' conftest.er1 >conftest.err
22986 rm -f conftest.er1
22987 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022989 (exit $ac_status); } && {
22990 test -z "$ac_c_werror_flag" ||
22991 test ! -s conftest.err
22992 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022993 ac_header_compiler=yes
22994else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022996sed 's/^/| /' conftest.$ac_ext >&5
22997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022998 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023000
23001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023002{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23003echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023004
23005# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023006{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23007echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023008cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023009/* confdefs.h. */
23010_ACEOF
23011cat confdefs.h >>conftest.$ac_ext
23012cat >>conftest.$ac_ext <<_ACEOF
23013/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023014#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023015_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023016if { (ac_try="$ac_cpp conftest.$ac_ext"
23017case "(($ac_try" in
23018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23019 *) ac_try_echo=$ac_try;;
23020esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023022 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023023 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023024 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023025 rm -f conftest.er1
23026 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023028 (exit $ac_status); } >/dev/null && {
23029 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23030 test ! -s conftest.err
23031 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023032 ac_header_preproc=yes
23033else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023035sed 's/^/| /' conftest.$ac_ext >&5
23036
Martin v. Löwis11437992002-04-12 09:54:03 +000023037 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023039
Martin v. Löwis11437992002-04-12 09:54:03 +000023040rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023041{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23042echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023043
23044# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023045case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23046 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023047 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23048echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23049 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23050echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023051 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023052 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023053 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023054 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23055echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23056 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23057echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23058 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23059echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23060 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23061echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23062 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23063echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23064 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23065echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023066 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023067## -------------------------------------- ##
23068## Report this to http://bugs.python.org/ ##
23069## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023070_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023071 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023072 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023073esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023074{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23075echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023076if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023077 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023078else
23079 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023080fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023081{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23082echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023083
23084fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023085if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023086
23087
23088cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023089#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023090_ACEOF
23091
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023092 wchar_h="yes"
23093
Guido van Rossumef2255b2000-03-10 22:30:29 +000023094else
Martin v. Löwis11437992002-04-12 09:54:03 +000023095 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023096
23097fi
23098
Michael W. Hudson54241132001-12-07 15:38:26 +000023099
Martin v. Löwis11437992002-04-12 09:54:03 +000023100
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023101# determine wchar_t size
23102if test "$wchar_h" = yes
23103then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023104 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23105echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23106if test "${ac_cv_type_wchar_t+set}" = set; then
23107 echo $ECHO_N "(cached) $ECHO_C" >&6
23108else
23109 cat >conftest.$ac_ext <<_ACEOF
23110/* confdefs.h. */
23111_ACEOF
23112cat confdefs.h >>conftest.$ac_ext
23113cat >>conftest.$ac_ext <<_ACEOF
23114/* end confdefs.h. */
23115#include <wchar.h>
23116
23117typedef wchar_t ac__type_new_;
23118int
23119main ()
23120{
23121if ((ac__type_new_ *) 0)
23122 return 0;
23123if (sizeof (ac__type_new_))
23124 return 0;
23125 ;
23126 return 0;
23127}
23128_ACEOF
23129rm -f conftest.$ac_objext
23130if { (ac_try="$ac_compile"
23131case "(($ac_try" in
23132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23133 *) ac_try_echo=$ac_try;;
23134esac
23135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23136 (eval "$ac_compile") 2>conftest.er1
23137 ac_status=$?
23138 grep -v '^ *+' conftest.er1 >conftest.err
23139 rm -f conftest.er1
23140 cat conftest.err >&5
23141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23142 (exit $ac_status); } && {
23143 test -z "$ac_c_werror_flag" ||
23144 test ! -s conftest.err
23145 } && test -s conftest.$ac_objext; then
23146 ac_cv_type_wchar_t=yes
23147else
23148 echo "$as_me: failed program was:" >&5
23149sed 's/^/| /' conftest.$ac_ext >&5
23150
23151 ac_cv_type_wchar_t=no
23152fi
23153
23154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23155fi
23156{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23157echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23158
23159# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023160# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23161# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23162# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023163{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23164echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023165if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023166 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023167else
Martin v. Löwis11437992002-04-12 09:54:03 +000023168 if test "$cross_compiling" = yes; then
23169 # Depending upon the size, compute the lo and hi bounds.
23170cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023171/* confdefs.h. */
23172_ACEOF
23173cat confdefs.h >>conftest.$ac_ext
23174cat >>conftest.$ac_ext <<_ACEOF
23175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023176#include <wchar.h>
23177
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023178 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023179int
23180main ()
23181{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023182static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023183test_array [0] = 0
23184
23185 ;
23186 return 0;
23187}
23188_ACEOF
23189rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023190if { (ac_try="$ac_compile"
23191case "(($ac_try" in
23192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23193 *) ac_try_echo=$ac_try;;
23194esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023198 grep -v '^ *+' conftest.er1 >conftest.err
23199 rm -f conftest.er1
23200 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023202 (exit $ac_status); } && {
23203 test -z "$ac_c_werror_flag" ||
23204 test ! -s conftest.err
23205 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023206 ac_lo=0 ac_mid=0
23207 while :; do
23208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023209/* confdefs.h. */
23210_ACEOF
23211cat confdefs.h >>conftest.$ac_ext
23212cat >>conftest.$ac_ext <<_ACEOF
23213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023214#include <wchar.h>
23215
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023216 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023217int
23218main ()
23219{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023221test_array [0] = 0
23222
23223 ;
23224 return 0;
23225}
23226_ACEOF
23227rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023228if { (ac_try="$ac_compile"
23229case "(($ac_try" in
23230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23231 *) ac_try_echo=$ac_try;;
23232esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023236 grep -v '^ *+' conftest.er1 >conftest.err
23237 rm -f conftest.er1
23238 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023240 (exit $ac_status); } && {
23241 test -z "$ac_c_werror_flag" ||
23242 test ! -s conftest.err
23243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023244 ac_hi=$ac_mid; break
23245else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023247sed 's/^/| /' conftest.$ac_ext >&5
23248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023249 ac_lo=`expr $ac_mid + 1`
23250 if test $ac_lo -le $ac_mid; then
23251 ac_lo= ac_hi=
23252 break
23253 fi
23254 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023256
23257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023258 done
23259else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023261sed 's/^/| /' conftest.$ac_ext >&5
23262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023264/* confdefs.h. */
23265_ACEOF
23266cat confdefs.h >>conftest.$ac_ext
23267cat >>conftest.$ac_ext <<_ACEOF
23268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023269#include <wchar.h>
23270
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023271 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023272int
23273main ()
23274{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023275static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023276test_array [0] = 0
23277
23278 ;
23279 return 0;
23280}
23281_ACEOF
23282rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023283if { (ac_try="$ac_compile"
23284case "(($ac_try" in
23285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23286 *) ac_try_echo=$ac_try;;
23287esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023291 grep -v '^ *+' conftest.er1 >conftest.err
23292 rm -f conftest.er1
23293 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023295 (exit $ac_status); } && {
23296 test -z "$ac_c_werror_flag" ||
23297 test ! -s conftest.err
23298 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023299 ac_hi=-1 ac_mid=-1
23300 while :; do
23301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023302/* confdefs.h. */
23303_ACEOF
23304cat confdefs.h >>conftest.$ac_ext
23305cat >>conftest.$ac_ext <<_ACEOF
23306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023307#include <wchar.h>
23308
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023309 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023310int
23311main ()
23312{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023313static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023314test_array [0] = 0
23315
23316 ;
23317 return 0;
23318}
23319_ACEOF
23320rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023321if { (ac_try="$ac_compile"
23322case "(($ac_try" in
23323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23324 *) ac_try_echo=$ac_try;;
23325esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023329 grep -v '^ *+' conftest.er1 >conftest.err
23330 rm -f conftest.er1
23331 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023333 (exit $ac_status); } && {
23334 test -z "$ac_c_werror_flag" ||
23335 test ! -s conftest.err
23336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023337 ac_lo=$ac_mid; break
23338else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023340sed 's/^/| /' conftest.$ac_ext >&5
23341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023342 ac_hi=`expr '(' $ac_mid ')' - 1`
23343 if test $ac_mid -le $ac_hi; then
23344 ac_lo= ac_hi=
23345 break
23346 fi
23347 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023349
23350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023351 done
23352else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023354sed 's/^/| /' conftest.$ac_ext >&5
23355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023356 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023358
23359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023361
23362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023363# Binary search between lo and hi bounds.
23364while test "x$ac_lo" != "x$ac_hi"; do
23365 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023367/* confdefs.h. */
23368_ACEOF
23369cat confdefs.h >>conftest.$ac_ext
23370cat >>conftest.$ac_ext <<_ACEOF
23371/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023372#include <wchar.h>
23373
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023374 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023375int
23376main ()
23377{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023378static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023379test_array [0] = 0
23380
23381 ;
23382 return 0;
23383}
23384_ACEOF
23385rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023386if { (ac_try="$ac_compile"
23387case "(($ac_try" in
23388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23389 *) ac_try_echo=$ac_try;;
23390esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023394 grep -v '^ *+' conftest.er1 >conftest.err
23395 rm -f conftest.er1
23396 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023398 (exit $ac_status); } && {
23399 test -z "$ac_c_werror_flag" ||
23400 test ! -s conftest.err
23401 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023402 ac_hi=$ac_mid
23403else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023405sed 's/^/| /' conftest.$ac_ext >&5
23406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023407 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023409
23410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023411done
23412case $ac_lo in
23413?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023414'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023415 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023416See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023417echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023418See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023419 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023420 else
23421 ac_cv_sizeof_wchar_t=0
23422 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023423esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023424else
Martin v. Löwis11437992002-04-12 09:54:03 +000023425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023426/* confdefs.h. */
23427_ACEOF
23428cat confdefs.h >>conftest.$ac_ext
23429cat >>conftest.$ac_ext <<_ACEOF
23430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023431#include <wchar.h>
23432
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023433 typedef wchar_t ac__type_sizeof_;
23434static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23435static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023436#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023437#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023438int
23439main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023440{
Martin v. Löwis11437992002-04-12 09:54:03 +000023441
23442 FILE *f = fopen ("conftest.val", "w");
23443 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023444 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023445 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023446 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023447 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023448 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023449 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023450 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023451 }
23452 else
23453 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023454 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023455 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023456 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023457 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023458 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023459 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023460
23461 ;
23462 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023463}
Martin v. Löwis11437992002-04-12 09:54:03 +000023464_ACEOF
23465rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023466if { (ac_try="$ac_link"
23467case "(($ac_try" in
23468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23469 *) ac_try_echo=$ac_try;;
23470esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023472 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023473 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023475 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023476 { (case "(($ac_try" in
23477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23478 *) ac_try_echo=$ac_try;;
23479esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023481 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023482 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023484 (exit $ac_status); }; }; then
23485 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023486else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023487 echo "$as_me: program exited with status $ac_status" >&5
23488echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023489sed 's/^/| /' conftest.$ac_ext >&5
23490
Martin v. Löwis11437992002-04-12 09:54:03 +000023491( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023492if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023493 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023494See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023495echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023496See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023497 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023498 else
23499 ac_cv_sizeof_wchar_t=0
23500 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023502rm -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 +000023503fi
23504rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023505fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023506{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23507echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023508
23509
23510
Martin v. Löwis11437992002-04-12 09:54:03 +000023511cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023512#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023513_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023514
Michael W. Hudson54241132001-12-07 15:38:26 +000023515
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023516fi
23517
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023518{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23519echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023520have_ucs4_tcl=no
23521cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023522/* confdefs.h. */
23523_ACEOF
23524cat confdefs.h >>conftest.$ac_ext
23525cat >>conftest.$ac_ext <<_ACEOF
23526/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023527
23528#include <tcl.h>
23529#if TCL_UTF_MAX != 6
23530# error "NOT UCS4_TCL"
23531#endif
23532int
23533main ()
23534{
23535
23536 ;
23537 return 0;
23538}
23539_ACEOF
23540rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023541if { (ac_try="$ac_compile"
23542case "(($ac_try" in
23543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23544 *) ac_try_echo=$ac_try;;
23545esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023549 grep -v '^ *+' conftest.er1 >conftest.err
23550 rm -f conftest.er1
23551 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023553 (exit $ac_status); } && {
23554 test -z "$ac_c_werror_flag" ||
23555 test ! -s conftest.err
23556 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023557
23558
23559cat >>confdefs.h <<\_ACEOF
23560#define HAVE_UCS4_TCL 1
23561_ACEOF
23562
23563 have_ucs4_tcl=yes
23564
23565else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023567sed 's/^/| /' conftest.$ac_ext >&5
23568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023569
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023571
23572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023573{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23574echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023575
Skip Montanaro6dead952003-09-25 14:50:04 +000023576# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023577if test "$wchar_h" = yes
23578then
23579 # check whether wchar_t is signed or not
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023580 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23581echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023582 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023583 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023584else
23585
23586 if test "$cross_compiling" = yes; then
23587 ac_cv_wchar_t_signed=yes
23588else
23589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023590/* confdefs.h. */
23591_ACEOF
23592cat confdefs.h >>conftest.$ac_ext
23593cat >>conftest.$ac_ext <<_ACEOF
23594/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023595
23596 #include <wchar.h>
23597 int main()
23598 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023599 /* Success: exit code 0 */
23600 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023601 }
23602
23603_ACEOF
23604rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023605if { (ac_try="$ac_link"
23606case "(($ac_try" in
23607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23608 *) ac_try_echo=$ac_try;;
23609esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023611 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023612 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023614 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023615 { (case "(($ac_try" in
23616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23617 *) ac_try_echo=$ac_try;;
23618esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023620 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023621 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023623 (exit $ac_status); }; }; then
23624 ac_cv_wchar_t_signed=yes
23625else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023626 echo "$as_me: program exited with status $ac_status" >&5
23627echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023628sed 's/^/| /' conftest.$ac_ext >&5
23629
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023630( exit $ac_status )
23631ac_cv_wchar_t_signed=no
23632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023633rm -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 +000023634fi
23635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023636
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023637fi
23638
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023639 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23640echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023641fi
23642
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023643{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23644echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023645
23646# Check whether --with-wide-unicode was given.
23647if test "${with_wide_unicode+set}" = set; then
23648 withval=$with_wide_unicode;
23649if test "$withval" != no
23650then unicode_size="4"
23651else unicode_size="2"
23652fi
23653
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023654else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023655
Georg Brandl52d168a2008-01-07 18:10:24 +000023656case "$have_ucs4_tcl" in
23657 yes) unicode_size="4" ;;
23658 *) unicode_size="2" ;;
23659esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023660
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023661fi
23662
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023663
23664
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023665
Georg Brandl52d168a2008-01-07 18:10:24 +000023666case "$unicode_size" in
23667 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023668#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023669_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023670 ;;
23671 *) cat >>confdefs.h <<\_ACEOF
23672#define Py_UNICODE_SIZE 2
23673_ACEOF
23674 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023675esac
23676
Michael W. Hudson54241132001-12-07 15:38:26 +000023677
Martin v. Löwis11437992002-04-12 09:54:03 +000023678
23679
Georg Brandl52d168a2008-01-07 18:10:24 +000023680# wchar_t is only usable if it maps to an unsigned type
23681if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023682 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023683then
23684 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023685
Martin v. Löwis11437992002-04-12 09:54:03 +000023686cat >>confdefs.h <<\_ACEOF
23687#define HAVE_USABLE_WCHAR_T 1
23688_ACEOF
23689
Georg Brandl52d168a2008-01-07 18:10:24 +000023690 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023691#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023692_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023693
Georg Brandl52d168a2008-01-07 18:10:24 +000023694elif test "$ac_cv_sizeof_short" = "$unicode_size"
23695then
23696 PY_UNICODE_TYPE="unsigned short"
23697 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023698#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023699_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023700
Georg Brandl52d168a2008-01-07 18:10:24 +000023701elif test "$ac_cv_sizeof_long" = "$unicode_size"
23702then
23703 PY_UNICODE_TYPE="unsigned long"
23704 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023705#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023706_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023707
Georg Brandl52d168a2008-01-07 18:10:24 +000023708else
23709 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023710fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023711{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23712echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023713
23714# check for endianness
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023715{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23716echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023717if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023718 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023719else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023720 # See if sys/param.h defines the BYTE_ORDER macro.
23721cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023722/* confdefs.h. */
23723_ACEOF
23724cat confdefs.h >>conftest.$ac_ext
23725cat >>conftest.$ac_ext <<_ACEOF
23726/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023727#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023728#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023729
Martin v. Löwis11437992002-04-12 09:54:03 +000023730int
23731main ()
23732{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023733#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23734 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23735 bogus endian macros
23736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023737
23738 ;
23739 return 0;
23740}
23741_ACEOF
23742rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023743if { (ac_try="$ac_compile"
23744case "(($ac_try" in
23745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23746 *) ac_try_echo=$ac_try;;
23747esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023749 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023751 grep -v '^ *+' conftest.er1 >conftest.err
23752 rm -f conftest.er1
23753 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023755 (exit $ac_status); } && {
23756 test -z "$ac_c_werror_flag" ||
23757 test ! -s conftest.err
23758 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023759 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023760cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023761/* confdefs.h. */
23762_ACEOF
23763cat confdefs.h >>conftest.$ac_ext
23764cat >>conftest.$ac_ext <<_ACEOF
23765/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023766#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023767#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023768
Martin v. Löwis11437992002-04-12 09:54:03 +000023769int
23770main ()
23771{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023772#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023773 not big endian
23774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023775
23776 ;
23777 return 0;
23778}
23779_ACEOF
23780rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023781if { (ac_try="$ac_compile"
23782case "(($ac_try" in
23783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23784 *) ac_try_echo=$ac_try;;
23785esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023789 grep -v '^ *+' conftest.er1 >conftest.err
23790 rm -f conftest.er1
23791 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023793 (exit $ac_status); } && {
23794 test -z "$ac_c_werror_flag" ||
23795 test ! -s conftest.err
23796 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023797 ac_cv_c_bigendian=yes
23798else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023800sed 's/^/| /' conftest.$ac_ext >&5
23801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023802 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023804
23805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023806else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023808sed 's/^/| /' conftest.$ac_ext >&5
23809
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023810 # It does not; compile a test program.
23811if test "$cross_compiling" = yes; then
23812 # try to guess the endianness by grepping values into an object file
23813 ac_cv_c_bigendian=unknown
23814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023815/* confdefs.h. */
23816_ACEOF
23817cat confdefs.h >>conftest.$ac_ext
23818cat >>conftest.$ac_ext <<_ACEOF
23819/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023820short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23821short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23822void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23823short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23824short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23825void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023826int
23827main ()
23828{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023829 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023830 ;
23831 return 0;
23832}
23833_ACEOF
23834rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023835if { (ac_try="$ac_compile"
23836case "(($ac_try" in
23837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23838 *) ac_try_echo=$ac_try;;
23839esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023843 grep -v '^ *+' conftest.er1 >conftest.err
23844 rm -f conftest.er1
23845 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023847 (exit $ac_status); } && {
23848 test -z "$ac_c_werror_flag" ||
23849 test ! -s conftest.err
23850 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023851 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023852 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000023853fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023854if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23855 if test "$ac_cv_c_bigendian" = unknown; then
23856 ac_cv_c_bigendian=no
23857 else
23858 # finding both strings is unlikely to happen, but who knows?
23859 ac_cv_c_bigendian=unknown
23860 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023861fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023862else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023864sed 's/^/| /' conftest.$ac_ext >&5
23865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023866
Martin v. Löwis11437992002-04-12 09:54:03 +000023867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023868
23869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023870else
23871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023872/* confdefs.h. */
23873_ACEOF
23874cat confdefs.h >>conftest.$ac_ext
23875cat >>conftest.$ac_ext <<_ACEOF
23876/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023877$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023878int
23879main ()
23880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023881
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023882 /* Are we little or big endian? From Harbison&Steele. */
23883 union
23884 {
23885 long int l;
23886 char c[sizeof (long int)];
23887 } u;
23888 u.l = 1;
23889 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023890
23891 ;
23892 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023893}
Martin v. Löwis11437992002-04-12 09:54:03 +000023894_ACEOF
23895rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023896if { (ac_try="$ac_link"
23897case "(($ac_try" in
23898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23899 *) ac_try_echo=$ac_try;;
23900esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023902 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023903 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023906 { (case "(($ac_try" in
23907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23908 *) ac_try_echo=$ac_try;;
23909esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023911 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023912 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023914 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023915 ac_cv_c_bigendian=no
23916else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023917 echo "$as_me: program exited with status $ac_status" >&5
23918echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023919sed 's/^/| /' conftest.$ac_ext >&5
23920
Martin v. Löwis11437992002-04-12 09:54:03 +000023921( exit $ac_status )
23922ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023924rm -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 +000023925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023926
23927
Martin v. Löwis11437992002-04-12 09:54:03 +000023928fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023929
23930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23931fi
23932{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23933echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23934case $ac_cv_c_bigendian in
23935 yes)
Benjamin Petersona8332062009-09-11 22:36:27 +000023936
23937cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023938#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000023939_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023940 ;;
23941 no)
23942 ;;
23943 *)
23944 { { echo "$as_me:$LINENO: error: unknown endianness
23945presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23946echo "$as_me: error: unknown endianness
23947presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023948 { (exit 1); exit 1; }; } ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023949esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023950
Michael W. Hudson54241132001-12-07 15:38:26 +000023951
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023952# Check whether right shifting a negative integer extends the sign bit
23953# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023954{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23955echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023956if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023957 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023958else
Martin v. Löwis11437992002-04-12 09:54:03 +000023959
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023960if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023961 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023962else
Martin v. Löwis11437992002-04-12 09:54:03 +000023963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023964/* confdefs.h. */
23965_ACEOF
23966cat confdefs.h >>conftest.$ac_ext
23967cat >>conftest.$ac_ext <<_ACEOF
23968/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023969
23970int main()
23971{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023972 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023973}
23974
Martin v. Löwis11437992002-04-12 09:54:03 +000023975_ACEOF
23976rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023977if { (ac_try="$ac_link"
23978case "(($ac_try" in
23979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23980 *) ac_try_echo=$ac_try;;
23981esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023983 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023984 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023987 { (case "(($ac_try" in
23988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23989 *) ac_try_echo=$ac_try;;
23990esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023992 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023993 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023995 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023996 ac_cv_rshift_extends_sign=yes
23997else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023998 echo "$as_me: program exited with status $ac_status" >&5
23999echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024000sed 's/^/| /' conftest.$ac_ext >&5
24001
Martin v. Löwis11437992002-04-12 09:54:03 +000024002( exit $ac_status )
24003ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024005rm -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 +000024006fi
24007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024008
24009fi
24010
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024011{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24012echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024013if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024014then
Martin v. Löwis11437992002-04-12 09:54:03 +000024015
24016cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024017#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024018_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024019
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024020fi
24021
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024022# check for getc_unlocked and related locking functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024023{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24024echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024025if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024026 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024027else
Martin v. Löwis11437992002-04-12 09:54:03 +000024028
24029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024030/* confdefs.h. */
24031_ACEOF
24032cat confdefs.h >>conftest.$ac_ext
24033cat >>conftest.$ac_ext <<_ACEOF
24034/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024035#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024036int
24037main ()
24038{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024039
24040 FILE *f = fopen("/dev/null", "r");
24041 flockfile(f);
24042 getc_unlocked(f);
24043 funlockfile(f);
24044
Martin v. Löwis11437992002-04-12 09:54:03 +000024045 ;
24046 return 0;
24047}
24048_ACEOF
24049rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024050if { (ac_try="$ac_link"
24051case "(($ac_try" in
24052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24053 *) ac_try_echo=$ac_try;;
24054esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024056 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024058 grep -v '^ *+' conftest.er1 >conftest.err
24059 rm -f conftest.er1
24060 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024062 (exit $ac_status); } && {
24063 test -z "$ac_c_werror_flag" ||
24064 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024065 } && test -s conftest$ac_exeext &&
24066 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024067 ac_cv_have_getc_unlocked=yes
24068else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024070sed 's/^/| /' conftest.$ac_ext >&5
24071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024072 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024074
24075rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024076 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024077fi
24078
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024079{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24080echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024081if test "$ac_cv_have_getc_unlocked" = yes
24082then
Martin v. Löwis11437992002-04-12 09:54:03 +000024083
24084cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024085#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024086_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024087
24088fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024089
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024090# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024091# save the value of LIBS so we don't actually link Python with readline
24092LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024093
Gregory P. Smith18820942008-09-07 06:24:49 +000024094# On some systems we need to link readline to a termcap compatible
24095# library. NOTE: Keep the precedence of listed libraries synchronised
24096# with setup.py.
24097py_cv_lib_readline=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024098{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24099echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024100for py_libtermcap in "" ncursesw ncurses curses termcap; do
24101 if test -z "$py_libtermcap"; then
24102 READLINE_LIBS="-lreadline"
24103 else
24104 READLINE_LIBS="-lreadline -l$py_libtermcap"
24105 fi
24106 LIBS="$READLINE_LIBS $LIBS_no_readline"
24107 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024108/* confdefs.h. */
24109_ACEOF
24110cat confdefs.h >>conftest.$ac_ext
24111cat >>conftest.$ac_ext <<_ACEOF
24112/* end confdefs.h. */
24113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024114/* Override any GCC internal prototype to avoid an error.
24115 Use char because int might match the return type of a GCC
24116 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024117#ifdef __cplusplus
24118extern "C"
24119#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024120char readline ();
24121int
24122main ()
24123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024124return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024125 ;
24126 return 0;
24127}
24128_ACEOF
24129rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024130if { (ac_try="$ac_link"
24131case "(($ac_try" in
24132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24133 *) ac_try_echo=$ac_try;;
24134esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024136 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024137 ac_status=$?
24138 grep -v '^ *+' conftest.er1 >conftest.err
24139 rm -f conftest.er1
24140 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024142 (exit $ac_status); } && {
24143 test -z "$ac_c_werror_flag" ||
24144 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024145 } && test -s conftest$ac_exeext &&
24146 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024147 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024148else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024149 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024150sed 's/^/| /' conftest.$ac_ext >&5
24151
Gregory P. Smith18820942008-09-07 06:24:49 +000024152
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024154
24155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024156 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024157 if test $py_cv_lib_readline = yes; then
24158 break
24159 fi
24160done
24161# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24162#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024163if test $py_cv_lib_readline = no; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024164 { echo "$as_me:$LINENO: result: none" >&5
24165echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024166else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024167 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24168echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024169
24170cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024171#define HAVE_LIBREADLINE 1
24172_ACEOF
24173
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024174fi
24175
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024176# check for readline 2.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024177{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24178echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024179if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024180 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024181else
24182 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024183LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024184cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024185/* confdefs.h. */
24186_ACEOF
24187cat confdefs.h >>conftest.$ac_ext
24188cat >>conftest.$ac_ext <<_ACEOF
24189/* end confdefs.h. */
24190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024191/* Override any GCC internal prototype to avoid an error.
24192 Use char because int might match the return type of a GCC
24193 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024194#ifdef __cplusplus
24195extern "C"
24196#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024197char rl_callback_handler_install ();
24198int
24199main ()
24200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024201return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024202 ;
24203 return 0;
24204}
24205_ACEOF
24206rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024207if { (ac_try="$ac_link"
24208case "(($ac_try" in
24209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24210 *) ac_try_echo=$ac_try;;
24211esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024213 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024215 grep -v '^ *+' conftest.er1 >conftest.err
24216 rm -f conftest.er1
24217 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024219 (exit $ac_status); } && {
24220 test -z "$ac_c_werror_flag" ||
24221 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024222 } && test -s conftest$ac_exeext &&
24223 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024224 ac_cv_lib_readline_rl_callback_handler_install=yes
24225else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024226 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024227sed 's/^/| /' conftest.$ac_ext >&5
24228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024229 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024231
24232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024233 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024234LIBS=$ac_check_lib_save_LIBS
24235fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024236{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24237echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24238if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024239
24240cat >>confdefs.h <<\_ACEOF
24241#define HAVE_RL_CALLBACK 1
24242_ACEOF
24243
24244fi
24245
24246
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024247# check for readline 2.2
24248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024249/* confdefs.h. */
24250_ACEOF
24251cat confdefs.h >>conftest.$ac_ext
24252cat >>conftest.$ac_ext <<_ACEOF
24253/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024254#include <readline/readline.h>
24255_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024256if { (ac_try="$ac_cpp conftest.$ac_ext"
24257case "(($ac_try" in
24258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24259 *) ac_try_echo=$ac_try;;
24260esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024262 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024263 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024264 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024265 rm -f conftest.er1
24266 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024268 (exit $ac_status); } >/dev/null && {
24269 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24270 test ! -s conftest.err
24271 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024272 have_readline=yes
24273else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024275sed 's/^/| /' conftest.$ac_ext >&5
24276
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024277 have_readline=no
24278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024279
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024280rm -f conftest.err conftest.$ac_ext
24281if test $have_readline = yes
24282then
24283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024284/* confdefs.h. */
24285_ACEOF
24286cat confdefs.h >>conftest.$ac_ext
24287cat >>conftest.$ac_ext <<_ACEOF
24288/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024289#include <readline/readline.h>
24290
24291_ACEOF
24292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024293 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024294
24295cat >>confdefs.h <<\_ACEOF
24296#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24297_ACEOF
24298
24299fi
Ronald Oussoren095d2822010-03-08 07:03:14 +000024300rm -f -r conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000024301
24302 cat >conftest.$ac_ext <<_ACEOF
24303/* confdefs.h. */
24304_ACEOF
24305cat confdefs.h >>conftest.$ac_ext
24306cat >>conftest.$ac_ext <<_ACEOF
24307/* end confdefs.h. */
24308#include <readline/readline.h>
24309
24310_ACEOF
24311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24312 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24313
24314cat >>confdefs.h <<\_ACEOF
24315#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24316_ACEOF
24317
24318fi
Ronald Oussoren095d2822010-03-08 07:03:14 +000024319rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024320
24321fi
24322
Martin v. Löwis0daad592001-09-30 21:09:59 +000024323# check for readline 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024324{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24325echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024326if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024328else
Martin v. Löwis11437992002-04-12 09:54:03 +000024329 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024330LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024332/* confdefs.h. */
24333_ACEOF
24334cat confdefs.h >>conftest.$ac_ext
24335cat >>conftest.$ac_ext <<_ACEOF
24336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024338/* Override any GCC internal prototype to avoid an error.
24339 Use char because int might match the return type of a GCC
24340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024341#ifdef __cplusplus
24342extern "C"
24343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024344char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024345int
24346main ()
24347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024348return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024349 ;
24350 return 0;
24351}
24352_ACEOF
24353rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024354if { (ac_try="$ac_link"
24355case "(($ac_try" in
24356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24357 *) ac_try_echo=$ac_try;;
24358esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024360 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024362 grep -v '^ *+' conftest.er1 >conftest.err
24363 rm -f conftest.er1
24364 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024366 (exit $ac_status); } && {
24367 test -z "$ac_c_werror_flag" ||
24368 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024369 } && test -s conftest$ac_exeext &&
24370 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024371 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024372else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024374sed 's/^/| /' conftest.$ac_ext >&5
24375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024376 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024378
24379rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024381LIBS=$ac_check_lib_save_LIBS
24382fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024383{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24384echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24385if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024386
Martin v. Löwis11437992002-04-12 09:54:03 +000024387cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024388#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024389_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024390
Martin v. Löwis0daad592001-09-30 21:09:59 +000024391fi
24392
Michael W. Hudson54241132001-12-07 15:38:26 +000024393
Thomas Wouters89d996e2007-09-08 17:39:28 +000024394# also in 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024395{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24396echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024397if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024398 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024399else
24400 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024401LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024402cat >conftest.$ac_ext <<_ACEOF
24403/* confdefs.h. */
24404_ACEOF
24405cat confdefs.h >>conftest.$ac_ext
24406cat >>conftest.$ac_ext <<_ACEOF
24407/* end confdefs.h. */
24408
24409/* Override any GCC internal prototype to avoid an error.
24410 Use char because int might match the return type of a GCC
24411 builtin and then its argument prototype would still apply. */
24412#ifdef __cplusplus
24413extern "C"
24414#endif
24415char rl_completion_display_matches_hook ();
24416int
24417main ()
24418{
24419return rl_completion_display_matches_hook ();
24420 ;
24421 return 0;
24422}
24423_ACEOF
24424rm -f conftest.$ac_objext conftest$ac_exeext
24425if { (ac_try="$ac_link"
24426case "(($ac_try" in
24427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24428 *) ac_try_echo=$ac_try;;
24429esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024431 (eval "$ac_link") 2>conftest.er1
24432 ac_status=$?
24433 grep -v '^ *+' conftest.er1 >conftest.err
24434 rm -f conftest.er1
24435 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024437 (exit $ac_status); } && {
24438 test -z "$ac_c_werror_flag" ||
24439 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024440 } && test -s conftest$ac_exeext &&
24441 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024442 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24443else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024444 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024445sed 's/^/| /' conftest.$ac_ext >&5
24446
24447 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24448fi
24449
24450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24451 conftest$ac_exeext conftest.$ac_ext
24452LIBS=$ac_check_lib_save_LIBS
24453fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024454{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24455echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24456if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024457
24458cat >>confdefs.h <<\_ACEOF
24459#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24460_ACEOF
24461
24462fi
24463
24464
Martin v. Löwis0daad592001-09-30 21:09:59 +000024465# check for readline 4.2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024466{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24467echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024468if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024469 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024470else
Martin v. Löwis11437992002-04-12 09:54:03 +000024471 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024472LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024473cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024474/* confdefs.h. */
24475_ACEOF
24476cat confdefs.h >>conftest.$ac_ext
24477cat >>conftest.$ac_ext <<_ACEOF
24478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024480/* Override any GCC internal prototype to avoid an error.
24481 Use char because int might match the return type of a GCC
24482 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024483#ifdef __cplusplus
24484extern "C"
24485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024486char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024487int
24488main ()
24489{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024490return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024491 ;
24492 return 0;
24493}
24494_ACEOF
24495rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024496if { (ac_try="$ac_link"
24497case "(($ac_try" in
24498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24499 *) ac_try_echo=$ac_try;;
24500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024502 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024504 grep -v '^ *+' conftest.er1 >conftest.err
24505 rm -f conftest.er1
24506 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024508 (exit $ac_status); } && {
24509 test -z "$ac_c_werror_flag" ||
24510 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024511 } && test -s conftest$ac_exeext &&
24512 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024513 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024516sed 's/^/| /' conftest.$ac_ext >&5
24517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024518 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024520
24521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024523LIBS=$ac_check_lib_save_LIBS
24524fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024525{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24526echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24527if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024528
Martin v. Löwis11437992002-04-12 09:54:03 +000024529cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024530#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024531_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024532
Guido van Rossum353ae582001-07-10 16:45:32 +000024533fi
24534
Jack Jansendd19cf82001-12-06 22:36:17 +000024535
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024536# also in readline 4.2
24537cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024538/* confdefs.h. */
24539_ACEOF
24540cat confdefs.h >>conftest.$ac_ext
24541cat >>conftest.$ac_ext <<_ACEOF
24542/* end confdefs.h. */
24543#include <readline/readline.h>
24544_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024545if { (ac_try="$ac_cpp conftest.$ac_ext"
24546case "(($ac_try" in
24547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24548 *) ac_try_echo=$ac_try;;
24549esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024551 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024552 ac_status=$?
24553 grep -v '^ *+' conftest.er1 >conftest.err
24554 rm -f conftest.er1
24555 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024557 (exit $ac_status); } >/dev/null && {
24558 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24559 test ! -s conftest.err
24560 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024561 have_readline=yes
24562else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024563 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024564sed 's/^/| /' conftest.$ac_ext >&5
24565
24566 have_readline=no
24567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024568
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024569rm -f conftest.err conftest.$ac_ext
24570if test $have_readline = yes
24571then
24572 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024573/* confdefs.h. */
24574_ACEOF
24575cat confdefs.h >>conftest.$ac_ext
24576cat >>conftest.$ac_ext <<_ACEOF
24577/* end confdefs.h. */
24578#include <readline/readline.h>
24579
24580_ACEOF
24581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24582 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24583
24584cat >>confdefs.h <<\_ACEOF
24585#define HAVE_RL_CATCH_SIGNAL 1
24586_ACEOF
24587
24588fi
Ronald Oussoren095d2822010-03-08 07:03:14 +000024589rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024590
24591fi
24592
Martin v. Löwis82bca632006-02-10 20:49:30 +000024593# End of readline checks: restore LIBS
24594LIBS=$LIBS_no_readline
24595
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024596{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24597echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024598if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024599 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024600else
Martin v. Löwis11437992002-04-12 09:54:03 +000024601
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024602if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024603 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024604else
Martin v. Löwis11437992002-04-12 09:54:03 +000024605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024606/* confdefs.h. */
24607_ACEOF
24608cat confdefs.h >>conftest.$ac_ext
24609cat >>conftest.$ac_ext <<_ACEOF
24610/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024611
24612int main()
24613{
24614 int val1 = nice(1);
24615 if (val1 != -1 && val1 == nice(2))
24616 exit(0);
24617 exit(1);
24618}
24619
Martin v. Löwis11437992002-04-12 09:54:03 +000024620_ACEOF
24621rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024622if { (ac_try="$ac_link"
24623case "(($ac_try" in
24624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24625 *) ac_try_echo=$ac_try;;
24626esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024628 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024629 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024631 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024632 { (case "(($ac_try" in
24633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24634 *) ac_try_echo=$ac_try;;
24635esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024637 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024638 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024640 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024641 ac_cv_broken_nice=yes
24642else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024643 echo "$as_me: program exited with status $ac_status" >&5
24644echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024645sed 's/^/| /' conftest.$ac_ext >&5
24646
Martin v. Löwis11437992002-04-12 09:54:03 +000024647( exit $ac_status )
24648ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024650rm -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 +000024651fi
24652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024653
24654fi
24655
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024656{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24657echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024658if test "$ac_cv_broken_nice" = yes
24659then
Martin v. Löwis11437992002-04-12 09:54:03 +000024660
24661cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024662#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024663_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024664
24665fi
24666
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024667{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24668echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024669if test "$cross_compiling" = yes; then
24670 ac_cv_broken_poll=no
24671else
24672 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024673/* confdefs.h. */
24674_ACEOF
24675cat confdefs.h >>conftest.$ac_ext
24676cat >>conftest.$ac_ext <<_ACEOF
24677/* end confdefs.h. */
24678
24679#include <poll.h>
24680
24681int main (void)
24682 {
24683 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24684
24685 close (42);
24686
24687 int poll_test = poll (&poll_struct, 1, 0);
24688
24689 if (poll_test < 0)
24690 {
24691 exit(0);
24692 }
24693 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24694 {
24695 exit(0);
24696 }
24697 else
24698 {
24699 exit(1);
24700 }
24701 }
24702
24703_ACEOF
24704rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024705if { (ac_try="$ac_link"
24706case "(($ac_try" in
24707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24708 *) ac_try_echo=$ac_try;;
24709esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024711 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024712 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024714 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024715 { (case "(($ac_try" in
24716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24717 *) ac_try_echo=$ac_try;;
24718esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024720 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024721 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024723 (exit $ac_status); }; }; then
24724 ac_cv_broken_poll=yes
24725else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024726 echo "$as_me: program exited with status $ac_status" >&5
24727echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024728sed 's/^/| /' conftest.$ac_ext >&5
24729
24730( exit $ac_status )
24731ac_cv_broken_poll=no
24732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024733rm -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 +000024734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024735
24736
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024737{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24738echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024739if test "$ac_cv_broken_poll" = yes
24740then
24741
24742cat >>confdefs.h <<\_ACEOF
24743#define HAVE_BROKEN_POLL 1
24744_ACEOF
24745
24746fi
24747
Brett Cannon43802422005-02-10 20:48:03 +000024748# 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 +000024749# (which is not required by ISO C or UNIX spec) and/or if we support
24750# tzname[]
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024751{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24752echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024753if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024754 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024755else
24756 cat >conftest.$ac_ext <<_ACEOF
24757/* confdefs.h. */
24758_ACEOF
24759cat confdefs.h >>conftest.$ac_ext
24760cat >>conftest.$ac_ext <<_ACEOF
24761/* end confdefs.h. */
24762#include <sys/types.h>
24763#include <$ac_cv_struct_tm>
24764
24765
24766int
24767main ()
24768{
24769static struct tm ac_aggr;
24770if (ac_aggr.tm_zone)
24771return 0;
24772 ;
24773 return 0;
24774}
24775_ACEOF
24776rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024777if { (ac_try="$ac_compile"
24778case "(($ac_try" in
24779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24780 *) ac_try_echo=$ac_try;;
24781esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024783 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024784 ac_status=$?
24785 grep -v '^ *+' conftest.er1 >conftest.err
24786 rm -f conftest.er1
24787 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024789 (exit $ac_status); } && {
24790 test -z "$ac_c_werror_flag" ||
24791 test ! -s conftest.err
24792 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024793 ac_cv_member_struct_tm_tm_zone=yes
24794else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024795 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024796sed 's/^/| /' conftest.$ac_ext >&5
24797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024798 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024799/* confdefs.h. */
24800_ACEOF
24801cat confdefs.h >>conftest.$ac_ext
24802cat >>conftest.$ac_ext <<_ACEOF
24803/* end confdefs.h. */
24804#include <sys/types.h>
24805#include <$ac_cv_struct_tm>
24806
24807
24808int
24809main ()
24810{
24811static struct tm ac_aggr;
24812if (sizeof ac_aggr.tm_zone)
24813return 0;
24814 ;
24815 return 0;
24816}
24817_ACEOF
24818rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819if { (ac_try="$ac_compile"
24820case "(($ac_try" in
24821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24822 *) ac_try_echo=$ac_try;;
24823esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024825 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024826 ac_status=$?
24827 grep -v '^ *+' conftest.er1 >conftest.err
24828 rm -f conftest.er1
24829 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024831 (exit $ac_status); } && {
24832 test -z "$ac_c_werror_flag" ||
24833 test ! -s conftest.err
24834 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024835 ac_cv_member_struct_tm_tm_zone=yes
24836else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024837 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024838sed 's/^/| /' conftest.$ac_ext >&5
24839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024840 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024842
24843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024845
24846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024847fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024848{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24849echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24850if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024851
24852cat >>confdefs.h <<_ACEOF
24853#define HAVE_STRUCT_TM_TM_ZONE 1
24854_ACEOF
24855
24856
24857fi
24858
24859if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24860
24861cat >>confdefs.h <<\_ACEOF
24862#define HAVE_TM_ZONE 1
24863_ACEOF
24864
24865else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024866 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24867echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024868if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024869 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024870else
24871 cat >conftest.$ac_ext <<_ACEOF
24872/* confdefs.h. */
24873_ACEOF
24874cat confdefs.h >>conftest.$ac_ext
24875cat >>conftest.$ac_ext <<_ACEOF
24876/* end confdefs.h. */
24877#include <time.h>
24878
24879int
24880main ()
24881{
24882#ifndef tzname
24883 (void) tzname;
24884#endif
24885
24886 ;
24887 return 0;
24888}
24889_ACEOF
24890rm -f conftest.$ac_objext
24891if { (ac_try="$ac_compile"
24892case "(($ac_try" in
24893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24894 *) ac_try_echo=$ac_try;;
24895esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024897 (eval "$ac_compile") 2>conftest.er1
24898 ac_status=$?
24899 grep -v '^ *+' conftest.er1 >conftest.err
24900 rm -f conftest.er1
24901 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024903 (exit $ac_status); } && {
24904 test -z "$ac_c_werror_flag" ||
24905 test ! -s conftest.err
24906 } && test -s conftest.$ac_objext; then
24907 ac_cv_have_decl_tzname=yes
24908else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024909 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024910sed 's/^/| /' conftest.$ac_ext >&5
24911
24912 ac_cv_have_decl_tzname=no
24913fi
24914
24915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24916fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024917{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24918echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24919if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024920
24921cat >>confdefs.h <<_ACEOF
24922#define HAVE_DECL_TZNAME 1
24923_ACEOF
24924
24925
24926else
24927 cat >>confdefs.h <<_ACEOF
24928#define HAVE_DECL_TZNAME 0
24929_ACEOF
24930
24931
24932fi
24933
24934
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024935 { echo "$as_me:$LINENO: checking for tzname" >&5
24936echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024937if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024938 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024939else
24940 cat >conftest.$ac_ext <<_ACEOF
24941/* confdefs.h. */
24942_ACEOF
24943cat confdefs.h >>conftest.$ac_ext
24944cat >>conftest.$ac_ext <<_ACEOF
24945/* end confdefs.h. */
24946#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024947#if !HAVE_DECL_TZNAME
24948extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024949#endif
24950
24951int
24952main ()
24953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024954return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024955 ;
24956 return 0;
24957}
24958_ACEOF
24959rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024960if { (ac_try="$ac_link"
24961case "(($ac_try" in
24962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24963 *) ac_try_echo=$ac_try;;
24964esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024966 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024967 ac_status=$?
24968 grep -v '^ *+' conftest.er1 >conftest.err
24969 rm -f conftest.er1
24970 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024972 (exit $ac_status); } && {
24973 test -z "$ac_c_werror_flag" ||
24974 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024975 } && test -s conftest$ac_exeext &&
24976 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024977 ac_cv_var_tzname=yes
24978else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024979 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024980sed 's/^/| /' conftest.$ac_ext >&5
24981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024982 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024984
24985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024986 conftest$ac_exeext conftest.$ac_ext
24987fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024988{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24989echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024990 if test $ac_cv_var_tzname = yes; then
24991
24992cat >>confdefs.h <<\_ACEOF
24993#define HAVE_TZNAME 1
24994_ACEOF
24995
24996 fi
24997fi
24998
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024999
Martin v. Löwis1d459062005-03-14 21:23:33 +000025000# check tzset(3) exists and works like we expect it to
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025001{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25002echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025003if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025005else
25006
25007if test "$cross_compiling" = yes; then
25008 ac_cv_working_tzset=no
25009else
25010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025011/* confdefs.h. */
25012_ACEOF
25013cat confdefs.h >>conftest.$ac_ext
25014cat >>conftest.$ac_ext <<_ACEOF
25015/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025016
25017#include <stdlib.h>
25018#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025019#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025020
25021#if HAVE_TZNAME
25022extern char *tzname[];
25023#endif
25024
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025025int main()
25026{
Brett Cannon18367812003-09-19 00:59:16 +000025027 /* Note that we need to ensure that not only does tzset(3)
25028 do 'something' with localtime, but it works as documented
25029 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025030 This includes making sure that tzname is set properly if
25031 tm->tm_zone does not exist since it is the alternative way
25032 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025033
25034 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025035 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025036 */
25037
Martin v. Löwis1d459062005-03-14 21:23:33 +000025038 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025039 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25040
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025041 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025042 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025043 if (localtime(&groundhogday)->tm_hour != 0)
25044 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025045#if HAVE_TZNAME
25046 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25047 if (strcmp(tzname[0], "UTC") ||
25048 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25049 exit(1);
25050#endif
Brett Cannon18367812003-09-19 00:59:16 +000025051
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025052 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025053 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025054 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025055 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025056#if HAVE_TZNAME
25057 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25058 exit(1);
25059#endif
Brett Cannon18367812003-09-19 00:59:16 +000025060
25061 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25062 tzset();
25063 if (localtime(&groundhogday)->tm_hour != 11)
25064 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025065#if HAVE_TZNAME
25066 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25067 exit(1);
25068#endif
25069
25070#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025071 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25072 exit(1);
25073 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25074 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025075#endif
Brett Cannon18367812003-09-19 00:59:16 +000025076
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025077 exit(0);
25078}
25079
25080_ACEOF
25081rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025082if { (ac_try="$ac_link"
25083case "(($ac_try" in
25084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25085 *) ac_try_echo=$ac_try;;
25086esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025088 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025089 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025092 { (case "(($ac_try" in
25093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25094 *) ac_try_echo=$ac_try;;
25095esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025097 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025098 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025100 (exit $ac_status); }; }; then
25101 ac_cv_working_tzset=yes
25102else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025103 echo "$as_me: program exited with status $ac_status" >&5
25104echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025105sed 's/^/| /' conftest.$ac_ext >&5
25106
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025107( exit $ac_status )
25108ac_cv_working_tzset=no
25109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025110rm -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 +000025111fi
25112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025113
25114fi
25115
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025116{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25117echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025118if test "$ac_cv_working_tzset" = yes
25119then
25120
25121cat >>confdefs.h <<\_ACEOF
25122#define HAVE_WORKING_TZSET 1
25123_ACEOF
25124
25125fi
25126
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025127# Look for subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025128{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25129echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025130if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025131 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025132else
25133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025134/* confdefs.h. */
25135_ACEOF
25136cat confdefs.h >>conftest.$ac_ext
25137cat >>conftest.$ac_ext <<_ACEOF
25138/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025139#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025140int
25141main ()
25142{
25143
25144struct stat st;
25145st.st_mtim.tv_nsec = 1;
25146
25147 ;
25148 return 0;
25149}
25150_ACEOF
25151rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025152if { (ac_try="$ac_compile"
25153case "(($ac_try" in
25154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25155 *) ac_try_echo=$ac_try;;
25156esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025160 grep -v '^ *+' conftest.er1 >conftest.err
25161 rm -f conftest.er1
25162 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025164 (exit $ac_status); } && {
25165 test -z "$ac_c_werror_flag" ||
25166 test ! -s conftest.err
25167 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025168 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025169else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025171sed 's/^/| /' conftest.$ac_ext >&5
25172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025173 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025174fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25177fi
25178
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025179{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25180echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025181if test "$ac_cv_stat_tv_nsec" = yes
25182then
25183
25184cat >>confdefs.h <<\_ACEOF
25185#define HAVE_STAT_TV_NSEC 1
25186_ACEOF
25187
25188fi
25189
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025190# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025191{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25192echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025193if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025194 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025195else
25196 cat >conftest.$ac_ext <<_ACEOF
25197/* confdefs.h. */
25198_ACEOF
25199cat confdefs.h >>conftest.$ac_ext
25200cat >>conftest.$ac_ext <<_ACEOF
25201/* end confdefs.h. */
25202#include <sys/stat.h>
25203int
25204main ()
25205{
25206
25207struct stat st;
25208st.st_mtimespec.tv_nsec = 1;
25209
25210 ;
25211 return 0;
25212}
25213_ACEOF
25214rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025215if { (ac_try="$ac_compile"
25216case "(($ac_try" in
25217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25218 *) ac_try_echo=$ac_try;;
25219esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025222 ac_status=$?
25223 grep -v '^ *+' conftest.er1 >conftest.err
25224 rm -f conftest.er1
25225 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025227 (exit $ac_status); } && {
25228 test -z "$ac_c_werror_flag" ||
25229 test ! -s conftest.err
25230 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025231 ac_cv_stat_tv_nsec2=yes
25232else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025233 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025234sed 's/^/| /' conftest.$ac_ext >&5
25235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025236 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025237fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25240fi
25241
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025242{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25243echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025244if test "$ac_cv_stat_tv_nsec2" = yes
25245then
25246
25247cat >>confdefs.h <<\_ACEOF
25248#define HAVE_STAT_TV_NSEC2 1
25249_ACEOF
25250
25251fi
25252
Jack Jansen666b1e72001-10-31 12:11:48 +000025253# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025254{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25255echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025256if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025257 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025258else
Martin v. Löwis11437992002-04-12 09:54:03 +000025259 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025260/* confdefs.h. */
25261_ACEOF
25262cat confdefs.h >>conftest.$ac_ext
25263cat >>conftest.$ac_ext <<_ACEOF
25264/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025265#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025266int
25267main ()
25268{
Jack Jansen666b1e72001-10-31 12:11:48 +000025269
25270 int rtn;
25271 rtn = mvwdelch(0,0,0);
25272
Martin v. Löwis11437992002-04-12 09:54:03 +000025273 ;
25274 return 0;
25275}
25276_ACEOF
25277rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025278if { (ac_try="$ac_compile"
25279case "(($ac_try" in
25280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25281 *) ac_try_echo=$ac_try;;
25282esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025284 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025286 grep -v '^ *+' conftest.er1 >conftest.err
25287 rm -f conftest.er1
25288 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025290 (exit $ac_status); } && {
25291 test -z "$ac_c_werror_flag" ||
25292 test ! -s conftest.err
25293 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025294 ac_cv_mvwdelch_is_expression=yes
25295else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025297sed 's/^/| /' conftest.$ac_ext >&5
25298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025299 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025300fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25303fi
25304
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025305{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25306echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025307
25308if test "$ac_cv_mvwdelch_is_expression" = yes
25309then
Martin v. Löwis11437992002-04-12 09:54:03 +000025310
25311cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025312#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025313_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025314
25315fi
25316
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025317{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25318echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025319if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025320 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025321else
Martin v. Löwis11437992002-04-12 09:54:03 +000025322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025323/* confdefs.h. */
25324_ACEOF
25325cat confdefs.h >>conftest.$ac_ext
25326cat >>conftest.$ac_ext <<_ACEOF
25327/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025328#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025329int
25330main ()
25331{
Jack Jansen666b1e72001-10-31 12:11:48 +000025332
25333 WINDOW *w;
25334 w->_flags = 0;
25335
Martin v. Löwis11437992002-04-12 09:54:03 +000025336 ;
25337 return 0;
25338}
25339_ACEOF
25340rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025341if { (ac_try="$ac_compile"
25342case "(($ac_try" in
25343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25344 *) ac_try_echo=$ac_try;;
25345esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025347 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025349 grep -v '^ *+' conftest.er1 >conftest.err
25350 rm -f conftest.er1
25351 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025353 (exit $ac_status); } && {
25354 test -z "$ac_c_werror_flag" ||
25355 test ! -s conftest.err
25356 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025357 ac_cv_window_has_flags=yes
25358else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025360sed 's/^/| /' conftest.$ac_ext >&5
25361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025362 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025363fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25366fi
25367
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025368{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25369echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025370
Jack Jansen666b1e72001-10-31 12:11:48 +000025371
25372if test "$ac_cv_window_has_flags" = yes
25373then
Martin v. Löwis11437992002-04-12 09:54:03 +000025374
25375cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025376#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025377_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025378
25379fi
25380
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025381{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25382echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025383cat >conftest.$ac_ext <<_ACEOF
25384/* confdefs.h. */
25385_ACEOF
25386cat confdefs.h >>conftest.$ac_ext
25387cat >>conftest.$ac_ext <<_ACEOF
25388/* end confdefs.h. */
25389#include <curses.h>
25390int
25391main ()
25392{
25393void *x=is_term_resized
25394 ;
25395 return 0;
25396}
25397_ACEOF
25398rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025399if { (ac_try="$ac_compile"
25400case "(($ac_try" in
25401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25402 *) ac_try_echo=$ac_try;;
25403esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025405 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025406 ac_status=$?
25407 grep -v '^ *+' conftest.er1 >conftest.err
25408 rm -f conftest.er1
25409 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025411 (exit $ac_status); } && {
25412 test -z "$ac_c_werror_flag" ||
25413 test ! -s conftest.err
25414 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025415
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025416cat >>confdefs.h <<\_ACEOF
25417#define HAVE_CURSES_IS_TERM_RESIZED 1
25418_ACEOF
25419
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025420 { echo "$as_me:$LINENO: result: yes" >&5
25421echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025422else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025423 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025424sed 's/^/| /' conftest.$ac_ext >&5
25425
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025426 { echo "$as_me:$LINENO: result: no" >&5
25427echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025428
25429fi
25430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25432
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025433{ echo "$as_me:$LINENO: checking for resize_term" >&5
25434echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025435cat >conftest.$ac_ext <<_ACEOF
25436/* confdefs.h. */
25437_ACEOF
25438cat confdefs.h >>conftest.$ac_ext
25439cat >>conftest.$ac_ext <<_ACEOF
25440/* end confdefs.h. */
25441#include <curses.h>
25442int
25443main ()
25444{
25445void *x=resize_term
25446 ;
25447 return 0;
25448}
25449_ACEOF
25450rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025451if { (ac_try="$ac_compile"
25452case "(($ac_try" in
25453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25454 *) ac_try_echo=$ac_try;;
25455esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025457 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025458 ac_status=$?
25459 grep -v '^ *+' conftest.er1 >conftest.err
25460 rm -f conftest.er1
25461 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025463 (exit $ac_status); } && {
25464 test -z "$ac_c_werror_flag" ||
25465 test ! -s conftest.err
25466 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025467
25468cat >>confdefs.h <<\_ACEOF
25469#define HAVE_CURSES_RESIZE_TERM 1
25470_ACEOF
25471
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025472 { echo "$as_me:$LINENO: result: yes" >&5
25473echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025474else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025475 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025476sed 's/^/| /' conftest.$ac_ext >&5
25477
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025478 { echo "$as_me:$LINENO: result: no" >&5
25479echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025480
25481fi
25482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25484
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025485{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25486echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025487cat >conftest.$ac_ext <<_ACEOF
25488/* confdefs.h. */
25489_ACEOF
25490cat confdefs.h >>conftest.$ac_ext
25491cat >>conftest.$ac_ext <<_ACEOF
25492/* end confdefs.h. */
25493#include <curses.h>
25494int
25495main ()
25496{
25497void *x=resizeterm
25498 ;
25499 return 0;
25500}
25501_ACEOF
25502rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025503if { (ac_try="$ac_compile"
25504case "(($ac_try" in
25505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25506 *) ac_try_echo=$ac_try;;
25507esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025509 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025510 ac_status=$?
25511 grep -v '^ *+' conftest.er1 >conftest.err
25512 rm -f conftest.er1
25513 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025515 (exit $ac_status); } && {
25516 test -z "$ac_c_werror_flag" ||
25517 test ! -s conftest.err
25518 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025519
25520cat >>confdefs.h <<\_ACEOF
25521#define HAVE_CURSES_RESIZETERM 1
25522_ACEOF
25523
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025524 { echo "$as_me:$LINENO: result: yes" >&5
25525echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025526else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025527 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025528sed 's/^/| /' conftest.$ac_ext >&5
25529
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025530 { echo "$as_me:$LINENO: result: no" >&5
25531echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025532
25533fi
25534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25536
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025537{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25538echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025539
25540if test -r /dev/ptmx
25541then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025542 { echo "$as_me:$LINENO: result: yes" >&5
25543echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025544
25545cat >>confdefs.h <<\_ACEOF
25546#define HAVE_DEV_PTMX 1
25547_ACEOF
25548
Thomas Wouters89f507f2006-12-13 04:49:30 +000025549else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025550 { echo "$as_me:$LINENO: result: no" >&5
25551echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025552fi
25553
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025554{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25555echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025556
25557if test -r /dev/ptc
25558then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025559 { echo "$as_me:$LINENO: result: yes" >&5
25560echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025561
25562cat >>confdefs.h <<\_ACEOF
25563#define HAVE_DEV_PTC 1
25564_ACEOF
25565
Thomas Wouters89f507f2006-12-13 04:49:30 +000025566else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025567 { echo "$as_me:$LINENO: result: no" >&5
25568echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025569fi
25570
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025571{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25572echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025573if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025574 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025575See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025576echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025577See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025578 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025579else
25580 cat >conftest.$ac_ext <<_ACEOF
25581/* confdefs.h. */
25582_ACEOF
25583cat confdefs.h >>conftest.$ac_ext
25584cat >>conftest.$ac_ext <<_ACEOF
25585/* end confdefs.h. */
25586#include <stdio.h>
25587#include <stddef.h>
25588#include <string.h>
25589
Christian Heimes2c181612007-12-17 20:04:13 +000025590#ifdef HAVE_SYS_TYPES_H
25591#include <sys/types.h>
25592#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025593
25594#ifdef HAVE_SSIZE_T
25595typedef ssize_t Py_ssize_t;
25596#elif SIZEOF_VOID_P == SIZEOF_LONG
25597typedef long Py_ssize_t;
25598#else
25599typedef int Py_ssize_t;
25600#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025601
Christian Heimes2c181612007-12-17 20:04:13 +000025602int main()
25603{
25604 char buffer[256];
25605
Thomas Wouters477c8d52006-05-27 19:21:47 +000025606 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25607 return 1;
25608
Thomas Wouters89f507f2006-12-13 04:49:30 +000025609 if (strcmp(buffer, "123"))
25610 return 1;
25611
25612 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25613 return 1;
25614
25615 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025616 return 1;
25617
25618 return 0;
25619}
25620_ACEOF
25621rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025622if { (ac_try="$ac_link"
25623case "(($ac_try" in
25624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25625 *) ac_try_echo=$ac_try;;
25626esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025628 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025629 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025631 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025632 { (case "(($ac_try" in
25633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25634 *) ac_try_echo=$ac_try;;
25635esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025637 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025638 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025640 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025641 { echo "$as_me:$LINENO: result: yes" >&5
25642echo "${ECHO_T}yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025643
25644cat >>confdefs.h <<\_ACEOF
25645#define PY_FORMAT_SIZE_T "z"
25646_ACEOF
25647
25648else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025649 echo "$as_me: program exited with status $ac_status" >&5
25650echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025651sed 's/^/| /' conftest.$ac_ext >&5
25652
25653( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025654{ echo "$as_me:$LINENO: result: no" >&5
25655echo "${ECHO_T}no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025657rm -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 +000025658fi
25659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025660
25661
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025662{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25663echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025664if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025666else
Martin v. Löwis11437992002-04-12 09:54:03 +000025667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025668/* confdefs.h. */
25669_ACEOF
25670cat confdefs.h >>conftest.$ac_ext
25671cat >>conftest.$ac_ext <<_ACEOF
25672/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025673
25674#ifdef HAVE_SYS_TYPES_H
25675#include <sys/types.h>
25676#endif
25677#ifdef HAVE_SYS_SOCKET_H
25678#include <sys/socket.h>
25679#endif
25680
25681
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025682typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025683int
25684main ()
25685{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025686if ((ac__type_new_ *) 0)
25687 return 0;
25688if (sizeof (ac__type_new_))
25689 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025690 ;
25691 return 0;
25692}
25693_ACEOF
25694rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025695if { (ac_try="$ac_compile"
25696case "(($ac_try" in
25697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25698 *) ac_try_echo=$ac_try;;
25699esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025703 grep -v '^ *+' conftest.er1 >conftest.err
25704 rm -f conftest.er1
25705 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025707 (exit $ac_status); } && {
25708 test -z "$ac_c_werror_flag" ||
25709 test ! -s conftest.err
25710 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025711 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025712else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025714sed 's/^/| /' conftest.$ac_ext >&5
25715
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025716 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025718
25719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025720fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025721{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25722echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25723if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025724 :
25725else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025726
Martin v. Löwis01c04012002-11-11 14:58:44 +000025727cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025728#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025729_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025730
25731fi
25732
Michael W. Hudson54241132001-12-07 15:38:26 +000025733
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025734{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25735echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025736if test "$cross_compiling" = yes; then
25737 ac_cv_broken_mbstowcs=no
25738else
25739 cat >conftest.$ac_ext <<_ACEOF
25740/* confdefs.h. */
25741_ACEOF
25742cat confdefs.h >>conftest.$ac_ext
25743cat >>conftest.$ac_ext <<_ACEOF
25744/* end confdefs.h. */
25745
25746#include<stdlib.h>
25747int main() {
25748 size_t len = -1;
25749 const char *str = "text";
25750 len = mbstowcs(NULL, str, 0);
25751 return (len != 4);
25752}
25753
25754_ACEOF
25755rm -f conftest$ac_exeext
25756if { (ac_try="$ac_link"
25757case "(($ac_try" in
25758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25759 *) ac_try_echo=$ac_try;;
25760esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025762 (eval "$ac_link") 2>&5
25763 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025765 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25766 { (case "(($ac_try" in
25767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25768 *) ac_try_echo=$ac_try;;
25769esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025771 (eval "$ac_try") 2>&5
25772 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025774 (exit $ac_status); }; }; then
25775 ac_cv_broken_mbstowcs=no
25776else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025777 echo "$as_me: program exited with status $ac_status" >&5
25778echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025779sed 's/^/| /' conftest.$ac_ext >&5
25780
25781( exit $ac_status )
25782ac_cv_broken_mbstowcs=yes
25783fi
25784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25785fi
25786
25787
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025788{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25789echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025790if test "$ac_cv_broken_mbstowcs" = yes
25791then
25792
25793cat >>confdefs.h <<\_ACEOF
25794#define HAVE_BROKEN_MBSTOWCS 1
25795_ACEOF
25796
25797fi
25798
Antoine Pitroub52ec782009-01-25 16:34:23 +000025799# Check for --with-computed-gotos
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025800{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25801echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025802
25803# Check whether --with-computed-gotos was given.
25804if test "${with_computed_gotos+set}" = set; then
25805 withval=$with_computed_gotos;
25806if test "$withval" != no
25807then
25808
25809cat >>confdefs.h <<\_ACEOF
25810#define USE_COMPUTED_GOTOS 1
25811_ACEOF
25812
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025813 { echo "$as_me:$LINENO: result: yes" >&5
25814echo "${ECHO_T}yes" >&6; }
25815else { echo "$as_me:$LINENO: result: no" >&5
25816echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025817fi
25818else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025819 { echo "$as_me:$LINENO: result: no" >&5
25820echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025821fi
25822
25823
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000025824if test $ac_sys_system = Darwin
25825then
25826 LIBS="$LIBS -framework CoreFoundation"
25827fi
25828
25829
Antoine Pitroub52ec782009-01-25 16:34:23 +000025830
Michael W. Hudson54241132001-12-07 15:38:26 +000025831
25832
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025833for h in `(cd $srcdir;echo Python/thread_*.h)`
25834do
25835 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25836done
25837
Michael W. Hudson54241132001-12-07 15:38:26 +000025838
Neal Norwitzd24499d2005-12-18 21:36:39 +000025839SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025840{ echo "$as_me:$LINENO: checking for build directories" >&5
25841echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025842for dir in $SRCDIRS; do
25843 if test ! -d $dir; then
25844 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025845 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025846done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025847{ echo "$as_me:$LINENO: result: done" >&5
25848echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025849
Guido van Rossum627b2d71993-12-24 10:39:16 +000025850# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025851ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025852
Martin v. Löwis11437992002-04-12 09:54:03 +000025853cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025854# This file is a shell script that caches the results of configure
25855# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025856# scripts and configure runs, see configure's option --config-cache.
25857# It is not useful on other systems. If it contains results you don't
25858# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025859#
Martin v. Löwis11437992002-04-12 09:54:03 +000025860# config.status only pays attention to the cache file if you give it
25861# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025862#
Skip Montanaro6dead952003-09-25 14:50:04 +000025863# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025864# loading this file, other *unset* `ac_cv_foo' will be assigned the
25865# following values.
25866
25867_ACEOF
25868
Guido van Rossumf78abae1997-01-21 22:02:36 +000025869# The following way of writing the cache mishandles newlines in values,
25870# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025871# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025872# Ultrix sh set writes to stderr and can't be redirected directly,
25873# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025874(
25875 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25876 eval ac_val=\$$ac_var
25877 case $ac_val in #(
25878 *${as_nl}*)
25879 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025880 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25881echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025882 esac
25883 case $ac_var in #(
25884 _ | IFS | as_nl) ;; #(
25885 *) $as_unset $ac_var ;;
25886 esac ;;
25887 esac
25888 done
25889
Martin v. Löwis11437992002-04-12 09:54:03 +000025890 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025891 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25892 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025893 # `set' does not quote correctly, so add quotes (double-quote
25894 # substitution turns \\\\ into \\, and sed turns \\ into \).
25895 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025896 "s/'/'\\\\''/g;
25897 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025898 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025899 *)
25900 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025901 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025902 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025903 esac |
25904 sort
25905) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025906 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025907 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025908 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025909 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025910 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25911 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025912 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25913 :end' >>confcache
25914if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25915 if test -w "$cache_file"; then
25916 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025917 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25918echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025919 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025920 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025921 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25922echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025923 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025924fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025925rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025926
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025927test "x$prefix" = xNONE && prefix=$ac_default_prefix
25928# Let make expand exec_prefix.
25929test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025930
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025931DEFS=-DHAVE_CONFIG_H
25932
Skip Montanaro6dead952003-09-25 14:50:04 +000025933ac_libobjs=
25934ac_ltlibobjs=
25935for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25936 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025937 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025938 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025939 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25940 # will be set to the directory where LIBOBJS objects are built.
25941 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25942 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025943done
25944LIBOBJS=$ac_libobjs
25945
25946LTLIBOBJS=$ac_ltlibobjs
25947
25948
Martin v. Löwis11437992002-04-12 09:54:03 +000025949
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025950: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025951ac_clean_files_save=$ac_clean_files
25952ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025953{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25954echo "$as_me: creating $CONFIG_STATUS" >&6;}
25955cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025956#! $SHELL
25957# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025958# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025959# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025960# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025961
Martin v. Löwis11437992002-04-12 09:54:03 +000025962debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025963ac_cs_recheck=false
25964ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025965SHELL=\${CONFIG_SHELL-$SHELL}
25966_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025967
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025968cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025969## --------------------- ##
25970## M4sh Initialization. ##
25971## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025973# Be more Bourne compatible
25974DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025975if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25976 emulate sh
25977 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025978 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025979 # is contrary to our usage. Disable this feature.
25980 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025981 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025982else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025983 case `(set -o) 2>/dev/null` in
25984 *posix*) set -o posix ;;
25985esac
25986
Michael W. Hudson54241132001-12-07 15:38:26 +000025987fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000025988
25989
Michael W. Hudson54241132001-12-07 15:38:26 +000025990
Michael W. Hudson54241132001-12-07 15:38:26 +000025991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025992# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025993# Avoid depending upon Character Ranges.
25994as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25995as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25996as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25997as_cr_digits='0123456789'
25998as_cr_alnum=$as_cr_Letters$as_cr_digits
25999
26000# The user is always right.
26001if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026002 echo "#! /bin/sh" >conf$$.sh
26003 echo "exit 0" >>conf$$.sh
26004 chmod +x conf$$.sh
26005 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26006 PATH_SEPARATOR=';'
26007 else
26008 PATH_SEPARATOR=:
26009 fi
26010 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026011fi
26012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026013# Support unset when possible.
26014if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26015 as_unset=unset
26016else
26017 as_unset=false
26018fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026020
26021# IFS
26022# We need space, tab and new line, in precisely that order. Quoting is
26023# there to prevent editors from complaining about space-tab.
26024# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26025# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026026as_nl='
26027'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026028IFS=" "" $as_nl"
26029
26030# Find who we are. Look in the path if we contain no directory separator.
26031case $0 in
26032 *[\\/]* ) as_myself=$0 ;;
26033 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026034for as_dir in $PATH
26035do
26036 IFS=$as_save_IFS
26037 test -z "$as_dir" && as_dir=.
26038 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26039done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026040IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026042 ;;
26043esac
26044# We did not find ourselves, most probably we were run as `sh COMMAND'
26045# in which case we are not to be found in the path.
26046if test "x$as_myself" = x; then
26047 as_myself=$0
26048fi
26049if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026050 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026051 { (exit 1); exit 1; }
26052fi
26053
26054# Work around bugs in pre-3.0 UWIN ksh.
26055for as_var in ENV MAIL MAILPATH
26056do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26057done
26058PS1='$ '
26059PS2='> '
26060PS4='+ '
26061
26062# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026063for as_var in \
26064 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26065 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26066 LC_TELEPHONE LC_TIME
26067do
26068 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26069 eval $as_var=C; export $as_var
26070 else
26071 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26072 fi
26073done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026074
26075# Required to use basename.
26076if expr a : '\(a\)' >/dev/null 2>&1 &&
26077 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26078 as_expr=expr
26079else
26080 as_expr=false
26081fi
26082
26083if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26084 as_basename=basename
26085else
26086 as_basename=false
26087fi
26088
26089
26090# Name of the executable.
26091as_me=`$as_basename -- "$0" ||
26092$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26093 X"$0" : 'X\(//\)$' \| \
26094 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026095echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026096 sed '/^.*\/\([^/][^/]*\)\/*$/{
26097 s//\1/
26098 q
26099 }
26100 /^X\/\(\/\/\)$/{
26101 s//\1/
26102 q
26103 }
26104 /^X\/\(\/\).*/{
26105 s//\1/
26106 q
26107 }
26108 s/.*/./; q'`
26109
26110# CDPATH.
26111$as_unset CDPATH
26112
26113
26114
Martin v. Löwis11437992002-04-12 09:54:03 +000026115 as_lineno_1=$LINENO
26116 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026117 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026118 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026119
Martin v. Löwis11437992002-04-12 09:54:03 +000026120 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26121 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026122 # line-number line after each line using $LINENO; the second 'sed'
26123 # does the real work. The second script uses 'N' to pair each
26124 # line-number line with the line containing $LINENO, and appends
26125 # trailing '-' during substitution so that $LINENO is not a special
26126 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026127 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026128 # scripts with optimization help from Paolo Bonzini. Blame Lee
26129 # E. McMahon (1931-1989) for sed's syntax. :-)
26130 sed -n '
26131 p
26132 /[$]LINENO/=
26133 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026134 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026135 s/[$]LINENO.*/&-/
26136 t lineno
26137 b
26138 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026139 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026140 :loop
26141 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026142 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026143 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026144 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026145 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026146 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026147 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026148
Martin v. Löwis11437992002-04-12 09:54:03 +000026149 # Don't try to exec as it changes $[0], causing all sort of problems
26150 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026151 # original and so on. Autoconf is especially sensitive to this).
26152 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026153 # Exit status is that of the last command.
26154 exit
26155}
26156
26157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026158if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26159 as_dirname=dirname
26160else
26161 as_dirname=false
26162fi
26163
26164ECHO_C= ECHO_N= ECHO_T=
26165case `echo -n x` in
26166-n*)
26167 case `echo 'x\c'` in
26168 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26169 *) ECHO_C='\c';;
26170 esac;;
26171*)
26172 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026173esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026175if expr a : '\(a\)' >/dev/null 2>&1 &&
26176 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026177 as_expr=expr
26178else
26179 as_expr=false
26180fi
26181
26182rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026183if test -d conf$$.dir; then
26184 rm -f conf$$.dir/conf$$.file
26185else
26186 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026187 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026188fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026189echo >conf$$.file
26190if ln -s conf$$.file conf$$ 2>/dev/null; then
26191 as_ln_s='ln -s'
26192 # ... but there are two gotchas:
26193 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26194 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26195 # In both cases, we have to default to `cp -p'.
26196 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026197 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026198elif ln conf$$.file conf$$ 2>/dev/null; then
26199 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026200else
26201 as_ln_s='cp -p'
26202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026203rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26204rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026205
Skip Montanaro6dead952003-09-25 14:50:04 +000026206if mkdir -p . 2>/dev/null; then
26207 as_mkdir_p=:
26208else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026209 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026210 as_mkdir_p=false
26211fi
26212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026213if test -x / >/dev/null 2>&1; then
26214 as_test_x='test -x'
26215else
26216 if ls -dL / >/dev/null 2>&1; then
26217 as_ls_L_option=L
26218 else
26219 as_ls_L_option=
26220 fi
26221 as_test_x='
26222 eval sh -c '\''
26223 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026224 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026225 else
26226 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026227 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026228 esac;
26229 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26230 ???[sx]*):;;*)false;;esac;fi
26231 '\'' sh
26232 '
26233fi
26234as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026235
26236# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026237as_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 +000026238
26239# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026240as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026241
26242
Martin v. Löwis11437992002-04-12 09:54:03 +000026243exec 6>&1
26244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026245# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026246# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026247# values after options handling.
26248ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026249This file was extended by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026250generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026251
26252 CONFIG_FILES = $CONFIG_FILES
26253 CONFIG_HEADERS = $CONFIG_HEADERS
26254 CONFIG_LINKS = $CONFIG_LINKS
26255 CONFIG_COMMANDS = $CONFIG_COMMANDS
26256 $ $0 $@
26257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026258on `(hostname || uname -n) 2>/dev/null | sed 1q`
26259"
26260
Martin v. Löwis11437992002-04-12 09:54:03 +000026261_ACEOF
26262
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026263cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026264# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026265config_files="$ac_config_files"
26266config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026268_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026269
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026270cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026271ac_cs_usage="\
26272\`$as_me' instantiates files from templates according to the
26273current configuration.
26274
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026275Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026276
26277 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026278 -V, --version print version number and configuration settings, then exit
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026279 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026280 -d, --debug don't remove temporary files
26281 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026282 --file=FILE[:TEMPLATE]
26283 instantiate the configuration file FILE
26284 --header=FILE[:TEMPLATE]
26285 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026286
26287Configuration files:
26288$config_files
26289
26290Configuration headers:
26291$config_headers
26292
26293Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026295_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026296cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026297ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026298python config.status 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026299configured by $0, generated by GNU Autoconf 2.61,
26300 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026301
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026302Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026303This config.status script is free software; the Free Software Foundation
26304gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026305
26306ac_pwd='$ac_pwd'
26307srcdir='$srcdir'
26308INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026309_ACEOF
26310
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026311cat >>$CONFIG_STATUS <<\_ACEOF
26312# If no file are specified by the user, then we need to provide default
26313# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026314ac_need_defaults=:
26315while test $# != 0
26316do
26317 case $1 in
26318 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026319 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26320 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026321 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026322 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026323 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026324 ac_option=$1
26325 ac_optarg=$2
26326 ac_shift=shift
26327 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026328 esac
26329
Skip Montanaro6dead952003-09-25 14:50:04 +000026330 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026331 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026332 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26333 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026334 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026335 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026336 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026337 debug=: ;;
26338 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026339 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026340 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026341 ac_need_defaults=false;;
26342 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026343 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026344 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026345 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026346 --he | --h)
26347 # Conflict between --help and --header
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026348 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026349Try \`$0 --help' for more information." >&2
26350 { (exit 1); exit 1; }; };;
26351 --help | --hel | -h )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026352 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026353 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26354 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26355 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026356
26357 # This is an error.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026358 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026359Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026360 { (exit 1); exit 1; }; } ;;
26361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026362 *) ac_config_targets="$ac_config_targets $1"
26363 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026364
26365 esac
26366 shift
26367done
26368
Skip Montanaro6dead952003-09-25 14:50:04 +000026369ac_configure_extra_args=
26370
26371if $ac_cs_silent; then
26372 exec 6>/dev/null
26373 ac_configure_extra_args="$ac_configure_extra_args --silent"
26374fi
26375
26376_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026377cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026378if \$ac_cs_recheck; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026379 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26380 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026381 export CONFIG_SHELL
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026382 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026383fi
26384
Martin v. Löwis11437992002-04-12 09:54:03 +000026385_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026386cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026387exec 5>>config.log
26388{
26389 echo
26390 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26391## Running $as_me. ##
26392_ASBOX
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026393 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026394} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026396_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026397cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026398_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026399
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026400cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026401
26402# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026403for ac_config_target in $ac_config_targets
26404do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026405 case $ac_config_target in
26406 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26407 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26408 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026409 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26410 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026411 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26412 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026413 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026414
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026415 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26416echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026417 { (exit 1); exit 1; }; };;
26418 esac
26419done
26420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026421
Martin v. Löwis11437992002-04-12 09:54:03 +000026422# If the user did not use the arguments to specify the items to instantiate,
26423# then the envvar interface is used. Set only those that are not.
26424# We use the long form for the default assignment because of an extremely
26425# bizarre bug on SunOS 4.1.3.
26426if $ac_need_defaults; then
26427 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26428 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26429fi
26430
Skip Montanaro6dead952003-09-25 14:50:04 +000026431# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026432# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026433# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026434# Hook for its removal unless debugging.
26435# Note that there is a small window in which the directory will not be cleaned:
26436# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026437$debug ||
26438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026439 tmp=
26440 trap 'exit_status=$?
26441 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26442' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026443 trap '{ (exit 1); exit 1; }' 1 2 13 15
26444}
Martin v. Löwis11437992002-04-12 09:54:03 +000026445# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026446
Martin v. Löwis11437992002-04-12 09:54:03 +000026447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026448 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026449 test -n "$tmp" && test -d "$tmp"
26450} ||
26451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026452 tmp=./conf$$-$RANDOM
26453 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026454} ||
26455{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026456 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026457 { (exit 1); exit 1; }
26458}
26459
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026460#
26461# Set up the sed scripts for CONFIG_FILES section.
26462#
26463
26464# No need to generate the scripts if there are no CONFIG_FILES.
26465# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026466if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026467
26468_ACEOF
26469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026470
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026472ac_delim='%!_!# '
26473for ac_last_try in false false false false false :; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026474 cat >conf$$subs.sed <<_ACEOF
26475SHELL!$SHELL$ac_delim
26476PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26477PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26478PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26479PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26480PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26481PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26482exec_prefix!$exec_prefix$ac_delim
26483prefix!$prefix$ac_delim
26484program_transform_name!$program_transform_name$ac_delim
26485bindir!$bindir$ac_delim
26486sbindir!$sbindir$ac_delim
26487libexecdir!$libexecdir$ac_delim
26488datarootdir!$datarootdir$ac_delim
26489datadir!$datadir$ac_delim
26490sysconfdir!$sysconfdir$ac_delim
26491sharedstatedir!$sharedstatedir$ac_delim
26492localstatedir!$localstatedir$ac_delim
26493includedir!$includedir$ac_delim
26494oldincludedir!$oldincludedir$ac_delim
26495docdir!$docdir$ac_delim
26496infodir!$infodir$ac_delim
26497htmldir!$htmldir$ac_delim
26498dvidir!$dvidir$ac_delim
26499pdfdir!$pdfdir$ac_delim
26500psdir!$psdir$ac_delim
26501libdir!$libdir$ac_delim
26502localedir!$localedir$ac_delim
26503mandir!$mandir$ac_delim
26504DEFS!$DEFS$ac_delim
26505ECHO_C!$ECHO_C$ac_delim
26506ECHO_N!$ECHO_N$ac_delim
26507ECHO_T!$ECHO_T$ac_delim
26508LIBS!$LIBS$ac_delim
26509build_alias!$build_alias$ac_delim
26510host_alias!$host_alias$ac_delim
26511target_alias!$target_alias$ac_delim
26512VERSION!$VERSION$ac_delim
26513SOVERSION!$SOVERSION$ac_delim
26514CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26515UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26516ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
26517PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26518PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26519PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26520PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26521PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26522FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26523FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26524FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26525FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26526FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26527MACHDEP!$MACHDEP$ac_delim
26528SGI_ABI!$SGI_ABI$ac_delim
26529CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26530EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26531CC!$CC$ac_delim
26532CFLAGS!$CFLAGS$ac_delim
26533LDFLAGS!$LDFLAGS$ac_delim
26534CPPFLAGS!$CPPFLAGS$ac_delim
26535ac_ct_CC!$ac_ct_CC$ac_delim
26536EXEEXT!$EXEEXT$ac_delim
26537OBJEXT!$OBJEXT$ac_delim
26538CXX!$CXX$ac_delim
26539MAINCC!$MAINCC$ac_delim
26540CPP!$CPP$ac_delim
26541GREP!$GREP$ac_delim
26542EGREP!$EGREP$ac_delim
26543BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26544LIBRARY!$LIBRARY$ac_delim
26545LDLIBRARY!$LDLIBRARY$ac_delim
26546DLLLIBRARY!$DLLLIBRARY$ac_delim
26547BLDLIBRARY!$BLDLIBRARY$ac_delim
26548LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26549INSTSONAME!$INSTSONAME$ac_delim
26550RUNSHARED!$RUNSHARED$ac_delim
26551LINKCC!$LINKCC$ac_delim
26552GNULD!$GNULD$ac_delim
26553RANLIB!$RANLIB$ac_delim
26554AR!$AR$ac_delim
26555ARFLAGS!$ARFLAGS$ac_delim
26556SVNVERSION!$SVNVERSION$ac_delim
26557INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26558INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26559INSTALL_DATA!$INSTALL_DATA$ac_delim
26560LN!$LN$ac_delim
26561OPT!$OPT$ac_delim
26562BASECFLAGS!$BASECFLAGS$ac_delim
26563UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26564OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26565LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26566SO!$SO$ac_delim
26567LDSHARED!$LDSHARED$ac_delim
26568BLDSHARED!$BLDSHARED$ac_delim
26569CCSHARED!$CCSHARED$ac_delim
26570LINKFORSHARED!$LINKFORSHARED$ac_delim
26571CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026573
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026574 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026575 break
26576 elif $ac_last_try; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026577 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26578echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026579 { (exit 1); exit 1; }; }
26580 else
26581 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026582 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026583done
26584
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026585ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26586if test -n "$ac_eof"; then
26587 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26588 ac_eof=`expr $ac_eof + 1`
26589fi
26590
26591cat >>$CONFIG_STATUS <<_ACEOF
26592cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26593/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026594_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026595sed '
26596s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26597s/^/s,@/; s/!/@,|#_!!_#|/
26598:n
26599t n
26600s/'"$ac_delim"'$/,g/; t
26601s/$/\\/; p
26602N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26603' >>$CONFIG_STATUS <conf$$subs.sed
26604rm -f conf$$subs.sed
26605cat >>$CONFIG_STATUS <<_ACEOF
26606CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026607_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026608
26609
26610ac_delim='%!_!# '
26611for ac_last_try in false false false false false :; do
26612 cat >conf$$subs.sed <<_ACEOF
26613SHLIBS!$SHLIBS$ac_delim
26614USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26615SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26616USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26617LDLAST!$LDLAST$ac_delim
26618THREADOBJ!$THREADOBJ$ac_delim
26619DLINCLDIR!$DLINCLDIR$ac_delim
26620DYNLOADFILE!$DYNLOADFILE$ac_delim
26621MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26622TRUE!$TRUE$ac_delim
26623LIBOBJS!$LIBOBJS$ac_delim
26624HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26625HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26626HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26627HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26628HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26629LIBM!$LIBM$ac_delim
26630LIBC!$LIBC$ac_delim
26631THREADHEADERS!$THREADHEADERS$ac_delim
26632SRCDIRS!$SRCDIRS$ac_delim
26633LTLIBOBJS!$LTLIBOBJS$ac_delim
26634_ACEOF
26635
26636 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
26637 break
26638 elif $ac_last_try; then
26639 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26640echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026641 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026642 else
26643 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26644 fi
26645done
26646
26647ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26648if test -n "$ac_eof"; then
26649 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26650 ac_eof=`expr $ac_eof + 1`
26651fi
26652
26653cat >>$CONFIG_STATUS <<_ACEOF
26654cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26655/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026656_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026657sed '
26658s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26659s/^/s,@/; s/!/@,|#_!!_#|/
26660:n
26661t n
26662s/'"$ac_delim"'$/,g/; t
26663s/$/\\/; p
26664N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26665' >>$CONFIG_STATUS <conf$$subs.sed
26666rm -f conf$$subs.sed
26667cat >>$CONFIG_STATUS <<_ACEOF
26668:end
26669s/|#_!!_#|//g
26670CEOF$ac_eof
26671_ACEOF
26672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026673
26674# VPATH may cause trouble with some makes, so we remove $(srcdir),
26675# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26676# trailing colons and then remove the whole line if VPATH becomes empty
26677# (actually we leave an empty line to preserve line numbers).
26678if test "x$srcdir" = x.; then
26679 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26680s/:*\$(srcdir):*/:/
26681s/:*\${srcdir}:*/:/
26682s/:*@srcdir@:*/:/
26683s/^\([^=]*=[ ]*\):*/\1/
26684s/:*$//
26685s/^[^=]*=[ ]*$//
26686}'
26687fi
26688
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026689cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026690fi # test -n "$CONFIG_FILES"
26691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026692
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026693for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026694do
26695 case $ac_tag in
26696 :[FHLC]) ac_mode=$ac_tag; continue;;
26697 esac
26698 case $ac_mode$ac_tag in
26699 :[FHL]*:*);;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026700 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26701echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026702 { (exit 1); exit 1; }; };;
26703 :[FH]-) ac_tag=-:-;;
26704 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26705 esac
26706 ac_save_IFS=$IFS
26707 IFS=:
26708 set x $ac_tag
26709 IFS=$ac_save_IFS
26710 shift
26711 ac_file=$1
26712 shift
26713
26714 case $ac_mode in
26715 :L) ac_source=$1;;
26716 :[FH])
26717 ac_file_inputs=
26718 for ac_f
26719 do
26720 case $ac_f in
26721 -) ac_f="$tmp/stdin";;
26722 *) # Look for the file first in the build tree, then in the source tree
26723 # (if the path is not absolute). The absolute path cannot be DOS-style,
26724 # because $ac_f cannot contain `:'.
26725 test -f "$ac_f" ||
26726 case $ac_f in
26727 [\\/$]*) false;;
26728 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26729 esac ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026730 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26731echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026732 { (exit 1); exit 1; }; };;
26733 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026734 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026735 done
26736
26737 # Let's still pretend it is `configure' which instantiates (i.e., don't
26738 # use $as_me), people would be surprised to read:
26739 # /* config.h. Generated by config.status. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026740 configure_input="Generated from "`IFS=:
26741 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026742 if test x"$ac_file" != x-; then
26743 configure_input="$ac_file. $configure_input"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026744 { echo "$as_me:$LINENO: creating $ac_file" >&5
26745echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026746 fi
26747
26748 case $ac_tag in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026749 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026750 esac
26751 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026752 esac
26753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026754 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026755$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026756 X"$ac_file" : 'X\(//\)[^/]' \| \
26757 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026758 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026759echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026760 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26761 s//\1/
26762 q
26763 }
26764 /^X\(\/\/\)[^/].*/{
26765 s//\1/
26766 q
26767 }
26768 /^X\(\/\/\)$/{
26769 s//\1/
26770 q
26771 }
26772 /^X\(\/\).*/{
26773 s//\1/
26774 q
26775 }
26776 s/.*/./; q'`
26777 { as_dir="$ac_dir"
26778 case $as_dir in #(
26779 -*) as_dir=./$as_dir;;
26780 esac
26781 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026782 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026783 while :; do
26784 case $as_dir in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026785 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026786 *) as_qdir=$as_dir;;
26787 esac
26788 as_dirs="'$as_qdir' $as_dirs"
26789 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026790$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026791 X"$as_dir" : 'X\(//\)[^/]' \| \
26792 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026793 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026794echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026795 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26796 s//\1/
26797 q
26798 }
26799 /^X\(\/\/\)[^/].*/{
26800 s//\1/
26801 q
26802 }
26803 /^X\(\/\/\)$/{
26804 s//\1/
26805 q
26806 }
26807 /^X\(\/\).*/{
26808 s//\1/
26809 q
26810 }
26811 s/.*/./; q'`
26812 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026813 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026814 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026815 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26816echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026817 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026818 ac_builddir=.
26819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026820case "$ac_dir" in
26821.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26822*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026823 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026824 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026825 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026826 case $ac_top_builddir_sub in
26827 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26828 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26829 esac ;;
26830esac
26831ac_abs_top_builddir=$ac_pwd
26832ac_abs_builddir=$ac_pwd$ac_dir_suffix
26833# for backward compatibility:
26834ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026835
26836case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026837 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026838 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026839 ac_top_srcdir=$ac_top_builddir_sub
26840 ac_abs_top_srcdir=$ac_pwd ;;
26841 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026842 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026843 ac_top_srcdir=$srcdir
26844 ac_abs_top_srcdir=$srcdir ;;
26845 *) # Relative name.
26846 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26847 ac_top_srcdir=$ac_top_build_prefix$srcdir
26848 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026849esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026850ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026851
Martin v. Löwis11437992002-04-12 09:54:03 +000026852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026853 case $ac_mode in
26854 :F)
26855 #
26856 # CONFIG_FILE
26857 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026858
26859 case $INSTALL in
26860 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026861 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026862 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026863_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026864
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026865cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026866# If the template does not know about datarootdir, expand it.
26867# FIXME: This hack should be removed a few years after 2.60.
26868ac_datarootdir_hack=; ac_datarootdir_seen=
26869
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026870case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026871 p
26872 q
26873}
26874/@datadir@/p
26875/@docdir@/p
26876/@infodir@/p
26877/@localedir@/p
26878/@mandir@/p
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026879' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026880*datarootdir*) ac_datarootdir_seen=yes;;
26881*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026882 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26883echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026884_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026885cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026886 ac_datarootdir_hack='
26887 s&@datadir@&$datadir&g
26888 s&@docdir@&$docdir&g
26889 s&@infodir@&$infodir&g
26890 s&@localedir@&$localedir&g
26891 s&@mandir@&$mandir&g
26892 s&\\\${datarootdir}&$datarootdir&g' ;;
26893esac
26894_ACEOF
26895
26896# Neutralize VPATH when `$srcdir' = `.'.
26897# Shell code in configure.ac might set extrasub.
26898# FIXME: do we really want to maintain this feature?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026899cat >>$CONFIG_STATUS <<_ACEOF
26900 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026901$extrasub
26902_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026903cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026904:t
26905/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026906s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026907s&@top_builddir@&$ac_top_builddir_sub&;t t
26908s&@srcdir@&$ac_srcdir&;t t
26909s&@abs_srcdir@&$ac_abs_srcdir&;t t
26910s&@top_srcdir@&$ac_top_srcdir&;t t
26911s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26912s&@builddir@&$ac_builddir&;t t
26913s&@abs_builddir@&$ac_abs_builddir&;t t
26914s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26915s&@INSTALL@&$ac_INSTALL&;t t
26916$ac_datarootdir_hack
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026917" $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 +000026918
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026919test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26920 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26921 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026922 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026923which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026924echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026925which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026927 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026928 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026929 -) cat "$tmp/out"; rm -f "$tmp/out";;
26930 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26931 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026932 ;;
26933 :H)
26934 #
26935 # CONFIG_HEADER
26936 #
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026937_ACEOF
26938
26939# Transform confdefs.h into a sed script `conftest.defines', that
26940# substitutes the proper values into config.h.in to produce config.h.
26941rm -f conftest.defines conftest.tail
26942# First, append a space to every undef/define line, to ease matching.
26943echo 's/$/ /' >conftest.defines
26944# Then, protect against being on the right side of a sed subst, or in
26945# an unquoted here document, in config.status. If some macros were
26946# called several times there might be several #defines for the same
26947# symbol, which is useless. But do not sort them, since the last
26948# AC_DEFINE must be honored.
26949ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26950# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26951# NAME is the cpp macro being defined, VALUE is the value it is being given.
26952# PARAMS is the parameter list in the macro definition--in most cases, it's
26953# just an empty string.
26954ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26955ac_dB='\\)[ (].*,\\1define\\2'
26956ac_dC=' '
26957ac_dD=' ,'
26958
26959uniq confdefs.h |
26960 sed -n '
26961 t rset
26962 :rset
26963 s/^[ ]*#[ ]*define[ ][ ]*//
26964 t ok
26965 d
26966 :ok
26967 s/[\\&,]/\\&/g
26968 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26969 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26970 ' >>conftest.defines
26971
26972# Remove the space that was appended to ease matching.
26973# Then replace #undef with comments. This is necessary, for
26974# example, in the case of _POSIX_SOURCE, which is predefined and required
26975# on some systems where configure will not decide to define it.
26976# (The regexp can be short, since the line contains either #define or #undef.)
26977echo 's/ $//
26978s,^[ #]*u.*,/* & */,' >>conftest.defines
26979
26980# Break up conftest.defines:
26981ac_max_sed_lines=50
26982
26983# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26984# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26985# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26986# et cetera.
26987ac_in='$ac_file_inputs'
26988ac_out='"$tmp/out1"'
26989ac_nxt='"$tmp/out2"'
26990
26991while :
26992do
26993 # Write a here document:
26994 cat >>$CONFIG_STATUS <<_ACEOF
26995 # First, check the format of the line:
26996 cat >"\$tmp/defines.sed" <<\\CEOF
26997/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26998/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26999b
27000:def
27001_ACEOF
27002 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27003 echo 'CEOF
27004 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27005 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27006 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27007 grep . conftest.tail >/dev/null || break
27008 rm -f conftest.defines
27009 mv conftest.tail conftest.defines
27010done
27011rm -f conftest.defines conftest.tail
27012
27013echo "ac_result=$ac_in" >>$CONFIG_STATUS
27014cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027015 if test x"$ac_file" != x-; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027016 echo "/* $configure_input */" >"$tmp/config.h"
27017 cat "$ac_result" >>"$tmp/config.h"
27018 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27019 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27020echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027021 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027022 rm -f $ac_file
27023 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027024 fi
27025 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027026 echo "/* $configure_input */"
27027 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027028 fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027029 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027030 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027032
27033 esac
27034
27035done # for ac_tag
27036
Guido van Rossum627b2d71993-12-24 10:39:16 +000027037
Martin v. Löwis11437992002-04-12 09:54:03 +000027038{ (exit 0); exit 0; }
27039_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027040chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027041ac_clean_files=$ac_clean_files_save
27042
27043
27044# configure is writing to config.log, and then calls config.status.
27045# config.status does its own redirection, appending to config.log.
27046# Unfortunately, on DOS this fails, as config.log is still kept open
27047# by configure, so config.status won't be able to write to it; its
27048# output is simply discarded. So we exec the FD to /dev/null,
27049# effectively closing config.log, so it can be properly (re)opened and
27050# appended to by config.status. When coming back to configure, we
27051# need to make the FD available again.
27052if test "$no_create" != yes; then
27053 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027054 ac_config_status_args=
27055 test "$silent" = yes &&
27056 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027057 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027058 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027059 exec 5>>config.log
27060 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27061 # would make configure fail if this is the last instruction.
27062 $ac_cs_success || { (exit 1); exit 1; }
27063fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027064
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027065
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027066echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027067if test ! -f Modules/Setup
27068then
27069 cp $srcdir/Modules/Setup.dist Modules/Setup
27070fi
27071
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027072echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027073if test ! -f Modules/Setup.local
27074then
27075 echo "# Edit this file for local setup changes" >Modules/Setup.local
27076fi
27077
27078echo "creating Makefile"
27079$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27080 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027081 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027082mv config.c Modules