blob: 48210a6e433d24b2e9db375d9a8e1f25c0c30d66 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren652f4de2010-02-07 11:54:03 +00002# From configure.in Revision: 77863 .
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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001884# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001885if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887 case $enableval in
1888 yes)
1889 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1890 ;;
1891 esac
1892 case $enableval in
1893 no)
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896 ;;
1897 *)
1898 UNIVERSALSDK=$enableval
1899 ;;
1900 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001901
Thomas Wouters477c8d52006-05-27 19:21:47 +00001902else
1903
1904 UNIVERSALSDK=
1905 enable_universalsdk=
1906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001907fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908
1909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001910
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001911
1912
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001913UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001914{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1915echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001916
1917# Check whether --with-universal-archs was given.
1918if test "${with_universal_archs+set}" = set; then
1919 withval=$with_universal_archs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001920 { echo "$as_me:$LINENO: result: $withval" >&5
1921echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001922 UNIVERSAL_ARCHS="$withval"
1923
1924else
1925
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001926 { echo "$as_me:$LINENO: result: 32-bit" >&5
1927echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001928
1929fi
1930
1931
1932
1933
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001934
1935# Check whether --with-framework-name was given.
1936if test "${with_framework_name+set}" = set; then
1937 withval=$with_framework_name;
1938 PYTHONFRAMEWORK=${withval}
1939 PYTHONFRAMEWORKDIR=${withval}.framework
1940 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1941
1942else
1943
1944 PYTHONFRAMEWORK=Python
1945 PYTHONFRAMEWORKDIR=Python.framework
1946 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1947
1948fi
1949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001950# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001951if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001952 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001953 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001955 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001956 esac
1957 case $enableval in
1958 no)
1959 PYTHONFRAMEWORK=
1960 PYTHONFRAMEWORKDIR=no-framework
1961 PYTHONFRAMEWORKPREFIX=
1962 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001963 FRAMEWORKINSTALLFIRST=
1964 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001965 FRAMEWORKALTINSTALLFIRST=
1966 FRAMEWORKALTINSTALLLAST=
1967 if test "x${prefix}" = "xNONE"; then
1968 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1969 else
1970 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1971 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001972 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001973 ;;
1974 *)
1975 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001977 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001978 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001979 if test "$UNIVERSAL_ARCHS" = "all"
1980 then
1981 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001982 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001983 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1986 fi
1987
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001988 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 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001995 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001999 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002000
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
2017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024 if test "$UNIVERSAL_ARCHS" = "all"
2025 then
2026 FRAMEWORKINSTALLLAST=update4wayuniversal
2027 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2028 fi
2029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002030fi
2031
Thomas Wouters477c8d52006-05-27 19:21:47 +00002032
2033
Michael W. Hudson54241132001-12-07 15:38:26 +00002034
2035
2036
2037
Jack Jansene578a632001-08-15 01:27:14 +00002038
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002039
2040
2041
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002042
Jack Jansene578a632001-08-15 01:27:14 +00002043##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002044## AC_HELP_STRING(--with-dyld,
2045## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002046##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002047# Set name for machine-dependent library files
2048
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002049{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2050echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051if test -z "$MACHDEP"
2052then
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002054 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002055 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002056 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002060 ac_md_system=`echo $ac_sys_system |
2061 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2062 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002063 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002065
Guido van Rossum07397971997-04-29 21:49:50 +00002066 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002067 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002068 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002069 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002070 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002071 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072 esac
2073fi
Guido van Rossum91922671997-10-09 20:24:13 +00002074
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002075# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2076# disable features if it is defined, without any means to access these
2077# features as extensions. For these systems, we skip the definition of
2078# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2079# some feature, make sure there is no alternative way to access this
2080# feature. Also, when using wildcards, make sure you have verified the
2081# need for not defining _XOPEN_SOURCE on all systems matching the
2082# wildcard, and that the wildcard does not include future systems
2083# (which may remove their limitations).
2084case $ac_sys_system/$ac_sys_release in
2085 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2086 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002087 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002088 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002089 define_xopen_source=no
2090 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2091 # also defined. This can be overridden by defining _BSD_SOURCE
2092 # As this has a different meaning on Linux, only define it on OpenBSD
2093
2094cat >>confdefs.h <<\_ACEOF
2095#define _BSD_SOURCE 1
2096_ACEOF
2097
2098 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002099 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2100 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2101 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002102 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 +00002103 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002104 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2105 # of union __?sigval. Reported by Stuart Bishop.
2106 SunOS/5.6)
2107 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002108 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2109 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002110 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002111 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002112 define_xopen_source=no;;
2113 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002115 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002116 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002117 # On FreeBSD 4, the math functions C89 does not cover are never defined
2118 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2119 FreeBSD/4.*)
2120 define_xopen_source=no;;
2121 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2122 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2123 # identifies itself as Darwin/7.*
2124 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # disables platform specific features beyond repair.
2126 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2127 # has no effect, don't bother defining them
2128 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002133 AIX/4)
2134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 AIX/5)
2136 if test `uname -r` -eq 1; then
2137 define_xopen_source=no
2138 fi
2139 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2141 # defining NI_NUMERICHOST.
2142 QNX/6.3.2)
2143 define_xopen_source=no
2144 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002146esac
2147
2148if test $define_xopen_source = yes
2149then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002150 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2151 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002152 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2153 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002155 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002156
2157cat >>confdefs.h <<\_ACEOF
2158#define _XOPEN_SOURCE 500
2159_ACEOF
2160
2161 ;;
2162 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002163
2164cat >>confdefs.h <<\_ACEOF
2165#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002166_ACEOF
2167
Skip Montanarof0d5f792004-08-15 14:08:23 +00002168 ;;
2169 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002170
2171 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2172 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2173 # several APIs are not declared. Since this is also needed in some
2174 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002175 # except for Solaris 10, where it must not be defined,
2176 # as it implies XPG4.2
2177 case $ac_sys_system/$ac_sys_release in
2178 SunOS/5.10)
2179 ;;
2180 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181
2182cat >>confdefs.h <<\_ACEOF
2183#define _XOPEN_SOURCE_EXTENDED 1
2184_ACEOF
2185
Martin v. Löwis7dece662005-11-26 11:38:24 +00002186 ;;
2187 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002189
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002190cat >>confdefs.h <<\_ACEOF
2191#define _POSIX_C_SOURCE 200112L
2192_ACEOF
2193
2194
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002195fi
2196
Guido van Rossum91922671997-10-09 20:24:13 +00002197#
2198# SGI compilers allow the specification of the both the ABI and the
2199# ISA on the command line. Depending on the values of these switches,
2200# different and often incompatable code will be generated.
2201#
2202# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2203# thus supply support for various ABI/ISA combinations. The MACHDEP
2204# variable is also adjusted.
2205#
2206
2207if test ! -z "$SGI_ABI"
2208then
2209 CC="cc $SGI_ABI"
2210 LDFLAGS="$SGI_ABI $LDFLAGS"
2211 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2212fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002213{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2214echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002215
Jack Jansen6b08a402004-06-03 12:41:45 +00002216# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2217# it may influence the way we can build extensions, so distutils
2218# needs to check it
2219
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220
Jack Jansen6b08a402004-06-03 12:41:45 +00002221CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002222EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002223
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002224{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2225echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002226ac_sys_machine=`uname -m`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002227{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2228echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002229
Guido van Rossum627b2d71993-12-24 10:39:16 +00002230# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002231
2232# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2233# for debug/optimization stuff. BASECFLAGS is for flags that are required
2234# just to get things to compile and link. Users are free to override OPT
2235# when running configure or make. The build should not break if they do.
2236# BASECFLAGS should generally not be messed with, however.
2237
2238# XXX shouldn't some/most/all of this code be merged with the stuff later
2239# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002240{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2241echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002243# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002244if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002245 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002246 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002247 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002248 without_gcc=yes;;
2249 yes) CC=gcc
2250 without_gcc=no;;
2251 *) CC=$withval
2252 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002253 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002254else
Martin v. Löwis11437992002-04-12 09:54:03 +00002255
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002256 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002257 AIX*) CC=cc_r
2258 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002259 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002260 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002261fi
2262
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002263{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2264echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002265
Guido van Rossum8b131c51995-03-09 14:10:13 +00002266# If the user switches compilers, we can't believe the cache
2267if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2268then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002269 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002270(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002271echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002272(it is also a good idea to do 'make clean' before compiling)" >&2;}
2273 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002274fi
2275
Martin v. Löwis11437992002-04-12 09:54:03 +00002276ac_ext=c
2277ac_cpp='$CPP $CPPFLAGS'
2278ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2279ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2280ac_compiler_gnu=$ac_cv_c_compiler_gnu
2281if test -n "$ac_tool_prefix"; then
2282 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2283set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002284{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2285echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002286if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002288else
2289 if test -n "$CC"; then
2290 ac_cv_prog_CC="$CC" # Let the user override the test.
2291else
Martin v. Löwis11437992002-04-12 09:54:03 +00002292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2293for as_dir in $PATH
2294do
2295 IFS=$as_save_IFS
2296 test -z "$as_dir" && as_dir=.
2297 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002298 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 +00002299 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002301 break 2
2302 fi
2303done
2304done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002305IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002306
Jack Jansendd19cf82001-12-06 22:36:17 +00002307fi
2308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002309CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002310if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002311 { echo "$as_me:$LINENO: result: $CC" >&5
2312echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002313else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002314 { echo "$as_me:$LINENO: result: no" >&5
2315echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002316fi
2317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002318
Martin v. Löwis11437992002-04-12 09:54:03 +00002319fi
2320if test -z "$ac_cv_prog_CC"; then
2321 ac_ct_CC=$CC
2322 # Extract the first word of "gcc", so it can be a program name with args.
2323set dummy gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002326if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002327 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002328else
2329 if test -n "$ac_ct_CC"; then
2330 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2331else
2332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2333for as_dir in $PATH
2334do
2335 IFS=$as_save_IFS
2336 test -z "$as_dir" && as_dir=.
2337 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338 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 +00002339 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002341 break 2
2342 fi
2343done
2344done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347fi
2348fi
2349ac_ct_CC=$ac_cv_prog_ac_ct_CC
2350if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002351 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2352echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002353else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002354 { echo "$as_me:$LINENO: result: no" >&5
2355echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002356fi
2357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358 if test "x$ac_ct_CC" = x; then
2359 CC=""
2360 else
2361 case $cross_compiling:$ac_tool_warned in
2362yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002363{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2364whose name does not start with the host triplet. If you think this
2365configuration is useful to you, please write to autoconf@gnu.org." >&5
2366echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2367whose name does not start with the host triplet. If you think this
2368configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369ac_tool_warned=yes ;;
2370esac
2371 CC=$ac_ct_CC
2372 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002373else
2374 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002375fi
2376
Jack Jansendd19cf82001-12-06 22:36:17 +00002377if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378 if test -n "$ac_tool_prefix"; then
2379 # 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 +00002380set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002381{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002383if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002384 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002385else
2386 if test -n "$CC"; then
2387 ac_cv_prog_CC="$CC" # Let the user override the test.
2388else
Martin v. Löwis11437992002-04-12 09:54:03 +00002389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2390for as_dir in $PATH
2391do
2392 IFS=$as_save_IFS
2393 test -z "$as_dir" && as_dir=.
2394 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002395 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 +00002396 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002398 break 2
2399 fi
2400done
2401done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002403
2404fi
2405fi
2406CC=$ac_cv_prog_CC
2407if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002408 { echo "$as_me:$LINENO: result: $CC" >&5
2409echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002410else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002411 { echo "$as_me:$LINENO: result: no" >&5
2412echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413fi
2414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415
Martin v. Löwis11437992002-04-12 09:54:03 +00002416 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002417fi
2418if test -z "$CC"; then
2419 # Extract the first word of "cc", so it can be a program name with args.
2420set dummy cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002421{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2422echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002423if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002424 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002425else
2426 if test -n "$CC"; then
2427 ac_cv_prog_CC="$CC" # Let the user override the test.
2428else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002429 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2431for as_dir in $PATH
2432do
2433 IFS=$as_save_IFS
2434 test -z "$as_dir" && as_dir=.
2435 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2438 ac_prog_rejected=yes
2439 continue
2440 fi
2441 ac_cv_prog_CC="cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002442 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002443 break 2
2444 fi
2445done
2446done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002448
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002449if test $ac_prog_rejected = yes; then
2450 # We found a bogon in the path, so make sure we never use it.
2451 set dummy $ac_cv_prog_CC
2452 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002454 # We chose a different compiler from the bogus one.
2455 # However, it has the same basename, so the bogon will be chosen
2456 # first if we set CC to just the basename; use the full file name.
2457 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002459 fi
2460fi
2461fi
2462fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002463CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002465 { echo "$as_me:$LINENO: result: $CC" >&5
2466echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002467else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002468 { echo "$as_me:$LINENO: result: no" >&5
2469echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002470fi
2471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472
Martin v. Löwis11437992002-04-12 09:54:03 +00002473fi
2474if test -z "$CC"; then
2475 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 do
2478 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2479set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002480{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2481echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002482if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002483 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002484else
2485 if test -n "$CC"; then
2486 ac_cv_prog_CC="$CC" # Let the user override the test.
2487else
Martin v. Löwis11437992002-04-12 09:54:03 +00002488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2489for as_dir in $PATH
2490do
2491 IFS=$as_save_IFS
2492 test -z "$as_dir" && as_dir=.
2493 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 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 +00002495 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002496 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002498 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002499done
2500done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002502
2503fi
2504fi
2505CC=$ac_cv_prog_CC
2506if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002507 { echo "$as_me:$LINENO: result: $CC" >&5
2508echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002509else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002510 { echo "$as_me:$LINENO: result: no" >&5
2511echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002512fi
2513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 test -n "$CC" && break
2516 done
2517fi
2518if test -z "$CC"; then
2519 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002521do
2522 # Extract the first word of "$ac_prog", so it can be a program name with args.
2523set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002524{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2525echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002526if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002527 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002528else
2529 if test -n "$ac_ct_CC"; then
2530 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2531else
2532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2533for as_dir in $PATH
2534do
2535 IFS=$as_save_IFS
2536 test -z "$as_dir" && as_dir=.
2537 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 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 +00002539 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002540 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 break 2
2542 fi
2543done
2544done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547fi
2548fi
2549ac_ct_CC=$ac_cv_prog_ac_ct_CC
2550if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002551 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2552echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002553else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002554 { echo "$as_me:$LINENO: result: no" >&5
2555echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002556fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 test -n "$ac_ct_CC" && break
2560done
Michael W. Hudson54241132001-12-07 15:38:26 +00002561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 if test "x$ac_ct_CC" = x; then
2563 CC=""
2564 else
2565 case $cross_compiling:$ac_tool_warned in
2566yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002567{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2568whose name does not start with the host triplet. If you think this
2569configuration is useful to you, please write to autoconf@gnu.org." >&5
2570echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2571whose name does not start with the host triplet. If you think this
2572configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573ac_tool_warned=yes ;;
2574esac
2575 CC=$ac_ct_CC
2576 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002577fi
2578
2579fi
2580
2581
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002582test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002583See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002584echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002585See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002586 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587
2588# Provide some information about the compiler.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002589echo "$as_me:$LINENO: checking for C compiler version" >&5
2590ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591{ (ac_try="$ac_compiler --version >&5"
2592case "(($ac_try" in
2593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2594 *) ac_try_echo=$ac_try;;
2595esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601{ (ac_try="$ac_compiler -v >&5"
2602case "(($ac_try" in
2603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2604 *) ac_try_echo=$ac_try;;
2605esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611{ (ac_try="$ac_compiler -V >&5"
2612case "(($ac_try" in
2613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2614 *) ac_try_echo=$ac_try;;
2615esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 (exit $ac_status); }
2621
2622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002623/* confdefs.h. */
2624_ACEOF
2625cat confdefs.h >>conftest.$ac_ext
2626cat >>conftest.$ac_ext <<_ACEOF
2627/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629int
2630main ()
2631{
2632
2633 ;
2634 return 0;
2635}
2636_ACEOF
2637ac_clean_files_save=$ac_clean_files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002638ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002639# Try to create an executable without -o first, disregard a.out.
2640# It will help us diagnose broken compilers, and finding out an intuition
2641# of exeext.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002642{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2643echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2644ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2645#
2646# List of possible output files, starting from the most likely.
2647# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2648# only as a last resort. b.out is created by i960 compilers.
2649ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2650#
2651# The IRIX 6 linker writes into existing files which may not be
2652# executable, retaining their permissions. Remove them first so a
2653# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654ac_rmfiles=
2655for ac_file in $ac_files
2656do
2657 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002658 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002659 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2660 esac
2661done
2662rm -f $ac_rmfiles
2663
2664if { (ac_try="$ac_link_default"
2665case "(($ac_try" in
2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2667 *) ac_try_echo=$ac_try;;
2668esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2675# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2676# in a Makefile. We should not override ac_cv_exeext if it was cached,
2677# so that the user can short-circuit this test for compilers unknown to
2678# Autoconf.
2679for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002680do
2681 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002683 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002684 ;;
2685 [ab].out )
2686 # We found the default executable, but exeext='' is most
2687 # certainly right.
2688 break;;
2689 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2691 then :; else
2692 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2693 fi
2694 # We set ac_cv_exeext here because the later test for it is not
2695 # safe: cross compilers may not add the suffix if given an `-o'
2696 # argument, so we may need to know it at that point already.
2697 # Even if this section looks crufty: it has the advantage of
2698 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002699 break;;
2700 * )
2701 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 esac
2703done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704test "$ac_cv_exeext" = no && ac_cv_exeext=
2705
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002706else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707 ac_file=''
2708fi
2709
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002710{ echo "$as_me:$LINENO: result: $ac_file" >&5
2711echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712if test -z "$ac_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002714sed 's/^/| /' conftest.$ac_ext >&5
2715
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002716{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002717See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002718echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002719See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002720 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002721fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002722
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002723ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002726# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002727{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2728echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002729# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2730# If not cross compiling, check that we can run a simple program.
2731if test "$cross_compiling" != yes; then
2732 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733 { (case "(($ac_try" in
2734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2735 *) ac_try_echo=$ac_try;;
2736esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 (exit $ac_status); }; }; then
2742 cross_compiling=no
2743 else
2744 if test "$cross_compiling" = maybe; then
2745 cross_compiling=yes
2746 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002747 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002748If you meant to cross compile, use \`--host'.
2749See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002750echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002751If you meant to cross compile, use \`--host'.
2752See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002753 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 fi
2755 fi
2756fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002757{ echo "$as_me:$LINENO: result: yes" >&5
2758echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002760rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002761ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002763# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002764{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2765echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2766{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2767echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002768
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002769{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2770echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771if { (ac_try="$ac_link"
2772case "(($ac_try" in
2773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2774 *) ac_try_echo=$ac_try;;
2775esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002781 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2782# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2783# work properly (i.e., refer to `conftest.exe'), while it won't with
2784# `rm'.
2785for ac_file in conftest.exe conftest conftest.*; do
2786 test -f "$ac_file" || continue
2787 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002788 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002789 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2790 break;;
2791 * ) break;;
2792 esac
2793done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002795 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002796See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002797echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002798See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002799 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002800fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002801
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002802rm -f conftest$ac_cv_exeext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002803{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2804echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002805
2806rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002807EXEEXT=$ac_cv_exeext
2808ac_exeext=$EXEEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002809{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2810echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002811if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002812 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002813else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002814 cat >conftest.$ac_ext <<_ACEOF
2815/* confdefs.h. */
2816_ACEOF
2817cat confdefs.h >>conftest.$ac_ext
2818cat >>conftest.$ac_ext <<_ACEOF
2819/* end confdefs.h. */
2820
2821int
2822main ()
2823{
2824
2825 ;
2826 return 0;
2827}
2828_ACEOF
2829rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830if { (ac_try="$ac_compile"
2831case "(($ac_try" in
2832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2833 *) ac_try_echo=$ac_try;;
2834esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002836 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002840 for ac_file in conftest.o conftest.obj conftest.*; do
2841 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002843 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2845 break;;
2846 esac
2847done
2848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002850sed 's/^/| /' conftest.$ac_ext >&5
2851
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002852{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002854echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002855See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002856 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002857fi
2858
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002859rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002860fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002861{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2862echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002863OBJEXT=$ac_cv_objext
2864ac_objext=$OBJEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002865{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2866echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002867if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002868 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002869else
2870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002871/* confdefs.h. */
2872_ACEOF
2873cat confdefs.h >>conftest.$ac_ext
2874cat >>conftest.$ac_ext <<_ACEOF
2875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002876
Martin v. Löwis11437992002-04-12 09:54:03 +00002877int
2878main ()
2879{
2880#ifndef __GNUC__
2881 choke me
2882#endif
2883
2884 ;
2885 return 0;
2886}
2887_ACEOF
2888rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002889if { (ac_try="$ac_compile"
2890case "(($ac_try" in
2891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2892 *) ac_try_echo=$ac_try;;
2893esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002897 grep -v '^ *+' conftest.er1 >conftest.err
2898 rm -f conftest.er1
2899 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002901 (exit $ac_status); } && {
2902 test -z "$ac_c_werror_flag" ||
2903 test ! -s conftest.err
2904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 ac_compiler_gnu=yes
2906else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002908sed 's/^/| /' conftest.$ac_ext >&5
2909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002912
2913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002914ac_cv_c_compiler_gnu=$ac_compiler_gnu
2915
2916fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002917{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2918echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2919GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002920ac_test_CFLAGS=${CFLAGS+set}
2921ac_save_CFLAGS=$CFLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002922{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2923echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002924if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002926else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002927 ac_save_c_werror_flag=$ac_c_werror_flag
2928 ac_c_werror_flag=yes
2929 ac_cv_prog_cc_g=no
2930 CFLAGS="-g"
2931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002932/* confdefs.h. */
2933_ACEOF
2934cat confdefs.h >>conftest.$ac_ext
2935cat >>conftest.$ac_ext <<_ACEOF
2936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Martin v. Löwis11437992002-04-12 09:54:03 +00002938int
2939main ()
2940{
2941
2942 ;
2943 return 0;
2944}
2945_ACEOF
2946rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002947if { (ac_try="$ac_compile"
2948case "(($ac_try" in
2949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2950 *) ac_try_echo=$ac_try;;
2951esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002955 grep -v '^ *+' conftest.er1 >conftest.err
2956 rm -f conftest.er1
2957 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002959 (exit $ac_status); } && {
2960 test -z "$ac_c_werror_flag" ||
2961 test ! -s conftest.err
2962 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002963 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002964else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002966sed 's/^/| /' conftest.$ac_ext >&5
2967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968 CFLAGS=""
2969 cat >conftest.$ac_ext <<_ACEOF
2970/* confdefs.h. */
2971_ACEOF
2972cat confdefs.h >>conftest.$ac_ext
2973cat >>conftest.$ac_ext <<_ACEOF
2974/* end confdefs.h. */
2975
2976int
2977main ()
2978{
2979
2980 ;
2981 return 0;
2982}
2983_ACEOF
2984rm -f conftest.$ac_objext
2985if { (ac_try="$ac_compile"
2986case "(($ac_try" in
2987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2988 *) ac_try_echo=$ac_try;;
2989esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 (eval "$ac_compile") 2>conftest.er1
2992 ac_status=$?
2993 grep -v '^ *+' conftest.er1 >conftest.err
2994 rm -f conftest.er1
2995 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002997 (exit $ac_status); } && {
2998 test -z "$ac_c_werror_flag" ||
2999 test ! -s conftest.err
3000 } && test -s conftest.$ac_objext; then
3001 :
3002else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003003 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004sed 's/^/| /' conftest.$ac_ext >&5
3005
3006 ac_c_werror_flag=$ac_save_c_werror_flag
3007 CFLAGS="-g"
3008 cat >conftest.$ac_ext <<_ACEOF
3009/* confdefs.h. */
3010_ACEOF
3011cat confdefs.h >>conftest.$ac_ext
3012cat >>conftest.$ac_ext <<_ACEOF
3013/* end confdefs.h. */
3014
3015int
3016main ()
3017{
3018
3019 ;
3020 return 0;
3021}
3022_ACEOF
3023rm -f conftest.$ac_objext
3024if { (ac_try="$ac_compile"
3025case "(($ac_try" in
3026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3027 *) ac_try_echo=$ac_try;;
3028esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003030 (eval "$ac_compile") 2>conftest.er1
3031 ac_status=$?
3032 grep -v '^ *+' conftest.er1 >conftest.err
3033 rm -f conftest.er1
3034 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003036 (exit $ac_status); } && {
3037 test -z "$ac_c_werror_flag" ||
3038 test ! -s conftest.err
3039 } && test -s conftest.$ac_objext; then
3040 ac_cv_prog_cc_g=yes
3041else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003042 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043sed 's/^/| /' conftest.$ac_ext >&5
3044
3045
Guido van Rossum627b2d71993-12-24 10:39:16 +00003046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047
3048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
3051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3052fi
3053
3054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3055 ac_c_werror_flag=$ac_save_c_werror_flag
3056fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003057{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3058echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003060 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003061elif test $ac_cv_prog_cc_g = yes; then
3062 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003063 CFLAGS="-g -O2"
3064 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003065 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003066 fi
3067else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003068 if test "$GCC" = yes; then
3069 CFLAGS="-O2"
3070 else
3071 CFLAGS=
3072 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003073fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003074{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3075echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003077 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003078else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003080ac_save_CC=$CC
3081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003082/* confdefs.h. */
3083_ACEOF
3084cat confdefs.h >>conftest.$ac_ext
3085cat >>conftest.$ac_ext <<_ACEOF
3086/* end confdefs.h. */
3087#include <stdarg.h>
3088#include <stdio.h>
3089#include <sys/types.h>
3090#include <sys/stat.h>
3091/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3092struct buf { int x; };
3093FILE * (*rcsopen) (struct buf *, struct stat *, int);
3094static char *e (p, i)
3095 char **p;
3096 int i;
3097{
3098 return p[i];
3099}
3100static char *f (char * (*g) (char **, int), char **p, ...)
3101{
3102 char *s;
3103 va_list v;
3104 va_start (v,p);
3105 s = g (p, va_arg (v,int));
3106 va_end (v);
3107 return s;
3108}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003109
3110/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3111 function prototypes and stuff, but not '\xHH' hex character constants.
3112 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003114 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3115 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003117int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3120 inside strings and character constants. */
3121#define FOO(x) 'x'
3122int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3123
Skip Montanaro6dead952003-09-25 14:50:04 +00003124int test (int i, double x);
3125struct s1 {int (*f) (int a);};
3126struct s2 {int (*f) (double a);};
3127int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3128int argc;
3129char **argv;
3130int
3131main ()
3132{
3133return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3134 ;
3135 return 0;
3136}
3137_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3139 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003140do
3141 CC="$ac_save_CC $ac_arg"
3142 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143if { (ac_try="$ac_compile"
3144case "(($ac_try" in
3145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 *) ac_try_echo=$ac_try;;
3147esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003151 grep -v '^ *+' conftest.er1 >conftest.err
3152 rm -f conftest.er1
3153 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003155 (exit $ac_status); } && {
3156 test -z "$ac_c_werror_flag" ||
3157 test ! -s conftest.err
3158 } && test -s conftest.$ac_objext; then
3159 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003160else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003162sed 's/^/| /' conftest.$ac_ext >&5
3163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164
Skip Montanaro6dead952003-09-25 14:50:04 +00003165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003166
3167rm -f core conftest.err conftest.$ac_objext
3168 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003169done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003171CC=$ac_save_CC
3172
3173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174# AC_CACHE_VAL
3175case "x$ac_cv_prog_cc_c89" in
3176 x)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003177 { echo "$as_me:$LINENO: result: none needed" >&5
3178echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 xno)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003180 { echo "$as_me:$LINENO: result: unsupported" >&5
3181echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003182 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003184 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3185echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003186esac
3187
Skip Montanaro6dead952003-09-25 14:50:04 +00003188
Martin v. Löwis11437992002-04-12 09:54:03 +00003189ac_ext=c
3190ac_cpp='$CPP $CPPFLAGS'
3191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3193ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003194
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003195
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003196
3197
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003198{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3199echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003202if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003204
3205 case $withval in
3206 no) with_cxx_main=no
3207 MAINCC='$(CC)';;
3208 yes) with_cxx_main=yes
3209 MAINCC='$(CXX)';;
3210 *) with_cxx_main=yes
3211 MAINCC=$withval
3212 if test -z "$CXX"
3213 then
3214 CXX=$withval
3215 fi;;
3216 esac
3217else
3218
3219 with_cxx_main=no
3220 MAINCC='$(CC)'
3221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003222fi
3223
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003224{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3225echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003226
3227preset_cxx="$CXX"
3228if test -z "$CXX"
3229then
3230 case "$CC" in
3231 gcc) # Extract the first word of "g++", so it can be a program name with args.
3232set dummy g++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003233{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3234echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003236 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003237else
3238 case $CXX in
3239 [\\/]* | ?:[\\/]*)
3240 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3241 ;;
3242 *)
3243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3244for as_dir in notfound
3245do
3246 IFS=$as_save_IFS
3247 test -z "$as_dir" && as_dir=.
3248 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003249 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 +00003250 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003251 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003252 break 2
3253 fi
3254done
3255done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003257
3258 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3259 ;;
3260esac
3261fi
3262CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003263if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003264 { echo "$as_me:$LINENO: result: $CXX" >&5
3265echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003266else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003267 { echo "$as_me:$LINENO: result: no" >&5
3268echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003271 ;;
3272 cc) # Extract the first word of "c++", so it can be a program name with args.
3273set dummy c++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003274{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003277 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003278else
3279 case $CXX in
3280 [\\/]* | ?:[\\/]*)
3281 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3282 ;;
3283 *)
3284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3285for as_dir in notfound
3286do
3287 IFS=$as_save_IFS
3288 test -z "$as_dir" && as_dir=.
3289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003291 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003293 break 2
3294 fi
3295done
3296done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003298
3299 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3300 ;;
3301esac
3302fi
3303CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003304if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003305 { echo "$as_me:$LINENO: result: $CXX" >&5
3306echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003307else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003308 { echo "$as_me:$LINENO: result: no" >&5
3309echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003312 ;;
3313 esac
3314 if test "$CXX" = "notfound"
3315 then
3316 CXX=""
3317 fi
3318fi
3319if test -z "$CXX"
3320then
3321 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3322do
3323 # Extract the first word of "$ac_prog", so it can be a program name with args.
3324set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003325{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003328 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003329else
3330 if test -n "$CXX"; then
3331 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3332else
3333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in $PATH
3335do
3336 IFS=$as_save_IFS
3337 test -z "$as_dir" && as_dir=.
3338 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339 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 +00003340 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003342 break 2
3343 fi
3344done
3345done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003347
3348fi
3349fi
3350CXX=$ac_cv_prog_CXX
3351if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003352 { echo "$as_me:$LINENO: result: $CXX" >&5
3353echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003354else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003355 { echo "$as_me:$LINENO: result: no" >&5
3356echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003357fi
3358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360 test -n "$CXX" && break
3361done
3362test -n "$CXX" || CXX="notfound"
3363
3364 if test "$CXX" = "notfound"
3365 then
3366 CXX=""
3367 fi
3368fi
3369if test "$preset_cxx" != "$CXX"
3370then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003371 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003372
3373 By default, distutils will build C++ extension modules with \"$CXX\".
3374 If this is not intended, then set CXX on the configure command line.
3375 " >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003376echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003377
3378 By default, distutils will build C++ extension modules with \"$CXX\".
3379 If this is not intended, then set CXX on the configure command line.
3380 " >&2;}
3381fi
3382
3383
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003384# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003385
3386ac_ext=c
3387ac_cpp='$CPP $CPPFLAGS'
3388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003391{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3392echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003393# On Suns, sometimes $CPP names a directory.
3394if test -n "$CPP" && test -d "$CPP"; then
3395 CPP=
3396fi
3397if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003399 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003400else
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 # Double quotes because CPP needs to be expanded
3402 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3403 do
3404 ac_preproc_ok=false
3405for ac_c_preproc_warn_flag in '' yes
3406do
3407 # Use a header file that comes with gcc, so configuring glibc
3408 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003409 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3410 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003411 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003412 # not just through cpp. "Syntax error" is here to catch this case.
3413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003414/* confdefs.h. */
3415_ACEOF
3416cat confdefs.h >>conftest.$ac_ext
3417cat >>conftest.$ac_ext <<_ACEOF
3418/* end confdefs.h. */
3419#ifdef __STDC__
3420# include <limits.h>
3421#else
3422# include <assert.h>
3423#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003424 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003425_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426if { (ac_try="$ac_cpp conftest.$ac_ext"
3427case "(($ac_try" in
3428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3429 *) ac_try_echo=$ac_try;;
3430esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003434 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003435 rm -f conftest.er1
3436 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003438 (exit $ac_status); } >/dev/null && {
3439 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3440 test ! -s conftest.err
3441 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442 :
3443else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003445sed 's/^/| /' conftest.$ac_ext >&5
3446
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 # Broken: fails on valid input.
3448continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450
Martin v. Löwis11437992002-04-12 09:54:03 +00003451rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 # can be detected and how.
3455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003456/* confdefs.h. */
3457_ACEOF
3458cat confdefs.h >>conftest.$ac_ext
3459cat >>conftest.$ac_ext <<_ACEOF
3460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003461#include <ac_nonexistent.h>
3462_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463if { (ac_try="$ac_cpp conftest.$ac_ext"
3464case "(($ac_try" in
3465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3466 *) ac_try_echo=$ac_try;;
3467esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003471 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003472 rm -f conftest.er1
3473 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 (exit $ac_status); } >/dev/null && {
3476 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3477 test ! -s conftest.err
3478 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 # Broken: success on invalid input.
3480continue
3481else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003483sed 's/^/| /' conftest.$ac_ext >&5
3484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 # Passes both tests.
3486ac_preproc_ok=:
3487break
3488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489
Martin v. Löwis11437992002-04-12 09:54:03 +00003490rm -f conftest.err conftest.$ac_ext
3491
3492done
3493# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3494rm -f conftest.err conftest.$ac_ext
3495if $ac_preproc_ok; then
3496 break
3497fi
3498
3499 done
3500 ac_cv_prog_CPP=$CPP
3501
3502fi
3503 CPP=$ac_cv_prog_CPP
3504else
3505 ac_cv_prog_CPP=$CPP
3506fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003507{ echo "$as_me:$LINENO: result: $CPP" >&5
3508echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003509ac_preproc_ok=false
3510for ac_c_preproc_warn_flag in '' yes
3511do
3512 # Use a header file that comes with gcc, so configuring glibc
3513 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003514 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3515 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 # On the NeXT, cc -E runs the code through the compiler's parser,
3517 # not just through cpp. "Syntax error" is here to catch this case.
3518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003519/* confdefs.h. */
3520_ACEOF
3521cat confdefs.h >>conftest.$ac_ext
3522cat >>conftest.$ac_ext <<_ACEOF
3523/* end confdefs.h. */
3524#ifdef __STDC__
3525# include <limits.h>
3526#else
3527# include <assert.h>
3528#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003529 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003530_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531if { (ac_try="$ac_cpp conftest.$ac_ext"
3532case "(($ac_try" in
3533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3534 *) ac_try_echo=$ac_try;;
3535esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003539 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 rm -f conftest.er1
3541 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 (exit $ac_status); } >/dev/null && {
3544 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3545 test ! -s conftest.err
3546 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 :
3548else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003550sed 's/^/| /' conftest.$ac_ext >&5
3551
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 # Broken: fails on valid input.
3553continue
3554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555
Martin v. Löwis11437992002-04-12 09:54:03 +00003556rm -f conftest.err conftest.$ac_ext
3557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 # can be detected and how.
3560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003561/* confdefs.h. */
3562_ACEOF
3563cat confdefs.h >>conftest.$ac_ext
3564cat >>conftest.$ac_ext <<_ACEOF
3565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003566#include <ac_nonexistent.h>
3567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568if { (ac_try="$ac_cpp conftest.$ac_ext"
3569case "(($ac_try" in
3570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3571 *) ac_try_echo=$ac_try;;
3572esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003576 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 rm -f conftest.er1
3578 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 (exit $ac_status); } >/dev/null && {
3581 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3582 test ! -s conftest.err
3583 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # Broken: success on invalid input.
3585continue
3586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003588sed 's/^/| /' conftest.$ac_ext >&5
3589
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # Passes both tests.
3591ac_preproc_ok=:
3592break
3593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594
Martin v. Löwis11437992002-04-12 09:54:03 +00003595rm -f conftest.err conftest.$ac_ext
3596
3597done
3598# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3599rm -f conftest.err conftest.$ac_ext
3600if $ac_preproc_ok; then
3601 :
3602else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003603 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003604See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003605echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003606See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003607 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609
3610ac_ext=c
3611ac_cpp='$CPP $CPPFLAGS'
3612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3614ac_compiler_gnu=$ac_cv_c_compiler_gnu
3615
3616
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003617{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3618echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003620 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003621else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003622 # Extract the first word of "grep ggrep" to use in msg output
3623if test -z "$GREP"; then
3624set dummy grep ggrep; ac_prog_name=$2
3625if test "${ac_cv_path_GREP+set}" = set; then
3626 echo $ECHO_N "(cached) $ECHO_C" >&6
3627else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628 ac_path_GREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003629# Loop through the user's path and test for each of PROGNAME-LIST
3630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3632do
3633 IFS=$as_save_IFS
3634 test -z "$as_dir" && as_dir=.
3635 for ac_prog in grep ggrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003636 for ac_exec_ext in '' $ac_executable_extensions; do
3637 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3638 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3639 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640 # Check for GNU $ac_path_GREP
3641case `"$ac_path_GREP" --version 2>&1` in
3642*GNU*)
3643 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3644*)
3645 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003646 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647 while :
3648 do
3649 cat "conftest.in" "conftest.in" >"conftest.tmp"
3650 mv "conftest.tmp" "conftest.in"
3651 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003652 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3654 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3655 ac_count=`expr $ac_count + 1`
3656 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3657 # Best one so far, save it but keep looking for a better one
3658 ac_cv_path_GREP="$ac_path_GREP"
3659 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003660 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661 # 10*(2^10) chars as input seems more than enough
3662 test $ac_count -gt 10 && break
3663 done
3664 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3665esac
3666
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003667
3668 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 done
3670done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003671
3672done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003674
3675
3676fi
3677
3678GREP="$ac_cv_path_GREP"
3679if test -z "$GREP"; then
3680 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3681echo "$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 +00003682 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685else
3686 ac_cv_path_GREP=$GREP
3687fi
3688
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003691{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3692echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 GREP="$ac_cv_path_GREP"
3694
3695
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003696{ echo "$as_me:$LINENO: checking for egrep" >&5
3697echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003699 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700else
3701 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3702 then ac_cv_path_EGREP="$GREP -E"
3703 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003704 # Extract the first word of "egrep" to use in msg output
3705if test -z "$EGREP"; then
3706set dummy egrep; ac_prog_name=$2
3707if test "${ac_cv_path_EGREP+set}" = set; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3709else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710 ac_path_EGREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003711# Loop through the user's path and test for each of PROGNAME-LIST
3712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
3717 for ac_prog in egrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
3719 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3720 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3721 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722 # Check for GNU $ac_path_EGREP
3723case `"$ac_path_EGREP" --version 2>&1` in
3724*GNU*)
3725 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3726*)
3727 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003728 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 while :
3730 do
3731 cat "conftest.in" "conftest.in" >"conftest.tmp"
3732 mv "conftest.tmp" "conftest.in"
3733 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003734 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3736 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3737 ac_count=`expr $ac_count + 1`
3738 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3739 # Best one so far, save it but keep looking for a better one
3740 ac_cv_path_EGREP="$ac_path_EGREP"
3741 ac_path_EGREP_max=$ac_count
3742 fi
3743 # 10*(2^10) chars as input seems more than enough
3744 test $ac_count -gt 10 && break
3745 done
3746 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3747esac
3748
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003749
3750 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 done
3752done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003753
3754done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003756
3757
3758fi
3759
3760EGREP="$ac_cv_path_EGREP"
3761if test -z "$EGREP"; then
3762 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3763echo "$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 +00003764 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003765fi
3766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767else
3768 ac_cv_path_EGREP=$EGREP
3769fi
3770
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772 fi
3773fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003774{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3775echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003777
3778
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003779
3780{ echo "$as_me:$LINENO: checking for AIX" >&5
3781echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3782cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00003783/* confdefs.h. */
3784_ACEOF
3785cat confdefs.h >>conftest.$ac_ext
3786cat >>conftest.$ac_ext <<_ACEOF
3787/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003788#ifdef _AIX
3789 yes
Benjamin Petersona8332062009-09-11 22:36:27 +00003790#endif
3791
Benjamin Petersona8332062009-09-11 22:36:27 +00003792_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3794 $EGREP "yes" >/dev/null 2>&1; then
3795 { echo "$as_me:$LINENO: result: yes" >&5
3796echo "${ECHO_T}yes" >&6; }
Benjamin Petersona8332062009-09-11 22:36:27 +00003797cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003798#define _ALL_SOURCE 1
3799_ACEOF
3800
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003801else
3802 { echo "$as_me:$LINENO: result: no" >&5
3803echo "${ECHO_T}no" >&6; }
3804fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +00003805rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00003806
3807
3808
3809# Check for unsupported systems
3810case $ac_sys_system/$ac_sys_release in
3811atheos*|Linux*/1*)
3812 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3813 echo See README for details.
3814 exit 1;;
3815esac
3816
3817
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003818{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3819echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003820
3821# Check whether --with-suffix was given.
3822if test "${with_suffix+set}" = set; then
3823 withval=$with_suffix;
3824 case $withval in
3825 no) EXEEXT=;;
3826 yes) EXEEXT=.exe;;
3827 *) EXEEXT=$withval;;
3828 esac
3829fi
3830
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003831{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3832echo "${ECHO_T}$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003833
3834# Test whether we're running on a non-case-sensitive system, in which
3835# case we give a warning if no ext is given
3836
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003837{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3838echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003839if test ! -d CaseSensitiveTestDir; then
3840mkdir CaseSensitiveTestDir
3841fi
3842
3843if test -d casesensitivetestdir
3844then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003845 { echo "$as_me:$LINENO: result: yes" >&5
3846echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003847 BUILDEXEEXT=.exe
3848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003849 { echo "$as_me:$LINENO: result: no" >&5
3850echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003851 BUILDEXEEXT=$EXEEXT
3852fi
3853rmdir CaseSensitiveTestDir
3854
3855case $MACHDEP in
3856bsdos*)
3857 case $CC in
3858 gcc) CC="$CC -D_HAVE_BSDI";;
3859 esac;;
3860esac
3861
3862case $ac_sys_system in
3863hp*|HP*)
3864 case $CC in
3865 cc|*/cc) CC="$CC -Ae";;
3866 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00003867SunOS*)
3868 # Some functions have a prototype only with that define, e.g. confstr
3869
3870cat >>confdefs.h <<\_ACEOF
3871#define __EXTENSIONS__ 1
3872_ACEOF
3873
3874 ;;
3875esac
3876
3877
3878
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003879{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3880echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003881if test -z "$LIBRARY"
3882then
3883 LIBRARY='libpython$(VERSION).a'
3884fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003885{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3886echo "${ECHO_T}$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003887
3888# LDLIBRARY is the name of the library to link against (as opposed to the
3889# name of the library into which to insert object files). BLDLIBRARY is also
3890# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3891# is blank as the main program is not linked directly against LDLIBRARY.
3892# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3893# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3894# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3895# DLLLIBRARY is the shared (i.e., DLL) library.
3896#
3897# RUNSHARED is used to run shared python without installed libraries
3898#
3899# INSTSONAME is the name of the shared library that will be use to install
3900# on the system - some systems like version suffix, others don't
3901
3902
3903
3904
3905
3906
3907LDLIBRARY="$LIBRARY"
3908BLDLIBRARY='$(LDLIBRARY)'
3909INSTSONAME='$(LDLIBRARY)'
3910DLLLIBRARY=''
3911LDLIBRARYDIR=''
3912RUNSHARED=''
3913
3914# LINKCC is the command that links the python executable -- default is $(CC).
3915# If CXX is set, and if it is needed to link a main function that was
3916# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3917# python might then depend on the C++ runtime
3918# This is altered for AIX in order to build the export list before
3919# linking.
3920
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003921{ echo "$as_me:$LINENO: checking LINKCC" >&5
3922echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003923if test -z "$LINKCC"
3924then
3925 LINKCC='$(PURIFY) $(MAINCC)'
3926 case $ac_sys_system in
3927 AIX*)
3928 exp_extra="\"\""
3929 if test $ac_sys_release -ge 5 -o \
3930 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3931 exp_extra="."
3932 fi
3933 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00003934 QNX*)
3935 # qcc must be used because the other compilers do not
3936 # support -N.
3937 LINKCC=qcc;;
3938 esac
3939fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003940{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3941echo "${ECHO_T}$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003942
3943# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3944# make sure we default having it set to "no": this is used by
3945# distutils.unixccompiler to know if it should add --enable-new-dtags
3946# to linker command lines, and failing to detect GNU ld simply results
3947# in the same bahaviour as before.
3948
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003949{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3950echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003951ac_prog=ld
3952if test "$GCC" = yes; then
3953 ac_prog=`$CC -print-prog-name=ld`
3954fi
3955case `"$ac_prog" -V 2>&1 < /dev/null` in
3956 *GNU*)
3957 GNULD=yes;;
3958 *)
3959 GNULD=no;;
3960esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003961{ echo "$as_me:$LINENO: result: $GNULD" >&5
3962echo "${ECHO_T}$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003963
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003964{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3965echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003966# Check whether --enable-shared was given.
3967if test "${enable_shared+set}" = set; then
3968 enableval=$enable_shared;
3969fi
3970
3971
3972if test -z "$enable_shared"
3973then
3974 case $ac_sys_system in
3975 CYGWIN* | atheos*)
3976 enable_shared="yes";;
3977 *)
3978 enable_shared="no";;
3979 esac
3980fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003981{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3982echo "${ECHO_T}$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003983
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003984{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3985echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003986# Check whether --enable-profiling was given.
3987if test "${enable_profiling+set}" = set; then
3988 enableval=$enable_profiling; ac_save_cc="$CC"
3989 CC="$CC -pg"
3990 if test "$cross_compiling" = yes; then
3991 ac_enable_profiling="no"
3992else
3993 cat >conftest.$ac_ext <<_ACEOF
3994/* confdefs.h. */
3995_ACEOF
3996cat confdefs.h >>conftest.$ac_ext
3997cat >>conftest.$ac_ext <<_ACEOF
3998/* end confdefs.h. */
3999int main() { return 0; }
4000_ACEOF
4001rm -f conftest$ac_exeext
4002if { (ac_try="$ac_link"
4003case "(($ac_try" in
4004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005 *) ac_try_echo=$ac_try;;
4006esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004008 (eval "$ac_link") 2>&5
4009 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4012 { (case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004017 (eval "$ac_try") 2>&5
4018 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004020 (exit $ac_status); }; }; then
4021 ac_enable_profiling="yes"
4022else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004023 echo "$as_me: program exited with status $ac_status" >&5
4024echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004025sed 's/^/| /' conftest.$ac_ext >&5
4026
4027( exit $ac_status )
4028ac_enable_profiling="no"
4029fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4031fi
4032
4033
4034 CC="$ac_save_cc"
4035fi
4036
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004037{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4038echo "${ECHO_T}$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004039
4040case "$ac_enable_profiling" in
4041 "yes")
4042 BASECFLAGS="-pg $BASECFLAGS"
4043 LDFLAGS="-pg $LDFLAGS"
4044 ;;
4045esac
4046
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004047{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4048echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004049
4050# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4051# library that we build, but we do not want to link against it (we
4052# will find it with a -framework option). For this reason there is an
4053# extra variable BLDLIBRARY against which Python and the extension
4054# modules are linked, BLDLIBRARY. This is normally the same as
4055# LDLIBRARY, but empty for MacOSX framework builds.
4056if test "$enable_framework"
4057then
4058 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4059 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4060 BLDLIBRARY=''
4061else
4062 BLDLIBRARY='$(LDLIBRARY)'
4063fi
4064
4065# Other platforms follow
4066if test $enable_shared = "yes"; then
4067
4068cat >>confdefs.h <<\_ACEOF
4069#define Py_ENABLE_SHARED 1
4070_ACEOF
4071
4072 case $ac_sys_system in
4073 CYGWIN*)
4074 LDLIBRARY='libpython$(VERSION).dll.a'
4075 DLLLIBRARY='libpython$(VERSION).dll'
4076 ;;
4077 SunOS*)
4078 LDLIBRARY='libpython$(VERSION).so'
4079 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4080 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4081 INSTSONAME="$LDLIBRARY".$SOVERSION
4082 ;;
4083 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4084 LDLIBRARY='libpython$(VERSION).so'
4085 BLDLIBRARY='-L. -lpython$(VERSION)'
4086 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4087 case $ac_sys_system in
4088 FreeBSD*)
4089 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4090 ;;
4091 esac
4092 INSTSONAME="$LDLIBRARY".$SOVERSION
4093 ;;
4094 hp*|HP*)
4095 case `uname -m` in
4096 ia64)
4097 LDLIBRARY='libpython$(VERSION).so'
4098 ;;
4099 *)
4100 LDLIBRARY='libpython$(VERSION).sl'
4101 ;;
4102 esac
4103 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4104 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4105 ;;
4106 OSF*)
4107 LDLIBRARY='libpython$(VERSION).so'
4108 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4109 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4110 ;;
4111 atheos*)
4112 LDLIBRARY='libpython$(VERSION).so'
4113 BLDLIBRARY='-L. -lpython$(VERSION)'
4114 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4115 ;;
4116 Darwin*)
4117 LDLIBRARY='libpython$(VERSION).dylib'
4118 BLDLIBRARY='-L. -lpython$(VERSION)'
4119 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4120 ;;
4121
4122 esac
4123else # shared is disabled
4124 case $ac_sys_system in
4125 CYGWIN*)
4126 BLDLIBRARY='$(LIBRARY)'
4127 LDLIBRARY='libpython$(VERSION).dll.a'
4128 ;;
4129 esac
4130fi
4131
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004132{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4133echo "${ECHO_T}$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004134
4135if test -n "$ac_tool_prefix"; then
4136 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4137set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004138{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4139echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004140if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004141 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004142else
4143 if test -n "$RANLIB"; then
4144 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4145else
4146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4147for as_dir in $PATH
4148do
4149 IFS=$as_save_IFS
4150 test -z "$as_dir" && as_dir=.
4151 for ac_exec_ext in '' $ac_executable_extensions; do
4152 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4153 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004154 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004155 break 2
4156 fi
4157done
4158done
4159IFS=$as_save_IFS
4160
4161fi
4162fi
4163RANLIB=$ac_cv_prog_RANLIB
4164if test -n "$RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004165 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4166echo "${ECHO_T}$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004167else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004168 { echo "$as_me:$LINENO: result: no" >&5
4169echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004170fi
4171
4172
4173fi
4174if test -z "$ac_cv_prog_RANLIB"; then
4175 ac_ct_RANLIB=$RANLIB
4176 # Extract the first word of "ranlib", so it can be a program name with args.
4177set dummy ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004178{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4179echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004180if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004181 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004182else
4183 if test -n "$ac_ct_RANLIB"; then
4184 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4185else
4186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189 IFS=$as_save_IFS
4190 test -z "$as_dir" && as_dir=.
4191 for ac_exec_ext in '' $ac_executable_extensions; do
4192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4193 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004194 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004195 break 2
4196 fi
4197done
4198done
4199IFS=$as_save_IFS
4200
4201fi
4202fi
4203ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4204if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004205 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4206echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004207else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004208 { echo "$as_me:$LINENO: result: no" >&5
4209echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004210fi
4211
4212 if test "x$ac_ct_RANLIB" = x; then
4213 RANLIB=":"
4214 else
4215 case $cross_compiling:$ac_tool_warned in
4216yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004217{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4218whose name does not start with the host triplet. If you think this
4219configuration is useful to you, please write to autoconf@gnu.org." >&5
4220echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4221whose name does not start with the host triplet. If you think this
4222configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004223ac_tool_warned=yes ;;
4224esac
4225 RANLIB=$ac_ct_RANLIB
4226 fi
4227else
4228 RANLIB="$ac_cv_prog_RANLIB"
4229fi
4230
4231
4232for ac_prog in ar aal
4233do
4234 # Extract the first word of "$ac_prog", so it can be a program name with args.
4235set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004236{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004238if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004239 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004240else
4241 if test -n "$AR"; then
4242 ac_cv_prog_AR="$AR" # Let the user override the test.
4243else
4244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247 IFS=$as_save_IFS
4248 test -z "$as_dir" && as_dir=.
4249 for ac_exec_ext in '' $ac_executable_extensions; do
4250 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004252 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004253 break 2
4254 fi
4255done
4256done
4257IFS=$as_save_IFS
4258
4259fi
4260fi
4261AR=$ac_cv_prog_AR
4262if test -n "$AR"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004263 { echo "$as_me:$LINENO: result: $AR" >&5
4264echo "${ECHO_T}$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004265else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004266 { echo "$as_me:$LINENO: result: no" >&5
4267echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004268fi
4269
4270
4271 test -n "$AR" && break
4272done
4273test -n "$AR" || AR="ar"
4274
4275
4276# tweak ARFLAGS only if the user didn't set it on the command line
4277
4278if test -z "$ARFLAGS"
4279then
4280 ARFLAGS="rc"
4281fi
4282
4283
4284# Extract the first word of "svnversion", so it can be a program name with args.
4285set dummy svnversion; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004286{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4287echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004288if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004289 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004290else
4291 if test -n "$SVNVERSION"; then
4292 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4293else
4294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4295for as_dir in $PATH
4296do
4297 IFS=$as_save_IFS
4298 test -z "$as_dir" && as_dir=.
4299 for ac_exec_ext in '' $ac_executable_extensions; do
4300 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4301 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004303 break 2
4304 fi
4305done
4306done
4307IFS=$as_save_IFS
4308
4309 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4310fi
4311fi
4312SVNVERSION=$ac_cv_prog_SVNVERSION
4313if test -n "$SVNVERSION"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004314 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4315echo "${ECHO_T}$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004317 { echo "$as_me:$LINENO: result: no" >&5
4318echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004319fi
4320
4321
4322if test $SVNVERSION = found
4323then
4324 SVNVERSION="svnversion \$(srcdir)"
4325else
4326 SVNVERSION="echo Unversioned directory"
4327fi
4328
4329case $MACHDEP in
4330bsdos*|hp*|HP*)
4331 # install -d does not work on BSDI or HP-UX
4332 if test -z "$INSTALL"
4333 then
4334 INSTALL="${srcdir}/install-sh -c"
4335 fi
4336esac
4337ac_aux_dir=
4338for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4339 if test -f "$ac_dir/install-sh"; then
4340 ac_aux_dir=$ac_dir
4341 ac_install_sh="$ac_aux_dir/install-sh -c"
4342 break
4343 elif test -f "$ac_dir/install.sh"; then
4344 ac_aux_dir=$ac_dir
4345 ac_install_sh="$ac_aux_dir/install.sh -c"
4346 break
4347 elif test -f "$ac_dir/shtool"; then
4348 ac_aux_dir=$ac_dir
4349 ac_install_sh="$ac_aux_dir/shtool install -c"
4350 break
4351 fi
4352done
4353if test -z "$ac_aux_dir"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004354 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4355echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004356 { (exit 1); exit 1; }; }
4357fi
4358
4359# These three variables are undocumented and unsupported,
4360# and are intended to be withdrawn in a future Autoconf release.
4361# They can cause serious problems if a builder's source tree is in a directory
4362# whose full name contains unusual characters.
4363ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4364ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4365ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4366
4367
4368# Find a good install program. We prefer a C program (faster),
4369# so one script is as good as another. But avoid the broken or
4370# incompatible versions:
4371# SysV /etc/install, /usr/sbin/install
4372# SunOS /usr/etc/install
4373# IRIX /sbin/install
4374# AIX /bin/install
4375# AmigaOS /C/install, which installs bootblocks on floppy discs
4376# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4377# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4378# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4379# OS/2's system install, which has a completely different semantic
4380# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004381{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4382echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004383if test -z "$INSTALL"; then
4384if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004385 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004386else
4387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4388for as_dir in $PATH
4389do
4390 IFS=$as_save_IFS
4391 test -z "$as_dir" && as_dir=.
4392 # Account for people who put trailing slashes in PATH elements.
4393case $as_dir/ in
4394 ./ | .// | /cC/* | \
4395 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4396 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4397 /usr/ucb/* ) ;;
4398 *)
4399 # OSF1 and SCO ODT 3.0 have their own names for install.
4400 # Don't use installbsd from OSF since it installs stuff as root
4401 # by default.
4402 for ac_prog in ginstall scoinst install; do
4403 for ac_exec_ext in '' $ac_executable_extensions; do
4404 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4405 if test $ac_prog = install &&
4406 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4407 # AIX install. It has an incompatible calling convention.
4408 :
4409 elif test $ac_prog = install &&
4410 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4411 # program-specific install script used by HP pwplus--don't use.
4412 :
4413 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004414 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4415 break 3
Antoine Pitrou20327222009-05-24 20:39:11 +00004416 fi
4417 fi
4418 done
4419 done
4420 ;;
4421esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004422done
4423IFS=$as_save_IFS
4424
Antoine Pitrou20327222009-05-24 20:39:11 +00004425
4426fi
4427 if test "${ac_cv_path_install+set}" = set; then
4428 INSTALL=$ac_cv_path_install
4429 else
4430 # As a last resort, use the slow shell script. Don't cache a
4431 # value for INSTALL within a source directory, because that will
4432 # break other packages using the cache if that directory is
4433 # removed, or if the value is a relative name.
4434 INSTALL=$ac_install_sh
4435 fi
4436fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004437{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4438echo "${ECHO_T}$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004439
4440# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4441# It thinks the first close brace ends the variable substitution.
4442test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4443
4444test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4445
4446test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4447
4448
4449# Not every filesystem supports hard links
4450
4451if test -z "$LN" ; then
4452 case $ac_sys_system in
4453 CYGWIN*) LN="ln -s";;
4454 atheos*) LN="ln -s";;
4455 *) LN=ln;;
4456 esac
4457fi
4458
4459# Check for --with-pydebug
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004460{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4461echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004462
4463# Check whether --with-pydebug was given.
4464if test "${with_pydebug+set}" = set; then
4465 withval=$with_pydebug;
4466if test "$withval" != no
4467then
4468
4469cat >>confdefs.h <<\_ACEOF
4470#define Py_DEBUG 1
4471_ACEOF
4472
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004473 { echo "$as_me:$LINENO: result: yes" >&5
4474echo "${ECHO_T}yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00004475 Py_DEBUG='true'
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004476else { echo "$as_me:$LINENO: result: no" >&5
4477echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00004478fi
4479else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004480 { echo "$as_me:$LINENO: result: no" >&5
4481echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004482fi
4483
4484
4485# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4486# merged with this chunk of code?
4487
4488# Optimizer/debugger flags
4489# ------------------------
4490# (The following bit of code is complicated enough - please keep things
4491# indented properly. Just pretend you're editing Python code. ;-)
4492
4493# There are two parallel sets of case statements below, one that checks to
4494# see if OPT was set and one that does BASECFLAGS setting based upon
4495# compiler and platform. BASECFLAGS tweaks need to be made even if the
4496# user set OPT.
4497
4498# tweak OPT based on compiler and platform, only if the user didn't set
4499# it on the command line
4500
4501if test -z "$OPT"
4502then
4503 case $GCC in
4504 yes)
4505 if test "$CC" != 'g++' ; then
4506 STRICT_PROTO="-Wstrict-prototypes"
4507 fi
4508 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4509 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4510 WRAP="-fwrapv"
4511 fi
4512 case $ac_cv_prog_cc_g in
4513 yes)
4514 if test "$Py_DEBUG" = 'true' ; then
4515 # Optimization messes up debuggers, so turn it off for
4516 # debug builds.
4517 OPT="-g -Wall $STRICT_PROTO"
4518 else
4519 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4520 fi
4521 ;;
4522 *)
4523 OPT="-O3 -Wall $STRICT_PROTO"
4524 ;;
4525 esac
4526 case $ac_sys_system in
4527 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4528 ;;
4529 esac
4530 ;;
4531
4532 *)
4533 OPT="-O"
4534 ;;
4535 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004536fi
4537
4538
4539
4540# The -arch flags for universal builds on OSX
4541UNIVERSAL_ARCH_FLAGS=
4542
4543
4544# tweak BASECFLAGS based on compiler and platform
4545case $GCC in
4546yes)
4547 # Python violates C99 rules, by casting between incompatible
4548 # pointer types. GCC may generate bad code as a result of that,
4549 # so use -fno-strict-aliasing if supported.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004550 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4551echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004552 ac_save_cc="$CC"
4553 CC="$CC -fno-strict-aliasing"
4554 if test "$cross_compiling" = yes; then
4555 ac_cv_no_strict_aliasing_ok=no
4556else
4557 cat >conftest.$ac_ext <<_ACEOF
4558/* confdefs.h. */
4559_ACEOF
4560cat confdefs.h >>conftest.$ac_ext
4561cat >>conftest.$ac_ext <<_ACEOF
4562/* end confdefs.h. */
4563int main() { return 0; }
4564_ACEOF
4565rm -f conftest$ac_exeext
4566if { (ac_try="$ac_link"
4567case "(($ac_try" in
4568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4569 *) ac_try_echo=$ac_try;;
4570esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004572 (eval "$ac_link") 2>&5
4573 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004575 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4576 { (case "(($ac_try" in
4577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4578 *) ac_try_echo=$ac_try;;
4579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004581 (eval "$ac_try") 2>&5
4582 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004584 (exit $ac_status); }; }; then
4585 ac_cv_no_strict_aliasing_ok=yes
4586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004587 echo "$as_me: program exited with status $ac_status" >&5
4588echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004589sed 's/^/| /' conftest.$ac_ext >&5
4590
4591( exit $ac_status )
4592ac_cv_no_strict_aliasing_ok=no
4593fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4595fi
4596
4597
4598 CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004599 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4600echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004601 if test $ac_cv_no_strict_aliasing_ok = yes
4602 then
4603 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4604 fi
4605
4606 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4607 # support. Without this, treatment of subnormals doesn't follow
4608 # the standard.
4609 case $ac_sys_machine in
4610 alpha*)
4611 BASECFLAGS="$BASECFLAGS -mieee"
4612 ;;
4613 esac
4614
4615 case $ac_sys_system in
4616 SCO_SV*)
4617 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4618 ;;
4619 # is there any other compiler on Darwin besides gcc?
4620 Darwin*)
4621 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4622 # used to be here, but non-Apple gcc doesn't accept them.
4623
4624
4625 if test "${enable_universalsdk}"; then
4626 UNIVERSAL_ARCH_FLAGS=""
4627 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4628 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4629 ARCH_RUN_32BIT=""
4630
4631 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4632 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004633 ARCH_RUN_32BIT="true"
Antoine Pitrou20327222009-05-24 20:39:11 +00004634
4635 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4636 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4637 ARCH_RUN_32BIT="arch -i386 -ppc"
4638
Ronald Oussoren856624d2009-09-08 07:13:53 +00004639 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4640 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4641 ARCH_RUN_32BIT="arch -i386"
4642
4643 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4644 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4645 ARCH_RUN_32BIT="arch -i386 -ppc"
4646
Antoine Pitrou20327222009-05-24 20:39:11 +00004647 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004648 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4649echo "$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 +00004650 { (exit 1); exit 1; }; }
4651
4652 fi
4653
4654
4655 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4656 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4657 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4658 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4659 fi
4660 fi
4661
4662 # Calculate the right deployment target for this build.
4663 #
4664 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4665 if test ${cur_target} '>' 10.2; then
4666 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004667 if test ${enable_universalsdk}; then
4668 if test "${UNIVERSAL_ARCHS}" = "all"; then
4669 # Ensure that the default platform for a
4670 # 4-way universal build is OSX 10.5,
4671 # that's the first OS release where
4672 # 4-way builds make sense.
4673 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00004674
4675 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4676 cur_target='10.5'
4677
4678 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4679 cur_target='10.5'
4680
4681 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4682 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004683 fi
4684 else
4685 if test `arch` = "i386"; then
4686 # On Intel macs default to a deployment
4687 # target of 10.4, that's the first OSX
4688 # release with Intel support.
4689 cur_target="10.4"
4690 fi
4691 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004692 fi
4693 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4694
4695 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4696 # environment with a value that is the same as what we'll use
4697 # in the Makefile to ensure that we'll get the same compiler
4698 # environment during configure and build time.
4699 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4700 export MACOSX_DEPLOYMENT_TARGET
4701 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4702
4703 ;;
4704 OSF*)
4705 BASECFLAGS="$BASECFLAGS -mieee"
4706 ;;
4707 esac
4708 ;;
4709
4710*)
4711 case $ac_sys_system in
4712 OpenUNIX*|UnixWare*)
4713 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4714 ;;
4715 OSF*)
4716 BASECFLAGS="$BASECFLAGS -ieee -std"
4717 ;;
4718 SCO_SV*)
4719 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4720 ;;
4721 esac
4722 ;;
4723esac
4724
4725if test "$Py_DEBUG" = 'true'; then
4726 :
4727else
4728 OPT="-DNDEBUG $OPT"
4729fi
4730
4731if test "$ac_arch_flags"
4732then
4733 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4734fi
4735
4736# disable check for icc since it seems to pass, but generates a warning
4737if test "$CC" = icc
4738then
4739 ac_cv_opt_olimit_ok=no
4740fi
4741
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004742{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4743echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004744if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004745 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004746else
4747 ac_save_cc="$CC"
4748CC="$CC -OPT:Olimit=0"
4749if test "$cross_compiling" = yes; then
4750 ac_cv_opt_olimit_ok=no
4751else
4752 cat >conftest.$ac_ext <<_ACEOF
4753/* confdefs.h. */
4754_ACEOF
4755cat confdefs.h >>conftest.$ac_ext
4756cat >>conftest.$ac_ext <<_ACEOF
4757/* end confdefs.h. */
4758int main() { return 0; }
4759_ACEOF
4760rm -f conftest$ac_exeext
4761if { (ac_try="$ac_link"
4762case "(($ac_try" in
4763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4764 *) ac_try_echo=$ac_try;;
4765esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004767 (eval "$ac_link") 2>&5
4768 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004770 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4771 { (case "(($ac_try" in
4772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4773 *) ac_try_echo=$ac_try;;
4774esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004776 (eval "$ac_try") 2>&5
4777 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004779 (exit $ac_status); }; }; then
4780 ac_cv_opt_olimit_ok=yes
4781else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004782 echo "$as_me: program exited with status $ac_status" >&5
4783echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004784sed 's/^/| /' conftest.$ac_ext >&5
4785
4786( exit $ac_status )
4787ac_cv_opt_olimit_ok=no
4788fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4790fi
4791
4792
4793CC="$ac_save_cc"
4794fi
4795
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004796{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4797echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004798if test $ac_cv_opt_olimit_ok = yes; then
4799 case $ac_sys_system in
4800 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4801 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4802 # environment?
4803 Darwin*)
4804 ;;
4805 *)
4806 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4807 ;;
4808 esac
4809else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004810 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4811echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004812 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004813 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004814else
4815 ac_save_cc="$CC"
4816 CC="$CC -Olimit 1500"
4817 if test "$cross_compiling" = yes; then
4818 ac_cv_olimit_ok=no
4819else
4820 cat >conftest.$ac_ext <<_ACEOF
4821/* confdefs.h. */
4822_ACEOF
4823cat confdefs.h >>conftest.$ac_ext
4824cat >>conftest.$ac_ext <<_ACEOF
4825/* end confdefs.h. */
4826int main() { return 0; }
4827_ACEOF
4828rm -f conftest$ac_exeext
4829if { (ac_try="$ac_link"
4830case "(($ac_try" in
4831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4832 *) ac_try_echo=$ac_try;;
4833esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004835 (eval "$ac_link") 2>&5
4836 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004838 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4839 { (case "(($ac_try" in
4840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4841 *) ac_try_echo=$ac_try;;
4842esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004844 (eval "$ac_try") 2>&5
4845 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004847 (exit $ac_status); }; }; then
4848 ac_cv_olimit_ok=yes
4849else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004850 echo "$as_me: program exited with status $ac_status" >&5
4851echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004852sed 's/^/| /' conftest.$ac_ext >&5
4853
4854( exit $ac_status )
4855ac_cv_olimit_ok=no
4856fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4858fi
4859
4860
4861 CC="$ac_save_cc"
4862fi
4863
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004864 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4865echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004866 if test $ac_cv_olimit_ok = yes; then
4867 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4868 fi
4869fi
4870
4871# Check whether GCC supports PyArg_ParseTuple format
4872if test "$GCC" = "yes"
4873then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004874 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4875echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004876 save_CFLAGS=$CFLAGS
4877 CFLAGS="$CFLAGS -Werror"
4878 cat >conftest.$ac_ext <<_ACEOF
4879/* confdefs.h. */
4880_ACEOF
4881cat confdefs.h >>conftest.$ac_ext
4882cat >>conftest.$ac_ext <<_ACEOF
4883/* end confdefs.h. */
4884
4885 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4886
4887int
4888main ()
4889{
4890
4891 ;
4892 return 0;
4893}
4894_ACEOF
4895rm -f conftest.$ac_objext
4896if { (ac_try="$ac_compile"
4897case "(($ac_try" in
4898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4899 *) ac_try_echo=$ac_try;;
4900esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004902 (eval "$ac_compile") 2>conftest.er1
4903 ac_status=$?
4904 grep -v '^ *+' conftest.er1 >conftest.err
4905 rm -f conftest.er1
4906 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004908 (exit $ac_status); } && {
4909 test -z "$ac_c_werror_flag" ||
4910 test ! -s conftest.err
4911 } && test -s conftest.$ac_objext; then
4912
4913cat >>confdefs.h <<\_ACEOF
4914#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4915_ACEOF
4916
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004917 { echo "$as_me:$LINENO: result: yes" >&5
4918echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004919else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004920 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004921sed 's/^/| /' conftest.$ac_ext >&5
4922
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004923 { echo "$as_me:$LINENO: result: no" >&5
4924echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004925
4926fi
4927
4928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4929 CFLAGS=$save_CFLAGS
4930fi
4931
4932# On some compilers, pthreads are available without further options
4933# (e.g. MacOS X). On some of these systems, the compiler will not
4934# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4935# So we have to see first whether pthreads are available without
4936# options before we can check whether -Kpthread improves anything.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004937{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4938echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004939if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004940 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004941else
4942 if test "$cross_compiling" = yes; then
4943 ac_cv_pthread_is_default=no
4944else
4945 cat >conftest.$ac_ext <<_ACEOF
4946/* confdefs.h. */
4947_ACEOF
4948cat confdefs.h >>conftest.$ac_ext
4949cat >>conftest.$ac_ext <<_ACEOF
4950/* end confdefs.h. */
4951
4952#include <pthread.h>
4953
4954void* routine(void* p){return NULL;}
4955
4956int main(){
4957 pthread_t p;
4958 if(pthread_create(&p,NULL,routine,NULL)!=0)
4959 return 1;
4960 (void)pthread_detach(p);
4961 return 0;
4962}
4963
4964_ACEOF
4965rm -f conftest$ac_exeext
4966if { (ac_try="$ac_link"
4967case "(($ac_try" in
4968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4969 *) ac_try_echo=$ac_try;;
4970esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004972 (eval "$ac_link") 2>&5
4973 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4976 { (case "(($ac_try" in
4977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4978 *) ac_try_echo=$ac_try;;
4979esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004981 (eval "$ac_try") 2>&5
4982 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004984 (exit $ac_status); }; }; then
4985
4986 ac_cv_pthread_is_default=yes
4987 ac_cv_kthread=no
4988 ac_cv_pthread=no
4989
4990else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004991 echo "$as_me: program exited with status $ac_status" >&5
4992echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004993sed 's/^/| /' conftest.$ac_ext >&5
4994
4995( exit $ac_status )
4996ac_cv_pthread_is_default=no
4997fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4999fi
5000
5001
5002
5003fi
5004
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005005{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5006echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005007
5008
5009if test $ac_cv_pthread_is_default = yes
5010then
5011 ac_cv_kpthread=no
5012else
5013# -Kpthread, if available, provides the right #defines
5014# and linker options to make pthread_create available
5015# Some compilers won't report that they do not support -Kpthread,
5016# so we need to run a program to see whether it really made the
5017# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005018{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5019echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005020if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005021 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005022else
5023 ac_save_cc="$CC"
5024CC="$CC -Kpthread"
5025if test "$cross_compiling" = yes; then
5026 ac_cv_kpthread=no
5027else
5028 cat >conftest.$ac_ext <<_ACEOF
5029/* confdefs.h. */
5030_ACEOF
5031cat confdefs.h >>conftest.$ac_ext
5032cat >>conftest.$ac_ext <<_ACEOF
5033/* end confdefs.h. */
5034
5035#include <pthread.h>
5036
5037void* routine(void* p){return NULL;}
5038
5039int main(){
5040 pthread_t p;
5041 if(pthread_create(&p,NULL,routine,NULL)!=0)
5042 return 1;
5043 (void)pthread_detach(p);
5044 return 0;
5045}
5046
5047_ACEOF
5048rm -f conftest$ac_exeext
5049if { (ac_try="$ac_link"
5050case "(($ac_try" in
5051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5052 *) ac_try_echo=$ac_try;;
5053esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005055 (eval "$ac_link") 2>&5
5056 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005058 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5059 { (case "(($ac_try" in
5060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5061 *) ac_try_echo=$ac_try;;
5062esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005064 (eval "$ac_try") 2>&5
5065 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005067 (exit $ac_status); }; }; then
5068 ac_cv_kpthread=yes
5069else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005070 echo "$as_me: program exited with status $ac_status" >&5
5071echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005072sed 's/^/| /' conftest.$ac_ext >&5
5073
5074( exit $ac_status )
5075ac_cv_kpthread=no
5076fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5078fi
5079
5080
5081CC="$ac_save_cc"
5082fi
5083
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005084{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5085echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005086fi
5087
5088if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5089then
5090# -Kthread, if available, provides the right #defines
5091# and linker options to make pthread_create available
5092# Some compilers won't report that they do not support -Kthread,
5093# so we need to run a program to see whether it really made the
5094# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005095{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5096echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005097if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005098 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005099else
5100 ac_save_cc="$CC"
5101CC="$CC -Kthread"
5102if test "$cross_compiling" = yes; then
5103 ac_cv_kthread=no
5104else
5105 cat >conftest.$ac_ext <<_ACEOF
5106/* confdefs.h. */
5107_ACEOF
5108cat confdefs.h >>conftest.$ac_ext
5109cat >>conftest.$ac_ext <<_ACEOF
5110/* end confdefs.h. */
5111
5112#include <pthread.h>
5113
5114void* routine(void* p){return NULL;}
5115
5116int main(){
5117 pthread_t p;
5118 if(pthread_create(&p,NULL,routine,NULL)!=0)
5119 return 1;
5120 (void)pthread_detach(p);
5121 return 0;
5122}
5123
5124_ACEOF
5125rm -f conftest$ac_exeext
5126if { (ac_try="$ac_link"
5127case "(($ac_try" in
5128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5129 *) ac_try_echo=$ac_try;;
5130esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005132 (eval "$ac_link") 2>&5
5133 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005135 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5136 { (case "(($ac_try" in
5137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5138 *) ac_try_echo=$ac_try;;
5139esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005141 (eval "$ac_try") 2>&5
5142 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005144 (exit $ac_status); }; }; then
5145 ac_cv_kthread=yes
5146else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005147 echo "$as_me: program exited with status $ac_status" >&5
5148echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005149sed 's/^/| /' conftest.$ac_ext >&5
5150
5151( exit $ac_status )
5152ac_cv_kthread=no
5153fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5155fi
5156
5157
5158CC="$ac_save_cc"
5159fi
5160
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005161{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5162echo "${ECHO_T}$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005163fi
5164
5165if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5166then
5167# -pthread, if available, provides the right #defines
5168# and linker options to make pthread_create available
5169# Some compilers won't report that they do not support -pthread,
5170# so we need to run a program to see whether it really made the
5171# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005172{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5173echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005174if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005175 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005176else
5177 ac_save_cc="$CC"
5178CC="$CC -pthread"
5179if test "$cross_compiling" = yes; then
5180 ac_cv_pthread=no
5181else
5182 cat >conftest.$ac_ext <<_ACEOF
5183/* confdefs.h. */
5184_ACEOF
5185cat confdefs.h >>conftest.$ac_ext
5186cat >>conftest.$ac_ext <<_ACEOF
5187/* end confdefs.h. */
5188
5189#include <pthread.h>
5190
5191void* routine(void* p){return NULL;}
5192
5193int main(){
5194 pthread_t p;
5195 if(pthread_create(&p,NULL,routine,NULL)!=0)
5196 return 1;
5197 (void)pthread_detach(p);
5198 return 0;
5199}
5200
5201_ACEOF
5202rm -f conftest$ac_exeext
5203if { (ac_try="$ac_link"
5204case "(($ac_try" in
5205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5206 *) ac_try_echo=$ac_try;;
5207esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005209 (eval "$ac_link") 2>&5
5210 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5213 { (case "(($ac_try" in
5214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5215 *) ac_try_echo=$ac_try;;
5216esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005218 (eval "$ac_try") 2>&5
5219 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005221 (exit $ac_status); }; }; then
5222 ac_cv_pthread=yes
5223else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005224 echo "$as_me: program exited with status $ac_status" >&5
5225echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005226sed 's/^/| /' conftest.$ac_ext >&5
5227
5228( exit $ac_status )
5229ac_cv_pthread=no
5230fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5232fi
5233
5234
5235CC="$ac_save_cc"
5236fi
5237
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005238{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5239echo "${ECHO_T}$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005240fi
5241
5242# If we have set a CC compiler flag for thread support then
5243# check if it works for CXX, too.
5244ac_cv_cxx_thread=no
5245if test ! -z "$CXX"
5246then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005247{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5248echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005249ac_save_cxx="$CXX"
5250
5251if test "$ac_cv_kpthread" = "yes"
5252then
5253 CXX="$CXX -Kpthread"
5254 ac_cv_cxx_thread=yes
5255elif test "$ac_cv_kthread" = "yes"
5256then
5257 CXX="$CXX -Kthread"
5258 ac_cv_cxx_thread=yes
5259elif test "$ac_cv_pthread" = "yes"
5260then
5261 CXX="$CXX -pthread"
5262 ac_cv_cxx_thread=yes
5263fi
5264
5265if test $ac_cv_cxx_thread = yes
5266then
5267 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5268 $CXX -c conftest.$ac_ext 2>&5
5269 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5270 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5271 then
5272 ac_cv_cxx_thread=yes
5273 else
5274 ac_cv_cxx_thread=no
5275 fi
5276 rm -fr conftest*
5277fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005278{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5279echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005280fi
5281CXX="$ac_save_cxx"
5282
5283
5284# checks for header files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005285{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5286echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005287if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005288 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005289else
5290 cat >conftest.$ac_ext <<_ACEOF
5291/* confdefs.h. */
5292_ACEOF
5293cat confdefs.h >>conftest.$ac_ext
5294cat >>conftest.$ac_ext <<_ACEOF
5295/* end confdefs.h. */
5296#include <stdlib.h>
5297#include <stdarg.h>
5298#include <string.h>
5299#include <float.h>
5300
5301int
5302main ()
5303{
5304
5305 ;
5306 return 0;
5307}
5308_ACEOF
5309rm -f conftest.$ac_objext
5310if { (ac_try="$ac_compile"
5311case "(($ac_try" in
5312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5313 *) ac_try_echo=$ac_try;;
5314esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005316 (eval "$ac_compile") 2>conftest.er1
5317 ac_status=$?
5318 grep -v '^ *+' conftest.er1 >conftest.err
5319 rm -f conftest.er1
5320 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005322 (exit $ac_status); } && {
5323 test -z "$ac_c_werror_flag" ||
5324 test ! -s conftest.err
5325 } && test -s conftest.$ac_objext; then
5326 ac_cv_header_stdc=yes
5327else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005328 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005329sed 's/^/| /' conftest.$ac_ext >&5
5330
5331 ac_cv_header_stdc=no
5332fi
5333
5334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5335
5336if test $ac_cv_header_stdc = yes; then
5337 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5338 cat >conftest.$ac_ext <<_ACEOF
5339/* confdefs.h. */
5340_ACEOF
5341cat confdefs.h >>conftest.$ac_ext
5342cat >>conftest.$ac_ext <<_ACEOF
5343/* end confdefs.h. */
5344#include <string.h>
5345
5346_ACEOF
5347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5348 $EGREP "memchr" >/dev/null 2>&1; then
5349 :
5350else
5351 ac_cv_header_stdc=no
5352fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +00005353rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005354
5355fi
5356
5357if test $ac_cv_header_stdc = yes; then
5358 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5359 cat >conftest.$ac_ext <<_ACEOF
5360/* confdefs.h. */
5361_ACEOF
5362cat confdefs.h >>conftest.$ac_ext
5363cat >>conftest.$ac_ext <<_ACEOF
5364/* end confdefs.h. */
5365#include <stdlib.h>
5366
5367_ACEOF
5368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5369 $EGREP "free" >/dev/null 2>&1; then
5370 :
5371else
5372 ac_cv_header_stdc=no
5373fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +00005374rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005375
5376fi
5377
5378if test $ac_cv_header_stdc = yes; then
5379 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5380 if test "$cross_compiling" = yes; then
5381 :
5382else
5383 cat >conftest.$ac_ext <<_ACEOF
5384/* confdefs.h. */
5385_ACEOF
5386cat confdefs.h >>conftest.$ac_ext
5387cat >>conftest.$ac_ext <<_ACEOF
5388/* end confdefs.h. */
5389#include <ctype.h>
5390#include <stdlib.h>
5391#if ((' ' & 0x0FF) == 0x020)
5392# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5393# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5394#else
5395# define ISLOWER(c) \
5396 (('a' <= (c) && (c) <= 'i') \
5397 || ('j' <= (c) && (c) <= 'r') \
5398 || ('s' <= (c) && (c) <= 'z'))
5399# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5400#endif
5401
5402#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5403int
5404main ()
5405{
5406 int i;
5407 for (i = 0; i < 256; i++)
5408 if (XOR (islower (i), ISLOWER (i))
5409 || toupper (i) != TOUPPER (i))
5410 return 2;
5411 return 0;
5412}
5413_ACEOF
5414rm -f conftest$ac_exeext
5415if { (ac_try="$ac_link"
5416case "(($ac_try" in
5417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5418 *) ac_try_echo=$ac_try;;
5419esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005421 (eval "$ac_link") 2>&5
5422 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005424 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5425 { (case "(($ac_try" in
5426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5427 *) ac_try_echo=$ac_try;;
5428esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005430 (eval "$ac_try") 2>&5
5431 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005433 (exit $ac_status); }; }; then
5434 :
5435else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005436 echo "$as_me: program exited with status $ac_status" >&5
5437echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005438sed 's/^/| /' conftest.$ac_ext >&5
5439
5440( exit $ac_status )
5441ac_cv_header_stdc=no
5442fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5444fi
5445
5446
5447fi
5448fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005449{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5450echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005451if test $ac_cv_header_stdc = yes; then
5452
5453cat >>confdefs.h <<\_ACEOF
5454#define STDC_HEADERS 1
5455_ACEOF
5456
5457fi
5458
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005459# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5470 inttypes.h stdint.h unistd.h
5471do
5472as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5473{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5474echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5475if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5476 echo $ECHO_N "(cached) $ECHO_C" >&6
5477else
5478 cat >conftest.$ac_ext <<_ACEOF
5479/* confdefs.h. */
5480_ACEOF
5481cat confdefs.h >>conftest.$ac_ext
5482cat >>conftest.$ac_ext <<_ACEOF
5483/* end confdefs.h. */
5484$ac_includes_default
5485
5486#include <$ac_header>
5487_ACEOF
5488rm -f conftest.$ac_objext
5489if { (ac_try="$ac_compile"
5490case "(($ac_try" in
5491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5492 *) ac_try_echo=$ac_try;;
5493esac
5494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5495 (eval "$ac_compile") 2>conftest.er1
5496 ac_status=$?
5497 grep -v '^ *+' conftest.er1 >conftest.err
5498 rm -f conftest.er1
5499 cat conftest.err >&5
5500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5501 (exit $ac_status); } && {
5502 test -z "$ac_c_werror_flag" ||
5503 test ! -s conftest.err
5504 } && test -s conftest.$ac_objext; then
5505 eval "$as_ac_Header=yes"
5506else
5507 echo "$as_me: failed program was:" >&5
5508sed 's/^/| /' conftest.$ac_ext >&5
5509
5510 eval "$as_ac_Header=no"
5511fi
5512
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514fi
5515ac_res=`eval echo '${'$as_ac_Header'}'`
5516 { echo "$as_me:$LINENO: result: $ac_res" >&5
5517echo "${ECHO_T}$ac_res" >&6; }
5518if test `eval echo '${'$as_ac_Header'}'` = yes; then
5519 cat >>confdefs.h <<_ACEOF
5520#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5521_ACEOF
5522
5523fi
5524
5525done
5526
5527
Antoine Pitrou20327222009-05-24 20:39:11 +00005528
Martin v. Löwis11437992002-04-12 09:54:03 +00005529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
Anthony Baxter8a560de2004-10-13 15:30:56 +00005564
Martin v. Löwisc3001752005-01-23 09:27:24 +00005565
Martin v. Löwis11017b12006-01-14 18:12:57 +00005566
Thomas Wouters477c8d52006-05-27 19:21:47 +00005567
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005568
5569
5570
5571
5572
5573
5574
5575
Thomas Wouters89f507f2006-12-13 04:49:30 +00005576
Christian Heimes043d6f62008-01-07 17:19:16 +00005577
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005578
5579
Christian Heimesbbe741d2008-03-28 10:53:29 +00005580
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005581
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005582for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5583fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005584ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005585shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005586unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005587sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5588sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005589sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005590sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005591sys/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 +00005592sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005593bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005594do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005595as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005597 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5598echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005599if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005600 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005601fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005602ac_res=`eval echo '${'$as_ac_Header'}'`
5603 { echo "$as_me:$LINENO: result: $ac_res" >&5
5604echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005605else
Martin v. Löwis11437992002-04-12 09:54:03 +00005606 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005607{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5608echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005610/* confdefs.h. */
5611_ACEOF
5612cat confdefs.h >>conftest.$ac_ext
5613cat >>conftest.$ac_ext <<_ACEOF
5614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005615$ac_includes_default
5616#include <$ac_header>
5617_ACEOF
5618rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005619if { (ac_try="$ac_compile"
5620case "(($ac_try" in
5621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5622 *) ac_try_echo=$ac_try;;
5623esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005627 grep -v '^ *+' conftest.er1 >conftest.err
5628 rm -f conftest.er1
5629 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005631 (exit $ac_status); } && {
5632 test -z "$ac_c_werror_flag" ||
5633 test ! -s conftest.err
5634 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005635 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005636else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005638sed 's/^/| /' conftest.$ac_ext >&5
5639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005640 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005642
5643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005644{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5645echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005646
5647# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005648{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5649echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005650cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005651/* confdefs.h. */
5652_ACEOF
5653cat confdefs.h >>conftest.$ac_ext
5654cat >>conftest.$ac_ext <<_ACEOF
5655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005656#include <$ac_header>
5657_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005658if { (ac_try="$ac_cpp conftest.$ac_ext"
5659case "(($ac_try" in
5660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5661 *) ac_try_echo=$ac_try;;
5662esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005664 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005665 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005666 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005667 rm -f conftest.er1
5668 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005670 (exit $ac_status); } >/dev/null && {
5671 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5672 test ! -s conftest.err
5673 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005674 ac_header_preproc=yes
5675else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005677sed 's/^/| /' conftest.$ac_ext >&5
5678
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005681
Martin v. Löwis11437992002-04-12 09:54:03 +00005682rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005683{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5684echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005685
5686# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005687case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5688 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005689 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5690echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5691 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5692echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005693 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005694 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005695 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005696 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5697echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5698 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5699echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5700 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5701echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5702 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5703echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5704 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5705echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5706 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5707echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005708 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005709## -------------------------------------- ##
5710## Report this to http://bugs.python.org/ ##
5711## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005712_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005713 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005714 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005715esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005716{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5717echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005718if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005719 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005720else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005721 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005722fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005723ac_res=`eval echo '${'$as_ac_Header'}'`
5724 { echo "$as_me:$LINENO: result: $ac_res" >&5
5725echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005726
5727fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005728if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005730#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005731_ACEOF
5732
5733fi
5734
Guido van Rossum627b2d71993-12-24 10:39:16 +00005735done
5736
Martin v. Löwis11437992002-04-12 09:54:03 +00005737
5738
5739
5740
5741
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005742ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005743for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005744 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5745{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5746echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005747if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005749else
Martin v. Löwis11437992002-04-12 09:54:03 +00005750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005751/* confdefs.h. */
5752_ACEOF
5753cat confdefs.h >>conftest.$ac_ext
5754cat >>conftest.$ac_ext <<_ACEOF
5755/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005756#include <sys/types.h>
5757#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005758
Martin v. Löwis11437992002-04-12 09:54:03 +00005759int
5760main ()
5761{
5762if ((DIR *) 0)
5763return 0;
5764 ;
5765 return 0;
5766}
5767_ACEOF
5768rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005769if { (ac_try="$ac_compile"
5770case "(($ac_try" in
5771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5772 *) ac_try_echo=$ac_try;;
5773esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005777 grep -v '^ *+' conftest.er1 >conftest.err
5778 rm -f conftest.er1
5779 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005781 (exit $ac_status); } && {
5782 test -z "$ac_c_werror_flag" ||
5783 test ! -s conftest.err
5784 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005785 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005786else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005788sed 's/^/| /' conftest.$ac_ext >&5
5789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005790 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005792
5793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005794fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005795ac_res=`eval echo '${'$as_ac_Header'}'`
5796 { echo "$as_me:$LINENO: result: $ac_res" >&5
5797echo "${ECHO_T}$ac_res" >&6; }
5798if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005799 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005800#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005801_ACEOF
5802
5803ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005806done
5807# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5808if test $ac_header_dirent = dirent.h; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005809 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5810echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005811if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005812 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813else
Martin v. Löwis11437992002-04-12 09:54:03 +00005814 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005815cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005816/* confdefs.h. */
5817_ACEOF
5818cat confdefs.h >>conftest.$ac_ext
5819cat >>conftest.$ac_ext <<_ACEOF
5820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005822/* Override any GCC internal prototype to avoid an error.
5823 Use char because int might match the return type of a GCC
5824 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005825#ifdef __cplusplus
5826extern "C"
5827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005828char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005829int
5830main ()
5831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005832return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005833 ;
5834 return 0;
5835}
5836_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005837for ac_lib in '' dir; do
5838 if test -z "$ac_lib"; then
5839 ac_res="none required"
5840 else
5841 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005842 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005843 fi
5844 rm -f conftest.$ac_objext conftest$ac_exeext
5845if { (ac_try="$ac_link"
5846case "(($ac_try" in
5847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5848 *) ac_try_echo=$ac_try;;
5849esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005851 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005852 ac_status=$?
5853 grep -v '^ *+' conftest.er1 >conftest.err
5854 rm -f conftest.er1
5855 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005857 (exit $ac_status); } && {
5858 test -z "$ac_c_werror_flag" ||
5859 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005860 } && test -s conftest$ac_exeext &&
5861 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005862 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005863else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005864 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005865sed 's/^/| /' conftest.$ac_ext >&5
5866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005867
Thomas Wouters477c8d52006-05-27 19:21:47 +00005868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005869
5870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5871 conftest$ac_exeext
5872 if test "${ac_cv_search_opendir+set}" = set; then
5873 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005875done
5876if test "${ac_cv_search_opendir+set}" = set; then
5877 :
5878else
5879 ac_cv_search_opendir=no
5880fi
5881rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005882LIBS=$ac_func_search_save_LIBS
5883fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005884{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5885echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005886ac_res=$ac_cv_search_opendir
5887if test "$ac_res" != no; then
5888 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005889
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005891
Michael W. Hudson54241132001-12-07 15:38:26 +00005892else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005893 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5894echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005895if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005896 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005897else
5898 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005900/* confdefs.h. */
5901_ACEOF
5902cat confdefs.h >>conftest.$ac_ext
5903cat >>conftest.$ac_ext <<_ACEOF
5904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005906/* Override any GCC internal prototype to avoid an error.
5907 Use char because int might match the return type of a GCC
5908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005909#ifdef __cplusplus
5910extern "C"
5911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005912char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005913int
5914main ()
5915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005917 ;
5918 return 0;
5919}
5920_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005921for ac_lib in '' x; do
5922 if test -z "$ac_lib"; then
5923 ac_res="none required"
5924 else
5925 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005926 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927 fi
5928 rm -f conftest.$ac_objext conftest$ac_exeext
5929if { (ac_try="$ac_link"
5930case "(($ac_try" in
5931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5932 *) ac_try_echo=$ac_try;;
5933esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005935 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005936 ac_status=$?
5937 grep -v '^ *+' conftest.er1 >conftest.err
5938 rm -f conftest.er1
5939 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005941 (exit $ac_status); } && {
5942 test -z "$ac_c_werror_flag" ||
5943 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005944 } && test -s conftest$ac_exeext &&
5945 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005946 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005947else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005948 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005949sed 's/^/| /' conftest.$ac_ext >&5
5950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005951
Thomas Wouters477c8d52006-05-27 19:21:47 +00005952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005953
5954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5955 conftest$ac_exeext
5956 if test "${ac_cv_search_opendir+set}" = set; then
5957 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005959done
5960if test "${ac_cv_search_opendir+set}" = set; then
5961 :
5962else
5963 ac_cv_search_opendir=no
5964fi
5965rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005966LIBS=$ac_func_search_save_LIBS
5967fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005968{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5969echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005970ac_res=$ac_cv_search_opendir
5971if test "$ac_res" != no; then
5972 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005973
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005974fi
5975
5976fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005977
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005978{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5979echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005980if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005981 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005982else
5983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005984/* confdefs.h. */
5985_ACEOF
5986cat confdefs.h >>conftest.$ac_ext
5987cat >>conftest.$ac_ext <<_ACEOF
5988/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005989#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005990int
5991main ()
5992{
5993return makedev(0, 0);
5994 ;
5995 return 0;
5996}
5997_ACEOF
5998rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005999if { (ac_try="$ac_link"
6000case "(($ac_try" in
6001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6002 *) ac_try_echo=$ac_try;;
6003esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006005 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006007 grep -v '^ *+' conftest.er1 >conftest.err
6008 rm -f conftest.er1
6009 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011 (exit $ac_status); } && {
6012 test -z "$ac_c_werror_flag" ||
6013 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006014 } && test -s conftest$ac_exeext &&
6015 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006016 ac_cv_header_sys_types_h_makedev=yes
6017else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006019sed 's/^/| /' conftest.$ac_ext >&5
6020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006021 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006023
6024rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006025 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026
6027fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006028{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6029echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006030
6031if test $ac_cv_header_sys_types_h_makedev = no; then
6032if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006033 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6034echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006036 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006038{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6039echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040else
6041 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006042{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6043echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006045/* confdefs.h. */
6046_ACEOF
6047cat confdefs.h >>conftest.$ac_ext
6048cat >>conftest.$ac_ext <<_ACEOF
6049/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050$ac_includes_default
6051#include <sys/mkdev.h>
6052_ACEOF
6053rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006054if { (ac_try="$ac_compile"
6055case "(($ac_try" in
6056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6057 *) ac_try_echo=$ac_try;;
6058esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006062 grep -v '^ *+' conftest.er1 >conftest.err
6063 rm -f conftest.er1
6064 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006066 (exit $ac_status); } && {
6067 test -z "$ac_c_werror_flag" ||
6068 test ! -s conftest.err
6069 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070 ac_header_compiler=yes
6071else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006073sed 's/^/| /' conftest.$ac_ext >&5
6074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006077
6078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006079{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6080echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081
6082# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006083{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6084echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006086/* confdefs.h. */
6087_ACEOF
6088cat confdefs.h >>conftest.$ac_ext
6089cat >>conftest.$ac_ext <<_ACEOF
6090/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091#include <sys/mkdev.h>
6092_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093if { (ac_try="$ac_cpp conftest.$ac_ext"
6094case "(($ac_try" in
6095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6096 *) ac_try_echo=$ac_try;;
6097esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006101 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102 rm -f conftest.er1
6103 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105 (exit $ac_status); } >/dev/null && {
6106 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6107 test ! -s conftest.err
6108 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109 ac_header_preproc=yes
6110else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006112sed 's/^/| /' conftest.$ac_ext >&5
6113
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114 ac_header_preproc=no
6115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006118{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6119echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120
6121# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006122case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6123 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006128 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006129 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006131 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6132echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6133 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6134echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6135 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6136echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6137 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6138echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6139 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6140echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6141 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6142echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006143 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006144## -------------------------------------- ##
6145## Report this to http://bugs.python.org/ ##
6146## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006147_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006148 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006149 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006151{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6152echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006154 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155else
6156 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6157fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006158{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6159echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160
6161fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006162if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163
6164cat >>confdefs.h <<\_ACEOF
6165#define MAJOR_IN_MKDEV 1
6166_ACEOF
6167
6168fi
6169
6170
6171
6172 if test $ac_cv_header_sys_mkdev_h = no; then
6173 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006174 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6175echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006177 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006179{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6180echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181else
6182 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006183{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6184echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006186/* confdefs.h. */
6187_ACEOF
6188cat confdefs.h >>conftest.$ac_ext
6189cat >>conftest.$ac_ext <<_ACEOF
6190/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191$ac_includes_default
6192#include <sys/sysmacros.h>
6193_ACEOF
6194rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195if { (ac_try="$ac_compile"
6196case "(($ac_try" in
6197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6198 *) ac_try_echo=$ac_try;;
6199esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006203 grep -v '^ *+' conftest.er1 >conftest.err
6204 rm -f conftest.er1
6205 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006207 (exit $ac_status); } && {
6208 test -z "$ac_c_werror_flag" ||
6209 test ! -s conftest.err
6210 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211 ac_header_compiler=yes
6212else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006214sed 's/^/| /' conftest.$ac_ext >&5
6215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006216 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006218
6219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006220{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6221echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222
6223# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006224{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6225echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006227/* confdefs.h. */
6228_ACEOF
6229cat confdefs.h >>conftest.$ac_ext
6230cat >>conftest.$ac_ext <<_ACEOF
6231/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232#include <sys/sysmacros.h>
6233_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234if { (ac_try="$ac_cpp conftest.$ac_ext"
6235case "(($ac_try" in
6236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6237 *) ac_try_echo=$ac_try;;
6238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006242 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243 rm -f conftest.er1
6244 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 (exit $ac_status); } >/dev/null && {
6247 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6248 test ! -s conftest.err
6249 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250 ac_header_preproc=yes
6251else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006253sed 's/^/| /' conftest.$ac_ext >&5
6254
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255 ac_header_preproc=no
6256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006257
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006259{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6260echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261
6262# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006263case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6264 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006269 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006270 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006271 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006272 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6273echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6274 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6275echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6276 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6277echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6278 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6279echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6280 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6281echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6282 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6283echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006284 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006285## -------------------------------------- ##
6286## Report this to http://bugs.python.org/ ##
6287## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006288_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006289 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006290 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006292{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6293echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006295 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296else
6297 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6298fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006299{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6300echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301
6302fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006303if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304
6305cat >>confdefs.h <<\_ACEOF
6306#define MAJOR_IN_SYSMACROS 1
6307_ACEOF
6308
6309fi
6310
6311
6312 fi
6313fi
6314
Michael W. Hudson54241132001-12-07 15:38:26 +00006315
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006316# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006317
6318for ac_header in term.h
6319do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006320as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6321{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6322echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006323if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006324 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006325else
6326 cat >conftest.$ac_ext <<_ACEOF
6327/* confdefs.h. */
6328_ACEOF
6329cat confdefs.h >>conftest.$ac_ext
6330cat >>conftest.$ac_ext <<_ACEOF
6331/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006332
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006333#ifdef HAVE_CURSES_H
6334#include <curses.h>
6335#endif
6336
6337
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006338#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006339_ACEOF
6340rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341if { (ac_try="$ac_compile"
6342case "(($ac_try" in
6343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6344 *) ac_try_echo=$ac_try;;
6345esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006347 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006348 ac_status=$?
6349 grep -v '^ *+' conftest.er1 >conftest.err
6350 rm -f conftest.er1
6351 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353 (exit $ac_status); } && {
6354 test -z "$ac_c_werror_flag" ||
6355 test ! -s conftest.err
6356 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006357 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006359 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360sed 's/^/| /' conftest.$ac_ext >&5
6361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006362 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006364
6365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006367ac_res=`eval echo '${'$as_ac_Header'}'`
6368 { echo "$as_me:$LINENO: result: $ac_res" >&5
6369echo "${ECHO_T}$ac_res" >&6; }
6370if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006371 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006372#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006373_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006375fi
6376
6377done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006378
6379
Martin v. Löwis11017b12006-01-14 18:12:57 +00006380# On Linux, netlink.h requires asm/types.h
6381
6382for ac_header in linux/netlink.h
6383do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006384as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6385{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006387if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006389else
6390 cat >conftest.$ac_ext <<_ACEOF
6391/* confdefs.h. */
6392_ACEOF
6393cat confdefs.h >>conftest.$ac_ext
6394cat >>conftest.$ac_ext <<_ACEOF
6395/* end confdefs.h. */
6396
6397#ifdef HAVE_ASM_TYPES_H
6398#include <asm/types.h>
6399#endif
6400#ifdef HAVE_SYS_SOCKET_H
6401#include <sys/socket.h>
6402#endif
6403
6404
6405#include <$ac_header>
6406_ACEOF
6407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408if { (ac_try="$ac_compile"
6409case "(($ac_try" in
6410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6411 *) ac_try_echo=$ac_try;;
6412esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006415 ac_status=$?
6416 grep -v '^ *+' conftest.er1 >conftest.err
6417 rm -f conftest.er1
6418 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420 (exit $ac_status); } && {
6421 test -z "$ac_c_werror_flag" ||
6422 test ! -s conftest.err
6423 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006424 eval "$as_ac_Header=yes"
6425else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006426 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427sed 's/^/| /' conftest.$ac_ext >&5
6428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006429 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006431
6432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006433fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006434ac_res=`eval echo '${'$as_ac_Header'}'`
6435 { echo "$as_me:$LINENO: result: $ac_res" >&5
6436echo "${ECHO_T}$ac_res" >&6; }
6437if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006439#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440_ACEOF
6441
6442fi
6443
6444done
6445
6446
Guido van Rossum627b2d71993-12-24 10:39:16 +00006447# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006448was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006449{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6450echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006451cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006452/* confdefs.h. */
6453_ACEOF
6454cat confdefs.h >>conftest.$ac_ext
6455cat >>conftest.$ac_ext <<_ACEOF
6456/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006458
6459_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006461 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006462 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006463else
Martin v. Löwis11437992002-04-12 09:54:03 +00006464
6465
6466cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006468_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006469
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006470
Guido van Rossum627b2d71993-12-24 10:39:16 +00006471fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +00006472rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006473
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006474{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6475echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006476
Neal Norwitz11690112002-07-30 01:08:28 +00006477# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006478{ echo "$as_me:$LINENO: checking for makedev" >&5
6479echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006480cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006481/* confdefs.h. */
6482_ACEOF
6483cat confdefs.h >>conftest.$ac_ext
6484cat >>conftest.$ac_ext <<_ACEOF
6485/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006486#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006487int
6488main ()
6489{
6490 makedev(0, 0)
6491 ;
6492 return 0;
6493}
6494_ACEOF
6495rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006496if { (ac_try="$ac_link"
6497case "(($ac_try" in
6498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6499 *) ac_try_echo=$ac_try;;
6500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006502 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006504 grep -v '^ *+' conftest.er1 >conftest.err
6505 rm -f conftest.er1
6506 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006508 (exit $ac_status); } && {
6509 test -z "$ac_c_werror_flag" ||
6510 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006511 } && test -s conftest$ac_exeext &&
6512 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006513 ac_cv_has_makedev=yes
6514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006516sed 's/^/| /' conftest.$ac_ext >&5
6517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006518 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006520
6521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006522 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006523if test "$ac_cv_has_makedev" = "no"; then
6524 # we didn't link, try if _OSF_SOURCE will allow us to link
6525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006526/* confdefs.h. */
6527_ACEOF
6528cat confdefs.h >>conftest.$ac_ext
6529cat >>conftest.$ac_ext <<_ACEOF
6530/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006531
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006532#define _OSF_SOURCE 1
6533#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006534
Neal Norwitz11690112002-07-30 01:08:28 +00006535int
6536main ()
6537{
6538 makedev(0, 0)
6539 ;
6540 return 0;
6541}
6542_ACEOF
6543rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006544if { (ac_try="$ac_link"
6545case "(($ac_try" in
6546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6547 *) ac_try_echo=$ac_try;;
6548esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006550 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006552 grep -v '^ *+' conftest.er1 >conftest.err
6553 rm -f conftest.er1
6554 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556 (exit $ac_status); } && {
6557 test -z "$ac_c_werror_flag" ||
6558 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006559 } && test -s conftest$ac_exeext &&
6560 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006561 ac_cv_has_makedev=yes
6562else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006564sed 's/^/| /' conftest.$ac_ext >&5
6565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006566 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568
6569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006570 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006571 if test "$ac_cv_has_makedev" = "yes"; then
6572
6573cat >>confdefs.h <<\_ACEOF
6574#define _OSF_SOURCE 1
6575_ACEOF
6576
6577 fi
6578fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006579{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6580echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006581if test "$ac_cv_has_makedev" = "yes"; then
6582
6583cat >>confdefs.h <<\_ACEOF
6584#define HAVE_MAKEDEV 1
6585_ACEOF
6586
6587fi
6588
Martin v. Löwis399a6892002-10-04 10:22:02 +00006589# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6590# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6591# defined, but the compiler does not support pragma redefine_extname,
6592# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6593# structures (such as rlimit64) without declaring them. As a
6594# work-around, disable LFS on such configurations
6595
6596use_lfs=yes
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006597{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6598echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006599cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006600/* confdefs.h. */
6601_ACEOF
6602cat confdefs.h >>conftest.$ac_ext
6603cat >>conftest.$ac_ext <<_ACEOF
6604/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006605
6606#define _LARGEFILE_SOURCE 1
6607#define _FILE_OFFSET_BITS 64
6608#include <sys/resource.h>
6609
Martin v. Löwis399a6892002-10-04 10:22:02 +00006610int
6611main ()
6612{
6613struct rlimit foo;
6614 ;
6615 return 0;
6616}
6617_ACEOF
6618rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619if { (ac_try="$ac_compile"
6620case "(($ac_try" in
6621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6622 *) ac_try_echo=$ac_try;;
6623esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006627 grep -v '^ *+' conftest.er1 >conftest.err
6628 rm -f conftest.er1
6629 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006631 (exit $ac_status); } && {
6632 test -z "$ac_c_werror_flag" ||
6633 test ! -s conftest.err
6634 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006635 sol_lfs_bug=no
6636else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006638sed 's/^/| /' conftest.$ac_ext >&5
6639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006640 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006642
6643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006644{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6645echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006646if test "$sol_lfs_bug" = "yes"; then
6647 use_lfs=no
6648fi
6649
6650if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006651# Two defines needed to enable largefile support on various platforms
6652# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006653
Martin v. Löwis11437992002-04-12 09:54:03 +00006654cat >>confdefs.h <<\_ACEOF
6655#define _LARGEFILE_SOURCE 1
6656_ACEOF
6657
6658
6659cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006660#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006661_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006662
Martin v. Löwis399a6892002-10-04 10:22:02 +00006663fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006664
Guido van Rossum84e7b241996-08-19 21:59:00 +00006665# Add some code to confdefs.h so that the test for off_t works on SCO
6666cat >> confdefs.h <<\EOF
6667#if defined(SCO_DS)
6668#undef _OFF_T
6669#endif
6670EOF
6671
Guido van Rossumef2255b2000-03-10 22:30:29 +00006672# Type availability checks
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006673{ echo "$as_me:$LINENO: checking for mode_t" >&5
6674echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006675if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006677else
Benjamin Petersona8332062009-09-11 22:36:27 +00006678 cat >conftest.$ac_ext <<_ACEOF
6679/* confdefs.h. */
6680_ACEOF
6681cat confdefs.h >>conftest.$ac_ext
6682cat >>conftest.$ac_ext <<_ACEOF
6683/* end confdefs.h. */
6684$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006685typedef mode_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006686int
6687main ()
6688{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006689if ((ac__type_new_ *) 0)
6690 return 0;
6691if (sizeof (ac__type_new_))
6692 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006693 ;
6694 return 0;
6695}
6696_ACEOF
6697rm -f conftest.$ac_objext
6698if { (ac_try="$ac_compile"
6699case "(($ac_try" in
6700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6701 *) ac_try_echo=$ac_try;;
6702esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006704 (eval "$ac_compile") 2>conftest.er1
6705 ac_status=$?
6706 grep -v '^ *+' conftest.er1 >conftest.err
6707 rm -f conftest.er1
6708 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006710 (exit $ac_status); } && {
6711 test -z "$ac_c_werror_flag" ||
6712 test ! -s conftest.err
6713 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006714 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006715else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006717sed 's/^/| /' conftest.$ac_ext >&5
6718
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006719 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006721
6722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006723fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006724{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6725echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6726if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006727 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006728else
Martin v. Löwis11437992002-04-12 09:54:03 +00006729
6730cat >>confdefs.h <<_ACEOF
6731#define mode_t int
6732_ACEOF
6733
6734fi
6735
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006736{ echo "$as_me:$LINENO: checking for off_t" >&5
6737echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006738if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006740else
Benjamin Petersona8332062009-09-11 22:36:27 +00006741 cat >conftest.$ac_ext <<_ACEOF
6742/* confdefs.h. */
6743_ACEOF
6744cat confdefs.h >>conftest.$ac_ext
6745cat >>conftest.$ac_ext <<_ACEOF
6746/* end confdefs.h. */
6747$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006748typedef off_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006749int
6750main ()
6751{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006752if ((ac__type_new_ *) 0)
6753 return 0;
6754if (sizeof (ac__type_new_))
6755 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006756 ;
6757 return 0;
6758}
6759_ACEOF
6760rm -f conftest.$ac_objext
6761if { (ac_try="$ac_compile"
6762case "(($ac_try" in
6763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6764 *) ac_try_echo=$ac_try;;
6765esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006767 (eval "$ac_compile") 2>conftest.er1
6768 ac_status=$?
6769 grep -v '^ *+' conftest.er1 >conftest.err
6770 rm -f conftest.er1
6771 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006773 (exit $ac_status); } && {
6774 test -z "$ac_c_werror_flag" ||
6775 test ! -s conftest.err
6776 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006777 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006778else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006780sed 's/^/| /' conftest.$ac_ext >&5
6781
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006782 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006784
6785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006786fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006787{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6788echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6789if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006791else
Martin v. Löwis11437992002-04-12 09:54:03 +00006792
6793cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006795_ACEOF
6796
6797fi
6798
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006799{ echo "$as_me:$LINENO: checking for pid_t" >&5
6800echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006801if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006803else
Benjamin Petersona8332062009-09-11 22:36:27 +00006804 cat >conftest.$ac_ext <<_ACEOF
6805/* confdefs.h. */
6806_ACEOF
6807cat confdefs.h >>conftest.$ac_ext
6808cat >>conftest.$ac_ext <<_ACEOF
6809/* end confdefs.h. */
6810$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006811typedef pid_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006812int
6813main ()
6814{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006815if ((ac__type_new_ *) 0)
6816 return 0;
6817if (sizeof (ac__type_new_))
6818 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006819 ;
6820 return 0;
6821}
6822_ACEOF
6823rm -f conftest.$ac_objext
6824if { (ac_try="$ac_compile"
6825case "(($ac_try" in
6826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6827 *) ac_try_echo=$ac_try;;
6828esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006830 (eval "$ac_compile") 2>conftest.er1
6831 ac_status=$?
6832 grep -v '^ *+' conftest.er1 >conftest.err
6833 rm -f conftest.er1
6834 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006836 (exit $ac_status); } && {
6837 test -z "$ac_c_werror_flag" ||
6838 test ! -s conftest.err
6839 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006840 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006843sed 's/^/| /' conftest.$ac_ext >&5
6844
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006845 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847
6848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006849fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006850{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6851echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6852if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006854else
Martin v. Löwis11437992002-04-12 09:54:03 +00006855
6856cat >>confdefs.h <<_ACEOF
6857#define pid_t int
6858_ACEOF
6859
6860fi
6861
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006862{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6863echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006864if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006866else
6867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006873#include <sys/types.h>
6874#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876int
6877main ()
6878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006880 ;
6881 return 0;
6882}
6883_ACEOF
6884rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885if { (ac_try="$ac_compile"
6886case "(($ac_try" in
6887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6888 *) ac_try_echo=$ac_try;;
6889esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006893 grep -v '^ *+' conftest.er1 >conftest.err
6894 rm -f conftest.er1
6895 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897 (exit $ac_status); } && {
6898 test -z "$ac_c_werror_flag" ||
6899 test ! -s conftest.err
6900 } && test -s conftest.$ac_objext; then
6901 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006902else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006904sed 's/^/| /' conftest.$ac_ext >&5
6905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908
6909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006911{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6912echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006915#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006916_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006917
Michael W. Hudson54241132001-12-07 15:38:26 +00006918
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006919{ echo "$as_me:$LINENO: checking for size_t" >&5
6920echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006921if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006923else
Benjamin Petersona8332062009-09-11 22:36:27 +00006924 cat >conftest.$ac_ext <<_ACEOF
6925/* confdefs.h. */
6926_ACEOF
6927cat confdefs.h >>conftest.$ac_ext
6928cat >>conftest.$ac_ext <<_ACEOF
6929/* end confdefs.h. */
6930$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006931typedef size_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006932int
6933main ()
6934{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006935if ((ac__type_new_ *) 0)
6936 return 0;
6937if (sizeof (ac__type_new_))
6938 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006939 ;
6940 return 0;
6941}
6942_ACEOF
6943rm -f conftest.$ac_objext
6944if { (ac_try="$ac_compile"
6945case "(($ac_try" in
6946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6947 *) ac_try_echo=$ac_try;;
6948esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006950 (eval "$ac_compile") 2>conftest.er1
6951 ac_status=$?
6952 grep -v '^ *+' conftest.er1 >conftest.err
6953 rm -f conftest.er1
6954 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006956 (exit $ac_status); } && {
6957 test -z "$ac_c_werror_flag" ||
6958 test ! -s conftest.err
6959 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006960 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006961else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006963sed 's/^/| /' conftest.$ac_ext >&5
6964
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006965 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967
6968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006969fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006970{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6971echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6972if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006974else
Martin v. Löwis11437992002-04-12 09:54:03 +00006975
6976cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006977#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006978_ACEOF
6979
6980fi
6981
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006982{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6983echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006984if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006985 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006986else
6987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006994
6995_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006997 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006998 ac_cv_type_uid_t=yes
6999else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007000 ac_cv_type_uid_t=no
7001fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +00007002rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007005{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7006echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007007if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007008
Martin v. Löwis11437992002-04-12 09:54:03 +00007009cat >>confdefs.h <<\_ACEOF
7010#define uid_t int
7011_ACEOF
7012
7013
7014cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007015#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007016_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007017
7018fi
7019
Mark Dickinsonbd792642009-03-18 20:06:12 +00007020
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007021 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7022echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007023if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007024 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007025else
7026 ac_cv_c_uint32_t=no
7027 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7028 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7029 cat >conftest.$ac_ext <<_ACEOF
7030/* confdefs.h. */
7031_ACEOF
7032cat confdefs.h >>conftest.$ac_ext
7033cat >>conftest.$ac_ext <<_ACEOF
7034/* end confdefs.h. */
7035$ac_includes_default
7036int
7037main ()
7038{
7039static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7040test_array [0] = 0
7041
7042 ;
7043 return 0;
7044}
7045_ACEOF
7046rm -f conftest.$ac_objext
7047if { (ac_try="$ac_compile"
7048case "(($ac_try" in
7049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7050 *) ac_try_echo=$ac_try;;
7051esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007053 (eval "$ac_compile") 2>conftest.er1
7054 ac_status=$?
7055 grep -v '^ *+' conftest.er1 >conftest.err
7056 rm -f conftest.er1
7057 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007059 (exit $ac_status); } && {
7060 test -z "$ac_c_werror_flag" ||
7061 test ! -s conftest.err
7062 } && test -s conftest.$ac_objext; then
7063 case $ac_type in
7064 uint32_t) ac_cv_c_uint32_t=yes ;;
7065 *) ac_cv_c_uint32_t=$ac_type ;;
7066esac
7067
7068else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007069 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007070sed 's/^/| /' conftest.$ac_ext >&5
7071
7072
7073fi
7074
7075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7076 test "$ac_cv_c_uint32_t" != no && break
7077 done
7078fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007079{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7080echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007081 case $ac_cv_c_uint32_t in #(
7082 no|yes) ;; #(
7083 *)
7084
7085cat >>confdefs.h <<\_ACEOF
7086#define _UINT32_T 1
7087_ACEOF
7088
7089
7090cat >>confdefs.h <<_ACEOF
7091#define uint32_t $ac_cv_c_uint32_t
7092_ACEOF
7093;;
7094 esac
7095
7096
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007097 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7098echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007099if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007100 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007101else
7102 ac_cv_c_uint64_t=no
7103 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7104 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7105 cat >conftest.$ac_ext <<_ACEOF
7106/* confdefs.h. */
7107_ACEOF
7108cat confdefs.h >>conftest.$ac_ext
7109cat >>conftest.$ac_ext <<_ACEOF
7110/* end confdefs.h. */
7111$ac_includes_default
7112int
7113main ()
7114{
7115static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7116test_array [0] = 0
7117
7118 ;
7119 return 0;
7120}
7121_ACEOF
7122rm -f conftest.$ac_objext
7123if { (ac_try="$ac_compile"
7124case "(($ac_try" in
7125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7126 *) ac_try_echo=$ac_try;;
7127esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007129 (eval "$ac_compile") 2>conftest.er1
7130 ac_status=$?
7131 grep -v '^ *+' conftest.er1 >conftest.err
7132 rm -f conftest.er1
7133 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007135 (exit $ac_status); } && {
7136 test -z "$ac_c_werror_flag" ||
7137 test ! -s conftest.err
7138 } && test -s conftest.$ac_objext; then
7139 case $ac_type in
7140 uint64_t) ac_cv_c_uint64_t=yes ;;
7141 *) ac_cv_c_uint64_t=$ac_type ;;
7142esac
7143
7144else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007145 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007146sed 's/^/| /' conftest.$ac_ext >&5
7147
7148
7149fi
7150
7151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7152 test "$ac_cv_c_uint64_t" != no && break
7153 done
7154fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007155{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7156echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007157 case $ac_cv_c_uint64_t in #(
7158 no|yes) ;; #(
7159 *)
7160
7161cat >>confdefs.h <<\_ACEOF
7162#define _UINT64_T 1
7163_ACEOF
7164
7165
7166cat >>confdefs.h <<_ACEOF
7167#define uint64_t $ac_cv_c_uint64_t
7168_ACEOF
7169;;
7170 esac
7171
7172
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007173 { echo "$as_me:$LINENO: checking for int32_t" >&5
7174echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007175if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007176 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007177else
7178 ac_cv_c_int32_t=no
7179 for ac_type in 'int32_t' 'int' 'long int' \
7180 'long long int' 'short int' 'signed char'; do
7181 cat >conftest.$ac_ext <<_ACEOF
7182/* confdefs.h. */
7183_ACEOF
7184cat confdefs.h >>conftest.$ac_ext
7185cat >>conftest.$ac_ext <<_ACEOF
7186/* end confdefs.h. */
7187$ac_includes_default
7188int
7189main ()
7190{
7191static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7192test_array [0] = 0
7193
7194 ;
7195 return 0;
7196}
7197_ACEOF
7198rm -f conftest.$ac_objext
7199if { (ac_try="$ac_compile"
7200case "(($ac_try" in
7201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7202 *) ac_try_echo=$ac_try;;
7203esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007205 (eval "$ac_compile") 2>conftest.er1
7206 ac_status=$?
7207 grep -v '^ *+' conftest.er1 >conftest.err
7208 rm -f conftest.er1
7209 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007211 (exit $ac_status); } && {
7212 test -z "$ac_c_werror_flag" ||
7213 test ! -s conftest.err
7214 } && test -s conftest.$ac_objext; then
7215 cat >conftest.$ac_ext <<_ACEOF
7216/* confdefs.h. */
7217_ACEOF
7218cat confdefs.h >>conftest.$ac_ext
7219cat >>conftest.$ac_ext <<_ACEOF
7220/* end confdefs.h. */
7221$ac_includes_default
7222int
7223main ()
7224{
7225static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007226 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007227test_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 :
7251else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007252 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007253sed 's/^/| /' conftest.$ac_ext >&5
7254
7255 case $ac_type in
7256 int32_t) ac_cv_c_int32_t=yes ;;
7257 *) ac_cv_c_int32_t=$ac_type ;;
7258esac
7259
7260fi
7261
7262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007264 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007265sed 's/^/| /' conftest.$ac_ext >&5
7266
7267
7268fi
7269
7270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7271 test "$ac_cv_c_int32_t" != no && break
7272 done
7273fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007274{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7275echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007276 case $ac_cv_c_int32_t in #(
7277 no|yes) ;; #(
7278 *)
7279
7280cat >>confdefs.h <<_ACEOF
7281#define int32_t $ac_cv_c_int32_t
7282_ACEOF
7283;;
7284 esac
7285
7286
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007287 { echo "$as_me:$LINENO: checking for int64_t" >&5
7288echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007289if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007290 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007291else
7292 ac_cv_c_int64_t=no
7293 for ac_type in 'int64_t' 'int' 'long int' \
7294 'long long int' 'short int' 'signed char'; do
7295 cat >conftest.$ac_ext <<_ACEOF
7296/* confdefs.h. */
7297_ACEOF
7298cat confdefs.h >>conftest.$ac_ext
7299cat >>conftest.$ac_ext <<_ACEOF
7300/* end confdefs.h. */
7301$ac_includes_default
7302int
7303main ()
7304{
7305static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7306test_array [0] = 0
7307
7308 ;
7309 return 0;
7310}
7311_ACEOF
7312rm -f conftest.$ac_objext
7313if { (ac_try="$ac_compile"
7314case "(($ac_try" in
7315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7316 *) ac_try_echo=$ac_try;;
7317esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007319 (eval "$ac_compile") 2>conftest.er1
7320 ac_status=$?
7321 grep -v '^ *+' conftest.er1 >conftest.err
7322 rm -f conftest.er1
7323 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007325 (exit $ac_status); } && {
7326 test -z "$ac_c_werror_flag" ||
7327 test ! -s conftest.err
7328 } && test -s conftest.$ac_objext; then
7329 cat >conftest.$ac_ext <<_ACEOF
7330/* confdefs.h. */
7331_ACEOF
7332cat confdefs.h >>conftest.$ac_ext
7333cat >>conftest.$ac_ext <<_ACEOF
7334/* end confdefs.h. */
7335$ac_includes_default
7336int
7337main ()
7338{
7339static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007340 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007341test_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 :
7365else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007366 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007367sed 's/^/| /' conftest.$ac_ext >&5
7368
7369 case $ac_type in
7370 int64_t) ac_cv_c_int64_t=yes ;;
7371 *) ac_cv_c_int64_t=$ac_type ;;
7372esac
7373
7374fi
7375
7376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7377else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007378 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007379sed 's/^/| /' conftest.$ac_ext >&5
7380
7381
7382fi
7383
7384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7385 test "$ac_cv_c_int64_t" != no && break
7386 done
7387fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007388{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7389echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007390 case $ac_cv_c_int64_t in #(
7391 no|yes) ;; #(
7392 *)
7393
7394cat >>confdefs.h <<_ACEOF
7395#define int64_t $ac_cv_c_int64_t
7396_ACEOF
7397;;
7398 esac
7399
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007400{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7401echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007402if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007403 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007404else
Benjamin Petersona8332062009-09-11 22:36:27 +00007405 cat >conftest.$ac_ext <<_ACEOF
7406/* confdefs.h. */
7407_ACEOF
7408cat confdefs.h >>conftest.$ac_ext
7409cat >>conftest.$ac_ext <<_ACEOF
7410/* end confdefs.h. */
7411$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007412typedef ssize_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007413int
7414main ()
7415{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007416if ((ac__type_new_ *) 0)
7417 return 0;
7418if (sizeof (ac__type_new_))
7419 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007420 ;
7421 return 0;
7422}
7423_ACEOF
7424rm -f conftest.$ac_objext
7425if { (ac_try="$ac_compile"
7426case "(($ac_try" in
7427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7428 *) ac_try_echo=$ac_try;;
7429esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007431 (eval "$ac_compile") 2>conftest.er1
7432 ac_status=$?
7433 grep -v '^ *+' conftest.er1 >conftest.err
7434 rm -f conftest.er1
7435 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007437 (exit $ac_status); } && {
7438 test -z "$ac_c_werror_flag" ||
7439 test ! -s conftest.err
7440 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007441 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007442else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007443 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007444sed 's/^/| /' conftest.$ac_ext >&5
7445
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007446 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007448
7449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007450fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007451{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7452echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7453if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007454
7455cat >>confdefs.h <<\_ACEOF
7456#define HAVE_SSIZE_T 1
7457_ACEOF
7458
7459fi
7460
Jack Jansendd19cf82001-12-06 22:36:17 +00007461
Michael W. Hudson54241132001-12-07 15:38:26 +00007462# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007463# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007464{ echo "$as_me:$LINENO: checking for int" >&5
7465echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7466if test "${ac_cv_type_int+set}" = set; then
7467 echo $ECHO_N "(cached) $ECHO_C" >&6
7468else
7469 cat >conftest.$ac_ext <<_ACEOF
7470/* confdefs.h. */
7471_ACEOF
7472cat confdefs.h >>conftest.$ac_ext
7473cat >>conftest.$ac_ext <<_ACEOF
7474/* end confdefs.h. */
7475$ac_includes_default
7476typedef int ac__type_new_;
7477int
7478main ()
7479{
7480if ((ac__type_new_ *) 0)
7481 return 0;
7482if (sizeof (ac__type_new_))
7483 return 0;
7484 ;
7485 return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext
7489if { (ac_try="$ac_compile"
7490case "(($ac_try" in
7491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7492 *) ac_try_echo=$ac_try;;
7493esac
7494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7495 (eval "$ac_compile") 2>conftest.er1
7496 ac_status=$?
7497 grep -v '^ *+' conftest.er1 >conftest.err
7498 rm -f conftest.er1
7499 cat conftest.err >&5
7500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7501 (exit $ac_status); } && {
7502 test -z "$ac_c_werror_flag" ||
7503 test ! -s conftest.err
7504 } && test -s conftest.$ac_objext; then
7505 ac_cv_type_int=yes
7506else
7507 echo "$as_me: failed program was:" >&5
7508sed 's/^/| /' conftest.$ac_ext >&5
7509
7510 ac_cv_type_int=no
7511fi
7512
7513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7514fi
7515{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7516echo "${ECHO_T}$ac_cv_type_int" >&6; }
7517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007518# The cast to long int works around a bug in the HP C Compiler
7519# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7520# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7521# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007522{ echo "$as_me:$LINENO: checking size of int" >&5
7523echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007524if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007526else
Martin v. Löwis11437992002-04-12 09:54:03 +00007527 if test "$cross_compiling" = yes; then
7528 # Depending upon the size, compute the lo and hi bounds.
7529cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007530/* confdefs.h. */
7531_ACEOF
7532cat confdefs.h >>conftest.$ac_ext
7533cat >>conftest.$ac_ext <<_ACEOF
7534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007535$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007536 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007537int
7538main ()
7539{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007540static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007541test_array [0] = 0
7542
7543 ;
7544 return 0;
7545}
7546_ACEOF
7547rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007548if { (ac_try="$ac_compile"
7549case "(($ac_try" in
7550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7551 *) ac_try_echo=$ac_try;;
7552esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007554 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007556 grep -v '^ *+' conftest.er1 >conftest.err
7557 rm -f conftest.er1
7558 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560 (exit $ac_status); } && {
7561 test -z "$ac_c_werror_flag" ||
7562 test ! -s conftest.err
7563 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 ac_lo=0 ac_mid=0
7565 while :; do
7566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007567/* confdefs.h. */
7568_ACEOF
7569cat confdefs.h >>conftest.$ac_ext
7570cat >>conftest.$ac_ext <<_ACEOF
7571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007572$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007573 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007574int
7575main ()
7576{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007578test_array [0] = 0
7579
7580 ;
7581 return 0;
7582}
7583_ACEOF
7584rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585if { (ac_try="$ac_compile"
7586case "(($ac_try" in
7587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7588 *) ac_try_echo=$ac_try;;
7589esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007593 grep -v '^ *+' conftest.er1 >conftest.err
7594 rm -f conftest.er1
7595 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007597 (exit $ac_status); } && {
7598 test -z "$ac_c_werror_flag" ||
7599 test ! -s conftest.err
7600 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 ac_hi=$ac_mid; break
7602else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007604sed 's/^/| /' conftest.$ac_ext >&5
7605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606 ac_lo=`expr $ac_mid + 1`
7607 if test $ac_lo -le $ac_mid; then
7608 ac_lo= ac_hi=
7609 break
7610 fi
7611 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613
7614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 done
7616else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007618sed 's/^/| /' conftest.$ac_ext >&5
7619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007621/* confdefs.h. */
7622_ACEOF
7623cat confdefs.h >>conftest.$ac_ext
7624cat >>conftest.$ac_ext <<_ACEOF
7625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007626$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007627 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007628int
7629main ()
7630{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007631static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007632test_array [0] = 0
7633
7634 ;
7635 return 0;
7636}
7637_ACEOF
7638rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639if { (ac_try="$ac_compile"
7640case "(($ac_try" in
7641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7642 *) ac_try_echo=$ac_try;;
7643esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007647 grep -v '^ *+' conftest.er1 >conftest.err
7648 rm -f conftest.er1
7649 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651 (exit $ac_status); } && {
7652 test -z "$ac_c_werror_flag" ||
7653 test ! -s conftest.err
7654 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 ac_hi=-1 ac_mid=-1
7656 while :; do
7657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007658/* confdefs.h. */
7659_ACEOF
7660cat confdefs.h >>conftest.$ac_ext
7661cat >>conftest.$ac_ext <<_ACEOF
7662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007663$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007664 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007665int
7666main ()
7667{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007668static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007669test_array [0] = 0
7670
7671 ;
7672 return 0;
7673}
7674_ACEOF
7675rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676if { (ac_try="$ac_compile"
7677case "(($ac_try" in
7678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7679 *) ac_try_echo=$ac_try;;
7680esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007684 grep -v '^ *+' conftest.er1 >conftest.err
7685 rm -f conftest.er1
7686 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688 (exit $ac_status); } && {
7689 test -z "$ac_c_werror_flag" ||
7690 test ! -s conftest.err
7691 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007692 ac_lo=$ac_mid; break
7693else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007695sed 's/^/| /' conftest.$ac_ext >&5
7696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007697 ac_hi=`expr '(' $ac_mid ')' - 1`
7698 if test $ac_mid -le $ac_hi; then
7699 ac_lo= ac_hi=
7700 break
7701 fi
7702 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704
7705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 done
7707else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007709sed 's/^/| /' conftest.$ac_ext >&5
7710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007713
7714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716
7717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007718# Binary search between lo and hi bounds.
7719while test "x$ac_lo" != "x$ac_hi"; do
7720 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007722/* confdefs.h. */
7723_ACEOF
7724cat confdefs.h >>conftest.$ac_ext
7725cat >>conftest.$ac_ext <<_ACEOF
7726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007727$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007728 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007729int
7730main ()
7731{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007733test_array [0] = 0
7734
7735 ;
7736 return 0;
7737}
7738_ACEOF
7739rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740if { (ac_try="$ac_compile"
7741case "(($ac_try" in
7742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7743 *) ac_try_echo=$ac_try;;
7744esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007748 grep -v '^ *+' conftest.er1 >conftest.err
7749 rm -f conftest.er1
7750 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752 (exit $ac_status); } && {
7753 test -z "$ac_c_werror_flag" ||
7754 test ! -s conftest.err
7755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_hi=$ac_mid
7757else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007759sed 's/^/| /' conftest.$ac_ext >&5
7760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763
7764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007765done
7766case $ac_lo in
7767?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007769 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007770See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007771echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007772See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007773 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774 else
7775 ac_cv_sizeof_int=0
7776 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007777esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007778else
Martin v. Löwis11437992002-04-12 09:54:03 +00007779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007785$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007786 typedef int ac__type_sizeof_;
7787static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7788static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007789#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007790#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007791int
7792main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007793{
Martin v. Löwis11437992002-04-12 09:54:03 +00007794
7795 FILE *f = fopen ("conftest.val", "w");
7796 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007798 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007801 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007803 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007804 }
7805 else
7806 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007808 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007810 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007813
7814 ;
7815 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007816}
Martin v. Löwis11437992002-04-12 09:54:03 +00007817_ACEOF
7818rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819if { (ac_try="$ac_link"
7820case "(($ac_try" in
7821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7822 *) ac_try_echo=$ac_try;;
7823esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829 { (case "(($ac_try" in
7830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7831 *) ac_try_echo=$ac_try;;
7832esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 (exit $ac_status); }; }; then
7838 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007839else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007840 echo "$as_me: program exited with status $ac_status" >&5
7841echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007842sed 's/^/| /' conftest.$ac_ext >&5
7843
Martin v. Löwis11437992002-04-12 09:54:03 +00007844( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007846 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007847See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007848echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007849See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007850 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851 else
7852 ac_cv_sizeof_int=0
7853 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855rm -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 +00007856fi
7857rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007858fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007859{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7860echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861
7862
7863
Martin v. Löwis11437992002-04-12 09:54:03 +00007864cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007865#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007866_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007867
7868
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007869{ echo "$as_me:$LINENO: checking for long" >&5
7870echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7871if test "${ac_cv_type_long+set}" = set; then
7872 echo $ECHO_N "(cached) $ECHO_C" >&6
7873else
7874 cat >conftest.$ac_ext <<_ACEOF
7875/* confdefs.h. */
7876_ACEOF
7877cat confdefs.h >>conftest.$ac_ext
7878cat >>conftest.$ac_ext <<_ACEOF
7879/* end confdefs.h. */
7880$ac_includes_default
7881typedef long ac__type_new_;
7882int
7883main ()
7884{
7885if ((ac__type_new_ *) 0)
7886 return 0;
7887if (sizeof (ac__type_new_))
7888 return 0;
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
7894if { (ac_try="$ac_compile"
7895case "(($ac_try" in
7896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7897 *) ac_try_echo=$ac_try;;
7898esac
7899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7900 (eval "$ac_compile") 2>conftest.er1
7901 ac_status=$?
7902 grep -v '^ *+' conftest.er1 >conftest.err
7903 rm -f conftest.er1
7904 cat conftest.err >&5
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); } && {
7907 test -z "$ac_c_werror_flag" ||
7908 test ! -s conftest.err
7909 } && test -s conftest.$ac_objext; then
7910 ac_cv_type_long=yes
7911else
7912 echo "$as_me: failed program was:" >&5
7913sed 's/^/| /' conftest.$ac_ext >&5
7914
7915 ac_cv_type_long=no
7916fi
7917
7918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7919fi
7920{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7921echo "${ECHO_T}$ac_cv_type_long" >&6; }
7922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923# The cast to long int works around a bug in the HP C Compiler
7924# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7925# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7926# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007927{ echo "$as_me:$LINENO: checking size of long" >&5
7928echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007929if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007930 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007931else
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 if test "$cross_compiling" = yes; then
7933 # Depending upon the size, compute the lo and hi bounds.
7934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007935/* confdefs.h. */
7936_ACEOF
7937cat confdefs.h >>conftest.$ac_ext
7938cat >>conftest.$ac_ext <<_ACEOF
7939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007940$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007941 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007942int
7943main ()
7944{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007945static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007946test_array [0] = 0
7947
7948 ;
7949 return 0;
7950}
7951_ACEOF
7952rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953if { (ac_try="$ac_compile"
7954case "(($ac_try" in
7955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7956 *) ac_try_echo=$ac_try;;
7957esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007961 grep -v '^ *+' conftest.er1 >conftest.err
7962 rm -f conftest.er1
7963 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965 (exit $ac_status); } && {
7966 test -z "$ac_c_werror_flag" ||
7967 test ! -s conftest.err
7968 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 ac_lo=0 ac_mid=0
7970 while :; do
7971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* confdefs.h. */
7973_ACEOF
7974cat confdefs.h >>conftest.$ac_ext
7975cat >>conftest.$ac_ext <<_ACEOF
7976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007977$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007978 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007979int
7980main ()
7981{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007982static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007983test_array [0] = 0
7984
7985 ;
7986 return 0;
7987}
7988_ACEOF
7989rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990if { (ac_try="$ac_compile"
7991case "(($ac_try" in
7992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7993 *) ac_try_echo=$ac_try;;
7994esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007998 grep -v '^ *+' conftest.er1 >conftest.err
7999 rm -f conftest.er1
8000 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002 (exit $ac_status); } && {
8003 test -z "$ac_c_werror_flag" ||
8004 test ! -s conftest.err
8005 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 ac_hi=$ac_mid; break
8007else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008009sed 's/^/| /' conftest.$ac_ext >&5
8010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011 ac_lo=`expr $ac_mid + 1`
8012 if test $ac_lo -le $ac_mid; then
8013 ac_lo= ac_hi=
8014 break
8015 fi
8016 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018
8019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 done
8021else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008023sed 's/^/| /' conftest.$ac_ext >&5
8024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008026/* confdefs.h. */
8027_ACEOF
8028cat confdefs.h >>conftest.$ac_ext
8029cat >>conftest.$ac_ext <<_ACEOF
8030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008031$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008032 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008033int
8034main ()
8035{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008036static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008037test_array [0] = 0
8038
8039 ;
8040 return 0;
8041}
8042_ACEOF
8043rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044if { (ac_try="$ac_compile"
8045case "(($ac_try" in
8046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8047 *) ac_try_echo=$ac_try;;
8048esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008052 grep -v '^ *+' conftest.er1 >conftest.err
8053 rm -f conftest.er1
8054 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 (exit $ac_status); } && {
8057 test -z "$ac_c_werror_flag" ||
8058 test ! -s conftest.err
8059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ac_hi=-1 ac_mid=-1
8061 while :; do
8062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008063/* confdefs.h. */
8064_ACEOF
8065cat confdefs.h >>conftest.$ac_ext
8066cat >>conftest.$ac_ext <<_ACEOF
8067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008068$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008069 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008070int
8071main ()
8072{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008073static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008074test_array [0] = 0
8075
8076 ;
8077 return 0;
8078}
8079_ACEOF
8080rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081if { (ac_try="$ac_compile"
8082case "(($ac_try" in
8083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8084 *) ac_try_echo=$ac_try;;
8085esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008089 grep -v '^ *+' conftest.er1 >conftest.err
8090 rm -f conftest.er1
8091 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093 (exit $ac_status); } && {
8094 test -z "$ac_c_werror_flag" ||
8095 test ! -s conftest.err
8096 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ac_lo=$ac_mid; break
8098else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008100sed 's/^/| /' conftest.$ac_ext >&5
8101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102 ac_hi=`expr '(' $ac_mid ')' - 1`
8103 if test $ac_mid -le $ac_hi; then
8104 ac_lo= ac_hi=
8105 break
8106 fi
8107 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109
8110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 done
8112else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008114sed 's/^/| /' conftest.$ac_ext >&5
8115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118
8119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121
8122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008123# Binary search between lo and hi bounds.
8124while test "x$ac_lo" != "x$ac_hi"; do
8125 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008127/* confdefs.h. */
8128_ACEOF
8129cat confdefs.h >>conftest.$ac_ext
8130cat >>conftest.$ac_ext <<_ACEOF
8131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008132$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008133 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008134int
8135main ()
8136{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008137static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008138test_array [0] = 0
8139
8140 ;
8141 return 0;
8142}
8143_ACEOF
8144rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145if { (ac_try="$ac_compile"
8146case "(($ac_try" in
8147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8148 *) ac_try_echo=$ac_try;;
8149esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008153 grep -v '^ *+' conftest.er1 >conftest.err
8154 rm -f conftest.er1
8155 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157 (exit $ac_status); } && {
8158 test -z "$ac_c_werror_flag" ||
8159 test ! -s conftest.err
8160 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 ac_hi=$ac_mid
8162else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008164sed 's/^/| /' conftest.$ac_ext >&5
8165
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168
8169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008170done
8171case $ac_lo in
8172?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008174 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008175See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008176echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008177See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008178 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179 else
8180 ac_cv_sizeof_long=0
8181 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008182esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008183else
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008185/* confdefs.h. */
8186_ACEOF
8187cat confdefs.h >>conftest.$ac_ext
8188cat >>conftest.$ac_ext <<_ACEOF
8189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008190$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008191 typedef long ac__type_sizeof_;
8192static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8193static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008194#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008195#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008196int
8197main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008198{
Martin v. Löwis11437992002-04-12 09:54:03 +00008199
8200 FILE *f = fopen ("conftest.val", "w");
8201 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008203 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008206 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008208 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 }
8210 else
8211 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008213 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008215 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008218
8219 ;
8220 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008221}
Martin v. Löwis11437992002-04-12 09:54:03 +00008222_ACEOF
8223rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224if { (ac_try="$ac_link"
8225case "(($ac_try" in
8226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8227 *) ac_try_echo=$ac_try;;
8228esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234 { (case "(($ac_try" in
8235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8236 *) ac_try_echo=$ac_try;;
8237esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008240 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 (exit $ac_status); }; }; then
8243 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008244else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008245 echo "$as_me: program exited with status $ac_status" >&5
8246echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008247sed 's/^/| /' conftest.$ac_ext >&5
8248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008251 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008252See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008253echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008254See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008255 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 else
8257 ac_cv_sizeof_long=0
8258 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260rm -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 +00008261fi
8262rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008263fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008264{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8265echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266
8267
8268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008270#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008271_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008272
8273
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008274{ echo "$as_me:$LINENO: checking for void *" >&5
8275echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8276if test "${ac_cv_type_void_p+set}" = set; then
8277 echo $ECHO_N "(cached) $ECHO_C" >&6
8278else
8279 cat >conftest.$ac_ext <<_ACEOF
8280/* confdefs.h. */
8281_ACEOF
8282cat confdefs.h >>conftest.$ac_ext
8283cat >>conftest.$ac_ext <<_ACEOF
8284/* end confdefs.h. */
8285$ac_includes_default
8286typedef void * ac__type_new_;
8287int
8288main ()
8289{
8290if ((ac__type_new_ *) 0)
8291 return 0;
8292if (sizeof (ac__type_new_))
8293 return 0;
8294 ;
8295 return 0;
8296}
8297_ACEOF
8298rm -f conftest.$ac_objext
8299if { (ac_try="$ac_compile"
8300case "(($ac_try" in
8301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8302 *) ac_try_echo=$ac_try;;
8303esac
8304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8305 (eval "$ac_compile") 2>conftest.er1
8306 ac_status=$?
8307 grep -v '^ *+' conftest.er1 >conftest.err
8308 rm -f conftest.er1
8309 cat conftest.err >&5
8310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311 (exit $ac_status); } && {
8312 test -z "$ac_c_werror_flag" ||
8313 test ! -s conftest.err
8314 } && test -s conftest.$ac_objext; then
8315 ac_cv_type_void_p=yes
8316else
8317 echo "$as_me: failed program was:" >&5
8318sed 's/^/| /' conftest.$ac_ext >&5
8319
8320 ac_cv_type_void_p=no
8321fi
8322
8323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8324fi
8325{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8326echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328# The cast to long int works around a bug in the HP C Compiler
8329# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8330# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8331# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008332{ echo "$as_me:$LINENO: checking size of void *" >&5
8333echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008334if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008335 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008336else
Martin v. Löwis11437992002-04-12 09:54:03 +00008337 if test "$cross_compiling" = yes; then
8338 # Depending upon the size, compute the lo and hi bounds.
8339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008340/* confdefs.h. */
8341_ACEOF
8342cat confdefs.h >>conftest.$ac_ext
8343cat >>conftest.$ac_ext <<_ACEOF
8344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008345$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008346 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008347int
8348main ()
8349{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008350static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008351test_array [0] = 0
8352
8353 ;
8354 return 0;
8355}
8356_ACEOF
8357rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358if { (ac_try="$ac_compile"
8359case "(($ac_try" in
8360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8361 *) ac_try_echo=$ac_try;;
8362esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008366 grep -v '^ *+' conftest.er1 >conftest.err
8367 rm -f conftest.er1
8368 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008370 (exit $ac_status); } && {
8371 test -z "$ac_c_werror_flag" ||
8372 test ! -s conftest.err
8373 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008374 ac_lo=0 ac_mid=0
8375 while :; do
8376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008377/* confdefs.h. */
8378_ACEOF
8379cat confdefs.h >>conftest.$ac_ext
8380cat >>conftest.$ac_ext <<_ACEOF
8381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008382$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008383 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008384int
8385main ()
8386{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008387static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008388test_array [0] = 0
8389
8390 ;
8391 return 0;
8392}
8393_ACEOF
8394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395if { (ac_try="$ac_compile"
8396case "(($ac_try" in
8397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8398 *) ac_try_echo=$ac_try;;
8399esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008403 grep -v '^ *+' conftest.er1 >conftest.err
8404 rm -f conftest.er1
8405 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407 (exit $ac_status); } && {
8408 test -z "$ac_c_werror_flag" ||
8409 test ! -s conftest.err
8410 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 ac_hi=$ac_mid; break
8412else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008414sed 's/^/| /' conftest.$ac_ext >&5
8415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416 ac_lo=`expr $ac_mid + 1`
8417 if test $ac_lo -le $ac_mid; then
8418 ac_lo= ac_hi=
8419 break
8420 fi
8421 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423
8424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 done
8426else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008428sed 's/^/| /' conftest.$ac_ext >&5
8429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008431/* confdefs.h. */
8432_ACEOF
8433cat confdefs.h >>conftest.$ac_ext
8434cat >>conftest.$ac_ext <<_ACEOF
8435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008436$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008437 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008438int
8439main ()
8440{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008441static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008442test_array [0] = 0
8443
8444 ;
8445 return 0;
8446}
8447_ACEOF
8448rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449if { (ac_try="$ac_compile"
8450case "(($ac_try" in
8451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8452 *) ac_try_echo=$ac_try;;
8453esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008457 grep -v '^ *+' conftest.er1 >conftest.err
8458 rm -f conftest.er1
8459 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461 (exit $ac_status); } && {
8462 test -z "$ac_c_werror_flag" ||
8463 test ! -s conftest.err
8464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_hi=-1 ac_mid=-1
8466 while :; do
8467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008468/* confdefs.h. */
8469_ACEOF
8470cat confdefs.h >>conftest.$ac_ext
8471cat >>conftest.$ac_ext <<_ACEOF
8472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008473$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008474 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008475int
8476main ()
8477{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008478static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008479test_array [0] = 0
8480
8481 ;
8482 return 0;
8483}
8484_ACEOF
8485rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486if { (ac_try="$ac_compile"
8487case "(($ac_try" in
8488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8489 *) ac_try_echo=$ac_try;;
8490esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008494 grep -v '^ *+' conftest.er1 >conftest.err
8495 rm -f conftest.er1
8496 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498 (exit $ac_status); } && {
8499 test -z "$ac_c_werror_flag" ||
8500 test ! -s conftest.err
8501 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 ac_lo=$ac_mid; break
8503else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008505sed 's/^/| /' conftest.$ac_ext >&5
8506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 ac_hi=`expr '(' $ac_mid ')' - 1`
8508 if test $ac_mid -le $ac_hi; then
8509 ac_lo= ac_hi=
8510 break
8511 fi
8512 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 done
8517else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008519sed 's/^/| /' conftest.$ac_ext >&5
8520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523
8524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526
8527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008528# Binary search between lo and hi bounds.
8529while test "x$ac_lo" != "x$ac_hi"; do
8530 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008532/* confdefs.h. */
8533_ACEOF
8534cat confdefs.h >>conftest.$ac_ext
8535cat >>conftest.$ac_ext <<_ACEOF
8536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008537$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008538 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008539int
8540main ()
8541{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008542static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008543test_array [0] = 0
8544
8545 ;
8546 return 0;
8547}
8548_ACEOF
8549rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550if { (ac_try="$ac_compile"
8551case "(($ac_try" in
8552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8553 *) ac_try_echo=$ac_try;;
8554esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008558 grep -v '^ *+' conftest.er1 >conftest.err
8559 rm -f conftest.er1
8560 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562 (exit $ac_status); } && {
8563 test -z "$ac_c_werror_flag" ||
8564 test ! -s conftest.err
8565 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ac_hi=$ac_mid
8567else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008569sed 's/^/| /' conftest.$ac_ext >&5
8570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573
8574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008575done
8576case $ac_lo in
8577?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008579 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008580See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008581echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008582See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008583 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584 else
8585 ac_cv_sizeof_void_p=0
8586 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008587esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008588else
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008590/* confdefs.h. */
8591_ACEOF
8592cat confdefs.h >>conftest.$ac_ext
8593cat >>conftest.$ac_ext <<_ACEOF
8594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008596 typedef void * ac__type_sizeof_;
8597static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8598static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008599#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008600#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008601int
8602main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008603{
Martin v. Löwis11437992002-04-12 09:54:03 +00008604
8605 FILE *f = fopen ("conftest.val", "w");
8606 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008608 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008611 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008613 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 }
8615 else
8616 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008618 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008620 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008623
8624 ;
8625 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008626}
Martin v. Löwis11437992002-04-12 09:54:03 +00008627_ACEOF
8628rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629if { (ac_try="$ac_link"
8630case "(($ac_try" in
8631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8632 *) ac_try_echo=$ac_try;;
8633esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639 { (case "(($ac_try" in
8640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8641 *) ac_try_echo=$ac_try;;
8642esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 (exit $ac_status); }; }; then
8648 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008649else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008650 echo "$as_me: program exited with status $ac_status" >&5
8651echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008652sed 's/^/| /' conftest.$ac_ext >&5
8653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008656 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008657See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008658echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008659See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008660 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661 else
8662 ac_cv_sizeof_void_p=0
8663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665rm -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 +00008666fi
8667rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008668fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008669{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8670echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671
8672
8673
Martin v. Löwis11437992002-04-12 09:54:03 +00008674cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008675#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008676_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008677
8678
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008679{ echo "$as_me:$LINENO: checking for short" >&5
8680echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8681if test "${ac_cv_type_short+set}" = set; then
8682 echo $ECHO_N "(cached) $ECHO_C" >&6
8683else
8684 cat >conftest.$ac_ext <<_ACEOF
8685/* confdefs.h. */
8686_ACEOF
8687cat confdefs.h >>conftest.$ac_ext
8688cat >>conftest.$ac_ext <<_ACEOF
8689/* end confdefs.h. */
8690$ac_includes_default
8691typedef short ac__type_new_;
8692int
8693main ()
8694{
8695if ((ac__type_new_ *) 0)
8696 return 0;
8697if (sizeof (ac__type_new_))
8698 return 0;
8699 ;
8700 return 0;
8701}
8702_ACEOF
8703rm -f conftest.$ac_objext
8704if { (ac_try="$ac_compile"
8705case "(($ac_try" in
8706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8707 *) ac_try_echo=$ac_try;;
8708esac
8709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8710 (eval "$ac_compile") 2>conftest.er1
8711 ac_status=$?
8712 grep -v '^ *+' conftest.er1 >conftest.err
8713 rm -f conftest.er1
8714 cat conftest.err >&5
8715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8716 (exit $ac_status); } && {
8717 test -z "$ac_c_werror_flag" ||
8718 test ! -s conftest.err
8719 } && test -s conftest.$ac_objext; then
8720 ac_cv_type_short=yes
8721else
8722 echo "$as_me: failed program was:" >&5
8723sed 's/^/| /' conftest.$ac_ext >&5
8724
8725 ac_cv_type_short=no
8726fi
8727
8728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8729fi
8730{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8731echo "${ECHO_T}$ac_cv_type_short" >&6; }
8732
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733# The cast to long int works around a bug in the HP C Compiler
8734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8736# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008737{ echo "$as_me:$LINENO: checking size of short" >&5
8738echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008739if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008740 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008741else
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 if test "$cross_compiling" = yes; then
8743 # Depending upon the size, compute the lo and hi bounds.
8744cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008745/* confdefs.h. */
8746_ACEOF
8747cat confdefs.h >>conftest.$ac_ext
8748cat >>conftest.$ac_ext <<_ACEOF
8749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008750$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008751 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008752int
8753main ()
8754{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008755static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008756test_array [0] = 0
8757
8758 ;
8759 return 0;
8760}
8761_ACEOF
8762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008763if { (ac_try="$ac_compile"
8764case "(($ac_try" in
8765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8766 *) ac_try_echo=$ac_try;;
8767esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008771 grep -v '^ *+' conftest.er1 >conftest.err
8772 rm -f conftest.er1
8773 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775 (exit $ac_status); } && {
8776 test -z "$ac_c_werror_flag" ||
8777 test ! -s conftest.err
8778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 ac_lo=0 ac_mid=0
8780 while :; do
8781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008782/* confdefs.h. */
8783_ACEOF
8784cat confdefs.h >>conftest.$ac_ext
8785cat >>conftest.$ac_ext <<_ACEOF
8786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008787$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008788 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008789int
8790main ()
8791{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008793test_array [0] = 0
8794
8795 ;
8796 return 0;
8797}
8798_ACEOF
8799rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800if { (ac_try="$ac_compile"
8801case "(($ac_try" in
8802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8803 *) ac_try_echo=$ac_try;;
8804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008808 grep -v '^ *+' conftest.er1 >conftest.err
8809 rm -f conftest.er1
8810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812 (exit $ac_status); } && {
8813 test -z "$ac_c_werror_flag" ||
8814 test ! -s conftest.err
8815 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 ac_hi=$ac_mid; break
8817else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008819sed 's/^/| /' conftest.$ac_ext >&5
8820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821 ac_lo=`expr $ac_mid + 1`
8822 if test $ac_lo -le $ac_mid; then
8823 ac_lo= ac_hi=
8824 break
8825 fi
8826 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828
8829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 done
8831else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008833sed 's/^/| /' conftest.$ac_ext >&5
8834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008836/* confdefs.h. */
8837_ACEOF
8838cat confdefs.h >>conftest.$ac_ext
8839cat >>conftest.$ac_ext <<_ACEOF
8840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008842 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008843int
8844main ()
8845{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008846static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008847test_array [0] = 0
8848
8849 ;
8850 return 0;
8851}
8852_ACEOF
8853rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854if { (ac_try="$ac_compile"
8855case "(($ac_try" in
8856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8857 *) ac_try_echo=$ac_try;;
8858esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008862 grep -v '^ *+' conftest.er1 >conftest.err
8863 rm -f conftest.er1
8864 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 (exit $ac_status); } && {
8867 test -z "$ac_c_werror_flag" ||
8868 test ! -s conftest.err
8869 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ac_hi=-1 ac_mid=-1
8871 while :; do
8872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008873/* confdefs.h. */
8874_ACEOF
8875cat confdefs.h >>conftest.$ac_ext
8876cat >>conftest.$ac_ext <<_ACEOF
8877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008879 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008880int
8881main ()
8882{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008883static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008884test_array [0] = 0
8885
8886 ;
8887 return 0;
8888}
8889_ACEOF
8890rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891if { (ac_try="$ac_compile"
8892case "(($ac_try" in
8893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8894 *) ac_try_echo=$ac_try;;
8895esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008899 grep -v '^ *+' conftest.er1 >conftest.err
8900 rm -f conftest.er1
8901 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008903 (exit $ac_status); } && {
8904 test -z "$ac_c_werror_flag" ||
8905 test ! -s conftest.err
8906 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 ac_lo=$ac_mid; break
8908else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008910sed 's/^/| /' conftest.$ac_ext >&5
8911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912 ac_hi=`expr '(' $ac_mid ')' - 1`
8913 if test $ac_mid -le $ac_hi; then
8914 ac_lo= ac_hi=
8915 break
8916 fi
8917 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919
8920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 done
8922else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008924sed 's/^/| /' conftest.$ac_ext >&5
8925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928
8929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931
8932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008933# Binary search between lo and hi bounds.
8934while test "x$ac_lo" != "x$ac_hi"; do
8935 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* confdefs.h. */
8938_ACEOF
8939cat confdefs.h >>conftest.$ac_ext
8940cat >>conftest.$ac_ext <<_ACEOF
8941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008943 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008944int
8945main ()
8946{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008947static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008948test_array [0] = 0
8949
8950 ;
8951 return 0;
8952}
8953_ACEOF
8954rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955if { (ac_try="$ac_compile"
8956case "(($ac_try" in
8957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8958 *) ac_try_echo=$ac_try;;
8959esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008963 grep -v '^ *+' conftest.er1 >conftest.err
8964 rm -f conftest.er1
8965 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967 (exit $ac_status); } && {
8968 test -z "$ac_c_werror_flag" ||
8969 test ! -s conftest.err
8970 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 ac_hi=$ac_mid
8972else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008974sed 's/^/| /' conftest.$ac_ext >&5
8975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978
8979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008980done
8981case $ac_lo in
8982?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008984 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008985See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008986echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008987See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008988 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989 else
8990 ac_cv_sizeof_short=0
8991 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008992esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008993else
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* confdefs.h. */
8996_ACEOF
8997cat confdefs.h >>conftest.$ac_ext
8998cat >>conftest.$ac_ext <<_ACEOF
8999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009001 typedef short ac__type_sizeof_;
9002static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9003static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009004#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009005#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009006int
9007main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009008{
Martin v. Löwis11437992002-04-12 09:54:03 +00009009
9010 FILE *f = fopen ("conftest.val", "w");
9011 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009013 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009016 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009018 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 }
9020 else
9021 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009023 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009025 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
9029 ;
9030 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009031}
Martin v. Löwis11437992002-04-12 09:54:03 +00009032_ACEOF
9033rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034if { (ac_try="$ac_link"
9035case "(($ac_try" in
9036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9037 *) ac_try_echo=$ac_try;;
9038esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009044 { (case "(($ac_try" in
9045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9046 *) ac_try_echo=$ac_try;;
9047esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 (exit $ac_status); }; }; then
9053 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009054else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009055 echo "$as_me: program exited with status $ac_status" >&5
9056echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009057sed 's/^/| /' conftest.$ac_ext >&5
9058
Martin v. Löwis11437992002-04-12 09:54:03 +00009059( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009060if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009061 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009062See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009063echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009064See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009065 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066 else
9067 ac_cv_sizeof_short=0
9068 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009070rm -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 +00009071fi
9072rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009073fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009074{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9075echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076
9077
9078
Martin v. Löwis11437992002-04-12 09:54:03 +00009079cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009080#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009081_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009082
9083
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009084{ echo "$as_me:$LINENO: checking for float" >&5
9085echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9086if test "${ac_cv_type_float+set}" = set; then
9087 echo $ECHO_N "(cached) $ECHO_C" >&6
9088else
9089 cat >conftest.$ac_ext <<_ACEOF
9090/* confdefs.h. */
9091_ACEOF
9092cat confdefs.h >>conftest.$ac_ext
9093cat >>conftest.$ac_ext <<_ACEOF
9094/* end confdefs.h. */
9095$ac_includes_default
9096typedef float ac__type_new_;
9097int
9098main ()
9099{
9100if ((ac__type_new_ *) 0)
9101 return 0;
9102if (sizeof (ac__type_new_))
9103 return 0;
9104 ;
9105 return 0;
9106}
9107_ACEOF
9108rm -f conftest.$ac_objext
9109if { (ac_try="$ac_compile"
9110case "(($ac_try" in
9111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9112 *) ac_try_echo=$ac_try;;
9113esac
9114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9115 (eval "$ac_compile") 2>conftest.er1
9116 ac_status=$?
9117 grep -v '^ *+' conftest.er1 >conftest.err
9118 rm -f conftest.er1
9119 cat conftest.err >&5
9120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121 (exit $ac_status); } && {
9122 test -z "$ac_c_werror_flag" ||
9123 test ! -s conftest.err
9124 } && test -s conftest.$ac_objext; then
9125 ac_cv_type_float=yes
9126else
9127 echo "$as_me: failed program was:" >&5
9128sed 's/^/| /' conftest.$ac_ext >&5
9129
9130 ac_cv_type_float=no
9131fi
9132
9133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9134fi
9135{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9136echo "${ECHO_T}$ac_cv_type_float" >&6; }
9137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138# The cast to long int works around a bug in the HP C Compiler
9139# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9140# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9141# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009142{ echo "$as_me:$LINENO: checking size of float" >&5
9143echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009144if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009145 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009146else
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 if test "$cross_compiling" = yes; then
9148 # Depending upon the size, compute the lo and hi bounds.
9149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009150/* confdefs.h. */
9151_ACEOF
9152cat confdefs.h >>conftest.$ac_ext
9153cat >>conftest.$ac_ext <<_ACEOF
9154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009155$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009156 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009157int
9158main ()
9159{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009161test_array [0] = 0
9162
9163 ;
9164 return 0;
9165}
9166_ACEOF
9167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168if { (ac_try="$ac_compile"
9169case "(($ac_try" in
9170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9171 *) ac_try_echo=$ac_try;;
9172esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009176 grep -v '^ *+' conftest.er1 >conftest.err
9177 rm -f conftest.er1
9178 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180 (exit $ac_status); } && {
9181 test -z "$ac_c_werror_flag" ||
9182 test ! -s conftest.err
9183 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 ac_lo=0 ac_mid=0
9185 while :; do
9186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009187/* confdefs.h. */
9188_ACEOF
9189cat confdefs.h >>conftest.$ac_ext
9190cat >>conftest.$ac_ext <<_ACEOF
9191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009192$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009193 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009194int
9195main ()
9196{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009197static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009198test_array [0] = 0
9199
9200 ;
9201 return 0;
9202}
9203_ACEOF
9204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205if { (ac_try="$ac_compile"
9206case "(($ac_try" in
9207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9208 *) ac_try_echo=$ac_try;;
9209esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009213 grep -v '^ *+' conftest.er1 >conftest.err
9214 rm -f conftest.er1
9215 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217 (exit $ac_status); } && {
9218 test -z "$ac_c_werror_flag" ||
9219 test ! -s conftest.err
9220 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 ac_hi=$ac_mid; break
9222else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009224sed 's/^/| /' conftest.$ac_ext >&5
9225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226 ac_lo=`expr $ac_mid + 1`
9227 if test $ac_lo -le $ac_mid; then
9228 ac_lo= ac_hi=
9229 break
9230 fi
9231 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009233
9234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 done
9236else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009238sed 's/^/| /' conftest.$ac_ext >&5
9239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009241/* confdefs.h. */
9242_ACEOF
9243cat confdefs.h >>conftest.$ac_ext
9244cat >>conftest.$ac_ext <<_ACEOF
9245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009246$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009247 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009248int
9249main ()
9250{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009252test_array [0] = 0
9253
9254 ;
9255 return 0;
9256}
9257_ACEOF
9258rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259if { (ac_try="$ac_compile"
9260case "(($ac_try" in
9261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9262 *) ac_try_echo=$ac_try;;
9263esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009267 grep -v '^ *+' conftest.er1 >conftest.err
9268 rm -f conftest.er1
9269 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271 (exit $ac_status); } && {
9272 test -z "$ac_c_werror_flag" ||
9273 test ! -s conftest.err
9274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_hi=-1 ac_mid=-1
9276 while :; do
9277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009278/* confdefs.h. */
9279_ACEOF
9280cat confdefs.h >>conftest.$ac_ext
9281cat >>conftest.$ac_ext <<_ACEOF
9282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009283$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009284 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009285int
9286main ()
9287{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009288static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009289test_array [0] = 0
9290
9291 ;
9292 return 0;
9293}
9294_ACEOF
9295rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296if { (ac_try="$ac_compile"
9297case "(($ac_try" in
9298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9299 *) ac_try_echo=$ac_try;;
9300esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009304 grep -v '^ *+' conftest.er1 >conftest.err
9305 rm -f conftest.er1
9306 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308 (exit $ac_status); } && {
9309 test -z "$ac_c_werror_flag" ||
9310 test ! -s conftest.err
9311 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 ac_lo=$ac_mid; break
9313else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009315sed 's/^/| /' conftest.$ac_ext >&5
9316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317 ac_hi=`expr '(' $ac_mid ')' - 1`
9318 if test $ac_mid -le $ac_hi; then
9319 ac_lo= ac_hi=
9320 break
9321 fi
9322 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324
9325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 done
9327else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009329sed 's/^/| /' conftest.$ac_ext >&5
9330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009333
9334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009336
9337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009338# Binary search between lo and hi bounds.
9339while test "x$ac_lo" != "x$ac_hi"; do
9340 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009342/* confdefs.h. */
9343_ACEOF
9344cat confdefs.h >>conftest.$ac_ext
9345cat >>conftest.$ac_ext <<_ACEOF
9346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009347$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009348 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009349int
9350main ()
9351{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009353test_array [0] = 0
9354
9355 ;
9356 return 0;
9357}
9358_ACEOF
9359rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360if { (ac_try="$ac_compile"
9361case "(($ac_try" in
9362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9363 *) ac_try_echo=$ac_try;;
9364esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009368 grep -v '^ *+' conftest.er1 >conftest.err
9369 rm -f conftest.er1
9370 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372 (exit $ac_status); } && {
9373 test -z "$ac_c_werror_flag" ||
9374 test ! -s conftest.err
9375 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ac_hi=$ac_mid
9377else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009379sed 's/^/| /' conftest.$ac_ext >&5
9380
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383
9384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009385done
9386case $ac_lo in
9387?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009388'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009389 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009390See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009391echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009392See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009393 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394 else
9395 ac_cv_sizeof_float=0
9396 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009397esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009398else
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* confdefs.h. */
9401_ACEOF
9402cat confdefs.h >>conftest.$ac_ext
9403cat >>conftest.$ac_ext <<_ACEOF
9404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009406 typedef float ac__type_sizeof_;
9407static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9408static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009409#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009410#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009411int
9412main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009413{
Martin v. Löwis11437992002-04-12 09:54:03 +00009414
9415 FILE *f = fopen ("conftest.val", "w");
9416 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009418 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009421 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009423 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 }
9425 else
9426 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009428 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009429 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009430 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009433
9434 ;
9435 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009436}
Martin v. Löwis11437992002-04-12 09:54:03 +00009437_ACEOF
9438rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439if { (ac_try="$ac_link"
9440case "(($ac_try" in
9441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9442 *) ac_try_echo=$ac_try;;
9443esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009445 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009449 { (case "(($ac_try" in
9450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9451 *) ac_try_echo=$ac_try;;
9452esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 (exit $ac_status); }; }; then
9458 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009459else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009460 echo "$as_me: program exited with status $ac_status" >&5
9461echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009462sed 's/^/| /' conftest.$ac_ext >&5
9463
Martin v. Löwis11437992002-04-12 09:54:03 +00009464( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009466 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009467See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009468echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009469See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009470 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471 else
9472 ac_cv_sizeof_float=0
9473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475rm -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 +00009476fi
9477rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009478fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009479{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9480echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481
9482
9483
Martin v. Löwis11437992002-04-12 09:54:03 +00009484cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009485#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009486_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009487
9488
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009489{ echo "$as_me:$LINENO: checking for double" >&5
9490echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9491if test "${ac_cv_type_double+set}" = set; then
9492 echo $ECHO_N "(cached) $ECHO_C" >&6
9493else
9494 cat >conftest.$ac_ext <<_ACEOF
9495/* confdefs.h. */
9496_ACEOF
9497cat confdefs.h >>conftest.$ac_ext
9498cat >>conftest.$ac_ext <<_ACEOF
9499/* end confdefs.h. */
9500$ac_includes_default
9501typedef double ac__type_new_;
9502int
9503main ()
9504{
9505if ((ac__type_new_ *) 0)
9506 return 0;
9507if (sizeof (ac__type_new_))
9508 return 0;
9509 ;
9510 return 0;
9511}
9512_ACEOF
9513rm -f conftest.$ac_objext
9514if { (ac_try="$ac_compile"
9515case "(($ac_try" in
9516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9517 *) ac_try_echo=$ac_try;;
9518esac
9519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9520 (eval "$ac_compile") 2>conftest.er1
9521 ac_status=$?
9522 grep -v '^ *+' conftest.er1 >conftest.err
9523 rm -f conftest.er1
9524 cat conftest.err >&5
9525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9526 (exit $ac_status); } && {
9527 test -z "$ac_c_werror_flag" ||
9528 test ! -s conftest.err
9529 } && test -s conftest.$ac_objext; then
9530 ac_cv_type_double=yes
9531else
9532 echo "$as_me: failed program was:" >&5
9533sed 's/^/| /' conftest.$ac_ext >&5
9534
9535 ac_cv_type_double=no
9536fi
9537
9538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9539fi
9540{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9541echo "${ECHO_T}$ac_cv_type_double" >&6; }
9542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543# The cast to long int works around a bug in the HP C Compiler
9544# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9545# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9546# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009547{ echo "$as_me:$LINENO: checking size of double" >&5
9548echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009549if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009550 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009551else
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 if test "$cross_compiling" = yes; then
9553 # Depending upon the size, compute the lo and hi bounds.
9554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009555/* confdefs.h. */
9556_ACEOF
9557cat confdefs.h >>conftest.$ac_ext
9558cat >>conftest.$ac_ext <<_ACEOF
9559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009560$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009561 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009562int
9563main ()
9564{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009566test_array [0] = 0
9567
9568 ;
9569 return 0;
9570}
9571_ACEOF
9572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573if { (ac_try="$ac_compile"
9574case "(($ac_try" in
9575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9576 *) ac_try_echo=$ac_try;;
9577esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009581 grep -v '^ *+' conftest.er1 >conftest.err
9582 rm -f conftest.er1
9583 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585 (exit $ac_status); } && {
9586 test -z "$ac_c_werror_flag" ||
9587 test ! -s conftest.err
9588 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 ac_lo=0 ac_mid=0
9590 while :; do
9591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009592/* confdefs.h. */
9593_ACEOF
9594cat confdefs.h >>conftest.$ac_ext
9595cat >>conftest.$ac_ext <<_ACEOF
9596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009597$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009598 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009599int
9600main ()
9601{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009603test_array [0] = 0
9604
9605 ;
9606 return 0;
9607}
9608_ACEOF
9609rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610if { (ac_try="$ac_compile"
9611case "(($ac_try" in
9612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9613 *) ac_try_echo=$ac_try;;
9614esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009618 grep -v '^ *+' conftest.er1 >conftest.err
9619 rm -f conftest.er1
9620 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622 (exit $ac_status); } && {
9623 test -z "$ac_c_werror_flag" ||
9624 test ! -s conftest.err
9625 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 ac_hi=$ac_mid; break
9627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009629sed 's/^/| /' conftest.$ac_ext >&5
9630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631 ac_lo=`expr $ac_mid + 1`
9632 if test $ac_lo -le $ac_mid; then
9633 ac_lo= ac_hi=
9634 break
9635 fi
9636 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638
9639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 done
9641else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009643sed 's/^/| /' conftest.$ac_ext >&5
9644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* confdefs.h. */
9647_ACEOF
9648cat confdefs.h >>conftest.$ac_ext
9649cat >>conftest.$ac_ext <<_ACEOF
9650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009652 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009653int
9654main ()
9655{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009657test_array [0] = 0
9658
9659 ;
9660 return 0;
9661}
9662_ACEOF
9663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664if { (ac_try="$ac_compile"
9665case "(($ac_try" in
9666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9667 *) ac_try_echo=$ac_try;;
9668esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009672 grep -v '^ *+' conftest.er1 >conftest.err
9673 rm -f conftest.er1
9674 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676 (exit $ac_status); } && {
9677 test -z "$ac_c_werror_flag" ||
9678 test ! -s conftest.err
9679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_hi=-1 ac_mid=-1
9681 while :; do
9682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009683/* confdefs.h. */
9684_ACEOF
9685cat confdefs.h >>conftest.$ac_ext
9686cat >>conftest.$ac_ext <<_ACEOF
9687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009688$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009689 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009690int
9691main ()
9692{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009694test_array [0] = 0
9695
9696 ;
9697 return 0;
9698}
9699_ACEOF
9700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701if { (ac_try="$ac_compile"
9702case "(($ac_try" in
9703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9704 *) ac_try_echo=$ac_try;;
9705esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009709 grep -v '^ *+' conftest.er1 >conftest.err
9710 rm -f conftest.er1
9711 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713 (exit $ac_status); } && {
9714 test -z "$ac_c_werror_flag" ||
9715 test ! -s conftest.err
9716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 ac_lo=$ac_mid; break
9718else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009720sed 's/^/| /' conftest.$ac_ext >&5
9721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722 ac_hi=`expr '(' $ac_mid ')' - 1`
9723 if test $ac_mid -le $ac_hi; then
9724 ac_lo= ac_hi=
9725 break
9726 fi
9727 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729
9730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 done
9732else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009734sed 's/^/| /' conftest.$ac_ext >&5
9735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738
9739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741
9742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009743# Binary search between lo and hi bounds.
9744while test "x$ac_lo" != "x$ac_hi"; do
9745 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009747/* confdefs.h. */
9748_ACEOF
9749cat confdefs.h >>conftest.$ac_ext
9750cat >>conftest.$ac_ext <<_ACEOF
9751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009753 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009754int
9755main ()
9756{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009757static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009758test_array [0] = 0
9759
9760 ;
9761 return 0;
9762}
9763_ACEOF
9764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765if { (ac_try="$ac_compile"
9766case "(($ac_try" in
9767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9768 *) ac_try_echo=$ac_try;;
9769esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009773 grep -v '^ *+' conftest.er1 >conftest.err
9774 rm -f conftest.er1
9775 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777 (exit $ac_status); } && {
9778 test -z "$ac_c_werror_flag" ||
9779 test ! -s conftest.err
9780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ac_hi=$ac_mid
9782else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009784sed 's/^/| /' conftest.$ac_ext >&5
9785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788
9789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009790done
9791case $ac_lo in
9792?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009793'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009794 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009795See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009796echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009797See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009798 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799 else
9800 ac_cv_sizeof_double=0
9801 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009802esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009805/* confdefs.h. */
9806_ACEOF
9807cat confdefs.h >>conftest.$ac_ext
9808cat >>conftest.$ac_ext <<_ACEOF
9809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009810$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009811 typedef double ac__type_sizeof_;
9812static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9813static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009814#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009815#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009816int
9817main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009818{
Martin v. Löwis11437992002-04-12 09:54:03 +00009819
9820 FILE *f = fopen ("conftest.val", "w");
9821 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009823 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009826 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009828 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 }
9830 else
9831 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009833 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009835 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009838
9839 ;
9840 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009841}
Martin v. Löwis11437992002-04-12 09:54:03 +00009842_ACEOF
9843rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844if { (ac_try="$ac_link"
9845case "(($ac_try" in
9846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9847 *) ac_try_echo=$ac_try;;
9848esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 { (case "(($ac_try" in
9855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9856 *) ac_try_echo=$ac_try;;
9857esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 (exit $ac_status); }; }; then
9863 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009864else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009865 echo "$as_me: program exited with status $ac_status" >&5
9866echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009867sed 's/^/| /' conftest.$ac_ext >&5
9868
Martin v. Löwis11437992002-04-12 09:54:03 +00009869( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009871 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009872See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009873echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009874See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009875 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876 else
9877 ac_cv_sizeof_double=0
9878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880rm -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 +00009881fi
9882rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009883fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009884{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9885echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886
9887
9888
Martin v. Löwis11437992002-04-12 09:54:03 +00009889cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009890#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009891_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009892
9893
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009894{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9895echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9896if test "${ac_cv_type_fpos_t+set}" = set; then
9897 echo $ECHO_N "(cached) $ECHO_C" >&6
9898else
9899 cat >conftest.$ac_ext <<_ACEOF
9900/* confdefs.h. */
9901_ACEOF
9902cat confdefs.h >>conftest.$ac_ext
9903cat >>conftest.$ac_ext <<_ACEOF
9904/* end confdefs.h. */
9905$ac_includes_default
9906typedef fpos_t ac__type_new_;
9907int
9908main ()
9909{
9910if ((ac__type_new_ *) 0)
9911 return 0;
9912if (sizeof (ac__type_new_))
9913 return 0;
9914 ;
9915 return 0;
9916}
9917_ACEOF
9918rm -f conftest.$ac_objext
9919if { (ac_try="$ac_compile"
9920case "(($ac_try" in
9921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9922 *) ac_try_echo=$ac_try;;
9923esac
9924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9925 (eval "$ac_compile") 2>conftest.er1
9926 ac_status=$?
9927 grep -v '^ *+' conftest.er1 >conftest.err
9928 rm -f conftest.er1
9929 cat conftest.err >&5
9930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931 (exit $ac_status); } && {
9932 test -z "$ac_c_werror_flag" ||
9933 test ! -s conftest.err
9934 } && test -s conftest.$ac_objext; then
9935 ac_cv_type_fpos_t=yes
9936else
9937 echo "$as_me: failed program was:" >&5
9938sed 's/^/| /' conftest.$ac_ext >&5
9939
9940 ac_cv_type_fpos_t=no
9941fi
9942
9943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9944fi
9945{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9946echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948# The cast to long int works around a bug in the HP C Compiler
9949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9951# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009952{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9953echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009954if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009955 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009956else
Martin v. Löwis11437992002-04-12 09:54:03 +00009957 if test "$cross_compiling" = yes; then
9958 # Depending upon the size, compute the lo and hi bounds.
9959cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009960/* confdefs.h. */
9961_ACEOF
9962cat confdefs.h >>conftest.$ac_ext
9963cat >>conftest.$ac_ext <<_ACEOF
9964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009965$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009966 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009967int
9968main ()
9969{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009970static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009971test_array [0] = 0
9972
9973 ;
9974 return 0;
9975}
9976_ACEOF
9977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978if { (ac_try="$ac_compile"
9979case "(($ac_try" in
9980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9981 *) ac_try_echo=$ac_try;;
9982esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009986 grep -v '^ *+' conftest.er1 >conftest.err
9987 rm -f conftest.er1
9988 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990 (exit $ac_status); } && {
9991 test -z "$ac_c_werror_flag" ||
9992 test ! -s conftest.err
9993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009994 ac_lo=0 ac_mid=0
9995 while :; do
9996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009997/* confdefs.h. */
9998_ACEOF
9999cat confdefs.h >>conftest.$ac_ext
10000cat >>conftest.$ac_ext <<_ACEOF
10001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010002$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010003 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010004int
10005main ()
10006{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010007static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010008test_array [0] = 0
10009
10010 ;
10011 return 0;
10012}
10013_ACEOF
10014rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015if { (ac_try="$ac_compile"
10016case "(($ac_try" in
10017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10018 *) ac_try_echo=$ac_try;;
10019esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010023 grep -v '^ *+' conftest.er1 >conftest.err
10024 rm -f conftest.er1
10025 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010027 (exit $ac_status); } && {
10028 test -z "$ac_c_werror_flag" ||
10029 test ! -s conftest.err
10030 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010031 ac_hi=$ac_mid; break
10032else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010034sed 's/^/| /' conftest.$ac_ext >&5
10035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036 ac_lo=`expr $ac_mid + 1`
10037 if test $ac_lo -le $ac_mid; then
10038 ac_lo= ac_hi=
10039 break
10040 fi
10041 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010043
10044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 done
10046else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010048sed 's/^/| /' conftest.$ac_ext >&5
10049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* confdefs.h. */
10052_ACEOF
10053cat confdefs.h >>conftest.$ac_ext
10054cat >>conftest.$ac_ext <<_ACEOF
10055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010056$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010057 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010058int
10059main ()
10060{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010062test_array [0] = 0
10063
10064 ;
10065 return 0;
10066}
10067_ACEOF
10068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069if { (ac_try="$ac_compile"
10070case "(($ac_try" in
10071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072 *) ac_try_echo=$ac_try;;
10073esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010077 grep -v '^ *+' conftest.er1 >conftest.err
10078 rm -f conftest.er1
10079 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081 (exit $ac_status); } && {
10082 test -z "$ac_c_werror_flag" ||
10083 test ! -s conftest.err
10084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_hi=-1 ac_mid=-1
10086 while :; do
10087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010088/* confdefs.h. */
10089_ACEOF
10090cat confdefs.h >>conftest.$ac_ext
10091cat >>conftest.$ac_ext <<_ACEOF
10092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010093$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010094 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010095int
10096main ()
10097{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010098static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010099test_array [0] = 0
10100
10101 ;
10102 return 0;
10103}
10104_ACEOF
10105rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106if { (ac_try="$ac_compile"
10107case "(($ac_try" in
10108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10109 *) ac_try_echo=$ac_try;;
10110esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010114 grep -v '^ *+' conftest.er1 >conftest.err
10115 rm -f conftest.er1
10116 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118 (exit $ac_status); } && {
10119 test -z "$ac_c_werror_flag" ||
10120 test ! -s conftest.err
10121 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 ac_lo=$ac_mid; break
10123else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010125sed 's/^/| /' conftest.$ac_ext >&5
10126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127 ac_hi=`expr '(' $ac_mid ')' - 1`
10128 if test $ac_mid -le $ac_hi; then
10129 ac_lo= ac_hi=
10130 break
10131 fi
10132 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134
10135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 done
10137else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010139sed 's/^/| /' conftest.$ac_ext >&5
10140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143
10144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146
10147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010148# Binary search between lo and hi bounds.
10149while test "x$ac_lo" != "x$ac_hi"; do
10150 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010152/* confdefs.h. */
10153_ACEOF
10154cat confdefs.h >>conftest.$ac_ext
10155cat >>conftest.$ac_ext <<_ACEOF
10156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010157$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010158 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010159int
10160main ()
10161{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010162static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010163test_array [0] = 0
10164
10165 ;
10166 return 0;
10167}
10168_ACEOF
10169rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170if { (ac_try="$ac_compile"
10171case "(($ac_try" in
10172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10173 *) ac_try_echo=$ac_try;;
10174esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010178 grep -v '^ *+' conftest.er1 >conftest.err
10179 rm -f conftest.er1
10180 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182 (exit $ac_status); } && {
10183 test -z "$ac_c_werror_flag" ||
10184 test ! -s conftest.err
10185 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_hi=$ac_mid
10187else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010189sed 's/^/| /' conftest.$ac_ext >&5
10190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193
10194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010195done
10196case $ac_lo in
10197?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010198'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010199 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010200See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010201echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010202See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010203 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204 else
10205 ac_cv_sizeof_fpos_t=0
10206 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010207esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010208else
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* confdefs.h. */
10211_ACEOF
10212cat confdefs.h >>conftest.$ac_ext
10213cat >>conftest.$ac_ext <<_ACEOF
10214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010215$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010216 typedef fpos_t ac__type_sizeof_;
10217static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10218static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010219#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010220#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010221int
10222main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010223{
Martin v. Löwis11437992002-04-12 09:54:03 +000010224
10225 FILE *f = fopen ("conftest.val", "w");
10226 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010228 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010231 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010233 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 }
10235 else
10236 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010238 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010240 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010243
10244 ;
10245 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010246}
Martin v. Löwis11437992002-04-12 09:54:03 +000010247_ACEOF
10248rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249if { (ac_try="$ac_link"
10250case "(($ac_try" in
10251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10252 *) ac_try_echo=$ac_try;;
10253esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259 { (case "(($ac_try" in
10260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10261 *) ac_try_echo=$ac_try;;
10262esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 (exit $ac_status); }; }; then
10268 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010270 echo "$as_me: program exited with status $ac_status" >&5
10271echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010272sed 's/^/| /' conftest.$ac_ext >&5
10273
Martin v. Löwis11437992002-04-12 09:54:03 +000010274( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010275if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010276 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010277See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010278echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010279See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010280 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281 else
10282 ac_cv_sizeof_fpos_t=0
10283 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285rm -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 +000010286fi
10287rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010288fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010289{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10290echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291
10292
10293
Martin v. Löwis11437992002-04-12 09:54:03 +000010294cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010295#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010296_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010297
Michael W. Hudson54241132001-12-07 15:38:26 +000010298
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010299{ echo "$as_me:$LINENO: checking for size_t" >&5
10300echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10301if test "${ac_cv_type_size_t+set}" = set; then
10302 echo $ECHO_N "(cached) $ECHO_C" >&6
10303else
10304 cat >conftest.$ac_ext <<_ACEOF
10305/* confdefs.h. */
10306_ACEOF
10307cat confdefs.h >>conftest.$ac_ext
10308cat >>conftest.$ac_ext <<_ACEOF
10309/* end confdefs.h. */
10310$ac_includes_default
10311typedef size_t ac__type_new_;
10312int
10313main ()
10314{
10315if ((ac__type_new_ *) 0)
10316 return 0;
10317if (sizeof (ac__type_new_))
10318 return 0;
10319 ;
10320 return 0;
10321}
10322_ACEOF
10323rm -f conftest.$ac_objext
10324if { (ac_try="$ac_compile"
10325case "(($ac_try" in
10326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10327 *) ac_try_echo=$ac_try;;
10328esac
10329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10330 (eval "$ac_compile") 2>conftest.er1
10331 ac_status=$?
10332 grep -v '^ *+' conftest.er1 >conftest.err
10333 rm -f conftest.er1
10334 cat conftest.err >&5
10335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336 (exit $ac_status); } && {
10337 test -z "$ac_c_werror_flag" ||
10338 test ! -s conftest.err
10339 } && test -s conftest.$ac_objext; then
10340 ac_cv_type_size_t=yes
10341else
10342 echo "$as_me: failed program was:" >&5
10343sed 's/^/| /' conftest.$ac_ext >&5
10344
10345 ac_cv_type_size_t=no
10346fi
10347
10348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10349fi
10350{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10351echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353# The cast to long int works around a bug in the HP C Compiler
10354# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10355# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10356# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010357{ echo "$as_me:$LINENO: checking size of size_t" >&5
10358echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010359if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010360 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010361else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010362 if test "$cross_compiling" = yes; then
10363 # Depending upon the size, compute the lo and hi bounds.
10364cat >conftest.$ac_ext <<_ACEOF
10365/* confdefs.h. */
10366_ACEOF
10367cat confdefs.h >>conftest.$ac_ext
10368cat >>conftest.$ac_ext <<_ACEOF
10369/* end confdefs.h. */
10370$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010371 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010372int
10373main ()
10374{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010376test_array [0] = 0
10377
10378 ;
10379 return 0;
10380}
10381_ACEOF
10382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383if { (ac_try="$ac_compile"
10384case "(($ac_try" in
10385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10386 *) ac_try_echo=$ac_try;;
10387esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010390 ac_status=$?
10391 grep -v '^ *+' conftest.er1 >conftest.err
10392 rm -f conftest.er1
10393 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395 (exit $ac_status); } && {
10396 test -z "$ac_c_werror_flag" ||
10397 test ! -s conftest.err
10398 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010399 ac_lo=0 ac_mid=0
10400 while :; do
10401 cat >conftest.$ac_ext <<_ACEOF
10402/* confdefs.h. */
10403_ACEOF
10404cat confdefs.h >>conftest.$ac_ext
10405cat >>conftest.$ac_ext <<_ACEOF
10406/* end confdefs.h. */
10407$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010408 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010409int
10410main ()
10411{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010413test_array [0] = 0
10414
10415 ;
10416 return 0;
10417}
10418_ACEOF
10419rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420if { (ac_try="$ac_compile"
10421case "(($ac_try" in
10422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10423 *) ac_try_echo=$ac_try;;
10424esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010427 ac_status=$?
10428 grep -v '^ *+' conftest.er1 >conftest.err
10429 rm -f conftest.er1
10430 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432 (exit $ac_status); } && {
10433 test -z "$ac_c_werror_flag" ||
10434 test ! -s conftest.err
10435 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436 ac_hi=$ac_mid; break
10437else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010438 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439sed 's/^/| /' conftest.$ac_ext >&5
10440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441 ac_lo=`expr $ac_mid + 1`
10442 if test $ac_lo -le $ac_mid; then
10443 ac_lo= ac_hi=
10444 break
10445 fi
10446 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448
10449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450 done
10451else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010452 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453sed 's/^/| /' conftest.$ac_ext >&5
10454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010456/* confdefs.h. */
10457_ACEOF
10458cat confdefs.h >>conftest.$ac_ext
10459cat >>conftest.$ac_ext <<_ACEOF
10460/* end confdefs.h. */
10461$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010462 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010463int
10464main ()
10465{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010466static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467test_array [0] = 0
10468
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474if { (ac_try="$ac_compile"
10475case "(($ac_try" in
10476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10477 *) ac_try_echo=$ac_try;;
10478esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481 ac_status=$?
10482 grep -v '^ *+' conftest.er1 >conftest.err
10483 rm -f conftest.er1
10484 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010486 (exit $ac_status); } && {
10487 test -z "$ac_c_werror_flag" ||
10488 test ! -s conftest.err
10489 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010490 ac_hi=-1 ac_mid=-1
10491 while :; do
10492 cat >conftest.$ac_ext <<_ACEOF
10493/* confdefs.h. */
10494_ACEOF
10495cat confdefs.h >>conftest.$ac_ext
10496cat >>conftest.$ac_ext <<_ACEOF
10497/* end confdefs.h. */
10498$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010499 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500int
10501main ()
10502{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010503static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010504test_array [0] = 0
10505
10506 ;
10507 return 0;
10508}
10509_ACEOF
10510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511if { (ac_try="$ac_compile"
10512case "(($ac_try" in
10513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10514 *) ac_try_echo=$ac_try;;
10515esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518 ac_status=$?
10519 grep -v '^ *+' conftest.er1 >conftest.err
10520 rm -f conftest.er1
10521 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010523 (exit $ac_status); } && {
10524 test -z "$ac_c_werror_flag" ||
10525 test ! -s conftest.err
10526 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527 ac_lo=$ac_mid; break
10528else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010529 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530sed 's/^/| /' conftest.$ac_ext >&5
10531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532 ac_hi=`expr '(' $ac_mid ')' - 1`
10533 if test $ac_mid -le $ac_hi; then
10534 ac_lo= ac_hi=
10535 break
10536 fi
10537 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539
10540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541 done
10542else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010543 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544sed 's/^/| /' conftest.$ac_ext >&5
10545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010548
10549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010551
10552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553# Binary search between lo and hi bounds.
10554while test "x$ac_lo" != "x$ac_hi"; do
10555 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10556 cat >conftest.$ac_ext <<_ACEOF
10557/* confdefs.h. */
10558_ACEOF
10559cat confdefs.h >>conftest.$ac_ext
10560cat >>conftest.$ac_ext <<_ACEOF
10561/* end confdefs.h. */
10562$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010563 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564int
10565main ()
10566{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010567static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010568test_array [0] = 0
10569
10570 ;
10571 return 0;
10572}
10573_ACEOF
10574rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575if { (ac_try="$ac_compile"
10576case "(($ac_try" in
10577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10578 *) ac_try_echo=$ac_try;;
10579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582 ac_status=$?
10583 grep -v '^ *+' conftest.er1 >conftest.err
10584 rm -f conftest.er1
10585 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587 (exit $ac_status); } && {
10588 test -z "$ac_c_werror_flag" ||
10589 test ! -s conftest.err
10590 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591 ac_hi=$ac_mid
10592else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010593 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594sed 's/^/| /' conftest.$ac_ext >&5
10595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598
10599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600done
10601case $ac_lo in
10602?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010603'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010604 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010606echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010608 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010609 else
10610 ac_cv_sizeof_size_t=0
10611 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612esac
10613else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010614 cat >conftest.$ac_ext <<_ACEOF
10615/* confdefs.h. */
10616_ACEOF
10617cat confdefs.h >>conftest.$ac_ext
10618cat >>conftest.$ac_ext <<_ACEOF
10619/* end confdefs.h. */
10620$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010621 typedef size_t ac__type_sizeof_;
10622static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10623static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624#include <stdio.h>
10625#include <stdlib.h>
10626int
10627main ()
10628{
10629
10630 FILE *f = fopen ("conftest.val", "w");
10631 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010633 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010636 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010638 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010639 }
10640 else
10641 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010643 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010645 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648
10649 ;
10650 return 0;
10651}
10652_ACEOF
10653rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654if { (ac_try="$ac_link"
10655case "(($ac_try" in
10656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10657 *) ac_try_echo=$ac_try;;
10658esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010664 { (case "(($ac_try" in
10665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10666 *) ac_try_echo=$ac_try;;
10667esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672 (exit $ac_status); }; }; then
10673 ac_cv_sizeof_size_t=`cat conftest.val`
10674else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010675 echo "$as_me: program exited with status $ac_status" >&5
10676echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677sed 's/^/| /' conftest.$ac_ext >&5
10678
10679( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010681 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010683echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010685 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686 else
10687 ac_cv_sizeof_size_t=0
10688 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690rm -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 +000010691fi
10692rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010693fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010694{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10695echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696
10697
10698
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699cat >>confdefs.h <<_ACEOF
10700#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10701_ACEOF
10702
10703
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010704{ echo "$as_me:$LINENO: checking for pid_t" >&5
10705echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10706if test "${ac_cv_type_pid_t+set}" = set; then
10707 echo $ECHO_N "(cached) $ECHO_C" >&6
10708else
10709 cat >conftest.$ac_ext <<_ACEOF
10710/* confdefs.h. */
10711_ACEOF
10712cat confdefs.h >>conftest.$ac_ext
10713cat >>conftest.$ac_ext <<_ACEOF
10714/* end confdefs.h. */
10715$ac_includes_default
10716typedef pid_t ac__type_new_;
10717int
10718main ()
10719{
10720if ((ac__type_new_ *) 0)
10721 return 0;
10722if (sizeof (ac__type_new_))
10723 return 0;
10724 ;
10725 return 0;
10726}
10727_ACEOF
10728rm -f conftest.$ac_objext
10729if { (ac_try="$ac_compile"
10730case "(($ac_try" in
10731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10732 *) ac_try_echo=$ac_try;;
10733esac
10734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10735 (eval "$ac_compile") 2>conftest.er1
10736 ac_status=$?
10737 grep -v '^ *+' conftest.er1 >conftest.err
10738 rm -f conftest.er1
10739 cat conftest.err >&5
10740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10741 (exit $ac_status); } && {
10742 test -z "$ac_c_werror_flag" ||
10743 test ! -s conftest.err
10744 } && test -s conftest.$ac_objext; then
10745 ac_cv_type_pid_t=yes
10746else
10747 echo "$as_me: failed program was:" >&5
10748sed 's/^/| /' conftest.$ac_ext >&5
10749
10750 ac_cv_type_pid_t=no
10751fi
10752
10753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10754fi
10755{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10756echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10757
Christian Heimes400adb02008-02-01 08:12:03 +000010758# The cast to long int works around a bug in the HP C Compiler
10759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10761# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010762{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10763echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010764if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010765 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010766else
10767 if test "$cross_compiling" = yes; then
10768 # Depending upon the size, compute the lo and hi bounds.
10769cat >conftest.$ac_ext <<_ACEOF
10770/* confdefs.h. */
10771_ACEOF
10772cat confdefs.h >>conftest.$ac_ext
10773cat >>conftest.$ac_ext <<_ACEOF
10774/* end confdefs.h. */
10775$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010776 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010777int
10778main ()
10779{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010781test_array [0] = 0
10782
10783 ;
10784 return 0;
10785}
10786_ACEOF
10787rm -f conftest.$ac_objext
10788if { (ac_try="$ac_compile"
10789case "(($ac_try" in
10790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10791 *) ac_try_echo=$ac_try;;
10792esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010794 (eval "$ac_compile") 2>conftest.er1
10795 ac_status=$?
10796 grep -v '^ *+' conftest.er1 >conftest.err
10797 rm -f conftest.er1
10798 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010800 (exit $ac_status); } && {
10801 test -z "$ac_c_werror_flag" ||
10802 test ! -s conftest.err
10803 } && test -s conftest.$ac_objext; then
10804 ac_lo=0 ac_mid=0
10805 while :; do
10806 cat >conftest.$ac_ext <<_ACEOF
10807/* confdefs.h. */
10808_ACEOF
10809cat confdefs.h >>conftest.$ac_ext
10810cat >>conftest.$ac_ext <<_ACEOF
10811/* end confdefs.h. */
10812$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010813 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010814int
10815main ()
10816{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010818test_array [0] = 0
10819
10820 ;
10821 return 0;
10822}
10823_ACEOF
10824rm -f conftest.$ac_objext
10825if { (ac_try="$ac_compile"
10826case "(($ac_try" in
10827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10828 *) ac_try_echo=$ac_try;;
10829esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010831 (eval "$ac_compile") 2>conftest.er1
10832 ac_status=$?
10833 grep -v '^ *+' conftest.er1 >conftest.err
10834 rm -f conftest.er1
10835 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010837 (exit $ac_status); } && {
10838 test -z "$ac_c_werror_flag" ||
10839 test ! -s conftest.err
10840 } && test -s conftest.$ac_objext; then
10841 ac_hi=$ac_mid; break
10842else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010843 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010844sed 's/^/| /' conftest.$ac_ext >&5
10845
10846 ac_lo=`expr $ac_mid + 1`
10847 if test $ac_lo -le $ac_mid; then
10848 ac_lo= ac_hi=
10849 break
10850 fi
10851 ac_mid=`expr 2 '*' $ac_mid + 1`
10852fi
10853
10854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10855 done
10856else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010857 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010858sed 's/^/| /' conftest.$ac_ext >&5
10859
10860 cat >conftest.$ac_ext <<_ACEOF
10861/* confdefs.h. */
10862_ACEOF
10863cat confdefs.h >>conftest.$ac_ext
10864cat >>conftest.$ac_ext <<_ACEOF
10865/* end confdefs.h. */
10866$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010867 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010868int
10869main ()
10870{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010872test_array [0] = 0
10873
10874 ;
10875 return 0;
10876}
10877_ACEOF
10878rm -f conftest.$ac_objext
10879if { (ac_try="$ac_compile"
10880case "(($ac_try" in
10881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10882 *) ac_try_echo=$ac_try;;
10883esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010885 (eval "$ac_compile") 2>conftest.er1
10886 ac_status=$?
10887 grep -v '^ *+' conftest.er1 >conftest.err
10888 rm -f conftest.er1
10889 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010891 (exit $ac_status); } && {
10892 test -z "$ac_c_werror_flag" ||
10893 test ! -s conftest.err
10894 } && test -s conftest.$ac_objext; then
10895 ac_hi=-1 ac_mid=-1
10896 while :; do
10897 cat >conftest.$ac_ext <<_ACEOF
10898/* confdefs.h. */
10899_ACEOF
10900cat confdefs.h >>conftest.$ac_ext
10901cat >>conftest.$ac_ext <<_ACEOF
10902/* end confdefs.h. */
10903$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010904 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010905int
10906main ()
10907{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010908static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010909test_array [0] = 0
10910
10911 ;
10912 return 0;
10913}
10914_ACEOF
10915rm -f conftest.$ac_objext
10916if { (ac_try="$ac_compile"
10917case "(($ac_try" in
10918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10919 *) ac_try_echo=$ac_try;;
10920esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010922 (eval "$ac_compile") 2>conftest.er1
10923 ac_status=$?
10924 grep -v '^ *+' conftest.er1 >conftest.err
10925 rm -f conftest.er1
10926 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010928 (exit $ac_status); } && {
10929 test -z "$ac_c_werror_flag" ||
10930 test ! -s conftest.err
10931 } && test -s conftest.$ac_objext; then
10932 ac_lo=$ac_mid; break
10933else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010934 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010935sed 's/^/| /' conftest.$ac_ext >&5
10936
10937 ac_hi=`expr '(' $ac_mid ')' - 1`
10938 if test $ac_mid -le $ac_hi; then
10939 ac_lo= ac_hi=
10940 break
10941 fi
10942 ac_mid=`expr 2 '*' $ac_mid`
10943fi
10944
10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10946 done
10947else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010948 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010949sed 's/^/| /' conftest.$ac_ext >&5
10950
10951 ac_lo= ac_hi=
10952fi
10953
10954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10955fi
10956
10957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10958# Binary search between lo and hi bounds.
10959while test "x$ac_lo" != "x$ac_hi"; do
10960 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10961 cat >conftest.$ac_ext <<_ACEOF
10962/* confdefs.h. */
10963_ACEOF
10964cat confdefs.h >>conftest.$ac_ext
10965cat >>conftest.$ac_ext <<_ACEOF
10966/* end confdefs.h. */
10967$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010968 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010969int
10970main ()
10971{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010972static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010973test_array [0] = 0
10974
10975 ;
10976 return 0;
10977}
10978_ACEOF
10979rm -f conftest.$ac_objext
10980if { (ac_try="$ac_compile"
10981case "(($ac_try" in
10982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10983 *) ac_try_echo=$ac_try;;
10984esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010986 (eval "$ac_compile") 2>conftest.er1
10987 ac_status=$?
10988 grep -v '^ *+' conftest.er1 >conftest.err
10989 rm -f conftest.er1
10990 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010992 (exit $ac_status); } && {
10993 test -z "$ac_c_werror_flag" ||
10994 test ! -s conftest.err
10995 } && test -s conftest.$ac_objext; then
10996 ac_hi=$ac_mid
10997else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010998 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010999sed 's/^/| /' conftest.$ac_ext >&5
11000
11001 ac_lo=`expr '(' $ac_mid ')' + 1`
11002fi
11003
11004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11005done
11006case $ac_lo in
11007?*) ac_cv_sizeof_pid_t=$ac_lo;;
11008'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011009 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011010See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011011echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011012See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011013 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011014 else
11015 ac_cv_sizeof_pid_t=0
11016 fi ;;
11017esac
11018else
11019 cat >conftest.$ac_ext <<_ACEOF
11020/* confdefs.h. */
11021_ACEOF
11022cat confdefs.h >>conftest.$ac_ext
11023cat >>conftest.$ac_ext <<_ACEOF
11024/* end confdefs.h. */
11025$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011026 typedef pid_t ac__type_sizeof_;
11027static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11028static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011029#include <stdio.h>
11030#include <stdlib.h>
11031int
11032main ()
11033{
11034
11035 FILE *f = fopen ("conftest.val", "w");
11036 if (! f)
11037 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011038 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011039 {
11040 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011041 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011042 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011043 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011044 }
11045 else
11046 {
11047 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011048 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011049 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011050 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011051 }
11052 return ferror (f) || fclose (f) != 0;
11053
11054 ;
11055 return 0;
11056}
11057_ACEOF
11058rm -f conftest$ac_exeext
11059if { (ac_try="$ac_link"
11060case "(($ac_try" in
11061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11062 *) ac_try_echo=$ac_try;;
11063esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011065 (eval "$ac_link") 2>&5
11066 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11069 { (case "(($ac_try" in
11070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11071 *) ac_try_echo=$ac_try;;
11072esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011074 (eval "$ac_try") 2>&5
11075 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011077 (exit $ac_status); }; }; then
11078 ac_cv_sizeof_pid_t=`cat conftest.val`
11079else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011080 echo "$as_me: program exited with status $ac_status" >&5
11081echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011082sed 's/^/| /' conftest.$ac_ext >&5
11083
11084( exit $ac_status )
11085if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011086 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011087See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011088echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011089See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011090 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011091 else
11092 ac_cv_sizeof_pid_t=0
11093 fi
11094fi
11095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11096fi
11097rm -f conftest.val
11098fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011099{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11100echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011101
11102
11103
11104cat >>confdefs.h <<_ACEOF
11105#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11106_ACEOF
11107
11108
Michael W. Hudson54241132001-12-07 15:38:26 +000011109
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011110{ echo "$as_me:$LINENO: checking for long long support" >&5
11111echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011112have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011114/* confdefs.h. */
11115_ACEOF
11116cat confdefs.h >>conftest.$ac_ext
11117cat >>conftest.$ac_ext <<_ACEOF
11118/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011119
Martin v. Löwis11437992002-04-12 09:54:03 +000011120int
11121main ()
11122{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011123long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 ;
11125 return 0;
11126}
11127_ACEOF
11128rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129if { (ac_try="$ac_compile"
11130case "(($ac_try" in
11131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11132 *) ac_try_echo=$ac_try;;
11133esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011137 grep -v '^ *+' conftest.er1 >conftest.err
11138 rm -f conftest.er1
11139 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141 (exit $ac_status); } && {
11142 test -z "$ac_c_werror_flag" ||
11143 test ! -s conftest.err
11144 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011145
11146
11147cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011148#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011149_ACEOF
11150
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011151 have_long_long=yes
11152
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011153else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011155sed 's/^/| /' conftest.$ac_ext >&5
11156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011157
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159
11160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011161{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11162echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011163if test "$have_long_long" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011164{ echo "$as_me:$LINENO: checking for long long" >&5
11165echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11166if test "${ac_cv_type_long_long+set}" = set; then
11167 echo $ECHO_N "(cached) $ECHO_C" >&6
11168else
11169 cat >conftest.$ac_ext <<_ACEOF
11170/* confdefs.h. */
11171_ACEOF
11172cat confdefs.h >>conftest.$ac_ext
11173cat >>conftest.$ac_ext <<_ACEOF
11174/* end confdefs.h. */
11175$ac_includes_default
11176typedef long long ac__type_new_;
11177int
11178main ()
11179{
11180if ((ac__type_new_ *) 0)
11181 return 0;
11182if (sizeof (ac__type_new_))
11183 return 0;
11184 ;
11185 return 0;
11186}
11187_ACEOF
11188rm -f conftest.$ac_objext
11189if { (ac_try="$ac_compile"
11190case "(($ac_try" in
11191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11192 *) ac_try_echo=$ac_try;;
11193esac
11194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11195 (eval "$ac_compile") 2>conftest.er1
11196 ac_status=$?
11197 grep -v '^ *+' conftest.er1 >conftest.err
11198 rm -f conftest.er1
11199 cat conftest.err >&5
11200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11201 (exit $ac_status); } && {
11202 test -z "$ac_c_werror_flag" ||
11203 test ! -s conftest.err
11204 } && test -s conftest.$ac_objext; then
11205 ac_cv_type_long_long=yes
11206else
11207 echo "$as_me: failed program was:" >&5
11208sed 's/^/| /' conftest.$ac_ext >&5
11209
11210 ac_cv_type_long_long=no
11211fi
11212
11213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11214fi
11215{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11216echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011218# The cast to long int works around a bug in the HP C Compiler
11219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11221# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011222{ echo "$as_me:$LINENO: checking size of long long" >&5
11223echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011224if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011225 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011226else
Martin v. Löwis11437992002-04-12 09:54:03 +000011227 if test "$cross_compiling" = yes; then
11228 # Depending upon the size, compute the lo and hi bounds.
11229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011230/* confdefs.h. */
11231_ACEOF
11232cat confdefs.h >>conftest.$ac_ext
11233cat >>conftest.$ac_ext <<_ACEOF
11234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011235$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011236 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011237int
11238main ()
11239{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011241test_array [0] = 0
11242
11243 ;
11244 return 0;
11245}
11246_ACEOF
11247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248if { (ac_try="$ac_compile"
11249case "(($ac_try" in
11250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11251 *) ac_try_echo=$ac_try;;
11252esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011256 grep -v '^ *+' conftest.er1 >conftest.err
11257 rm -f conftest.er1
11258 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260 (exit $ac_status); } && {
11261 test -z "$ac_c_werror_flag" ||
11262 test ! -s conftest.err
11263 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ac_lo=0 ac_mid=0
11265 while :; do
11266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011267/* confdefs.h. */
11268_ACEOF
11269cat confdefs.h >>conftest.$ac_ext
11270cat >>conftest.$ac_ext <<_ACEOF
11271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011272$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011273 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011274int
11275main ()
11276{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011277static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011278test_array [0] = 0
11279
11280 ;
11281 return 0;
11282}
11283_ACEOF
11284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285if { (ac_try="$ac_compile"
11286case "(($ac_try" in
11287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11288 *) ac_try_echo=$ac_try;;
11289esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011293 grep -v '^ *+' conftest.er1 >conftest.err
11294 rm -f conftest.er1
11295 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011297 (exit $ac_status); } && {
11298 test -z "$ac_c_werror_flag" ||
11299 test ! -s conftest.err
11300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011301 ac_hi=$ac_mid; break
11302else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011304sed 's/^/| /' conftest.$ac_ext >&5
11305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306 ac_lo=`expr $ac_mid + 1`
11307 if test $ac_lo -le $ac_mid; then
11308 ac_lo= ac_hi=
11309 break
11310 fi
11311 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313
11314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 done
11316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011318sed 's/^/| /' conftest.$ac_ext >&5
11319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011321/* confdefs.h. */
11322_ACEOF
11323cat confdefs.h >>conftest.$ac_ext
11324cat >>conftest.$ac_ext <<_ACEOF
11325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011326$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011327 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011328int
11329main ()
11330{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011332test_array [0] = 0
11333
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339if { (ac_try="$ac_compile"
11340case "(($ac_try" in
11341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11342 *) ac_try_echo=$ac_try;;
11343esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011347 grep -v '^ *+' conftest.er1 >conftest.err
11348 rm -f conftest.er1
11349 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351 (exit $ac_status); } && {
11352 test -z "$ac_c_werror_flag" ||
11353 test ! -s conftest.err
11354 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 ac_hi=-1 ac_mid=-1
11356 while :; do
11357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* confdefs.h. */
11359_ACEOF
11360cat confdefs.h >>conftest.$ac_ext
11361cat >>conftest.$ac_ext <<_ACEOF
11362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011363$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011364 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011365int
11366main ()
11367{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011368static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011369test_array [0] = 0
11370
11371 ;
11372 return 0;
11373}
11374_ACEOF
11375rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376if { (ac_try="$ac_compile"
11377case "(($ac_try" in
11378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11379 *) ac_try_echo=$ac_try;;
11380esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011384 grep -v '^ *+' conftest.er1 >conftest.err
11385 rm -f conftest.er1
11386 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388 (exit $ac_status); } && {
11389 test -z "$ac_c_werror_flag" ||
11390 test ! -s conftest.err
11391 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 ac_lo=$ac_mid; break
11393else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011395sed 's/^/| /' conftest.$ac_ext >&5
11396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397 ac_hi=`expr '(' $ac_mid ')' - 1`
11398 if test $ac_mid -le $ac_hi; then
11399 ac_lo= ac_hi=
11400 break
11401 fi
11402 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 done
11407else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011409sed 's/^/| /' conftest.$ac_ext >&5
11410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413
11414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416
11417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011418# Binary search between lo and hi bounds.
11419while test "x$ac_lo" != "x$ac_hi"; do
11420 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011422/* confdefs.h. */
11423_ACEOF
11424cat confdefs.h >>conftest.$ac_ext
11425cat >>conftest.$ac_ext <<_ACEOF
11426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011427$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011428 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011429int
11430main ()
11431{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011433test_array [0] = 0
11434
11435 ;
11436 return 0;
11437}
11438_ACEOF
11439rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440if { (ac_try="$ac_compile"
11441case "(($ac_try" in
11442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11443 *) ac_try_echo=$ac_try;;
11444esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011448 grep -v '^ *+' conftest.er1 >conftest.err
11449 rm -f conftest.er1
11450 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452 (exit $ac_status); } && {
11453 test -z "$ac_c_werror_flag" ||
11454 test ! -s conftest.err
11455 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ac_hi=$ac_mid
11457else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011459sed 's/^/| /' conftest.$ac_ext >&5
11460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463
11464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011465done
11466case $ac_lo in
11467?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011470See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011471echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011472See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011473 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474 else
11475 ac_cv_sizeof_long_long=0
11476 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011477esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011478else
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* confdefs.h. */
11481_ACEOF
11482cat confdefs.h >>conftest.$ac_ext
11483cat >>conftest.$ac_ext <<_ACEOF
11484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011485$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011486 typedef long long ac__type_sizeof_;
11487static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11488static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011489#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011490#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011491int
11492main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011493{
Martin v. Löwis11437992002-04-12 09:54:03 +000011494
11495 FILE *f = fopen ("conftest.val", "w");
11496 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011498 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011501 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011503 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011504 }
11505 else
11506 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011508 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011510 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
11514 ;
11515 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011516}
Martin v. Löwis11437992002-04-12 09:54:03 +000011517_ACEOF
11518rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519if { (ac_try="$ac_link"
11520case "(($ac_try" in
11521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11522 *) ac_try_echo=$ac_try;;
11523esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529 { (case "(($ac_try" in
11530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11531 *) ac_try_echo=$ac_try;;
11532esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 (exit $ac_status); }; }; then
11538 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011539else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011540 echo "$as_me: program exited with status $ac_status" >&5
11541echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011542sed 's/^/| /' conftest.$ac_ext >&5
11543
Martin v. Löwis11437992002-04-12 09:54:03 +000011544( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011546 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011547See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011548echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011549See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011550 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551 else
11552 ac_cv_sizeof_long_long=0
11553 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555rm -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 +000011556fi
11557rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011558fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011559{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11560echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011561
11562
11563
Martin v. Löwis11437992002-04-12 09:54:03 +000011564cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011565#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011566_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011567
Michael W. Hudson54241132001-12-07 15:38:26 +000011568
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011569fi
11570
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011571{ echo "$as_me:$LINENO: checking for long double support" >&5
11572echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011573have_long_double=no
11574cat >conftest.$ac_ext <<_ACEOF
11575/* confdefs.h. */
11576_ACEOF
11577cat confdefs.h >>conftest.$ac_ext
11578cat >>conftest.$ac_ext <<_ACEOF
11579/* end confdefs.h. */
11580
11581int
11582main ()
11583{
11584long double x; x = (long double)0;
11585 ;
11586 return 0;
11587}
11588_ACEOF
11589rm -f conftest.$ac_objext
11590if { (ac_try="$ac_compile"
11591case "(($ac_try" in
11592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11593 *) ac_try_echo=$ac_try;;
11594esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011596 (eval "$ac_compile") 2>conftest.er1
11597 ac_status=$?
11598 grep -v '^ *+' conftest.er1 >conftest.err
11599 rm -f conftest.er1
11600 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011602 (exit $ac_status); } && {
11603 test -z "$ac_c_werror_flag" ||
11604 test ! -s conftest.err
11605 } && test -s conftest.$ac_objext; then
11606
11607
11608cat >>confdefs.h <<\_ACEOF
11609#define HAVE_LONG_DOUBLE 1
11610_ACEOF
11611
11612 have_long_double=yes
11613
11614else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011615 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011616sed 's/^/| /' conftest.$ac_ext >&5
11617
11618
11619fi
11620
11621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011622{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11623echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011624if test "$have_long_double" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011625{ echo "$as_me:$LINENO: checking for long double" >&5
11626echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11627if test "${ac_cv_type_long_double+set}" = set; then
11628 echo $ECHO_N "(cached) $ECHO_C" >&6
11629else
11630 cat >conftest.$ac_ext <<_ACEOF
11631/* confdefs.h. */
11632_ACEOF
11633cat confdefs.h >>conftest.$ac_ext
11634cat >>conftest.$ac_ext <<_ACEOF
11635/* end confdefs.h. */
11636$ac_includes_default
11637typedef long double ac__type_new_;
11638int
11639main ()
11640{
11641if ((ac__type_new_ *) 0)
11642 return 0;
11643if (sizeof (ac__type_new_))
11644 return 0;
11645 ;
11646 return 0;
11647}
11648_ACEOF
11649rm -f conftest.$ac_objext
11650if { (ac_try="$ac_compile"
11651case "(($ac_try" in
11652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11653 *) ac_try_echo=$ac_try;;
11654esac
11655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11656 (eval "$ac_compile") 2>conftest.er1
11657 ac_status=$?
11658 grep -v '^ *+' conftest.er1 >conftest.err
11659 rm -f conftest.er1
11660 cat conftest.err >&5
11661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662 (exit $ac_status); } && {
11663 test -z "$ac_c_werror_flag" ||
11664 test ! -s conftest.err
11665 } && test -s conftest.$ac_objext; then
11666 ac_cv_type_long_double=yes
11667else
11668 echo "$as_me: failed program was:" >&5
11669sed 's/^/| /' conftest.$ac_ext >&5
11670
11671 ac_cv_type_long_double=no
11672fi
11673
11674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11675fi
11676{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11677echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11678
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011679# The cast to long int works around a bug in the HP C Compiler
11680# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11681# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11682# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011683{ echo "$as_me:$LINENO: checking size of long double" >&5
11684echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011685if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011686 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011687else
11688 if test "$cross_compiling" = yes; then
11689 # Depending upon the size, compute the lo and hi bounds.
11690cat >conftest.$ac_ext <<_ACEOF
11691/* confdefs.h. */
11692_ACEOF
11693cat confdefs.h >>conftest.$ac_ext
11694cat >>conftest.$ac_ext <<_ACEOF
11695/* end confdefs.h. */
11696$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011697 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011698int
11699main ()
11700{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011701static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011702test_array [0] = 0
11703
11704 ;
11705 return 0;
11706}
11707_ACEOF
11708rm -f conftest.$ac_objext
11709if { (ac_try="$ac_compile"
11710case "(($ac_try" in
11711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11712 *) ac_try_echo=$ac_try;;
11713esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011715 (eval "$ac_compile") 2>conftest.er1
11716 ac_status=$?
11717 grep -v '^ *+' conftest.er1 >conftest.err
11718 rm -f conftest.er1
11719 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011721 (exit $ac_status); } && {
11722 test -z "$ac_c_werror_flag" ||
11723 test ! -s conftest.err
11724 } && test -s conftest.$ac_objext; then
11725 ac_lo=0 ac_mid=0
11726 while :; do
11727 cat >conftest.$ac_ext <<_ACEOF
11728/* confdefs.h. */
11729_ACEOF
11730cat confdefs.h >>conftest.$ac_ext
11731cat >>conftest.$ac_ext <<_ACEOF
11732/* end confdefs.h. */
11733$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011734 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011735int
11736main ()
11737{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011738static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011739test_array [0] = 0
11740
11741 ;
11742 return 0;
11743}
11744_ACEOF
11745rm -f conftest.$ac_objext
11746if { (ac_try="$ac_compile"
11747case "(($ac_try" in
11748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11749 *) ac_try_echo=$ac_try;;
11750esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011752 (eval "$ac_compile") 2>conftest.er1
11753 ac_status=$?
11754 grep -v '^ *+' conftest.er1 >conftest.err
11755 rm -f conftest.er1
11756 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011758 (exit $ac_status); } && {
11759 test -z "$ac_c_werror_flag" ||
11760 test ! -s conftest.err
11761 } && test -s conftest.$ac_objext; then
11762 ac_hi=$ac_mid; break
11763else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011764 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011765sed 's/^/| /' conftest.$ac_ext >&5
11766
11767 ac_lo=`expr $ac_mid + 1`
11768 if test $ac_lo -le $ac_mid; then
11769 ac_lo= ac_hi=
11770 break
11771 fi
11772 ac_mid=`expr 2 '*' $ac_mid + 1`
11773fi
11774
11775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11776 done
11777else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011778 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011779sed 's/^/| /' conftest.$ac_ext >&5
11780
11781 cat >conftest.$ac_ext <<_ACEOF
11782/* confdefs.h. */
11783_ACEOF
11784cat confdefs.h >>conftest.$ac_ext
11785cat >>conftest.$ac_ext <<_ACEOF
11786/* end confdefs.h. */
11787$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011788 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011789int
11790main ()
11791{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793test_array [0] = 0
11794
11795 ;
11796 return 0;
11797}
11798_ACEOF
11799rm -f conftest.$ac_objext
11800if { (ac_try="$ac_compile"
11801case "(($ac_try" in
11802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11803 *) ac_try_echo=$ac_try;;
11804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011806 (eval "$ac_compile") 2>conftest.er1
11807 ac_status=$?
11808 grep -v '^ *+' conftest.er1 >conftest.err
11809 rm -f conftest.er1
11810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812 (exit $ac_status); } && {
11813 test -z "$ac_c_werror_flag" ||
11814 test ! -s conftest.err
11815 } && test -s conftest.$ac_objext; then
11816 ac_hi=-1 ac_mid=-1
11817 while :; do
11818 cat >conftest.$ac_ext <<_ACEOF
11819/* confdefs.h. */
11820_ACEOF
11821cat confdefs.h >>conftest.$ac_ext
11822cat >>conftest.$ac_ext <<_ACEOF
11823/* end confdefs.h. */
11824$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011825 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011826int
11827main ()
11828{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011829static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011830test_array [0] = 0
11831
11832 ;
11833 return 0;
11834}
11835_ACEOF
11836rm -f conftest.$ac_objext
11837if { (ac_try="$ac_compile"
11838case "(($ac_try" in
11839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11840 *) ac_try_echo=$ac_try;;
11841esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011843 (eval "$ac_compile") 2>conftest.er1
11844 ac_status=$?
11845 grep -v '^ *+' conftest.er1 >conftest.err
11846 rm -f conftest.er1
11847 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011849 (exit $ac_status); } && {
11850 test -z "$ac_c_werror_flag" ||
11851 test ! -s conftest.err
11852 } && test -s conftest.$ac_objext; then
11853 ac_lo=$ac_mid; break
11854else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011855 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011856sed 's/^/| /' conftest.$ac_ext >&5
11857
11858 ac_hi=`expr '(' $ac_mid ')' - 1`
11859 if test $ac_mid -le $ac_hi; then
11860 ac_lo= ac_hi=
11861 break
11862 fi
11863 ac_mid=`expr 2 '*' $ac_mid`
11864fi
11865
11866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11867 done
11868else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011869 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011870sed 's/^/| /' conftest.$ac_ext >&5
11871
11872 ac_lo= ac_hi=
11873fi
11874
11875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11876fi
11877
11878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11879# Binary search between lo and hi bounds.
11880while test "x$ac_lo" != "x$ac_hi"; do
11881 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11882 cat >conftest.$ac_ext <<_ACEOF
11883/* confdefs.h. */
11884_ACEOF
11885cat confdefs.h >>conftest.$ac_ext
11886cat >>conftest.$ac_ext <<_ACEOF
11887/* end confdefs.h. */
11888$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011889 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011890int
11891main ()
11892{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011894test_array [0] = 0
11895
11896 ;
11897 return 0;
11898}
11899_ACEOF
11900rm -f conftest.$ac_objext
11901if { (ac_try="$ac_compile"
11902case "(($ac_try" in
11903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11904 *) ac_try_echo=$ac_try;;
11905esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011907 (eval "$ac_compile") 2>conftest.er1
11908 ac_status=$?
11909 grep -v '^ *+' conftest.er1 >conftest.err
11910 rm -f conftest.er1
11911 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011913 (exit $ac_status); } && {
11914 test -z "$ac_c_werror_flag" ||
11915 test ! -s conftest.err
11916 } && test -s conftest.$ac_objext; then
11917 ac_hi=$ac_mid
11918else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011919 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011920sed 's/^/| /' conftest.$ac_ext >&5
11921
11922 ac_lo=`expr '(' $ac_mid ')' + 1`
11923fi
11924
11925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11926done
11927case $ac_lo in
11928?*) ac_cv_sizeof_long_double=$ac_lo;;
11929'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011930 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011931See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011932echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011933See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011934 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011935 else
11936 ac_cv_sizeof_long_double=0
11937 fi ;;
11938esac
11939else
11940 cat >conftest.$ac_ext <<_ACEOF
11941/* confdefs.h. */
11942_ACEOF
11943cat confdefs.h >>conftest.$ac_ext
11944cat >>conftest.$ac_ext <<_ACEOF
11945/* end confdefs.h. */
11946$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011947 typedef long double ac__type_sizeof_;
11948static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11949static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011950#include <stdio.h>
11951#include <stdlib.h>
11952int
11953main ()
11954{
11955
11956 FILE *f = fopen ("conftest.val", "w");
11957 if (! f)
11958 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011959 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960 {
11961 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011962 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011963 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011964 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011965 }
11966 else
11967 {
11968 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011969 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011970 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011971 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011972 }
11973 return ferror (f) || fclose (f) != 0;
11974
11975 ;
11976 return 0;
11977}
11978_ACEOF
11979rm -f conftest$ac_exeext
11980if { (ac_try="$ac_link"
11981case "(($ac_try" in
11982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11983 *) ac_try_echo=$ac_try;;
11984esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 (eval "$ac_link") 2>&5
11987 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011989 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11990 { (case "(($ac_try" in
11991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11992 *) ac_try_echo=$ac_try;;
11993esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995 (eval "$ac_try") 2>&5
11996 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011998 (exit $ac_status); }; }; then
11999 ac_cv_sizeof_long_double=`cat conftest.val`
12000else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012001 echo "$as_me: program exited with status $ac_status" >&5
12002echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012003sed 's/^/| /' conftest.$ac_ext >&5
12004
12005( exit $ac_status )
12006if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012007 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012009echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012011 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012012 else
12013 ac_cv_sizeof_long_double=0
12014 fi
12015fi
12016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12017fi
12018rm -f conftest.val
12019fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012020{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12021echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012022
12023
12024
12025cat >>confdefs.h <<_ACEOF
12026#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12027_ACEOF
12028
12029
12030fi
12031
12032
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012033{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12034echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012035have_c99_bool=no
12036cat >conftest.$ac_ext <<_ACEOF
12037/* confdefs.h. */
12038_ACEOF
12039cat confdefs.h >>conftest.$ac_ext
12040cat >>conftest.$ac_ext <<_ACEOF
12041/* end confdefs.h. */
12042
12043int
12044main ()
12045{
12046_Bool x; x = (_Bool)0;
12047 ;
12048 return 0;
12049}
12050_ACEOF
12051rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052if { (ac_try="$ac_compile"
12053case "(($ac_try" in
12054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12055 *) ac_try_echo=$ac_try;;
12056esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012059 ac_status=$?
12060 grep -v '^ *+' conftest.er1 >conftest.err
12061 rm -f conftest.er1
12062 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064 (exit $ac_status); } && {
12065 test -z "$ac_c_werror_flag" ||
12066 test ! -s conftest.err
12067 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012068
12069
12070cat >>confdefs.h <<\_ACEOF
12071#define HAVE_C99_BOOL 1
12072_ACEOF
12073
12074 have_c99_bool=yes
12075
12076else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012077 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012078sed 's/^/| /' conftest.$ac_ext >&5
12079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080
Thomas Woutersb2137042007-02-01 18:02:27 +000012081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012082
12083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012084{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12085echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012086if test "$have_c99_bool" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012087{ echo "$as_me:$LINENO: checking for _Bool" >&5
12088echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12089if test "${ac_cv_type__Bool+set}" = set; then
12090 echo $ECHO_N "(cached) $ECHO_C" >&6
12091else
12092 cat >conftest.$ac_ext <<_ACEOF
12093/* confdefs.h. */
12094_ACEOF
12095cat confdefs.h >>conftest.$ac_ext
12096cat >>conftest.$ac_ext <<_ACEOF
12097/* end confdefs.h. */
12098$ac_includes_default
12099typedef _Bool ac__type_new_;
12100int
12101main ()
12102{
12103if ((ac__type_new_ *) 0)
12104 return 0;
12105if (sizeof (ac__type_new_))
12106 return 0;
12107 ;
12108 return 0;
12109}
12110_ACEOF
12111rm -f conftest.$ac_objext
12112if { (ac_try="$ac_compile"
12113case "(($ac_try" in
12114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12115 *) ac_try_echo=$ac_try;;
12116esac
12117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12118 (eval "$ac_compile") 2>conftest.er1
12119 ac_status=$?
12120 grep -v '^ *+' conftest.er1 >conftest.err
12121 rm -f conftest.er1
12122 cat conftest.err >&5
12123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12124 (exit $ac_status); } && {
12125 test -z "$ac_c_werror_flag" ||
12126 test ! -s conftest.err
12127 } && test -s conftest.$ac_objext; then
12128 ac_cv_type__Bool=yes
12129else
12130 echo "$as_me: failed program was:" >&5
12131sed 's/^/| /' conftest.$ac_ext >&5
12132
12133 ac_cv_type__Bool=no
12134fi
12135
12136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12137fi
12138{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12139echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012141# The cast to long int works around a bug in the HP C Compiler
12142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12144# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012145{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12146echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012147if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012148 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012149else
12150 if test "$cross_compiling" = yes; then
12151 # Depending upon the size, compute the lo and hi bounds.
12152cat >conftest.$ac_ext <<_ACEOF
12153/* confdefs.h. */
12154_ACEOF
12155cat confdefs.h >>conftest.$ac_ext
12156cat >>conftest.$ac_ext <<_ACEOF
12157/* end confdefs.h. */
12158$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012159 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012160int
12161main ()
12162{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012163static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012164test_array [0] = 0
12165
12166 ;
12167 return 0;
12168}
12169_ACEOF
12170rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171if { (ac_try="$ac_compile"
12172case "(($ac_try" in
12173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12174 *) ac_try_echo=$ac_try;;
12175esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012178 ac_status=$?
12179 grep -v '^ *+' conftest.er1 >conftest.err
12180 rm -f conftest.er1
12181 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183 (exit $ac_status); } && {
12184 test -z "$ac_c_werror_flag" ||
12185 test ! -s conftest.err
12186 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012187 ac_lo=0 ac_mid=0
12188 while :; do
12189 cat >conftest.$ac_ext <<_ACEOF
12190/* confdefs.h. */
12191_ACEOF
12192cat confdefs.h >>conftest.$ac_ext
12193cat >>conftest.$ac_ext <<_ACEOF
12194/* end confdefs.h. */
12195$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012196 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012197int
12198main ()
12199{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012201test_array [0] = 0
12202
12203 ;
12204 return 0;
12205}
12206_ACEOF
12207rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208if { (ac_try="$ac_compile"
12209case "(($ac_try" in
12210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12211 *) ac_try_echo=$ac_try;;
12212esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012215 ac_status=$?
12216 grep -v '^ *+' conftest.er1 >conftest.err
12217 rm -f conftest.er1
12218 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220 (exit $ac_status); } && {
12221 test -z "$ac_c_werror_flag" ||
12222 test ! -s conftest.err
12223 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012224 ac_hi=$ac_mid; break
12225else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012226 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012227sed 's/^/| /' conftest.$ac_ext >&5
12228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229 ac_lo=`expr $ac_mid + 1`
12230 if test $ac_lo -le $ac_mid; then
12231 ac_lo= ac_hi=
12232 break
12233 fi
12234 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236
12237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012238 done
12239else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012240 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012241sed 's/^/| /' conftest.$ac_ext >&5
12242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012244/* confdefs.h. */
12245_ACEOF
12246cat confdefs.h >>conftest.$ac_ext
12247cat >>conftest.$ac_ext <<_ACEOF
12248/* end confdefs.h. */
12249$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012250 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012251int
12252main ()
12253{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012255test_array [0] = 0
12256
12257 ;
12258 return 0;
12259}
12260_ACEOF
12261rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262if { (ac_try="$ac_compile"
12263case "(($ac_try" in
12264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12265 *) ac_try_echo=$ac_try;;
12266esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012269 ac_status=$?
12270 grep -v '^ *+' conftest.er1 >conftest.err
12271 rm -f conftest.er1
12272 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274 (exit $ac_status); } && {
12275 test -z "$ac_c_werror_flag" ||
12276 test ! -s conftest.err
12277 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012278 ac_hi=-1 ac_mid=-1
12279 while :; do
12280 cat >conftest.$ac_ext <<_ACEOF
12281/* confdefs.h. */
12282_ACEOF
12283cat confdefs.h >>conftest.$ac_ext
12284cat >>conftest.$ac_ext <<_ACEOF
12285/* end confdefs.h. */
12286$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012287 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012288int
12289main ()
12290{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012292test_array [0] = 0
12293
12294 ;
12295 return 0;
12296}
12297_ACEOF
12298rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299if { (ac_try="$ac_compile"
12300case "(($ac_try" in
12301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12302 *) ac_try_echo=$ac_try;;
12303esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012306 ac_status=$?
12307 grep -v '^ *+' conftest.er1 >conftest.err
12308 rm -f conftest.er1
12309 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311 (exit $ac_status); } && {
12312 test -z "$ac_c_werror_flag" ||
12313 test ! -s conftest.err
12314 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012315 ac_lo=$ac_mid; break
12316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012317 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012318sed 's/^/| /' conftest.$ac_ext >&5
12319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320 ac_hi=`expr '(' $ac_mid ')' - 1`
12321 if test $ac_mid -le $ac_hi; then
12322 ac_lo= ac_hi=
12323 break
12324 fi
12325 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327
12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012329 done
12330else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012331 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012332sed 's/^/| /' conftest.$ac_ext >&5
12333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336
12337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339
12340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012341# Binary search between lo and hi bounds.
12342while test "x$ac_lo" != "x$ac_hi"; do
12343 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12344 cat >conftest.$ac_ext <<_ACEOF
12345/* confdefs.h. */
12346_ACEOF
12347cat confdefs.h >>conftest.$ac_ext
12348cat >>conftest.$ac_ext <<_ACEOF
12349/* end confdefs.h. */
12350$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012351 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012352int
12353main ()
12354{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012356test_array [0] = 0
12357
12358 ;
12359 return 0;
12360}
12361_ACEOF
12362rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363if { (ac_try="$ac_compile"
12364case "(($ac_try" in
12365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12366 *) ac_try_echo=$ac_try;;
12367esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012370 ac_status=$?
12371 grep -v '^ *+' conftest.er1 >conftest.err
12372 rm -f conftest.er1
12373 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375 (exit $ac_status); } && {
12376 test -z "$ac_c_werror_flag" ||
12377 test ! -s conftest.err
12378 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012379 ac_hi=$ac_mid
12380else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012381 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012382sed 's/^/| /' conftest.$ac_ext >&5
12383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386
12387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012388done
12389case $ac_lo in
12390?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012392 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012393See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012394echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012395See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012396 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397 else
12398 ac_cv_sizeof__Bool=0
12399 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012400esac
12401else
12402 cat >conftest.$ac_ext <<_ACEOF
12403/* confdefs.h. */
12404_ACEOF
12405cat confdefs.h >>conftest.$ac_ext
12406cat >>conftest.$ac_ext <<_ACEOF
12407/* end confdefs.h. */
12408$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012409 typedef _Bool ac__type_sizeof_;
12410static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12411static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012412#include <stdio.h>
12413#include <stdlib.h>
12414int
12415main ()
12416{
12417
12418 FILE *f = fopen ("conftest.val", "w");
12419 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012421 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012422 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012424 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012426 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012427 }
12428 else
12429 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012431 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012433 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012434 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012436
12437 ;
12438 return 0;
12439}
12440_ACEOF
12441rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442if { (ac_try="$ac_link"
12443case "(($ac_try" in
12444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12445 *) ac_try_echo=$ac_try;;
12446esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012449 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452 { (case "(($ac_try" in
12453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12454 *) ac_try_echo=$ac_try;;
12455esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012458 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012460 (exit $ac_status); }; }; then
12461 ac_cv_sizeof__Bool=`cat conftest.val`
12462else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012463 echo "$as_me: program exited with status $ac_status" >&5
12464echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012465sed 's/^/| /' conftest.$ac_ext >&5
12466
12467( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012470See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012471echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012472See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012473 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474 else
12475 ac_cv_sizeof__Bool=0
12476 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478rm -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 +000012479fi
12480rm -f conftest.val
12481fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012482{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12483echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484
12485
12486
Thomas Woutersb2137042007-02-01 18:02:27 +000012487cat >>confdefs.h <<_ACEOF
12488#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12489_ACEOF
12490
12491
12492fi
12493
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012494{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12495echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012496if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012497 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012498else
12499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012500/* confdefs.h. */
12501_ACEOF
12502cat confdefs.h >>conftest.$ac_ext
12503cat >>conftest.$ac_ext <<_ACEOF
12504/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012505#ifdef HAVE_STDINT_H
12506 #include <stdint.h>
12507 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012508
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012509typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012510int
12511main ()
12512{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012513if ((ac__type_new_ *) 0)
12514 return 0;
12515if (sizeof (ac__type_new_))
12516 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ;
12518 return 0;
12519}
12520_ACEOF
12521rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522if { (ac_try="$ac_compile"
12523case "(($ac_try" in
12524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12525 *) ac_try_echo=$ac_try;;
12526esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012530 grep -v '^ *+' conftest.er1 >conftest.err
12531 rm -f conftest.er1
12532 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534 (exit $ac_status); } && {
12535 test -z "$ac_c_werror_flag" ||
12536 test ! -s conftest.err
12537 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012538 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012539else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012541sed 's/^/| /' conftest.$ac_ext >&5
12542
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012543 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545
12546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012547fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012548{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12549echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12550if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012551
12552cat >>confdefs.h <<_ACEOF
12553#define HAVE_UINTPTR_T 1
12554_ACEOF
12555
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012556{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12557echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12558if test "${ac_cv_type_uintptr_t+set}" = set; then
12559 echo $ECHO_N "(cached) $ECHO_C" >&6
12560else
12561 cat >conftest.$ac_ext <<_ACEOF
12562/* confdefs.h. */
12563_ACEOF
12564cat confdefs.h >>conftest.$ac_ext
12565cat >>conftest.$ac_ext <<_ACEOF
12566/* end confdefs.h. */
12567$ac_includes_default
12568typedef uintptr_t ac__type_new_;
12569int
12570main ()
12571{
12572if ((ac__type_new_ *) 0)
12573 return 0;
12574if (sizeof (ac__type_new_))
12575 return 0;
12576 ;
12577 return 0;
12578}
12579_ACEOF
12580rm -f conftest.$ac_objext
12581if { (ac_try="$ac_compile"
12582case "(($ac_try" in
12583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12584 *) ac_try_echo=$ac_try;;
12585esac
12586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12587 (eval "$ac_compile") 2>conftest.er1
12588 ac_status=$?
12589 grep -v '^ *+' conftest.er1 >conftest.err
12590 rm -f conftest.er1
12591 cat conftest.err >&5
12592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12593 (exit $ac_status); } && {
12594 test -z "$ac_c_werror_flag" ||
12595 test ! -s conftest.err
12596 } && test -s conftest.$ac_objext; then
12597 ac_cv_type_uintptr_t=yes
12598else
12599 echo "$as_me: failed program was:" >&5
12600sed 's/^/| /' conftest.$ac_ext >&5
12601
12602 ac_cv_type_uintptr_t=no
12603fi
12604
12605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12606fi
12607{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12608echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012610# The cast to long int works around a bug in the HP C Compiler
12611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12613# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012614{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12615echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012616if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012617 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012618else
Martin v. Löwis11437992002-04-12 09:54:03 +000012619 if test "$cross_compiling" = yes; then
12620 # Depending upon the size, compute the lo and hi bounds.
12621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012622/* confdefs.h. */
12623_ACEOF
12624cat confdefs.h >>conftest.$ac_ext
12625cat >>conftest.$ac_ext <<_ACEOF
12626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012627$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012628 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012629int
12630main ()
12631{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012632static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012633test_array [0] = 0
12634
12635 ;
12636 return 0;
12637}
12638_ACEOF
12639rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012640if { (ac_try="$ac_compile"
12641case "(($ac_try" in
12642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12643 *) ac_try_echo=$ac_try;;
12644esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012648 grep -v '^ *+' conftest.er1 >conftest.err
12649 rm -f conftest.er1
12650 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012652 (exit $ac_status); } && {
12653 test -z "$ac_c_werror_flag" ||
12654 test ! -s conftest.err
12655 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ac_lo=0 ac_mid=0
12657 while :; do
12658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012659/* confdefs.h. */
12660_ACEOF
12661cat confdefs.h >>conftest.$ac_ext
12662cat >>conftest.$ac_ext <<_ACEOF
12663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012664$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012665 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012666int
12667main ()
12668{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012669static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012670test_array [0] = 0
12671
12672 ;
12673 return 0;
12674}
12675_ACEOF
12676rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677if { (ac_try="$ac_compile"
12678case "(($ac_try" in
12679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12680 *) ac_try_echo=$ac_try;;
12681esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012685 grep -v '^ *+' conftest.er1 >conftest.err
12686 rm -f conftest.er1
12687 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689 (exit $ac_status); } && {
12690 test -z "$ac_c_werror_flag" ||
12691 test ! -s conftest.err
12692 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 ac_hi=$ac_mid; break
12694else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012696sed 's/^/| /' conftest.$ac_ext >&5
12697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698 ac_lo=`expr $ac_mid + 1`
12699 if test $ac_lo -le $ac_mid; then
12700 ac_lo= ac_hi=
12701 break
12702 fi
12703 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705
12706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012707 done
12708else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012710sed 's/^/| /' conftest.$ac_ext >&5
12711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012713/* confdefs.h. */
12714_ACEOF
12715cat confdefs.h >>conftest.$ac_ext
12716cat >>conftest.$ac_ext <<_ACEOF
12717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012718$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012719 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012720int
12721main ()
12722{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012724test_array [0] = 0
12725
12726 ;
12727 return 0;
12728}
12729_ACEOF
12730rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731if { (ac_try="$ac_compile"
12732case "(($ac_try" in
12733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12734 *) ac_try_echo=$ac_try;;
12735esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012739 grep -v '^ *+' conftest.er1 >conftest.err
12740 rm -f conftest.er1
12741 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743 (exit $ac_status); } && {
12744 test -z "$ac_c_werror_flag" ||
12745 test ! -s conftest.err
12746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_hi=-1 ac_mid=-1
12748 while :; do
12749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012750/* confdefs.h. */
12751_ACEOF
12752cat confdefs.h >>conftest.$ac_ext
12753cat >>conftest.$ac_ext <<_ACEOF
12754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012755$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012756 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012757int
12758main ()
12759{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012761test_array [0] = 0
12762
12763 ;
12764 return 0;
12765}
12766_ACEOF
12767rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768if { (ac_try="$ac_compile"
12769case "(($ac_try" in
12770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12771 *) ac_try_echo=$ac_try;;
12772esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012776 grep -v '^ *+' conftest.er1 >conftest.err
12777 rm -f conftest.er1
12778 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780 (exit $ac_status); } && {
12781 test -z "$ac_c_werror_flag" ||
12782 test ! -s conftest.err
12783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 ac_lo=$ac_mid; break
12785else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012787sed 's/^/| /' conftest.$ac_ext >&5
12788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789 ac_hi=`expr '(' $ac_mid ')' - 1`
12790 if test $ac_mid -le $ac_hi; then
12791 ac_lo= ac_hi=
12792 break
12793 fi
12794 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796
12797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 done
12799else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012801sed 's/^/| /' conftest.$ac_ext >&5
12802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012805
12806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012808
12809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012810# Binary search between lo and hi bounds.
12811while test "x$ac_lo" != "x$ac_hi"; do
12812 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012814/* confdefs.h. */
12815_ACEOF
12816cat confdefs.h >>conftest.$ac_ext
12817cat >>conftest.$ac_ext <<_ACEOF
12818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012819$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012820 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012821int
12822main ()
12823{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012824static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012825test_array [0] = 0
12826
12827 ;
12828 return 0;
12829}
12830_ACEOF
12831rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832if { (ac_try="$ac_compile"
12833case "(($ac_try" in
12834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12835 *) ac_try_echo=$ac_try;;
12836esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012840 grep -v '^ *+' conftest.er1 >conftest.err
12841 rm -f conftest.er1
12842 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844 (exit $ac_status); } && {
12845 test -z "$ac_c_werror_flag" ||
12846 test ! -s conftest.err
12847 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012848 ac_hi=$ac_mid
12849else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012851sed 's/^/| /' conftest.$ac_ext >&5
12852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855
12856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012857done
12858case $ac_lo in
12859?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012861 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012862See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012863echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012864See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012865 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866 else
12867 ac_cv_sizeof_uintptr_t=0
12868 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012869esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012870else
Martin v. Löwis11437992002-04-12 09:54:03 +000012871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012872/* confdefs.h. */
12873_ACEOF
12874cat confdefs.h >>conftest.$ac_ext
12875cat >>conftest.$ac_ext <<_ACEOF
12876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012877$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012878 typedef uintptr_t ac__type_sizeof_;
12879static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12880static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012881#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012882#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012883int
12884main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012885{
Martin v. Löwis11437992002-04-12 09:54:03 +000012886
12887 FILE *f = fopen ("conftest.val", "w");
12888 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012890 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012893 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012895 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 }
12897 else
12898 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012900 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012902 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012905
12906 ;
12907 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012908}
Martin v. Löwis11437992002-04-12 09:54:03 +000012909_ACEOF
12910rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911if { (ac_try="$ac_link"
12912case "(($ac_try" in
12913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12914 *) ac_try_echo=$ac_try;;
12915esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921 { (case "(($ac_try" in
12922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12923 *) ac_try_echo=$ac_try;;
12924esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 (exit $ac_status); }; }; then
12930 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012931else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012932 echo "$as_me: program exited with status $ac_status" >&5
12933echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012934sed 's/^/| /' conftest.$ac_ext >&5
12935
Martin v. Löwis11437992002-04-12 09:54:03 +000012936( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012938 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012939See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012940echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012941See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012942 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943 else
12944 ac_cv_sizeof_uintptr_t=0
12945 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947rm -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 +000012948fi
12949rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012950fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012951{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12952echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953
12954
12955
Martin v. Löwis11437992002-04-12 09:54:03 +000012956cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012957#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012958_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012959
Michael W. Hudson54241132001-12-07 15:38:26 +000012960
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012961fi
12962
Thomas Wouters89f507f2006-12-13 04:49:30 +000012963
12964
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012965# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012966{ echo "$as_me:$LINENO: checking size of off_t" >&5
12967echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012968if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012970else
12971 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012972 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012973else
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012975/* confdefs.h. */
12976_ACEOF
12977cat confdefs.h >>conftest.$ac_ext
12978cat >>conftest.$ac_ext <<_ACEOF
12979/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012980#include <stdio.h>
12981#include <sys/types.h>
12982main()
12983{
12984 FILE *f=fopen("conftestval", "w");
12985 if (!f) exit(1);
12986 fprintf(f, "%d\n", sizeof(off_t));
12987 exit(0);
12988}
Martin v. Löwis11437992002-04-12 09:54:03 +000012989_ACEOF
12990rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012991if { (ac_try="$ac_link"
12992case "(($ac_try" in
12993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12994 *) ac_try_echo=$ac_try;;
12995esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001 { (case "(($ac_try" in
13002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13003 *) ac_try_echo=$ac_try;;
13004esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013010 ac_cv_sizeof_off_t=`cat conftestval`
13011else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013012 echo "$as_me: program exited with status $ac_status" >&5
13013echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013014sed 's/^/| /' conftest.$ac_ext >&5
13015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016( exit $ac_status )
13017ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019rm -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 +000013020fi
13021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022
13023
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013024fi
13025
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013026{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13027echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
13029cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013030#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013031_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013032
Michael W. Hudson54241132001-12-07 15:38:26 +000013033
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013034{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13035echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013036if test "$have_long_long" = yes
13037then
13038if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013039 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013040
Martin v. Löwis11437992002-04-12 09:54:03 +000013041cat >>confdefs.h <<\_ACEOF
13042#define HAVE_LARGEFILE_SUPPORT 1
13043_ACEOF
13044
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013045 { echo "$as_me:$LINENO: result: yes" >&5
13046echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013047else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013048 { echo "$as_me:$LINENO: result: no" >&5
13049echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013050fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013051else
13052 { echo "$as_me:$LINENO: result: no" >&5
13053echo "${ECHO_T}no" >&6; }
13054fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013055
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013056# AC_CHECK_SIZEOF() doesn't include <time.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013057{ echo "$as_me:$LINENO: checking size of time_t" >&5
13058echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013059if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013060 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013061else
13062 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013063 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013064else
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013066/* confdefs.h. */
13067_ACEOF
13068cat confdefs.h >>conftest.$ac_ext
13069cat >>conftest.$ac_ext <<_ACEOF
13070/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013071#include <stdio.h>
13072#include <time.h>
13073main()
13074{
13075 FILE *f=fopen("conftestval", "w");
13076 if (!f) exit(1);
13077 fprintf(f, "%d\n", sizeof(time_t));
13078 exit(0);
13079}
Martin v. Löwis11437992002-04-12 09:54:03 +000013080_ACEOF
13081rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013082if { (ac_try="$ac_link"
13083case "(($ac_try" in
13084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13085 *) ac_try_echo=$ac_try;;
13086esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013088 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013089 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013092 { (case "(($ac_try" in
13093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13094 *) ac_try_echo=$ac_try;;
13095esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013101 ac_cv_sizeof_time_t=`cat conftestval`
13102else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013103 echo "$as_me: program exited with status $ac_status" >&5
13104echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013105sed 's/^/| /' conftest.$ac_ext >&5
13106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107( exit $ac_status )
13108ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013110rm -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 +000013111fi
13112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013113
13114
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013115fi
13116
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013117{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13118echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013119
13120cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013121#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013122_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013123
Michael W. Hudson54241132001-12-07 15:38:26 +000013124
13125
Trent Mick635f6fb2000-08-23 21:33:05 +000013126# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013127ac_save_cc="$CC"
13128if test "$ac_cv_kpthread" = "yes"
13129then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013130elif test "$ac_cv_kthread" = "yes"
13131then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013132elif test "$ac_cv_pthread" = "yes"
13133then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013134fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013135{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13136echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013137have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013139/* confdefs.h. */
13140_ACEOF
13141cat confdefs.h >>conftest.$ac_ext
13142cat >>conftest.$ac_ext <<_ACEOF
13143/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013144#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013145int
13146main ()
13147{
Guido van Rossum12580492000-09-24 16:47:19 +000013148pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 ;
13150 return 0;
13151}
13152_ACEOF
13153rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013154if { (ac_try="$ac_compile"
13155case "(($ac_try" in
13156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13157 *) ac_try_echo=$ac_try;;
13158esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013162 grep -v '^ *+' conftest.er1 >conftest.err
13163 rm -f conftest.er1
13164 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013166 (exit $ac_status); } && {
13167 test -z "$ac_c_werror_flag" ||
13168 test ! -s conftest.err
13169 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013170 have_pthread_t=yes
13171else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013173sed 's/^/| /' conftest.$ac_ext >&5
13174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175
Trent Mick635f6fb2000-08-23 21:33:05 +000013176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177
13178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013179{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13180echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013181if test "$have_pthread_t" = yes ; then
13182 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013183 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13184echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013185 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013186 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013187else
13188 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013189 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013190else
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013192/* confdefs.h. */
13193_ACEOF
13194cat confdefs.h >>conftest.$ac_ext
13195cat >>conftest.$ac_ext <<_ACEOF
13196/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013197#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013198#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013199 main()
13200 {
13201 FILE *f=fopen("conftestval", "w");
13202 if (!f) exit(1);
13203 fprintf(f, "%d\n", sizeof(pthread_t));
13204 exit(0);
13205 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013206_ACEOF
13207rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013208if { (ac_try="$ac_link"
13209case "(($ac_try" in
13210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13211 *) ac_try_echo=$ac_try;;
13212esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218 { (case "(($ac_try" in
13219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13220 *) ac_try_echo=$ac_try;;
13221esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013223 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013227 ac_cv_sizeof_pthread_t=`cat conftestval`
13228else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013229 echo "$as_me: program exited with status $ac_status" >&5
13230echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013231sed 's/^/| /' conftest.$ac_ext >&5
13232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233( exit $ac_status )
13234ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013236rm -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 +000013237fi
13238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013239
13240
Trent Mick635f6fb2000-08-23 21:33:05 +000013241fi
13242
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013243 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13244echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013245
13246cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013247#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013248_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013249
13250fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013251CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013252
Michael W. Hudson54241132001-12-07 15:38:26 +000013253
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013254
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013255
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013256case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013257 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013258 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13259 ;;
13260 Darwin/*)
13261 OTHER_LIBTOOL_OPT=""
13262 ;;
13263esac
13264
13265
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013266ARCH_RUN_32BIT=""
13267
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013268case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013269 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013270 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13271 if test "${enable_universalsdk}"; then
13272 :
13273 else
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013274 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013275 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013276 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013277 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013278 Darwin/*)
Ronald Oussoren652f4de2010-02-07 11:54:03 +000013279 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013280 if test ${gcc_version} '<' 4.0
13281 then
13282 LIBTOOL_CRUFT="-lcc_dynamic"
13283 else
13284 LIBTOOL_CRUFT=""
13285 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013286 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013287 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013288else
13289 cat >conftest.$ac_ext <<_ACEOF
13290/* confdefs.h. */
13291_ACEOF
13292cat confdefs.h >>conftest.$ac_ext
13293cat >>conftest.$ac_ext <<_ACEOF
13294/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013295
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013296 #include <unistd.h>
13297 int main(int argc, char*argv[])
13298 {
13299 if (sizeof(long) == 4) {
13300 return 0;
13301 } else {
13302 return 1;
13303 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013304 }
13305
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013306_ACEOF
13307rm -f conftest$ac_exeext
13308if { (ac_try="$ac_link"
13309case "(($ac_try" in
13310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13311 *) ac_try_echo=$ac_try;;
13312esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013314 (eval "$ac_link") 2>&5
13315 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013317 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13318 { (case "(($ac_try" in
13319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13320 *) ac_try_echo=$ac_try;;
13321esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013323 (eval "$ac_try") 2>&5
13324 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013326 (exit $ac_status); }; }; then
13327 ac_osx_32bit=yes
13328else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013329 echo "$as_me: program exited with status $ac_status" >&5
13330echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013331sed 's/^/| /' conftest.$ac_ext >&5
13332
13333( exit $ac_status )
13334ac_osx_32bit=no
13335fi
13336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13337fi
13338
13339
13340
13341 if test "${ac_osx_32bit}" = "yes"; then
13342 case `arch` in
13343 i386)
13344 MACOSX_DEFAULT_ARCH="i386"
13345 ;;
13346 ppc)
13347 MACOSX_DEFAULT_ARCH="ppc"
13348 ;;
13349 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013350 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13351echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013352 { (exit 1); exit 1; }; }
13353 ;;
13354 esac
13355 else
13356 case `arch` in
13357 i386)
13358 MACOSX_DEFAULT_ARCH="x86_64"
13359 ;;
13360 ppc)
13361 MACOSX_DEFAULT_ARCH="ppc64"
13362 ;;
13363 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013364 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13365echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013366 { (exit 1); exit 1; }; }
13367 ;;
13368 esac
13369
13370 #ARCH_RUN_32BIT="true"
13371 fi
13372
13373 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013374 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013375 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013376esac
13377
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013378{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13379echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013380if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013381then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013382 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013384 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013385
Martin v. Löwis11437992002-04-12 09:54:03 +000013386cat >>confdefs.h <<\_ACEOF
13387#define WITH_NEXT_FRAMEWORK 1
13388_ACEOF
13389
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013390 { echo "$as_me:$LINENO: result: yes" >&5
13391echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013392 if test $enable_shared = "yes"
13393 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013394 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13395echo "$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 +000013396 { (exit 1); exit 1; }; }
13397 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013398else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013399 { echo "$as_me:$LINENO: result: no" >&5
13400echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013401fi
13402
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013403{ echo "$as_me:$LINENO: checking for dyld" >&5
13404echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013405case $ac_sys_system/$ac_sys_release in
13406 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013407
Martin v. Löwis11437992002-04-12 09:54:03 +000013408cat >>confdefs.h <<\_ACEOF
13409#define WITH_DYLD 1
13410_ACEOF
13411
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013412 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13413echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013414 ;;
13415 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013416 { echo "$as_me:$LINENO: result: no" >&5
13417echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013418 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013419esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013420
Guido van Rossum0a516c91994-09-12 10:58:40 +000013421# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013422
Michael W. Hudson54241132001-12-07 15:38:26 +000013423
13424
13425
13426
Guido van Rossum0a516c91994-09-12 10:58:40 +000013427# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013428# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013429{ echo "$as_me:$LINENO: checking SO" >&5
13430echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013431if test -z "$SO"
13432then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013433 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013434 hp*|HP*)
13435 case `uname -m` in
13436 ia64) SO=.so;;
13437 *) SO=.sl;;
13438 esac
13439 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013440 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013441 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013442 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013443else
13444 # this might also be a termcap variable, see #610332
13445 echo
13446 echo '====================================================================='
13447 echo '+ +'
13448 echo '+ WARNING: You have set SO in your environment. +'
13449 echo '+ Do you really mean to change the extension for shared libraries? +'
13450 echo '+ Continuing in 10 seconds to let you to ponder. +'
13451 echo '+ +'
13452 echo '====================================================================='
13453 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013454fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013455{ echo "$as_me:$LINENO: result: $SO" >&5
13456echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013457
Georg Brandlb1441c72009-01-03 22:33:39 +000013458
Thomas Wouters477c8d52006-05-27 19:21:47 +000013459cat >>confdefs.h <<_ACEOF
13460#define SHLIB_EXT "$SO"
13461_ACEOF
13462
Guido van Rossum0a516c91994-09-12 10:58:40 +000013463# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013464# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013465# (Shared libraries in this instance are shared modules to be loaded into
13466# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013467{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13468echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013469if test -z "$LDSHARED"
13470then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013472 AIX*)
13473 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013474 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013475 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013476 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013477 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013478 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013479 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013480 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013481 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013482 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013483 hp*|HP*)
13484 if test "$GCC" = "yes"
13485 then LDSHARED='$(CC) -shared'
13486 else LDSHARED='ld -b';
13487 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013488 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013489 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013490 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13491 if test "$enable_framework" ; then
13492 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013493 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13494 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013495 else
13496 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013497 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013498 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013499 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013500 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13501 if test "$enable_framework" ; then
13502 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013503 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13504 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013505 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013506 # No framework, use the Python app as bundle-loader
13507 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013508 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013509 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013510 Darwin/*)
13511 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13512 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013513
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013514 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013515 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013516 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013517 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013518 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013519 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13520 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013521 else
13522 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13523 if test "$enable_framework" ; then
13524 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013525 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13526 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013527 else
13528 # No framework, use the Python app as bundle-loader
13529 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13530 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13531 fi
13532 fi
13533 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013534 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013535 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013536 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013537 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013538 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013539 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013540 else
13541 LDSHARED="ld -Bshareable ${LDFLAGS}"
13542 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013543 OpenBSD*)
13544 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13545 then
13546 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13547 else
13548 case `uname -r` in
13549 [01].* | 2.[0-7] | 2.[0-7].*)
13550 LDSHARED="ld -Bshareable ${LDFLAGS}"
13551 ;;
13552 *)
13553 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13554 ;;
13555 esac
13556 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013557 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013558 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013559 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013560 then LDSHARED='$(CC) -shared'
13561 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013562 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013563 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013564 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013565 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013566 *) LDSHARED="ld";;
13567 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013568fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013569{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13570echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013571BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013572# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013573# library (module) -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013574{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13575echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013576if test -z "$CCSHARED"
13577then
Guido van Rossum07397971997-04-29 21:49:50 +000013578 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013579 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013580 then CCSHARED="-fPIC";
13581 elif test `uname -p` = sparc;
13582 then CCSHARED="-xcode=pic32";
13583 else CCSHARED="-Kpic";
13584 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013585 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013586 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013587 else CCSHARED="+z";
13588 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013589 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013590 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013591 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013592 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013593 if test "$GCC" = "yes"
13594 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013595 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013596 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013597 SCO_SV*)
13598 if test "$GCC" = "yes"
13599 then CCSHARED="-fPIC"
13600 else CCSHARED="-Kpic -belf"
13601 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013602 IRIX*/6*) case $CC in
13603 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013604 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013605 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013606 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013607 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013608fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013609{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13610echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013611# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013612# the python executable -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013613{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13614echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013615if test -z "$LINKFORSHARED"
13616then
Guido van Rossum07397971997-04-29 21:49:50 +000013617 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013618 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013619 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013620 LINKFORSHARED="-Wl,-E -Wl,+s";;
13621# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013622 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013623 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013624 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013626 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013627 if test "$enable_framework"
13628 then
Jack Jansenda49e192005-01-07 13:08:22 +000013629 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013630 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013631 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013632 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013633 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013634 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013635 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013636 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13637 then
13638 LINKFORSHARED="-Wl,--export-dynamic"
13639 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013640 SunOS/5*) case $CC in
13641 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013642 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013643 then
13644 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013645 fi;;
13646 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013647 CYGWIN*)
13648 if test $enable_shared = "no"
13649 then
13650 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13651 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013652 QNX*)
13653 # -Wl,-E causes the symbols to be added to the dynamic
13654 # symbol table so that they can be found when a module
13655 # is loaded. -N 2048K causes the stack size to be set
13656 # to 2048 kilobytes so that the stack doesn't overflow
13657 # when running test_compile.py.
13658 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013659 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013660fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013661{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13662echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013663
Michael W. Hudson54241132001-12-07 15:38:26 +000013664
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013665
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013666{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13667echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013668if test ! "$LIBRARY" = "$LDLIBRARY"
13669then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013670 case $ac_sys_system in
13671 CYGWIN*)
13672 # Cygwin needs CCSHARED when building extension DLLs
13673 # but not when building the interpreter DLL.
13674 CFLAGSFORSHARED='';;
13675 *)
13676 CFLAGSFORSHARED='$(CCSHARED)'
13677 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013678fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013679{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13680echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013681
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013682# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13683# library (with --enable-shared).
13684# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013685# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13686# if it is not required, since it creates a dependency of the shared library
13687# to LIBS. This, in turn, means that applications linking the shared libpython
13688# don't need to link LIBS explicitly. The default should be only changed
13689# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013690
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013691{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13692echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013693case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013694 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013695 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013696esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013697{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13698echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013699
13700
Guido van Rossum627b2d71993-12-24 10:39:16 +000013701# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013703{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13704echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013705if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013706 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013707else
Martin v. Löwis11437992002-04-12 09:54:03 +000013708 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013709LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013710cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013711/* confdefs.h. */
13712_ACEOF
13713cat confdefs.h >>conftest.$ac_ext
13714cat >>conftest.$ac_ext <<_ACEOF
13715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013717/* Override any GCC internal prototype to avoid an error.
13718 Use char because int might match the return type of a GCC
13719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013720#ifdef __cplusplus
13721extern "C"
13722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013723char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013724int
13725main ()
13726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013727return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 ;
13729 return 0;
13730}
13731_ACEOF
13732rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733if { (ac_try="$ac_link"
13734case "(($ac_try" in
13735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13736 *) ac_try_echo=$ac_try;;
13737esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013739 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013741 grep -v '^ *+' conftest.er1 >conftest.err
13742 rm -f conftest.er1
13743 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745 (exit $ac_status); } && {
13746 test -z "$ac_c_werror_flag" ||
13747 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013748 } && test -s conftest$ac_exeext &&
13749 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013750 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013753sed 's/^/| /' conftest.$ac_ext >&5
13754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013757
13758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013760LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013761fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013762{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13763echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13764if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 cat >>confdefs.h <<_ACEOF
13766#define HAVE_LIBDL 1
13767_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013768
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013769 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013770
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013771fi
13772 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013773
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013774{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13775echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013776if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013777 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013778else
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013780LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013782/* confdefs.h. */
13783_ACEOF
13784cat confdefs.h >>conftest.$ac_ext
13785cat >>conftest.$ac_ext <<_ACEOF
13786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788/* Override any GCC internal prototype to avoid an error.
13789 Use char because int might match the return type of a GCC
13790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013791#ifdef __cplusplus
13792extern "C"
13793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013794char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013795int
13796main ()
13797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 ;
13800 return 0;
13801}
13802_ACEOF
13803rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804if { (ac_try="$ac_link"
13805case "(($ac_try" in
13806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13807 *) ac_try_echo=$ac_try;;
13808esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013812 grep -v '^ *+' conftest.er1 >conftest.err
13813 rm -f conftest.er1
13814 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013816 (exit $ac_status); } && {
13817 test -z "$ac_c_werror_flag" ||
13818 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013819 } && test -s conftest$ac_exeext &&
13820 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013822else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013824sed 's/^/| /' conftest.$ac_ext >&5
13825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828
13829rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013831LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013832fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013833{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13834echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13835if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 cat >>confdefs.h <<_ACEOF
13837#define HAVE_LIBDLD 1
13838_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013839
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013840 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013841
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013842fi
13843 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013844
Georg Brandlb1441c72009-01-03 22:33:39 +000013845# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013846if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013847 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13848echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013849if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013850 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013851else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013852 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013854/* confdefs.h. */
13855_ACEOF
13856cat confdefs.h >>conftest.$ac_ext
13857cat >>conftest.$ac_ext <<_ACEOF
13858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860/* Override any GCC internal prototype to avoid an error.
13861 Use char because int might match the return type of a GCC
13862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013863#ifdef __cplusplus
13864extern "C"
13865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013866char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013867int
13868main ()
13869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013871 ;
13872 return 0;
13873}
13874_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875for ac_lib in '' pthread rt posix4; do
13876 if test -z "$ac_lib"; then
13877 ac_res="none required"
13878 else
13879 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013880 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881 fi
13882 rm -f conftest.$ac_objext conftest$ac_exeext
13883if { (ac_try="$ac_link"
13884case "(($ac_try" in
13885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13886 *) ac_try_echo=$ac_try;;
13887esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013889 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013890 ac_status=$?
13891 grep -v '^ *+' conftest.er1 >conftest.err
13892 rm -f conftest.er1
13893 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895 (exit $ac_status); } && {
13896 test -z "$ac_c_werror_flag" ||
13897 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013898 } && test -s conftest$ac_exeext &&
13899 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013901else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013902 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013903sed 's/^/| /' conftest.$ac_ext >&5
13904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905
Thomas Wouters477c8d52006-05-27 19:21:47 +000013906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907
13908rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13909 conftest$ac_exeext
13910 if test "${ac_cv_search_sem_init+set}" = set; then
13911 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913done
13914if test "${ac_cv_search_sem_init+set}" = set; then
13915 :
13916else
13917 ac_cv_search_sem_init=no
13918fi
13919rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013920LIBS=$ac_func_search_save_LIBS
13921fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013922{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13923echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924ac_res=$ac_cv_search_sem_init
13925if test "$ac_res" != no; then
13926 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013927
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013928fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013929 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013930 # posix4 on Solaris 2.6
13931 # pthread (first!) on Linux
13932fi
13933
Martin v. Löwis19d17342003-06-14 21:03:05 +000013934# check if we need libintl for locale functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013935{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13936echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013937if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013938 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013939else
13940 ac_check_lib_save_LIBS=$LIBS
13941LIBS="-lintl $LIBS"
13942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013943/* confdefs.h. */
13944_ACEOF
13945cat confdefs.h >>conftest.$ac_ext
13946cat >>conftest.$ac_ext <<_ACEOF
13947/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949/* Override any GCC internal prototype to avoid an error.
13950 Use char because int might match the return type of a GCC
13951 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013952#ifdef __cplusplus
13953extern "C"
13954#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013955char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013956int
13957main ()
13958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013959return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013960 ;
13961 return 0;
13962}
13963_ACEOF
13964rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965if { (ac_try="$ac_link"
13966case "(($ac_try" in
13967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13968 *) ac_try_echo=$ac_try;;
13969esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013973 grep -v '^ *+' conftest.er1 >conftest.err
13974 rm -f conftest.er1
13975 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977 (exit $ac_status); } && {
13978 test -z "$ac_c_werror_flag" ||
13979 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013980 } && test -s conftest$ac_exeext &&
13981 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013982 ac_cv_lib_intl_textdomain=yes
13983else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013985sed 's/^/| /' conftest.$ac_ext >&5
13986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989
13990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013991 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013992LIBS=$ac_check_lib_save_LIBS
13993fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013994{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13995echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
13996if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013997
13998cat >>confdefs.h <<\_ACEOF
13999#define WITH_LIBINTL 1
14000_ACEOF
14001
Brett Cannonc6d936e2009-06-07 20:09:53 +000014002 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014003fi
14004
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014005
14006# checks for system dependent C++ extensions support
14007case "$ac_sys_system" in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014008 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14009echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014011/* confdefs.h. */
14012_ACEOF
14013cat confdefs.h >>conftest.$ac_ext
14014cat >>conftest.$ac_ext <<_ACEOF
14015/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014016#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014017int
14018main ()
14019{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014020loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014021 ;
14022 return 0;
14023}
14024_ACEOF
14025rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014026if { (ac_try="$ac_link"
14027case "(($ac_try" in
14028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14029 *) ac_try_echo=$ac_try;;
14030esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014032 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014034 grep -v '^ *+' conftest.er1 >conftest.err
14035 rm -f conftest.er1
14036 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014038 (exit $ac_status); } && {
14039 test -z "$ac_c_werror_flag" ||
14040 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014041 } && test -s conftest$ac_exeext &&
14042 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014043
Martin v. Löwis11437992002-04-12 09:54:03 +000014044cat >>confdefs.h <<\_ACEOF
14045#define AIX_GENUINE_CPLUSPLUS 1
14046_ACEOF
14047
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014048 { echo "$as_me:$LINENO: result: yes" >&5
14049echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014050else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014052sed 's/^/| /' conftest.$ac_ext >&5
14053
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014054 { echo "$as_me:$LINENO: result: no" >&5
14055echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057
14058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014059 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014060 *) ;;
14061esac
14062
Guido van Rossum70c7f481998-03-26 18:44:10 +000014063# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014064{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14065echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014066if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014067 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014068else
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014070LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014071cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014072/* confdefs.h. */
14073_ACEOF
14074cat confdefs.h >>conftest.$ac_ext
14075cat >>conftest.$ac_ext <<_ACEOF
14076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078/* Override any GCC internal prototype to avoid an error.
14079 Use char because int might match the return type of a GCC
14080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014081#ifdef __cplusplus
14082extern "C"
14083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014084char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014085int
14086main ()
14087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 ;
14090 return 0;
14091}
14092_ACEOF
14093rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094if { (ac_try="$ac_link"
14095case "(($ac_try" in
14096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14097 *) ac_try_echo=$ac_try;;
14098esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014102 grep -v '^ *+' conftest.er1 >conftest.err
14103 rm -f conftest.er1
14104 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106 (exit $ac_status); } && {
14107 test -z "$ac_c_werror_flag" ||
14108 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014109 } && test -s conftest$ac_exeext &&
14110 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014112else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014114sed 's/^/| /' conftest.$ac_ext >&5
14115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118
14119rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014120 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014121LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014122fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014123{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14124echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14125if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014126 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014127fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014128 # SVR4
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014129{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14130echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014131if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014133else
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014135LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014137/* confdefs.h. */
14138_ACEOF
14139cat confdefs.h >>conftest.$ac_ext
14140cat >>conftest.$ac_ext <<_ACEOF
14141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014143/* Override any GCC internal prototype to avoid an error.
14144 Use char because int might match the return type of a GCC
14145 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014146#ifdef __cplusplus
14147extern "C"
14148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014149char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014150int
14151main ()
14152{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 ;
14155 return 0;
14156}
14157_ACEOF
14158rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159if { (ac_try="$ac_link"
14160case "(($ac_try" in
14161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14162 *) ac_try_echo=$ac_try;;
14163esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014167 grep -v '^ *+' conftest.er1 >conftest.err
14168 rm -f conftest.er1
14169 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171 (exit $ac_status); } && {
14172 test -z "$ac_c_werror_flag" ||
14173 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014174 } && test -s conftest$ac_exeext &&
14175 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014176 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014177else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014179sed 's/^/| /' conftest.$ac_ext >&5
14180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014183
14184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014186LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014187fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014188{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14189echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14190if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014191 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014192fi
14193 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014194
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014195{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14196echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014199if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200 withval=$with_libs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014201{ echo "$as_me:$LINENO: result: $withval" >&5
14202echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014203LIBS="$withval $LIBS"
14204
14205else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014206 { echo "$as_me:$LINENO: result: no" >&5
14207echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208fi
14209
Guido van Rossum7f43da71994-08-01 12:15:30 +000014210
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014211# Check for use of the system libffi library
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014212{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14213echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014216if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217 withval=$with_system_ffi;
14218fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014219
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014220
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014221{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14222echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014223
Matthias Klose55708cc2009-04-30 08:06:49 +000014224# Check for --with-dbmliborder
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014225{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14226echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014227
14228# Check whether --with-dbmliborder was given.
14229if test "${with_dbmliborder+set}" = set; then
14230 withval=$with_dbmliborder;
14231if test x$with_dbmliborder = xyes
14232then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014233{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14234echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014235 { (exit 1); exit 1; }; }
14236else
14237 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14238 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14239 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014240 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14241echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014242 { (exit 1); exit 1; }; }
14243 fi
14244 done
14245fi
14246fi
14247
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014248{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14249echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014250
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014251# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014252
14253
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014254{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14255echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014258if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259 withval=$with_signal_module;
14260fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014261
14262
14263if test -z "$with_signal_module"
14264then with_signal_module="yes"
14265fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014266{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14267echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014268
14269if test "${with_signal_module}" = "yes"; then
14270 USE_SIGNAL_MODULE=""
14271 SIGNAL_OBJS=""
14272else
14273 USE_SIGNAL_MODULE="#"
14274 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14275fi
14276
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014277# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014278
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014279USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014280
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014281{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14282echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
Guido van Rossumec2f0731997-01-22 20:54:01 +000014284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014286if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287 withval=$with_dec_threads;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014288{ echo "$as_me:$LINENO: result: $withval" >&5
14289echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014290LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014291if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014292 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014293fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014294else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014295 { echo "$as_me:$LINENO: result: no" >&5
14296echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297fi
14298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
14300# Templates for things AC_DEFINEd more than once.
14301# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014302
14303
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
14305
14306
14307
14308
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014309{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14310echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014313if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014314 withval=$with_threads;
14315fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014316
14317
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014318# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014320# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014321if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322 withval=$with_thread; with_threads=$with_thread
14323fi
14324
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014325
14326if test -z "$with_threads"
14327then with_threads="yes"
14328fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014329{ echo "$as_me:$LINENO: result: $with_threads" >&5
14330echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014331
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014332
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014333if test "$with_threads" = "no"
14334then
14335 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014336elif test "$ac_cv_pthread_is_default" = yes
14337then
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014339#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014340_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014341
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014342 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014344#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014345_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014346
14347 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014348 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014349elif test "$ac_cv_kpthread" = "yes"
14350then
14351 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014352 if test "$ac_cv_cxx_thread" = "yes"; then
14353 CXX="$CXX -Kpthread"
14354 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014356#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014357_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014358
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014359 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014360 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014361elif test "$ac_cv_kthread" = "yes"
14362then
14363 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014364 if test "$ac_cv_cxx_thread" = "yes"; then
14365 CXX="$CXX -Kthread"
14366 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014367 cat >>confdefs.h <<\_ACEOF
14368#define WITH_THREAD 1
14369_ACEOF
14370
14371 posix_threads=yes
14372 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014373elif test "$ac_cv_pthread" = "yes"
14374then
14375 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014376 if test "$ac_cv_cxx_thread" = "yes"; then
14377 CXX="$CXX -pthread"
14378 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014379 cat >>confdefs.h <<\_ACEOF
14380#define WITH_THREAD 1
14381_ACEOF
14382
14383 posix_threads=yes
14384 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014385else
14386 if test ! -z "$with_threads" -a -d "$with_threads"
14387 then LDFLAGS="$LDFLAGS -L$with_threads"
14388 fi
14389 if test ! -z "$withval" -a -d "$withval"
14390 then LDFLAGS="$LDFLAGS -L$withval"
14391 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014392
14393 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014394 # define _POSIX_THREADS in unistd.h. Some apparently don't
14395 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014396 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14397echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014399/* confdefs.h. */
14400_ACEOF
14401cat confdefs.h >>conftest.$ac_ext
14402cat >>conftest.$ac_ext <<_ACEOF
14403/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014404
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014405#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014406#ifdef _POSIX_THREADS
14407yes
14408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014409
14410_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014412 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014413 unistd_defines_pthreads=yes
14414else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014415 unistd_defines_pthreads=no
14416fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000014417rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014418
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014419 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14420echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014421
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014423#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014424_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014425
Martin v. Löwis11437992002-04-12 09:54:03 +000014426 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014427 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14428echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014429if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014430 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014431fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014432{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14433echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014434else
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014436{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14437echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014439/* confdefs.h. */
14440_ACEOF
14441cat confdefs.h >>conftest.$ac_ext
14442cat >>conftest.$ac_ext <<_ACEOF
14443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014444$ac_includes_default
14445#include <cthreads.h>
14446_ACEOF
14447rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448if { (ac_try="$ac_compile"
14449case "(($ac_try" in
14450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14451 *) ac_try_echo=$ac_try;;
14452esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014456 grep -v '^ *+' conftest.er1 >conftest.err
14457 rm -f conftest.er1
14458 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460 (exit $ac_status); } && {
14461 test -z "$ac_c_werror_flag" ||
14462 test ! -s conftest.err
14463 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014464 ac_header_compiler=yes
14465else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014467sed 's/^/| /' conftest.$ac_ext >&5
14468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471
14472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014473{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14474echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014475
14476# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014477{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14478echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014479cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014480/* confdefs.h. */
14481_ACEOF
14482cat confdefs.h >>conftest.$ac_ext
14483cat >>conftest.$ac_ext <<_ACEOF
14484/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014485#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014486_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487if { (ac_try="$ac_cpp conftest.$ac_ext"
14488case "(($ac_try" in
14489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14490 *) ac_try_echo=$ac_try;;
14491esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014495 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 rm -f conftest.er1
14497 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499 (exit $ac_status); } >/dev/null && {
14500 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14501 test ! -s conftest.err
14502 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 ac_header_preproc=yes
14504else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014506sed 's/^/| /' conftest.$ac_ext >&5
14507
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510
Martin v. Löwis11437992002-04-12 09:54:03 +000014511rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014512{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14513echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014514
14515# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014516case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14517 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014518 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14519echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14520 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14521echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014522 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014523 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014524 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014525 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14526echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14527 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14528echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14529 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14530echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14531 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14532echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14533 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14534echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14535 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14536echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014537 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014538## -------------------------------------- ##
14539## Report this to http://bugs.python.org/ ##
14540## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014541_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014543 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014544esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014545{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14546echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014547if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014548 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014549else
14550 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014551fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014552{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14553echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014554
14555fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014556if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014557 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014558#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014559_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014560
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014562#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014564
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
14566cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014567#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014568_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014569
14570 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014571 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014572else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014573
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014575 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14576echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014577if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014578 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014579fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014580{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14581echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014582else
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014584{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14585echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014586cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014587/* confdefs.h. */
14588_ACEOF
14589cat confdefs.h >>conftest.$ac_ext
14590cat >>conftest.$ac_ext <<_ACEOF
14591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014592$ac_includes_default
14593#include <mach/cthreads.h>
14594_ACEOF
14595rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596if { (ac_try="$ac_compile"
14597case "(($ac_try" in
14598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14599 *) ac_try_echo=$ac_try;;
14600esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014604 grep -v '^ *+' conftest.er1 >conftest.err
14605 rm -f conftest.er1
14606 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608 (exit $ac_status); } && {
14609 test -z "$ac_c_werror_flag" ||
14610 test ! -s conftest.err
14611 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 ac_header_compiler=yes
14613else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014615sed 's/^/| /' conftest.$ac_ext >&5
14616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619
14620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014621{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14622echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014623
14624# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014625{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14626echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014628/* confdefs.h. */
14629_ACEOF
14630cat confdefs.h >>conftest.$ac_ext
14631cat >>conftest.$ac_ext <<_ACEOF
14632/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014633#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014634_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635if { (ac_try="$ac_cpp conftest.$ac_ext"
14636case "(($ac_try" in
14637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14638 *) ac_try_echo=$ac_try;;
14639esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014642 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014643 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014644 rm -f conftest.er1
14645 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647 (exit $ac_status); } >/dev/null && {
14648 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14649 test ! -s conftest.err
14650 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 ac_header_preproc=yes
14652else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014654sed 's/^/| /' conftest.$ac_ext >&5
14655
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014658
Martin v. Löwis11437992002-04-12 09:54:03 +000014659rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014660{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14661echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014662
14663# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014664case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14665 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014666 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14667echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14668 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14669echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014670 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014671 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014672 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014673 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14674echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14675 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14676echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14677 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14678echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14679 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14680echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14681 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14682echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14683 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14684echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014686## -------------------------------------- ##
14687## Report this to http://bugs.python.org/ ##
14688## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014689_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014691 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014692esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014693{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14694echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014695if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014696 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014697else
14698 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014700{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14701echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014702
14703fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014704if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014706#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014707_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014708
Martin v. Löwis11437992002-04-12 09:54:03 +000014709 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014710#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014711_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014712
Martin v. Löwis11437992002-04-12 09:54:03 +000014713
14714cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014715#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014716_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014717
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014718 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014719else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014720
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014721 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14722echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014725if test "${with_pth+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014726 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14727echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014728 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014729#define WITH_THREAD 1
14730_ACEOF
14731
14732
14733cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014734#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014735_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014736
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014737 LIBS="-lpth $LIBS"
14738 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014739else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014740 { echo "$as_me:$LINENO: result: no" >&5
14741echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014742
14743 # Just looking for pthread_create in libpthread is not enough:
14744 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14745 # So we really have to include pthread.h, and then link.
14746 _libs=$LIBS
14747 LIBS="$LIBS -lpthread"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014748 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14749echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* confdefs.h. */
14752_ACEOF
14753cat confdefs.h >>conftest.$ac_ext
14754cat >>conftest.$ac_ext <<_ACEOF
14755/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014756#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014757
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014758void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014759int
14760main ()
14761{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014762
14763pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014764 ;
14765 return 0;
14766}
14767_ACEOF
14768rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769if { (ac_try="$ac_link"
14770case "(($ac_try" in
14771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14772 *) ac_try_echo=$ac_try;;
14773esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014777 grep -v '^ *+' conftest.er1 >conftest.err
14778 rm -f conftest.er1
14779 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781 (exit $ac_status); } && {
14782 test -z "$ac_c_werror_flag" ||
14783 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014784 } && test -s conftest$ac_exeext &&
14785 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014787 { echo "$as_me:$LINENO: result: yes" >&5
14788echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014790#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014791_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014792
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014793 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014794 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014795else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014797sed 's/^/| /' conftest.$ac_ext >&5
14798
Martin v. Löwis11437992002-04-12 09:54:03 +000014799
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014800 LIBS=$_libs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014801 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14802echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014803if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014805else
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014807/* confdefs.h. */
14808_ACEOF
14809cat confdefs.h >>conftest.$ac_ext
14810cat >>conftest.$ac_ext <<_ACEOF
14811/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014812/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14813 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14814#define pthread_detach innocuous_pthread_detach
14815
Guido van Rossumad678af1998-10-02 14:42:15 +000014816/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014817 which can conflict with char pthread_detach (); below.
14818 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014819 <limits.h> exists even on freestanding compilers. */
14820
14821#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014822# include <limits.h>
14823#else
14824# include <assert.h>
14825#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014826
14827#undef pthread_detach
14828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829/* Override any GCC internal prototype to avoid an error.
14830 Use char because int might match the return type of a GCC
14831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014832#ifdef __cplusplus
14833extern "C"
14834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014835char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014836/* The GNU C library defines this for functions which it implements
14837 to always fail with ENOSYS. Some functions are actually named
14838 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014840choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014841#endif
14842
Skip Montanaro6dead952003-09-25 14:50:04 +000014843int
14844main ()
14845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014846return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014847 ;
14848 return 0;
14849}
14850_ACEOF
14851rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852if { (ac_try="$ac_link"
14853case "(($ac_try" in
14854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14855 *) ac_try_echo=$ac_try;;
14856esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014860 grep -v '^ *+' conftest.er1 >conftest.err
14861 rm -f conftest.er1
14862 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864 (exit $ac_status); } && {
14865 test -z "$ac_c_werror_flag" ||
14866 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014867 } && test -s conftest$ac_exeext &&
14868 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014870else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014872sed 's/^/| /' conftest.$ac_ext >&5
14873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876
14877rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014878 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014879fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014880{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14881echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14882if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014883 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014884#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014885_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014886
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014887 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014888 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014889else
Guido van Rossumad678af1998-10-02 14:42:15 +000014890
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014891 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014892 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14893echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014894if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014895 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014896fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014897{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14898echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014899else
14900 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014901{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14902echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014904/* confdefs.h. */
14905_ACEOF
14906cat confdefs.h >>conftest.$ac_ext
14907cat >>conftest.$ac_ext <<_ACEOF
14908/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014909$ac_includes_default
14910#include <atheos/threads.h>
14911_ACEOF
14912rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913if { (ac_try="$ac_compile"
14914case "(($ac_try" in
14915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14916 *) ac_try_echo=$ac_try;;
14917esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014921 grep -v '^ *+' conftest.er1 >conftest.err
14922 rm -f conftest.er1
14923 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925 (exit $ac_status); } && {
14926 test -z "$ac_c_werror_flag" ||
14927 test ! -s conftest.err
14928 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014929 ac_header_compiler=yes
14930else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014932sed 's/^/| /' conftest.$ac_ext >&5
14933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936
14937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014938{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14939echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014940
14941# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014942{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14943echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014945/* confdefs.h. */
14946_ACEOF
14947cat confdefs.h >>conftest.$ac_ext
14948cat >>conftest.$ac_ext <<_ACEOF
14949/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014950#include <atheos/threads.h>
14951_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952if { (ac_try="$ac_cpp conftest.$ac_ext"
14953case "(($ac_try" in
14954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14955 *) ac_try_echo=$ac_try;;
14956esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014959 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014960 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014961 rm -f conftest.er1
14962 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964 (exit $ac_status); } >/dev/null && {
14965 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14966 test ! -s conftest.err
14967 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014968 ac_header_preproc=yes
14969else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014971sed 's/^/| /' conftest.$ac_ext >&5
14972
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014973 ac_header_preproc=no
14974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014976rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014977{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14978echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014979
14980# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014981case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14982 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014983 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14984echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14985 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14986echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014987 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014988 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014989 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014990 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14991echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
14992 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14993echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14994 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14995echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14996 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14997echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14998 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14999echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15000 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15001echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015003## -------------------------------------- ##
15004## Report this to http://bugs.python.org/ ##
15005## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015006_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015008 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015009esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015010{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15011echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015012if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015014else
15015 ac_cv_header_atheos_threads_h=$ac_header_preproc
15016fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015017{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15018echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015019
15020fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015021if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015022 cat >>confdefs.h <<\_ACEOF
15023#define WITH_THREAD 1
15024_ACEOF
15025
15026
15027cat >>confdefs.h <<\_ACEOF
15028#define ATHEOS_THREADS 1
15029_ACEOF
15030
15031 THREADOBJ="Python/thread.o"
15032else
15033
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015034 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15035echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015036if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015037 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015038else
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015040LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015042/* confdefs.h. */
15043_ACEOF
15044cat confdefs.h >>conftest.$ac_ext
15045cat >>conftest.$ac_ext <<_ACEOF
15046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048/* Override any GCC internal prototype to avoid an error.
15049 Use char because int might match the return type of a GCC
15050 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015051#ifdef __cplusplus
15052extern "C"
15053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015054char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015055int
15056main ()
15057{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ;
15060 return 0;
15061}
15062_ACEOF
15063rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064if { (ac_try="$ac_link"
15065case "(($ac_try" in
15066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15067 *) ac_try_echo=$ac_try;;
15068esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015072 grep -v '^ *+' conftest.er1 >conftest.err
15073 rm -f conftest.er1
15074 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076 (exit $ac_status); } && {
15077 test -z "$ac_c_werror_flag" ||
15078 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015079 } && test -s conftest$ac_exeext &&
15080 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015081 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015082else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015084sed 's/^/| /' conftest.$ac_ext >&5
15085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088
15089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015091LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015092fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015093{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15094echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
15095if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015097#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015098_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015099
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015100 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015101 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015102 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015103else
Greg Steinadf63d62000-07-05 10:38:09 +000015104
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015105 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15106echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015107if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015108 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015109else
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015111LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015113/* confdefs.h. */
15114_ACEOF
15115cat confdefs.h >>conftest.$ac_ext
15116cat >>conftest.$ac_ext <<_ACEOF
15117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119/* Override any GCC internal prototype to avoid an error.
15120 Use char because int might match the return type of a GCC
15121 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015122#ifdef __cplusplus
15123extern "C"
15124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015125char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015126int
15127main ()
15128{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 ;
15131 return 0;
15132}
15133_ACEOF
15134rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135if { (ac_try="$ac_link"
15136case "(($ac_try" in
15137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15138 *) ac_try_echo=$ac_try;;
15139esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015143 grep -v '^ *+' conftest.er1 >conftest.err
15144 rm -f conftest.er1
15145 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147 (exit $ac_status); } && {
15148 test -z "$ac_c_werror_flag" ||
15149 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015150 } && test -s conftest$ac_exeext &&
15151 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015153else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015155sed 's/^/| /' conftest.$ac_ext >&5
15156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015159
15160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015162LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015163fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015164{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15165echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15166if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015167 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015168#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015169_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015170
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015171 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015172 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015173 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015174else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015175
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015176 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15177echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015178if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015179 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015180else
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015182LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015184/* confdefs.h. */
15185_ACEOF
15186cat confdefs.h >>conftest.$ac_ext
15187cat >>conftest.$ac_ext <<_ACEOF
15188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190/* Override any GCC internal prototype to avoid an error.
15191 Use char because int might match the return type of a GCC
15192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015193#ifdef __cplusplus
15194extern "C"
15195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015196char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015197int
15198main ()
15199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 ;
15202 return 0;
15203}
15204_ACEOF
15205rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206if { (ac_try="$ac_link"
15207case "(($ac_try" in
15208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15209 *) ac_try_echo=$ac_try;;
15210esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015214 grep -v '^ *+' conftest.er1 >conftest.err
15215 rm -f conftest.er1
15216 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218 (exit $ac_status); } && {
15219 test -z "$ac_c_werror_flag" ||
15220 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015221 } && test -s conftest$ac_exeext &&
15222 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015224else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015226sed 's/^/| /' conftest.$ac_ext >&5
15227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230
15231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015233LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015234fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015235{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15236echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15237if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015238 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015239#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015240_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015241
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015242 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015243 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015244 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015245else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015246
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015247 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15248echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015249if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015251else
Martin v. Löwis11437992002-04-12 09:54:03 +000015252 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015253LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015254cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015255/* confdefs.h. */
15256_ACEOF
15257cat confdefs.h >>conftest.$ac_ext
15258cat >>conftest.$ac_ext <<_ACEOF
15259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261/* Override any GCC internal prototype to avoid an error.
15262 Use char because int might match the return type of a GCC
15263 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015264#ifdef __cplusplus
15265extern "C"
15266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015267char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015268int
15269main ()
15270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015272 ;
15273 return 0;
15274}
15275_ACEOF
15276rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277if { (ac_try="$ac_link"
15278case "(($ac_try" in
15279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15280 *) ac_try_echo=$ac_try;;
15281esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015285 grep -v '^ *+' conftest.er1 >conftest.err
15286 rm -f conftest.er1
15287 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015289 (exit $ac_status); } && {
15290 test -z "$ac_c_werror_flag" ||
15291 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015292 } && test -s conftest$ac_exeext &&
15293 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015294 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015295else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015297sed 's/^/| /' conftest.$ac_ext >&5
15298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015301
15302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015303 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015304LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015305fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015306{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15307echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15308if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015309 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015310#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015311_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015312
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015313 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015314 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015315 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015316else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015317
Martin v. Löwis130fb172001-07-19 11:00:41 +000015318 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015319fi
15320
Guido van Rossum627b2d71993-12-24 10:39:16 +000015321
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015322fi
15323
Guido van Rossum0be3e491997-05-22 20:33:33 +000015324fi
15325
Guido van Rossum49545951997-12-02 19:28:29 +000015326fi
15327
Guido van Rossumb93a8621998-05-07 13:27:32 +000015328fi
15329
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015330
Michael W. Hudson54241132001-12-07 15:38:26 +000015331fi
15332
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334
15335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015336 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337fi
15338
Martin v. Löwis11437992002-04-12 09:54:03 +000015339fi
15340
15341
15342fi
15343
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015344
Michael W. Hudson54241132001-12-07 15:38:26 +000015345
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015346 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15347echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015348if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015350else
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015352LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015353cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015354/* confdefs.h. */
15355_ACEOF
15356cat confdefs.h >>conftest.$ac_ext
15357cat >>conftest.$ac_ext <<_ACEOF
15358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015360/* Override any GCC internal prototype to avoid an error.
15361 Use char because int might match the return type of a GCC
15362 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015363#ifdef __cplusplus
15364extern "C"
15365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015366char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015367int
15368main ()
15369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ;
15372 return 0;
15373}
15374_ACEOF
15375rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376if { (ac_try="$ac_link"
15377case "(($ac_try" in
15378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15379 *) ac_try_echo=$ac_try;;
15380esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015382 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015384 grep -v '^ *+' conftest.er1 >conftest.err
15385 rm -f conftest.er1
15386 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388 (exit $ac_status); } && {
15389 test -z "$ac_c_werror_flag" ||
15390 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015391 } && test -s conftest$ac_exeext &&
15392 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015393 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015394else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015396sed 's/^/| /' conftest.$ac_ext >&5
15397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400
15401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015403LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015404fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015405{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15406echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15407if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015409#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015410_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015411
Martin v. Löwis130fb172001-07-19 11:00:41 +000015412 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015413 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015414 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015415fi
15416
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015417
Neal Norwitza978ab02002-11-02 16:58:05 +000015418 if test "$posix_threads" != "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015419 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15420echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015421if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015423else
Martin v. Löwis11437992002-04-12 09:54:03 +000015424 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015425LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015427/* confdefs.h. */
15428_ACEOF
15429cat confdefs.h >>conftest.$ac_ext
15430cat >>conftest.$ac_ext <<_ACEOF
15431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015433/* Override any GCC internal prototype to avoid an error.
15434 Use char because int might match the return type of a GCC
15435 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015436#ifdef __cplusplus
15437extern "C"
15438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015439char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015440int
15441main ()
15442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015443return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015444 ;
15445 return 0;
15446}
15447_ACEOF
15448rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449if { (ac_try="$ac_link"
15450case "(($ac_try" in
15451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15452 *) ac_try_echo=$ac_try;;
15453esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015457 grep -v '^ *+' conftest.er1 >conftest.err
15458 rm -f conftest.er1
15459 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461 (exit $ac_status); } && {
15462 test -z "$ac_c_werror_flag" ||
15463 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015464 } && test -s conftest$ac_exeext &&
15465 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015467else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015469sed 's/^/| /' conftest.$ac_ext >&5
15470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015471 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015473
15474rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015477fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015478{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15479echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15480if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015482#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015484
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015485 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015486 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015487 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015488fi
15489
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015490 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015491
Martin v. Löwis130fb172001-07-19 11:00:41 +000015492 if test "$USE_THREAD_MODULE" != "#"
15493 then
15494 # If the above checks didn't disable threads, (at least) OSF1
15495 # needs this '-threads' argument during linking.
15496 case $ac_sys_system in
15497 OSF1) LDLAST=-threads;;
15498 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015499 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015500fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015501
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015502if test "$posix_threads" = "yes"; then
15503 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015504
15505cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015506#define _POSIX_THREADS 1
15507_ACEOF
15508
15509 fi
15510
15511 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15512 case $ac_sys_system/$ac_sys_release in
15513 SunOS/5.6)
15514cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015515#define HAVE_PTHREAD_DESTRUCTOR 1
15516_ACEOF
15517
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015518 ;;
15519 SunOS/5.8)
15520cat >>confdefs.h <<\_ACEOF
15521#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15522_ACEOF
15523
15524 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015525 AIX/5)
15526cat >>confdefs.h <<\_ACEOF
15527#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15528_ACEOF
15529
15530 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015531 esac
15532
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015533 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15534echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015535 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015536 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015537else
15538 if test "$cross_compiling" = yes; then
15539 ac_cv_pthread_system_supported=no
15540else
15541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015542/* confdefs.h. */
15543_ACEOF
15544cat confdefs.h >>conftest.$ac_ext
15545cat >>conftest.$ac_ext <<_ACEOF
15546/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015547#include <pthread.h>
15548 void *foo(void *parm) {
15549 return NULL;
15550 }
15551 main() {
15552 pthread_attr_t attr;
15553 pthread_t id;
15554 if (pthread_attr_init(&attr)) exit(-1);
15555 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15556 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15557 exit(0);
15558 }
15559_ACEOF
15560rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561if { (ac_try="$ac_link"
15562case "(($ac_try" in
15563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15564 *) ac_try_echo=$ac_try;;
15565esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015568 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571 { (case "(($ac_try" in
15572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15573 *) ac_try_echo=$ac_try;;
15574esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015576 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015577 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015579 (exit $ac_status); }; }; then
15580 ac_cv_pthread_system_supported=yes
15581else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015582 echo "$as_me: program exited with status $ac_status" >&5
15583echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015584sed 's/^/| /' conftest.$ac_ext >&5
15585
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015586( exit $ac_status )
15587ac_cv_pthread_system_supported=no
15588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015589rm -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 +000015590fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015592
15593
Guido van Rossum627b2d71993-12-24 10:39:16 +000015594fi
15595
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015596 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15597echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015598 if test "$ac_cv_pthread_system_supported" = "yes"; then
15599
15600cat >>confdefs.h <<\_ACEOF
15601#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15602_ACEOF
15603
15604 fi
15605
15606for ac_func in pthread_sigmask
15607do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015608as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15609{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15610echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015612 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015613else
15614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015615/* confdefs.h. */
15616_ACEOF
15617cat confdefs.h >>conftest.$ac_ext
15618cat >>conftest.$ac_ext <<_ACEOF
15619/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015620/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15621 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15622#define $ac_func innocuous_$ac_func
15623
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015624/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015625 which can conflict with char $ac_func (); below.
15626 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015627 <limits.h> exists even on freestanding compilers. */
15628
15629#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015630# include <limits.h>
15631#else
15632# include <assert.h>
15633#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015634
15635#undef $ac_func
15636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637/* Override any GCC internal prototype to avoid an error.
15638 Use char because int might match the return type of a GCC
15639 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015640#ifdef __cplusplus
15641extern "C"
15642#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015643char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015644/* The GNU C library defines this for functions which it implements
15645 to always fail with ENOSYS. Some functions are actually named
15646 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015648choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015649#endif
15650
Skip Montanaro6dead952003-09-25 14:50:04 +000015651int
15652main ()
15653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015654return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015655 ;
15656 return 0;
15657}
15658_ACEOF
15659rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015660if { (ac_try="$ac_link"
15661case "(($ac_try" in
15662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15663 *) ac_try_echo=$ac_try;;
15664esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015668 grep -v '^ *+' conftest.er1 >conftest.err
15669 rm -f conftest.er1
15670 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015672 (exit $ac_status); } && {
15673 test -z "$ac_c_werror_flag" ||
15674 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015675 } && test -s conftest$ac_exeext &&
15676 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015677 eval "$as_ac_var=yes"
15678else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015680sed 's/^/| /' conftest.$ac_ext >&5
15681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015684
15685rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015687fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015688ac_res=`eval echo '${'$as_ac_var'}'`
15689 { echo "$as_me:$LINENO: result: $ac_res" >&5
15690echo "${ECHO_T}$ac_res" >&6; }
15691if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015692 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015693#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015694_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015695 case $ac_sys_system in
15696 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015697
Jason Tishlerfac083d2003-07-22 15:20:49 +000015698cat >>confdefs.h <<\_ACEOF
15699#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15700_ACEOF
15701
15702 ;;
15703 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015704fi
15705done
15706
15707fi
15708
15709
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015710# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015711
15712
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015713{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15714echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015716if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015718 no)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015719 { echo "$as_me:$LINENO: result: no" >&5
15720echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015721 ipv6=no
15722 ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015723 *) { echo "$as_me:$LINENO: result: yes" >&5
15724echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015725 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015726#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015727_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015728
15729 ipv6=yes
15730 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015732else
Martin v. Löwis11437992002-04-12 09:54:03 +000015733
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015734 if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015735 { echo "$as_me:$LINENO: result: no" >&5
15736echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015737 ipv6=no
15738
15739else
Martin v. Löwis11437992002-04-12 09:54:03 +000015740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015741/* confdefs.h. */
15742_ACEOF
15743cat confdefs.h >>conftest.$ac_ext
15744cat >>conftest.$ac_ext <<_ACEOF
15745/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015746 /* AF_INET6 available check */
15747#include <sys/types.h>
15748#include <sys/socket.h>
15749main()
15750{
15751 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15752 exit(1);
15753 else
15754 exit(0);
15755}
15756
Martin v. Löwis11437992002-04-12 09:54:03 +000015757_ACEOF
15758rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759if { (ac_try="$ac_link"
15760case "(($ac_try" in
15761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15762 *) ac_try_echo=$ac_try;;
15763esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769 { (case "(($ac_try" in
15770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15771 *) ac_try_echo=$ac_try;;
15772esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015777 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015778 { echo "$as_me:$LINENO: result: yes" >&5
15779echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015780 ipv6=yes
15781else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015782 echo "$as_me: program exited with status $ac_status" >&5
15783echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015784sed 's/^/| /' conftest.$ac_ext >&5
15785
Martin v. Löwis11437992002-04-12 09:54:03 +000015786( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015787{ echo "$as_me:$LINENO: result: no" >&5
15788echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015789 ipv6=no
15790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015791rm -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 +000015792fi
15793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794
15795
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015796if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015797 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15798echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015800/* confdefs.h. */
15801_ACEOF
15802cat confdefs.h >>conftest.$ac_ext
15803cat >>conftest.$ac_ext <<_ACEOF
15804/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015805#include <sys/types.h>
15806#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015807int
15808main ()
15809{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015810struct sockaddr_in6 x;
15811x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 ;
15813 return 0;
15814}
15815_ACEOF
15816rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015817if { (ac_try="$ac_compile"
15818case "(($ac_try" in
15819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15820 *) ac_try_echo=$ac_try;;
15821esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015825 grep -v '^ *+' conftest.er1 >conftest.err
15826 rm -f conftest.er1
15827 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829 (exit $ac_status); } && {
15830 test -z "$ac_c_werror_flag" ||
15831 test ! -s conftest.err
15832 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015833 { echo "$as_me:$LINENO: result: yes" >&5
15834echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015835 ipv6=yes
15836else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015838sed 's/^/| /' conftest.$ac_ext >&5
15839
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015840 { echo "$as_me:$LINENO: result: no" >&5
15841echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015842 ipv6=no
15843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844
15845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015846fi
15847
15848if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015850#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015851_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015852
15853fi
15854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015855fi
15856
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015857
15858ipv6type=unknown
15859ipv6lib=none
15860ipv6trylibc=no
15861
15862if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015863 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15864echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015865 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15866 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015867 case $i in
15868 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015870/* confdefs.h. */
15871_ACEOF
15872cat confdefs.h >>conftest.$ac_ext
15873cat >>conftest.$ac_ext <<_ACEOF
15874/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015876#include <netinet/in.h>
15877#ifdef IPV6_INRIA_VERSION
15878yes
15879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015880_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015882 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015883 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015884fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000015885rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015886
15887 ;;
15888 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015890/* confdefs.h. */
15891_ACEOF
15892cat confdefs.h >>conftest.$ac_ext
15893cat >>conftest.$ac_ext <<_ACEOF
15894/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015896#include <netinet/in.h>
15897#ifdef __KAME__
15898yes
15899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015900_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015902 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015903 ipv6type=$i;
15904 ipv6lib=inet6
15905 ipv6libdir=/usr/local/v6/lib
15906 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015907fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000015908rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015909
15910 ;;
15911 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015913/* confdefs.h. */
15914_ACEOF
15915cat confdefs.h >>conftest.$ac_ext
15916cat >>conftest.$ac_ext <<_ACEOF
15917/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015919#include <features.h>
15920#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15921yes
15922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015923_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015925 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015926 ipv6type=$i;
15927 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015928fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000015929rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015930
15931 ;;
15932 linux-inet6)
15933 if test -d /usr/inet6; then
15934 ipv6type=$i
15935 ipv6lib=inet6
15936 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015937 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015938 fi
15939 ;;
15940 solaris)
15941 if test -f /etc/netconfig; then
15942 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15943 ipv6type=$i
15944 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015945 fi
15946 fi
15947 ;;
15948 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015950/* confdefs.h. */
15951_ACEOF
15952cat confdefs.h >>conftest.$ac_ext
15953cat >>conftest.$ac_ext <<_ACEOF
15954/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015956#include <sys/param.h>
15957#ifdef _TOSHIBA_INET6
15958yes
15959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015960_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015962 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015963 ipv6type=$i;
15964 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015965 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015966fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000015967rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015968
15969 ;;
15970 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015972/* confdefs.h. */
15973_ACEOF
15974cat confdefs.h >>conftest.$ac_ext
15975cat >>conftest.$ac_ext <<_ACEOF
15976/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015977
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015978#include </usr/local/v6/include/sys/v6config.h>
15979#ifdef __V6D__
15980yes
15981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015982_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015984 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015985 ipv6type=$i;
15986 ipv6lib=v6;
15987 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015988 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015989fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000015990rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015991
15992 ;;
15993 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015995/* confdefs.h. */
15996_ACEOF
15997cat confdefs.h >>conftest.$ac_ext
15998cat >>conftest.$ac_ext <<_ACEOF
15999/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016000
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016001#include <sys/param.h>
16002#ifdef _ZETA_MINAMI_INET6
16003yes
16004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016005_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016007 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016008 ipv6type=$i;
16009 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016010 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016011fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000016012rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016013
16014 ;;
16015 esac
16016 if test "$ipv6type" != "unknown"; then
16017 break
16018 fi
16019 done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016020 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16021echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016022fi
16023
16024if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16025 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16026 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16027 echo "using lib$ipv6lib"
16028 else
16029 if test $ipv6trylibc = "yes"; then
16030 echo "using libc"
16031 else
16032 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16033 echo "You need to fetch lib$ipv6lib.a from appropriate"
16034 echo 'ipv6 kit and compile beforehand.'
16035 exit 1
16036 fi
16037 fi
16038fi
16039
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016040{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16041echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016042cat >conftest.$ac_ext <<_ACEOF
16043/* confdefs.h. */
16044_ACEOF
16045cat confdefs.h >>conftest.$ac_ext
16046cat >>conftest.$ac_ext <<_ACEOF
16047/* end confdefs.h. */
16048#include <Carbon/Carbon.h>
16049int
16050main ()
16051{
16052FSIORefNum fRef = 0
16053 ;
16054 return 0;
16055}
16056_ACEOF
16057rm -f conftest.$ac_objext
16058if { (ac_try="$ac_compile"
16059case "(($ac_try" in
16060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16061 *) ac_try_echo=$ac_try;;
16062esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016064 (eval "$ac_compile") 2>conftest.er1
16065 ac_status=$?
16066 grep -v '^ *+' conftest.er1 >conftest.err
16067 rm -f conftest.er1
16068 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016070 (exit $ac_status); } && {
16071 test -z "$ac_c_werror_flag" ||
16072 test ! -s conftest.err
16073 } && test -s conftest.$ac_objext; then
16074
16075cat >>confdefs.h <<\_ACEOF
16076#define HAVE_OSX105_SDK 1
16077_ACEOF
16078
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016079 { echo "$as_me:$LINENO: result: yes" >&5
16080echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016081else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016082 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016083sed 's/^/| /' conftest.$ac_ext >&5
16084
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016085 { echo "$as_me:$LINENO: result: no" >&5
16086echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016087
16088fi
16089
16090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16091
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016092# Check for --with-doc-strings
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016093{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16094echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016096# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016097if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016098 withval=$with_doc_strings;
16099fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016100
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016101
16102if test -z "$with_doc_strings"
16103then with_doc_strings="yes"
16104fi
16105if test "$with_doc_strings" != "no"
16106then
16107
16108cat >>confdefs.h <<\_ACEOF
16109#define WITH_DOC_STRINGS 1
16110_ACEOF
16111
16112fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016113{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16114echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016115
Neil Schemenauera35c6882001-02-27 04:45:05 +000016116# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016117{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16118echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016120# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016121if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016122 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016123if test "$withval" != no
16124then
16125
16126cat >>confdefs.h <<\_ACEOF
16127#define WITH_TSC 1
16128_ACEOF
16129
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016130 { echo "$as_me:$LINENO: result: yes" >&5
16131echo "${ECHO_T}yes" >&6; }
16132else { echo "$as_me:$LINENO: result: no" >&5
16133echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016134fi
16135else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016136 { echo "$as_me:$LINENO: result: no" >&5
16137echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138fi
16139
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016140
16141# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016142{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16143echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016145# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016146if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016147 withval=$with_pymalloc;
16148fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016149
Neil Schemenauera35c6882001-02-27 04:45:05 +000016150
Neil Schemenauer16c22972002-03-22 15:34:49 +000016151if test -z "$with_pymalloc"
16152then with_pymalloc="yes"
16153fi
16154if test "$with_pymalloc" != "no"
16155then
Martin v. Löwis11437992002-04-12 09:54:03 +000016156
16157cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016158#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016159_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016160
16161fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016162{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16163echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016164
Barry Warsawef82cd72000-06-30 16:21:01 +000016165# Check for --with-wctype-functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016166{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16167echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016170if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016171 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016172if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016173then
16174
16175cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016176#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016177_ACEOF
16178
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016179 { echo "$as_me:$LINENO: result: yes" >&5
16180echo "${ECHO_T}yes" >&6; }
16181else { echo "$as_me:$LINENO: result: no" >&5
16182echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016183fi
16184else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016185 { echo "$as_me:$LINENO: result: no" >&5
16186echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187fi
16188
Barry Warsawef82cd72000-06-30 16:21:01 +000016189
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016190# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016191
Guido van Rossum98935bf2001-09-05 19:13:16 +000016192DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016193
Guido van Rossume97ee181999-12-20 21:27:22 +000016194# the dlopen() function means we might want to use dynload_shlib.o. some
16195# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016196
Thomas Wouters3a584202000-08-05 23:28:51 +000016197for ac_func in dlopen
16198do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016199as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16200{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16201echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016203 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016204else
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016206/* confdefs.h. */
16207_ACEOF
16208cat confdefs.h >>conftest.$ac_ext
16209cat >>conftest.$ac_ext <<_ACEOF
16210/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016211/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16212 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16213#define $ac_func innocuous_$ac_func
16214
Guido van Rossume97ee181999-12-20 21:27:22 +000016215/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016216 which can conflict with char $ac_func (); below.
16217 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016218 <limits.h> exists even on freestanding compilers. */
16219
16220#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016221# include <limits.h>
16222#else
16223# include <assert.h>
16224#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016225
16226#undef $ac_func
16227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228/* Override any GCC internal prototype to avoid an error.
16229 Use char because int might match the return type of a GCC
16230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016231#ifdef __cplusplus
16232extern "C"
16233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016234char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016235/* The GNU C library defines this for functions which it implements
16236 to always fail with ENOSYS. Some functions are actually named
16237 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016239choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016240#endif
16241
Skip Montanaro6dead952003-09-25 14:50:04 +000016242int
16243main ()
16244{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016245return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 ;
16247 return 0;
16248}
16249_ACEOF
16250rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251if { (ac_try="$ac_link"
16252case "(($ac_try" in
16253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16254 *) ac_try_echo=$ac_try;;
16255esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016257 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016259 grep -v '^ *+' conftest.er1 >conftest.err
16260 rm -f conftest.er1
16261 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263 (exit $ac_status); } && {
16264 test -z "$ac_c_werror_flag" ||
16265 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016266 } && test -s conftest$ac_exeext &&
16267 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016271sed 's/^/| /' conftest.$ac_ext >&5
16272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275
16276rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016277 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016278fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016279ac_res=`eval echo '${'$as_ac_var'}'`
16280 { echo "$as_me:$LINENO: result: $ac_res" >&5
16281echo "${ECHO_T}$ac_res" >&6; }
16282if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016283 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016284#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016285_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016286
Guido van Rossume97ee181999-12-20 21:27:22 +000016287fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016288done
Guido van Rossume97ee181999-12-20 21:27:22 +000016289
Michael W. Hudson54241132001-12-07 15:38:26 +000016290
Guido van Rossume97ee181999-12-20 21:27:22 +000016291# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16292# loading of modules.
16293
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016294{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16295echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016296if test -z "$DYNLOADFILE"
16297then
16298 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016299 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16300 if test "$ac_cv_func_dlopen" = yes
16301 then DYNLOADFILE="dynload_shlib.o"
16302 else DYNLOADFILE="dynload_aix.o"
16303 fi
16304 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016305 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016306 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16307 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016308 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016309 *)
16310 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16311 # out any dynamic loading
16312 if test "$ac_cv_func_dlopen" = yes
16313 then DYNLOADFILE="dynload_shlib.o"
16314 else DYNLOADFILE="dynload_stub.o"
16315 fi
16316 ;;
16317 esac
16318fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016319{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16320echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016321if test "$DYNLOADFILE" != "dynload_stub.o"
16322then
Martin v. Löwis11437992002-04-12 09:54:03 +000016323
16324cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016325#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016326_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016327
16328fi
16329
Neil Schemenauer4e425612001-06-19 15:44:15 +000016330# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16331
Michael W. Hudson54241132001-12-07 15:38:26 +000016332
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016333{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16334echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016335if test -z "$MACHDEP_OBJS"
16336then
Jack Jansene578a632001-08-15 01:27:14 +000016337 MACHDEP_OBJS=$extra_machdep_objs
16338else
16339 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016340fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016341{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16342echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016343
Guido van Rossum627b2d71993-12-24 10:39:16 +000016344# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000016416
Martin v. Löwisc3001752005-01-23 09:27:24 +000016417
16418
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016419
16420
Thomas Wouterscf297e42007-02-23 15:07:44 +000016421
16422
Gregory P. Smith25523d22007-09-03 16:44:55 +000016423
Christian Heimes4e30a842007-11-30 22:12:06 +000016424
Martin v. Löwis92fab752008-03-08 10:40:41 +000016425
Martin v. Löwis823725e2008-03-24 13:39:54 +000016426
16427
Benjamin Peterson965ce872009-04-05 21:24:58 +000016428
16429
16430
16431
Martin v. Löwis011e8422009-05-05 04:43:17 +000016432
Martin v. Löwis113a0852009-05-29 17:25:39 +000016433
Martin v. Löwis823725e2008-03-24 13:39:54 +000016434for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16435 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016436 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016437 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016438 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016439 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016440 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016441 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16442 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016443 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016444 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016445 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016446 truncate uname unsetenv utimes waitpid wait3 wait4 \
16447 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016448do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016449as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16450{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16451echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016453 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016454else
Martin v. Löwis11437992002-04-12 09:54:03 +000016455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016456/* confdefs.h. */
16457_ACEOF
16458cat confdefs.h >>conftest.$ac_ext
16459cat >>conftest.$ac_ext <<_ACEOF
16460/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016461/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16462 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16463#define $ac_func innocuous_$ac_func
16464
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016465/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016466 which can conflict with char $ac_func (); below.
16467 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016468 <limits.h> exists even on freestanding compilers. */
16469
16470#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016471# include <limits.h>
16472#else
16473# include <assert.h>
16474#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016475
16476#undef $ac_func
16477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016478/* Override any GCC internal prototype to avoid an error.
16479 Use char because int might match the return type of a GCC
16480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016481#ifdef __cplusplus
16482extern "C"
16483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016484char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016485/* The GNU C library defines this for functions which it implements
16486 to always fail with ENOSYS. Some functions are actually named
16487 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016488#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016489choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016490#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016491
Skip Montanaro6dead952003-09-25 14:50:04 +000016492int
16493main ()
16494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016495return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016496 ;
16497 return 0;
16498}
16499_ACEOF
16500rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016501if { (ac_try="$ac_link"
16502case "(($ac_try" in
16503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16504 *) ac_try_echo=$ac_try;;
16505esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016509 grep -v '^ *+' conftest.er1 >conftest.err
16510 rm -f conftest.er1
16511 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513 (exit $ac_status); } && {
16514 test -z "$ac_c_werror_flag" ||
16515 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016516 } && test -s conftest$ac_exeext &&
16517 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016518 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016519else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016521sed 's/^/| /' conftest.$ac_ext >&5
16522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016523 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016525
16526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016527 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016528fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016529ac_res=`eval echo '${'$as_ac_var'}'`
16530 { echo "$as_me:$LINENO: result: $ac_res" >&5
16531echo "${ECHO_T}$ac_res" >&6; }
16532if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016533 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016534#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016535_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016536
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016537fi
16538done
16539
Michael W. Hudson54241132001-12-07 15:38:26 +000016540
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016541# For some functions, having a definition is not sufficient, since
16542# we want to take their address.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016543{ echo "$as_me:$LINENO: checking for chroot" >&5
16544echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016546/* confdefs.h. */
16547_ACEOF
16548cat confdefs.h >>conftest.$ac_ext
16549cat >>conftest.$ac_ext <<_ACEOF
16550/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016551#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016552int
16553main ()
16554{
16555void *x=chroot
16556 ;
16557 return 0;
16558}
16559_ACEOF
16560rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561if { (ac_try="$ac_compile"
16562case "(($ac_try" in
16563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16564 *) ac_try_echo=$ac_try;;
16565esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016569 grep -v '^ *+' conftest.er1 >conftest.err
16570 rm -f conftest.er1
16571 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573 (exit $ac_status); } && {
16574 test -z "$ac_c_werror_flag" ||
16575 test ! -s conftest.err
16576 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016577
16578cat >>confdefs.h <<\_ACEOF
16579#define HAVE_CHROOT 1
16580_ACEOF
16581
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016582 { echo "$as_me:$LINENO: result: yes" >&5
16583echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016584else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016586sed 's/^/| /' conftest.$ac_ext >&5
16587
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016588 { echo "$as_me:$LINENO: result: no" >&5
16589echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016590
16591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592
16593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016594{ echo "$as_me:$LINENO: checking for link" >&5
16595echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016597/* confdefs.h. */
16598_ACEOF
16599cat confdefs.h >>conftest.$ac_ext
16600cat >>conftest.$ac_ext <<_ACEOF
16601/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016602#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016603int
16604main ()
16605{
16606void *x=link
16607 ;
16608 return 0;
16609}
16610_ACEOF
16611rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016612if { (ac_try="$ac_compile"
16613case "(($ac_try" in
16614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16615 *) ac_try_echo=$ac_try;;
16616esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016620 grep -v '^ *+' conftest.er1 >conftest.err
16621 rm -f conftest.er1
16622 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016624 (exit $ac_status); } && {
16625 test -z "$ac_c_werror_flag" ||
16626 test ! -s conftest.err
16627 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016628
16629cat >>confdefs.h <<\_ACEOF
16630#define HAVE_LINK 1
16631_ACEOF
16632
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016633 { echo "$as_me:$LINENO: result: yes" >&5
16634echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016635else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016637sed 's/^/| /' conftest.$ac_ext >&5
16638
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016639 { echo "$as_me:$LINENO: result: no" >&5
16640echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016641
16642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643
16644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016645{ echo "$as_me:$LINENO: checking for symlink" >&5
16646echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016648/* confdefs.h. */
16649_ACEOF
16650cat confdefs.h >>conftest.$ac_ext
16651cat >>conftest.$ac_ext <<_ACEOF
16652/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016653#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016654int
16655main ()
16656{
16657void *x=symlink
16658 ;
16659 return 0;
16660}
16661_ACEOF
16662rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663if { (ac_try="$ac_compile"
16664case "(($ac_try" in
16665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16666 *) ac_try_echo=$ac_try;;
16667esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016671 grep -v '^ *+' conftest.er1 >conftest.err
16672 rm -f conftest.er1
16673 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675 (exit $ac_status); } && {
16676 test -z "$ac_c_werror_flag" ||
16677 test ! -s conftest.err
16678 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016679
16680cat >>confdefs.h <<\_ACEOF
16681#define HAVE_SYMLINK 1
16682_ACEOF
16683
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016684 { echo "$as_me:$LINENO: result: yes" >&5
16685echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016686else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016688sed 's/^/| /' conftest.$ac_ext >&5
16689
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016690 { echo "$as_me:$LINENO: result: no" >&5
16691echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016692
16693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694
16695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016696{ echo "$as_me:$LINENO: checking for fchdir" >&5
16697echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016699/* confdefs.h. */
16700_ACEOF
16701cat confdefs.h >>conftest.$ac_ext
16702cat >>conftest.$ac_ext <<_ACEOF
16703/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016704#include <unistd.h>
16705int
16706main ()
16707{
16708void *x=fchdir
16709 ;
16710 return 0;
16711}
16712_ACEOF
16713rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714if { (ac_try="$ac_compile"
16715case "(($ac_try" in
16716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16717 *) ac_try_echo=$ac_try;;
16718esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016722 grep -v '^ *+' conftest.er1 >conftest.err
16723 rm -f conftest.er1
16724 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726 (exit $ac_status); } && {
16727 test -z "$ac_c_werror_flag" ||
16728 test ! -s conftest.err
16729 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016730
16731cat >>confdefs.h <<\_ACEOF
16732#define HAVE_FCHDIR 1
16733_ACEOF
16734
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016735 { echo "$as_me:$LINENO: result: yes" >&5
16736echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016737else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016739sed 's/^/| /' conftest.$ac_ext >&5
16740
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016741 { echo "$as_me:$LINENO: result: no" >&5
16742echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016743
16744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745
16746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016747{ echo "$as_me:$LINENO: checking for fsync" >&5
16748echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016750/* confdefs.h. */
16751_ACEOF
16752cat confdefs.h >>conftest.$ac_ext
16753cat >>conftest.$ac_ext <<_ACEOF
16754/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016755#include <unistd.h>
16756int
16757main ()
16758{
16759void *x=fsync
16760 ;
16761 return 0;
16762}
16763_ACEOF
16764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765if { (ac_try="$ac_compile"
16766case "(($ac_try" in
16767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16768 *) ac_try_echo=$ac_try;;
16769esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016773 grep -v '^ *+' conftest.er1 >conftest.err
16774 rm -f conftest.er1
16775 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016777 (exit $ac_status); } && {
16778 test -z "$ac_c_werror_flag" ||
16779 test ! -s conftest.err
16780 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016781
16782cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016783#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016784_ACEOF
16785
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016786 { echo "$as_me:$LINENO: result: yes" >&5
16787echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016788else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016790sed 's/^/| /' conftest.$ac_ext >&5
16791
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016792 { echo "$as_me:$LINENO: result: no" >&5
16793echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016794
16795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016796
16797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016798{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16799echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016801/* confdefs.h. */
16802_ACEOF
16803cat confdefs.h >>conftest.$ac_ext
16804cat >>conftest.$ac_ext <<_ACEOF
16805/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016806#include <unistd.h>
16807int
16808main ()
16809{
16810void *x=fdatasync
16811 ;
16812 return 0;
16813}
16814_ACEOF
16815rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816if { (ac_try="$ac_compile"
16817case "(($ac_try" in
16818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16819 *) ac_try_echo=$ac_try;;
16820esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016824 grep -v '^ *+' conftest.er1 >conftest.err
16825 rm -f conftest.er1
16826 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016828 (exit $ac_status); } && {
16829 test -z "$ac_c_werror_flag" ||
16830 test ! -s conftest.err
16831 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016832
16833cat >>confdefs.h <<\_ACEOF
16834#define HAVE_FDATASYNC 1
16835_ACEOF
16836
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016837 { echo "$as_me:$LINENO: result: yes" >&5
16838echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016839else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016841sed 's/^/| /' conftest.$ac_ext >&5
16842
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016843 { echo "$as_me:$LINENO: result: no" >&5
16844echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016845
16846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847
16848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016849{ echo "$as_me:$LINENO: checking for epoll" >&5
16850echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016851cat >conftest.$ac_ext <<_ACEOF
16852/* confdefs.h. */
16853_ACEOF
16854cat confdefs.h >>conftest.$ac_ext
16855cat >>conftest.$ac_ext <<_ACEOF
16856/* end confdefs.h. */
16857#include <sys/epoll.h>
16858int
16859main ()
16860{
16861void *x=epoll_create
16862 ;
16863 return 0;
16864}
16865_ACEOF
16866rm -f conftest.$ac_objext
16867if { (ac_try="$ac_compile"
16868case "(($ac_try" in
16869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16870 *) ac_try_echo=$ac_try;;
16871esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016873 (eval "$ac_compile") 2>conftest.er1
16874 ac_status=$?
16875 grep -v '^ *+' conftest.er1 >conftest.err
16876 rm -f conftest.er1
16877 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016879 (exit $ac_status); } && {
16880 test -z "$ac_c_werror_flag" ||
16881 test ! -s conftest.err
16882 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016883
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016884cat >>confdefs.h <<\_ACEOF
16885#define HAVE_EPOLL 1
16886_ACEOF
16887
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016888 { echo "$as_me:$LINENO: result: yes" >&5
16889echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016890else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016891 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016892sed 's/^/| /' conftest.$ac_ext >&5
16893
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016894 { echo "$as_me:$LINENO: result: no" >&5
16895echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016896
16897fi
16898
16899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016900{ echo "$as_me:$LINENO: checking for kqueue" >&5
16901echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016902cat >conftest.$ac_ext <<_ACEOF
16903/* confdefs.h. */
16904_ACEOF
16905cat confdefs.h >>conftest.$ac_ext
16906cat >>conftest.$ac_ext <<_ACEOF
16907/* end confdefs.h. */
16908
16909#include <sys/types.h>
16910#include <sys/event.h>
16911
16912int
16913main ()
16914{
16915int x=kqueue()
16916 ;
16917 return 0;
16918}
16919_ACEOF
16920rm -f conftest.$ac_objext
16921if { (ac_try="$ac_compile"
16922case "(($ac_try" in
16923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16924 *) ac_try_echo=$ac_try;;
16925esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016927 (eval "$ac_compile") 2>conftest.er1
16928 ac_status=$?
16929 grep -v '^ *+' conftest.er1 >conftest.err
16930 rm -f conftest.er1
16931 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016933 (exit $ac_status); } && {
16934 test -z "$ac_c_werror_flag" ||
16935 test ! -s conftest.err
16936 } && test -s conftest.$ac_objext; then
16937
16938cat >>confdefs.h <<\_ACEOF
16939#define HAVE_KQUEUE 1
16940_ACEOF
16941
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016942 { echo "$as_me:$LINENO: result: yes" >&5
16943echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016944else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016945 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016946sed 's/^/| /' conftest.$ac_ext >&5
16947
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016948 { echo "$as_me:$LINENO: result: no" >&5
16949echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016950
16951fi
16952
16953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016954# On some systems (eg. FreeBSD 5), we would find a definition of the
16955# functions ctermid_r, setgroups in the library, but no prototype
16956# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16957# address to avoid compiler warnings and potential miscompilations
16958# because of the missing prototypes.
16959
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016960{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16961echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016963/* confdefs.h. */
16964_ACEOF
16965cat confdefs.h >>conftest.$ac_ext
16966cat >>conftest.$ac_ext <<_ACEOF
16967/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016968
16969#include "confdefs.h"
16970#include <stdio.h>
16971
Martin v. Löwisd5843682002-11-21 20:41:28 +000016972int
16973main ()
16974{
16975void* p = ctermid_r
16976 ;
16977 return 0;
16978}
16979_ACEOF
16980rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981if { (ac_try="$ac_compile"
16982case "(($ac_try" in
16983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16984 *) ac_try_echo=$ac_try;;
16985esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016989 grep -v '^ *+' conftest.er1 >conftest.err
16990 rm -f conftest.er1
16991 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993 (exit $ac_status); } && {
16994 test -z "$ac_c_werror_flag" ||
16995 test ! -s conftest.err
16996 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016997
16998cat >>confdefs.h <<\_ACEOF
16999#define HAVE_CTERMID_R 1
17000_ACEOF
17001
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017002 { echo "$as_me:$LINENO: result: yes" >&5
17003echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017004else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017006sed 's/^/| /' conftest.$ac_ext >&5
17007
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017008 { echo "$as_me:$LINENO: result: no" >&5
17009echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017010
17011fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17014
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017015{ echo "$as_me:$LINENO: checking for flock" >&5
17016echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017018/* confdefs.h. */
17019_ACEOF
17020cat confdefs.h >>conftest.$ac_ext
17021cat >>conftest.$ac_ext <<_ACEOF
17022/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017023
17024#include "confdefs.h"
17025#include <sys/file.h>
17026
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017027int
17028main ()
17029{
17030void* p = flock
17031 ;
17032 return 0;
17033}
17034_ACEOF
17035rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036if { (ac_try="$ac_compile"
17037case "(($ac_try" in
17038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17039 *) ac_try_echo=$ac_try;;
17040esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017044 grep -v '^ *+' conftest.er1 >conftest.err
17045 rm -f conftest.er1
17046 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048 (exit $ac_status); } && {
17049 test -z "$ac_c_werror_flag" ||
17050 test ! -s conftest.err
17051 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017052
17053cat >>confdefs.h <<\_ACEOF
17054#define HAVE_FLOCK 1
17055_ACEOF
17056
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017057 { echo "$as_me:$LINENO: result: yes" >&5
17058echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017059else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017061sed 's/^/| /' conftest.$ac_ext >&5
17062
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017063 { echo "$as_me:$LINENO: result: no" >&5
17064echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017065
17066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17069
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017070{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17071echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017073/* confdefs.h. */
17074_ACEOF
17075cat confdefs.h >>conftest.$ac_ext
17076cat >>conftest.$ac_ext <<_ACEOF
17077/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017078
17079#include "confdefs.h"
17080#include <unistd.h>
17081
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017082int
17083main ()
17084{
17085void* p = getpagesize
17086 ;
17087 return 0;
17088}
17089_ACEOF
17090rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091if { (ac_try="$ac_compile"
17092case "(($ac_try" in
17093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17094 *) ac_try_echo=$ac_try;;
17095esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017099 grep -v '^ *+' conftest.er1 >conftest.err
17100 rm -f conftest.er1
17101 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103 (exit $ac_status); } && {
17104 test -z "$ac_c_werror_flag" ||
17105 test ! -s conftest.err
17106 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017107
17108cat >>confdefs.h <<\_ACEOF
17109#define HAVE_GETPAGESIZE 1
17110_ACEOF
17111
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017112 { echo "$as_me:$LINENO: result: yes" >&5
17113echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017114else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017116sed 's/^/| /' conftest.$ac_ext >&5
17117
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017118 { echo "$as_me:$LINENO: result: no" >&5
17119echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017120
17121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017122
17123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017124
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017125for ac_prog in true
17126do
17127 # Extract the first word of "$ac_prog", so it can be a program name with args.
17128set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017129{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17130echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017131if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017132 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017133else
17134 if test -n "$TRUE"; then
17135 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17136else
17137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17138for as_dir in $PATH
17139do
17140 IFS=$as_save_IFS
17141 test -z "$as_dir" && as_dir=.
17142 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017143 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 +000017144 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017145 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017146 break 2
17147 fi
17148done
17149done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017151
17152fi
17153fi
17154TRUE=$ac_cv_prog_TRUE
17155if test -n "$TRUE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017156 { echo "$as_me:$LINENO: result: $TRUE" >&5
17157echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017158else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017159 { echo "$as_me:$LINENO: result: no" >&5
17160echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017161fi
17162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017164 test -n "$TRUE" && break
17165done
17166test -n "$TRUE" || TRUE="/bin/true"
17167
17168
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017169{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17170echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017171if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017172 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017173else
17174 ac_check_lib_save_LIBS=$LIBS
17175LIBS="-lc $LIBS"
17176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017177/* confdefs.h. */
17178_ACEOF
17179cat confdefs.h >>conftest.$ac_ext
17180cat >>conftest.$ac_ext <<_ACEOF
17181/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183/* Override any GCC internal prototype to avoid an error.
17184 Use char because int might match the return type of a GCC
17185 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017186#ifdef __cplusplus
17187extern "C"
17188#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017189char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017190int
17191main ()
17192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017193return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017194 ;
17195 return 0;
17196}
17197_ACEOF
17198rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017199if { (ac_try="$ac_link"
17200case "(($ac_try" in
17201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17202 *) ac_try_echo=$ac_try;;
17203esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017207 grep -v '^ *+' conftest.er1 >conftest.err
17208 rm -f conftest.er1
17209 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211 (exit $ac_status); } && {
17212 test -z "$ac_c_werror_flag" ||
17213 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017214 } && test -s conftest$ac_exeext &&
17215 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017216 ac_cv_lib_c_inet_aton=yes
17217else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017219sed 's/^/| /' conftest.$ac_ext >&5
17220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017221 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017223
17224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017225 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017226LIBS=$ac_check_lib_save_LIBS
17227fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017228{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17229echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17230if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017231 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017232else
17233
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017234{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17235echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017236if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017237 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017238else
17239 ac_check_lib_save_LIBS=$LIBS
17240LIBS="-lresolv $LIBS"
17241cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017242/* confdefs.h. */
17243_ACEOF
17244cat confdefs.h >>conftest.$ac_ext
17245cat >>conftest.$ac_ext <<_ACEOF
17246/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248/* Override any GCC internal prototype to avoid an error.
17249 Use char because int might match the return type of a GCC
17250 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017251#ifdef __cplusplus
17252extern "C"
17253#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017254char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017255int
17256main ()
17257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017259 ;
17260 return 0;
17261}
17262_ACEOF
17263rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264if { (ac_try="$ac_link"
17265case "(($ac_try" in
17266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17267 *) ac_try_echo=$ac_try;;
17268esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017272 grep -v '^ *+' conftest.er1 >conftest.err
17273 rm -f conftest.er1
17274 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276 (exit $ac_status); } && {
17277 test -z "$ac_c_werror_flag" ||
17278 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017279 } && test -s conftest$ac_exeext &&
17280 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017281 ac_cv_lib_resolv_inet_aton=yes
17282else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017284sed 's/^/| /' conftest.$ac_ext >&5
17285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288
17289rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017291LIBS=$ac_check_lib_save_LIBS
17292fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017293{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17294echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17295if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017296 cat >>confdefs.h <<_ACEOF
17297#define HAVE_LIBRESOLV 1
17298_ACEOF
17299
17300 LIBS="-lresolv $LIBS"
17301
17302fi
17303
17304
17305fi
17306
17307
Christian Heimesd0764e22007-12-04 15:00:33 +000017308# On Tru64, chflags seems to be present, but calling it will
17309# exit Python
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017310{ echo "$as_me:$LINENO: checking for chflags" >&5
17311echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017312if test "${ac_cv_have_chflags+set}" = set; then
17313 echo $ECHO_N "(cached) $ECHO_C" >&6
17314else
17315 if test "$cross_compiling" = yes; then
17316 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000017317else
17318 cat >conftest.$ac_ext <<_ACEOF
17319/* confdefs.h. */
17320_ACEOF
17321cat confdefs.h >>conftest.$ac_ext
17322cat >>conftest.$ac_ext <<_ACEOF
17323/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017324[
Christian Heimesd0764e22007-12-04 15:00:33 +000017325#include <sys/stat.h>
17326#include <unistd.h>
17327int main(int argc, char*argv[])
17328{
17329 if(chflags(argv[0], 0) != 0)
17330 return 1;
17331 return 0;
17332}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017333]
Christian Heimesd0764e22007-12-04 15:00:33 +000017334_ACEOF
17335rm -f conftest$ac_exeext
17336if { (ac_try="$ac_link"
17337case "(($ac_try" in
17338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17339 *) ac_try_echo=$ac_try;;
17340esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017342 (eval "$ac_link") 2>&5
17343 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17346 { (case "(($ac_try" in
17347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17348 *) ac_try_echo=$ac_try;;
17349esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017351 (eval "$ac_try") 2>&5
17352 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017354 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017355 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017356else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017357 echo "$as_me: program exited with status $ac_status" >&5
17358echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017359sed 's/^/| /' conftest.$ac_ext >&5
17360
17361( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017362ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017363fi
17364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17365fi
17366
17367
17368
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017369fi
17370{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
17371echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
17372if test "$ac_cv_have_chflags" = cross ; then
17373 { echo "$as_me:$LINENO: checking for chflags" >&5
17374echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17375if test "${ac_cv_func_chflags+set}" = set; then
17376 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesd0764e22007-12-04 15:00:33 +000017377else
17378 cat >conftest.$ac_ext <<_ACEOF
17379/* confdefs.h. */
17380_ACEOF
17381cat confdefs.h >>conftest.$ac_ext
17382cat >>conftest.$ac_ext <<_ACEOF
17383/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017384/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
17385 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17386#define chflags innocuous_chflags
Christian Heimesd0764e22007-12-04 15:00:33 +000017387
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017388/* System header to define __stub macros and hopefully few prototypes,
17389 which can conflict with char chflags (); below.
17390 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17391 <limits.h> exists even on freestanding compilers. */
17392
17393#ifdef __STDC__
17394# include <limits.h>
17395#else
17396# include <assert.h>
17397#endif
17398
17399#undef chflags
17400
17401/* Override any GCC internal prototype to avoid an error.
17402 Use char because int might match the return type of a GCC
17403 builtin and then its argument prototype would still apply. */
17404#ifdef __cplusplus
17405extern "C"
17406#endif
17407char chflags ();
17408/* The GNU C library defines this for functions which it implements
17409 to always fail with ENOSYS. Some functions are actually named
17410 something starting with __ and the normal name is an alias. */
17411#if defined __stub_chflags || defined __stub___chflags
17412choke me
17413#endif
17414
17415int
17416main ()
17417{
17418return chflags ();
17419 ;
17420 return 0;
17421}
17422_ACEOF
17423rm -f conftest.$ac_objext conftest$ac_exeext
17424if { (ac_try="$ac_link"
17425case "(($ac_try" in
17426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17427 *) ac_try_echo=$ac_try;;
17428esac
17429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17430 (eval "$ac_link") 2>conftest.er1
17431 ac_status=$?
17432 grep -v '^ *+' conftest.er1 >conftest.err
17433 rm -f conftest.er1
17434 cat conftest.err >&5
17435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17436 (exit $ac_status); } && {
17437 test -z "$ac_c_werror_flag" ||
17438 test ! -s conftest.err
17439 } && test -s conftest$ac_exeext &&
17440 $as_test_x conftest$ac_exeext; then
17441 ac_cv_func_chflags=yes
17442else
17443 echo "$as_me: failed program was:" >&5
17444sed 's/^/| /' conftest.$ac_ext >&5
17445
17446 ac_cv_func_chflags=no
17447fi
17448
17449rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17450 conftest$ac_exeext conftest.$ac_ext
17451fi
17452{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
17453echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
17454if test $ac_cv_func_chflags = yes; then
17455 ac_cv_have_chflags="yes"
17456else
17457 ac_cv_have_chflags="no"
17458fi
17459
17460fi
17461if test "$ac_cv_have_chflags" = yes ; then
17462
17463cat >>confdefs.h <<\_ACEOF
17464#define HAVE_CHFLAGS 1
17465_ACEOF
17466
17467fi
17468
17469{ echo "$as_me:$LINENO: checking for lchflags" >&5
17470echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17471if test "${ac_cv_have_lchflags+set}" = set; then
17472 echo $ECHO_N "(cached) $ECHO_C" >&6
17473else
17474 if test "$cross_compiling" = yes; then
17475 ac_cv_have_lchflags=cross
17476else
17477 cat >conftest.$ac_ext <<_ACEOF
17478/* confdefs.h. */
17479_ACEOF
17480cat confdefs.h >>conftest.$ac_ext
17481cat >>conftest.$ac_ext <<_ACEOF
17482/* end confdefs.h. */
17483[
Christian Heimesd0764e22007-12-04 15:00:33 +000017484#include <sys/stat.h>
17485#include <unistd.h>
17486int main(int argc, char*argv[])
17487{
17488 if(lchflags(argv[0], 0) != 0)
17489 return 1;
17490 return 0;
17491}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017492]
Christian Heimesd0764e22007-12-04 15:00:33 +000017493_ACEOF
17494rm -f conftest$ac_exeext
17495if { (ac_try="$ac_link"
17496case "(($ac_try" in
17497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17498 *) ac_try_echo=$ac_try;;
17499esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017501 (eval "$ac_link") 2>&5
17502 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017504 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17505 { (case "(($ac_try" in
17506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17507 *) ac_try_echo=$ac_try;;
17508esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017510 (eval "$ac_try") 2>&5
17511 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017513 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017514 ac_cv_have_lchflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017515else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017516 echo "$as_me: program exited with status $ac_status" >&5
17517echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017518sed 's/^/| /' conftest.$ac_ext >&5
17519
17520( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017521ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017522fi
17523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17524fi
17525
17526
17527
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017528fi
17529{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
17530echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
17531if test "$ac_cv_have_lchflags" = cross ; then
17532 { echo "$as_me:$LINENO: checking for lchflags" >&5
17533echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17534if test "${ac_cv_func_lchflags+set}" = set; then
17535 echo $ECHO_N "(cached) $ECHO_C" >&6
17536else
17537 cat >conftest.$ac_ext <<_ACEOF
17538/* confdefs.h. */
17539_ACEOF
17540cat confdefs.h >>conftest.$ac_ext
17541cat >>conftest.$ac_ext <<_ACEOF
17542/* end confdefs.h. */
17543/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
17544 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17545#define lchflags innocuous_lchflags
17546
17547/* System header to define __stub macros and hopefully few prototypes,
17548 which can conflict with char lchflags (); below.
17549 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17550 <limits.h> exists even on freestanding compilers. */
17551
17552#ifdef __STDC__
17553# include <limits.h>
17554#else
17555# include <assert.h>
17556#endif
17557
17558#undef lchflags
17559
17560/* Override any GCC internal prototype to avoid an error.
17561 Use char because int might match the return type of a GCC
17562 builtin and then its argument prototype would still apply. */
17563#ifdef __cplusplus
17564extern "C"
17565#endif
17566char lchflags ();
17567/* The GNU C library defines this for functions which it implements
17568 to always fail with ENOSYS. Some functions are actually named
17569 something starting with __ and the normal name is an alias. */
17570#if defined __stub_lchflags || defined __stub___lchflags
17571choke me
17572#endif
17573
17574int
17575main ()
17576{
17577return lchflags ();
17578 ;
17579 return 0;
17580}
17581_ACEOF
17582rm -f conftest.$ac_objext conftest$ac_exeext
17583if { (ac_try="$ac_link"
17584case "(($ac_try" in
17585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17586 *) ac_try_echo=$ac_try;;
17587esac
17588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17589 (eval "$ac_link") 2>conftest.er1
17590 ac_status=$?
17591 grep -v '^ *+' conftest.er1 >conftest.err
17592 rm -f conftest.er1
17593 cat conftest.err >&5
17594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17595 (exit $ac_status); } && {
17596 test -z "$ac_c_werror_flag" ||
17597 test ! -s conftest.err
17598 } && test -s conftest$ac_exeext &&
17599 $as_test_x conftest$ac_exeext; then
17600 ac_cv_func_lchflags=yes
17601else
17602 echo "$as_me: failed program was:" >&5
17603sed 's/^/| /' conftest.$ac_ext >&5
17604
17605 ac_cv_func_lchflags=no
17606fi
17607
17608rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17609 conftest$ac_exeext conftest.$ac_ext
17610fi
17611{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
17612echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
17613if test $ac_cv_func_lchflags = yes; then
17614 ac_cv_have_lchflags="yes"
17615else
17616 ac_cv_have_lchflags="no"
17617fi
17618
17619fi
17620if test "$ac_cv_have_lchflags" = yes ; then
17621
17622cat >>confdefs.h <<\_ACEOF
17623#define HAVE_LCHFLAGS 1
17624_ACEOF
17625
17626fi
17627
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017628case $ac_sys_system/$ac_sys_release in
17629Darwin/*)
17630 _CUR_CFLAGS="${CFLAGS}"
17631 _CUR_LDFLAGS="${LDFLAGS}"
17632 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17633 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17634 ;;
17635esac
17636
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017637{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17638echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017639if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017640 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017641else
17642 ac_check_lib_save_LIBS=$LIBS
17643LIBS="-lz $LIBS"
17644cat >conftest.$ac_ext <<_ACEOF
17645/* confdefs.h. */
17646_ACEOF
17647cat confdefs.h >>conftest.$ac_ext
17648cat >>conftest.$ac_ext <<_ACEOF
17649/* end confdefs.h. */
17650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017651/* Override any GCC internal prototype to avoid an error.
17652 Use char because int might match the return type of a GCC
17653 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017654#ifdef __cplusplus
17655extern "C"
17656#endif
17657char inflateCopy ();
17658int
17659main ()
17660{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017661return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017662 ;
17663 return 0;
17664}
17665_ACEOF
17666rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667if { (ac_try="$ac_link"
17668case "(($ac_try" in
17669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17670 *) ac_try_echo=$ac_try;;
17671esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017674 ac_status=$?
17675 grep -v '^ *+' conftest.er1 >conftest.err
17676 rm -f conftest.er1
17677 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679 (exit $ac_status); } && {
17680 test -z "$ac_c_werror_flag" ||
17681 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017682 } && test -s conftest$ac_exeext &&
17683 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017684 ac_cv_lib_z_inflateCopy=yes
17685else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017686 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017687sed 's/^/| /' conftest.$ac_ext >&5
17688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017691
17692rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017693 conftest$ac_exeext conftest.$ac_ext
17694LIBS=$ac_check_lib_save_LIBS
17695fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017696{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17697echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17698if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017699
17700cat >>confdefs.h <<\_ACEOF
17701#define HAVE_ZLIB_COPY 1
17702_ACEOF
17703
17704fi
17705
17706
17707case $ac_sys_system/$ac_sys_release in
17708Darwin/*)
17709 CFLAGS="${_CUR_CFLAGS}"
17710 LDFLAGS="${_CUR_LDFLAGS}"
17711 ;;
17712esac
17713
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017714{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17715echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017716cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017717/* confdefs.h. */
17718_ACEOF
17719cat confdefs.h >>conftest.$ac_ext
17720cat >>conftest.$ac_ext <<_ACEOF
17721/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017722
17723#include "confdefs.h"
17724#include <netdb.h>
17725
Martin v. Löwise9416172003-05-03 10:12:45 +000017726int
17727main ()
17728{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017729void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017730 ;
17731 return 0;
17732}
17733_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017734rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735if { (ac_try="$ac_link"
17736case "(($ac_try" in
17737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17738 *) ac_try_echo=$ac_try;;
17739esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017743 grep -v '^ *+' conftest.er1 >conftest.err
17744 rm -f conftest.er1
17745 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747 (exit $ac_status); } && {
17748 test -z "$ac_c_werror_flag" ||
17749 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017750 } && test -s conftest$ac_exeext &&
17751 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017752
17753cat >>confdefs.h <<\_ACEOF
17754#define HAVE_HSTRERROR 1
17755_ACEOF
17756
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017757 { echo "$as_me:$LINENO: result: yes" >&5
17758echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017759else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017761sed 's/^/| /' conftest.$ac_ext >&5
17762
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017763 { echo "$as_me:$LINENO: result: no" >&5
17764echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017765
17766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767
17768rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017769 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017770
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017771{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17772echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017774/* confdefs.h. */
17775_ACEOF
17776cat confdefs.h >>conftest.$ac_ext
17777cat >>conftest.$ac_ext <<_ACEOF
17778/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017779
17780#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017781#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017782#include <sys/socket.h>
17783#include <netinet/in.h>
17784#include <arpa/inet.h>
17785
Martin v. Löwise9416172003-05-03 10:12:45 +000017786int
17787main ()
17788{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017789void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017790 ;
17791 return 0;
17792}
17793_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017794rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795if { (ac_try="$ac_link"
17796case "(($ac_try" in
17797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17798 *) ac_try_echo=$ac_try;;
17799esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017803 grep -v '^ *+' conftest.er1 >conftest.err
17804 rm -f conftest.er1
17805 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807 (exit $ac_status); } && {
17808 test -z "$ac_c_werror_flag" ||
17809 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017810 } && test -s conftest$ac_exeext &&
17811 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017812
17813cat >>confdefs.h <<\_ACEOF
17814#define HAVE_INET_ATON 1
17815_ACEOF
17816
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017817 { echo "$as_me:$LINENO: result: yes" >&5
17818echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017819else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017821sed 's/^/| /' conftest.$ac_ext >&5
17822
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017823 { echo "$as_me:$LINENO: result: no" >&5
17824echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017825
17826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827
17828rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017830
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017831{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17832echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017834/* confdefs.h. */
17835_ACEOF
17836cat confdefs.h >>conftest.$ac_ext
17837cat >>conftest.$ac_ext <<_ACEOF
17838/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017839
17840#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017841#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017842#include <sys/socket.h>
17843#include <netinet/in.h>
17844#include <arpa/inet.h>
17845
Martin v. Löwise9416172003-05-03 10:12:45 +000017846int
17847main ()
17848{
17849void* p = inet_pton
17850 ;
17851 return 0;
17852}
17853_ACEOF
17854rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855if { (ac_try="$ac_compile"
17856case "(($ac_try" in
17857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17858 *) ac_try_echo=$ac_try;;
17859esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017863 grep -v '^ *+' conftest.er1 >conftest.err
17864 rm -f conftest.er1
17865 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867 (exit $ac_status); } && {
17868 test -z "$ac_c_werror_flag" ||
17869 test ! -s conftest.err
17870 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017871
17872cat >>confdefs.h <<\_ACEOF
17873#define HAVE_INET_PTON 1
17874_ACEOF
17875
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017876 { echo "$as_me:$LINENO: result: yes" >&5
17877echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017878else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017880sed 's/^/| /' conftest.$ac_ext >&5
17881
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017882 { echo "$as_me:$LINENO: result: no" >&5
17883echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017884
17885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017886
17887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017888
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017889# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017890{ echo "$as_me:$LINENO: checking for setgroups" >&5
17891echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017892cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017893/* confdefs.h. */
17894_ACEOF
17895cat confdefs.h >>conftest.$ac_ext
17896cat >>conftest.$ac_ext <<_ACEOF
17897/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017898
17899#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017900#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017901#ifdef HAVE_GRP_H
17902#include <grp.h>
17903#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017904
Martin v. Löwisd5843682002-11-21 20:41:28 +000017905int
17906main ()
17907{
17908void* p = setgroups
17909 ;
17910 return 0;
17911}
17912_ACEOF
17913rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914if { (ac_try="$ac_compile"
17915case "(($ac_try" in
17916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17917 *) ac_try_echo=$ac_try;;
17918esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017922 grep -v '^ *+' conftest.er1 >conftest.err
17923 rm -f conftest.er1
17924 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926 (exit $ac_status); } && {
17927 test -z "$ac_c_werror_flag" ||
17928 test ! -s conftest.err
17929 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017930
17931cat >>confdefs.h <<\_ACEOF
17932#define HAVE_SETGROUPS 1
17933_ACEOF
17934
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017935 { echo "$as_me:$LINENO: result: yes" >&5
17936echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017937else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017939sed 's/^/| /' conftest.$ac_ext >&5
17940
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017941 { echo "$as_me:$LINENO: result: no" >&5
17942echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017943
17944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945
17946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017947
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017948# check for openpty and forkpty
17949
Martin v. Löwis11437992002-04-12 09:54:03 +000017950
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017951for ac_func in openpty
17952do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017953as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17954{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17955echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017956if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017958else
Martin v. Löwis11437992002-04-12 09:54:03 +000017959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017960/* confdefs.h. */
17961_ACEOF
17962cat confdefs.h >>conftest.$ac_ext
17963cat >>conftest.$ac_ext <<_ACEOF
17964/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017965/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17966 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17967#define $ac_func innocuous_$ac_func
17968
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017969/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017970 which can conflict with char $ac_func (); below.
17971 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017972 <limits.h> exists even on freestanding compilers. */
17973
17974#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017975# include <limits.h>
17976#else
17977# include <assert.h>
17978#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017979
17980#undef $ac_func
17981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982/* Override any GCC internal prototype to avoid an error.
17983 Use char because int might match the return type of a GCC
17984 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017985#ifdef __cplusplus
17986extern "C"
17987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017988char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017989/* The GNU C library defines this for functions which it implements
17990 to always fail with ENOSYS. Some functions are actually named
17991 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017992#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017993choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017994#endif
17995
Skip Montanaro6dead952003-09-25 14:50:04 +000017996int
17997main ()
17998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017999return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018000 ;
18001 return 0;
18002}
18003_ACEOF
18004rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018005if { (ac_try="$ac_link"
18006case "(($ac_try" in
18007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18008 *) ac_try_echo=$ac_try;;
18009esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018011 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018013 grep -v '^ *+' conftest.er1 >conftest.err
18014 rm -f conftest.er1
18015 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017 (exit $ac_status); } && {
18018 test -z "$ac_c_werror_flag" ||
18019 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018020 } && test -s conftest$ac_exeext &&
18021 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018022 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018023else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018025sed 's/^/| /' conftest.$ac_ext >&5
18026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029
18030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018031 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018032fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018033ac_res=`eval echo '${'$as_ac_var'}'`
18034 { echo "$as_me:$LINENO: result: $ac_res" >&5
18035echo "${ECHO_T}$ac_res" >&6; }
18036if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018037 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018038#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018039_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018040
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018041else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018042 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18043echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018044if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018045 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018046else
Martin v. Löwis11437992002-04-12 09:54:03 +000018047 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018048LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018049cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018050/* confdefs.h. */
18051_ACEOF
18052cat confdefs.h >>conftest.$ac_ext
18053cat >>conftest.$ac_ext <<_ACEOF
18054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018056/* Override any GCC internal prototype to avoid an error.
18057 Use char because int might match the return type of a GCC
18058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018059#ifdef __cplusplus
18060extern "C"
18061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018062char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018063int
18064main ()
18065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018067 ;
18068 return 0;
18069}
18070_ACEOF
18071rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072if { (ac_try="$ac_link"
18073case "(($ac_try" in
18074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18075 *) ac_try_echo=$ac_try;;
18076esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018078 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018080 grep -v '^ *+' conftest.er1 >conftest.err
18081 rm -f conftest.er1
18082 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084 (exit $ac_status); } && {
18085 test -z "$ac_c_werror_flag" ||
18086 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018087 } && test -s conftest$ac_exeext &&
18088 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018089 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018090else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018092sed 's/^/| /' conftest.$ac_ext >&5
18093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018094 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096
18097rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018098 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018099LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018100fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018101{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18102echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18103if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018104 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018105#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018106_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018107 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018108else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018109 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18110echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018111if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018112 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018113else
18114 ac_check_lib_save_LIBS=$LIBS
18115LIBS="-lbsd $LIBS"
18116cat >conftest.$ac_ext <<_ACEOF
18117/* confdefs.h. */
18118_ACEOF
18119cat confdefs.h >>conftest.$ac_ext
18120cat >>conftest.$ac_ext <<_ACEOF
18121/* end confdefs.h. */
18122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018123/* Override any GCC internal prototype to avoid an error.
18124 Use char because int might match the return type of a GCC
18125 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018126#ifdef __cplusplus
18127extern "C"
18128#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018129char openpty ();
18130int
18131main ()
18132{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018133return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018134 ;
18135 return 0;
18136}
18137_ACEOF
18138rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139if { (ac_try="$ac_link"
18140case "(($ac_try" in
18141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18142 *) ac_try_echo=$ac_try;;
18143esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018145 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018146 ac_status=$?
18147 grep -v '^ *+' conftest.er1 >conftest.err
18148 rm -f conftest.er1
18149 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018151 (exit $ac_status); } && {
18152 test -z "$ac_c_werror_flag" ||
18153 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018154 } && test -s conftest$ac_exeext &&
18155 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018156 ac_cv_lib_bsd_openpty=yes
18157else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018158 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018159sed 's/^/| /' conftest.$ac_ext >&5
18160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018161 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018163
18164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018165 conftest$ac_exeext conftest.$ac_ext
18166LIBS=$ac_check_lib_save_LIBS
18167fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018168{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18169echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18170if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018171 cat >>confdefs.h <<\_ACEOF
18172#define HAVE_OPENPTY 1
18173_ACEOF
18174 LIBS="$LIBS -lbsd"
18175fi
18176
18177
18178fi
18179
Fred Drake8cef4cf2000-06-28 16:40:38 +000018180
18181fi
18182done
18183
Martin v. Löwis11437992002-04-12 09:54:03 +000018184
Fred Drake8cef4cf2000-06-28 16:40:38 +000018185for ac_func in forkpty
18186do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018187as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18188{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18189echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018190if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018191 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018192else
Martin v. Löwis11437992002-04-12 09:54:03 +000018193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018194/* confdefs.h. */
18195_ACEOF
18196cat confdefs.h >>conftest.$ac_ext
18197cat >>conftest.$ac_ext <<_ACEOF
18198/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018199/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18200 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18201#define $ac_func innocuous_$ac_func
18202
Fred Drake8cef4cf2000-06-28 16:40:38 +000018203/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018204 which can conflict with char $ac_func (); below.
18205 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018206 <limits.h> exists even on freestanding compilers. */
18207
18208#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018209# include <limits.h>
18210#else
18211# include <assert.h>
18212#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018213
18214#undef $ac_func
18215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018216/* Override any GCC internal prototype to avoid an error.
18217 Use char because int might match the return type of a GCC
18218 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018219#ifdef __cplusplus
18220extern "C"
18221#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018222char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018223/* The GNU C library defines this for functions which it implements
18224 to always fail with ENOSYS. Some functions are actually named
18225 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018226#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018227choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018228#endif
18229
Skip Montanaro6dead952003-09-25 14:50:04 +000018230int
18231main ()
18232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018233return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018234 ;
18235 return 0;
18236}
18237_ACEOF
18238rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018239if { (ac_try="$ac_link"
18240case "(($ac_try" in
18241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18242 *) ac_try_echo=$ac_try;;
18243esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018245 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018247 grep -v '^ *+' conftest.er1 >conftest.err
18248 rm -f conftest.er1
18249 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018251 (exit $ac_status); } && {
18252 test -z "$ac_c_werror_flag" ||
18253 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018254 } && test -s conftest$ac_exeext &&
18255 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018256 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018257else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018259sed 's/^/| /' conftest.$ac_ext >&5
18260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018263
18264rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018265 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018266fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018267ac_res=`eval echo '${'$as_ac_var'}'`
18268 { echo "$as_me:$LINENO: result: $ac_res" >&5
18269echo "${ECHO_T}$ac_res" >&6; }
18270if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018271 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018272#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018273_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018274
Fred Drake8cef4cf2000-06-28 16:40:38 +000018275else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018276 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18277echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018278if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018279 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018280else
Martin v. Löwis11437992002-04-12 09:54:03 +000018281 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018282LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018283cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018284/* confdefs.h. */
18285_ACEOF
18286cat confdefs.h >>conftest.$ac_ext
18287cat >>conftest.$ac_ext <<_ACEOF
18288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018290/* Override any GCC internal prototype to avoid an error.
18291 Use char because int might match the return type of a GCC
18292 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018293#ifdef __cplusplus
18294extern "C"
18295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018296char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018297int
18298main ()
18299{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018300return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018301 ;
18302 return 0;
18303}
18304_ACEOF
18305rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018306if { (ac_try="$ac_link"
18307case "(($ac_try" in
18308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18309 *) ac_try_echo=$ac_try;;
18310esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018312 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018314 grep -v '^ *+' conftest.er1 >conftest.err
18315 rm -f conftest.er1
18316 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018318 (exit $ac_status); } && {
18319 test -z "$ac_c_werror_flag" ||
18320 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018321 } && test -s conftest$ac_exeext &&
18322 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018323 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018324else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018326sed 's/^/| /' conftest.$ac_ext >&5
18327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018328 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018330
18331rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018333LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018334fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018335{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18336echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18337if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018338 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018339#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018340_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018341 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018342else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018343 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18344echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018345if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018346 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018347else
18348 ac_check_lib_save_LIBS=$LIBS
18349LIBS="-lbsd $LIBS"
18350cat >conftest.$ac_ext <<_ACEOF
18351/* confdefs.h. */
18352_ACEOF
18353cat confdefs.h >>conftest.$ac_ext
18354cat >>conftest.$ac_ext <<_ACEOF
18355/* end confdefs.h. */
18356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018357/* Override any GCC internal prototype to avoid an error.
18358 Use char because int might match the return type of a GCC
18359 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018360#ifdef __cplusplus
18361extern "C"
18362#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018363char forkpty ();
18364int
18365main ()
18366{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018367return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018368 ;
18369 return 0;
18370}
18371_ACEOF
18372rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018373if { (ac_try="$ac_link"
18374case "(($ac_try" in
18375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18376 *) ac_try_echo=$ac_try;;
18377esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018379 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018380 ac_status=$?
18381 grep -v '^ *+' conftest.er1 >conftest.err
18382 rm -f conftest.er1
18383 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385 (exit $ac_status); } && {
18386 test -z "$ac_c_werror_flag" ||
18387 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018388 } && test -s conftest$ac_exeext &&
18389 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018390 ac_cv_lib_bsd_forkpty=yes
18391else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018392 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018393sed 's/^/| /' conftest.$ac_ext >&5
18394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018395 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018397
18398rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018399 conftest$ac_exeext conftest.$ac_ext
18400LIBS=$ac_check_lib_save_LIBS
18401fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018402{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18403echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18404if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018405 cat >>confdefs.h <<\_ACEOF
18406#define HAVE_FORKPTY 1
18407_ACEOF
18408 LIBS="$LIBS -lbsd"
18409fi
18410
18411
18412fi
18413
Fred Drake8cef4cf2000-06-28 16:40:38 +000018414
18415fi
18416done
18417
Jack Jansendd19cf82001-12-06 22:36:17 +000018418
Christian Heimesb186d002008-03-18 15:15:01 +000018419# Stuff for expat.
18420
18421for ac_func in memmove
18422do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018423as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18424{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18425echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018426if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018427 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018428else
18429 cat >conftest.$ac_ext <<_ACEOF
18430/* confdefs.h. */
18431_ACEOF
18432cat confdefs.h >>conftest.$ac_ext
18433cat >>conftest.$ac_ext <<_ACEOF
18434/* end confdefs.h. */
18435/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18436 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18437#define $ac_func innocuous_$ac_func
18438
18439/* System header to define __stub macros and hopefully few prototypes,
18440 which can conflict with char $ac_func (); below.
18441 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18442 <limits.h> exists even on freestanding compilers. */
18443
18444#ifdef __STDC__
18445# include <limits.h>
18446#else
18447# include <assert.h>
18448#endif
18449
18450#undef $ac_func
18451
18452/* Override any GCC internal prototype to avoid an error.
18453 Use char because int might match the return type of a GCC
18454 builtin and then its argument prototype would still apply. */
18455#ifdef __cplusplus
18456extern "C"
18457#endif
18458char $ac_func ();
18459/* The GNU C library defines this for functions which it implements
18460 to always fail with ENOSYS. Some functions are actually named
18461 something starting with __ and the normal name is an alias. */
18462#if defined __stub_$ac_func || defined __stub___$ac_func
18463choke me
18464#endif
18465
18466int
18467main ()
18468{
18469return $ac_func ();
18470 ;
18471 return 0;
18472}
18473_ACEOF
18474rm -f conftest.$ac_objext conftest$ac_exeext
18475if { (ac_try="$ac_link"
18476case "(($ac_try" in
18477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18478 *) ac_try_echo=$ac_try;;
18479esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018481 (eval "$ac_link") 2>conftest.er1
18482 ac_status=$?
18483 grep -v '^ *+' conftest.er1 >conftest.err
18484 rm -f conftest.er1
18485 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018487 (exit $ac_status); } && {
18488 test -z "$ac_c_werror_flag" ||
18489 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018490 } && test -s conftest$ac_exeext &&
18491 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018492 eval "$as_ac_var=yes"
18493else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018494 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018495sed 's/^/| /' conftest.$ac_ext >&5
18496
18497 eval "$as_ac_var=no"
18498fi
18499
18500rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18501 conftest$ac_exeext conftest.$ac_ext
18502fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018503ac_res=`eval echo '${'$as_ac_var'}'`
18504 { echo "$as_me:$LINENO: result: $ac_res" >&5
18505echo "${ECHO_T}$ac_res" >&6; }
18506if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018507 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018508#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018509_ACEOF
18510
18511fi
18512done
18513
18514
Michael W. Hudson54241132001-12-07 15:38:26 +000018515# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018516
18517
18518
18519
18520
18521
Fred Drake8cef4cf2000-06-28 16:40:38 +000018522for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18523do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018524as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18525{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18526echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018528 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018529else
Martin v. Löwis11437992002-04-12 09:54:03 +000018530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018531/* confdefs.h. */
18532_ACEOF
18533cat confdefs.h >>conftest.$ac_ext
18534cat >>conftest.$ac_ext <<_ACEOF
18535/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018536/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18537 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18538#define $ac_func innocuous_$ac_func
18539
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018540/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018541 which can conflict with char $ac_func (); below.
18542 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018543 <limits.h> exists even on freestanding compilers. */
18544
18545#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018546# include <limits.h>
18547#else
18548# include <assert.h>
18549#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018550
18551#undef $ac_func
18552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018553/* Override any GCC internal prototype to avoid an error.
18554 Use char because int might match the return type of a GCC
18555 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018556#ifdef __cplusplus
18557extern "C"
18558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018559char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018560/* The GNU C library defines this for functions which it implements
18561 to always fail with ENOSYS. Some functions are actually named
18562 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018563#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018564choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018565#endif
18566
Skip Montanaro6dead952003-09-25 14:50:04 +000018567int
18568main ()
18569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018571 ;
18572 return 0;
18573}
18574_ACEOF
18575rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018576if { (ac_try="$ac_link"
18577case "(($ac_try" in
18578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18579 *) ac_try_echo=$ac_try;;
18580esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018582 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018584 grep -v '^ *+' conftest.er1 >conftest.err
18585 rm -f conftest.er1
18586 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018588 (exit $ac_status); } && {
18589 test -z "$ac_c_werror_flag" ||
18590 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018591 } && test -s conftest$ac_exeext &&
18592 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018593 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018594else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018596sed 's/^/| /' conftest.$ac_ext >&5
18597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018598 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600
18601rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018602 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018603fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018604ac_res=`eval echo '${'$as_ac_var'}'`
18605 { echo "$as_me:$LINENO: result: $ac_res" >&5
18606echo "${ECHO_T}$ac_res" >&6; }
18607if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018608 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018609#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018610_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018611
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018612fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018613done
18614
Michael W. Hudson54241132001-12-07 15:38:26 +000018615
Martin v. Löwis11437992002-04-12 09:54:03 +000018616
18617
18618
Christian Heimesb186d002008-03-18 15:15:01 +000018619for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018620do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018621as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18622{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18623echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018624if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018625 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018626else
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018628/* confdefs.h. */
18629_ACEOF
18630cat confdefs.h >>conftest.$ac_ext
18631cat >>conftest.$ac_ext <<_ACEOF
18632/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018633/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18634 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18635#define $ac_func innocuous_$ac_func
18636
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018637/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018638 which can conflict with char $ac_func (); below.
18639 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018640 <limits.h> exists even on freestanding compilers. */
18641
18642#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018643# include <limits.h>
18644#else
18645# include <assert.h>
18646#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018647
18648#undef $ac_func
18649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018650/* Override any GCC internal prototype to avoid an error.
18651 Use char because int might match the return type of a GCC
18652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018653#ifdef __cplusplus
18654extern "C"
18655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018656char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018657/* The GNU C library defines this for functions which it implements
18658 to always fail with ENOSYS. Some functions are actually named
18659 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018660#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018661choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018662#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018663
Skip Montanaro6dead952003-09-25 14:50:04 +000018664int
18665main ()
18666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018667return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018668 ;
18669 return 0;
18670}
18671_ACEOF
18672rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018673if { (ac_try="$ac_link"
18674case "(($ac_try" in
18675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18676 *) ac_try_echo=$ac_try;;
18677esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018679 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018681 grep -v '^ *+' conftest.er1 >conftest.err
18682 rm -f conftest.er1
18683 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018685 (exit $ac_status); } && {
18686 test -z "$ac_c_werror_flag" ||
18687 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018688 } && test -s conftest$ac_exeext &&
18689 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018690 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018691else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018693sed 's/^/| /' conftest.$ac_ext >&5
18694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018695 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018697
18698rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018700fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018701ac_res=`eval echo '${'$as_ac_var'}'`
18702 { echo "$as_me:$LINENO: result: $ac_res" >&5
18703echo "${ECHO_T}$ac_res" >&6; }
18704if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018705 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018706#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018707_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018708
Martin v. Löwis1142de32002-03-29 16:28:31 +000018709else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018710 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018711 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018712 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18713 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018714esac
18715
Martin v. Löwis1142de32002-03-29 16:28:31 +000018716fi
18717done
18718
18719
Martin v. Löwis11437992002-04-12 09:54:03 +000018720
Martin v. Löwis1142de32002-03-29 16:28:31 +000018721for ac_func in getpgrp
18722do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018723as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18724{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18725echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018726if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018727 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018728else
Martin v. Löwis11437992002-04-12 09:54:03 +000018729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018730/* confdefs.h. */
18731_ACEOF
18732cat confdefs.h >>conftest.$ac_ext
18733cat >>conftest.$ac_ext <<_ACEOF
18734/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018735/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18736 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18737#define $ac_func innocuous_$ac_func
18738
Martin v. Löwis1142de32002-03-29 16:28:31 +000018739/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018740 which can conflict with char $ac_func (); below.
18741 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018742 <limits.h> exists even on freestanding compilers. */
18743
18744#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018745# include <limits.h>
18746#else
18747# include <assert.h>
18748#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018749
18750#undef $ac_func
18751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018752/* Override any GCC internal prototype to avoid an error.
18753 Use char because int might match the return type of a GCC
18754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018755#ifdef __cplusplus
18756extern "C"
18757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018758char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018759/* The GNU C library defines this for functions which it implements
18760 to always fail with ENOSYS. Some functions are actually named
18761 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018762#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018763choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018764#endif
18765
Skip Montanaro6dead952003-09-25 14:50:04 +000018766int
18767main ()
18768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018769return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018770 ;
18771 return 0;
18772}
18773_ACEOF
18774rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018775if { (ac_try="$ac_link"
18776case "(($ac_try" in
18777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18778 *) ac_try_echo=$ac_try;;
18779esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018781 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018783 grep -v '^ *+' conftest.er1 >conftest.err
18784 rm -f conftest.er1
18785 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018787 (exit $ac_status); } && {
18788 test -z "$ac_c_werror_flag" ||
18789 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018790 } && test -s conftest$ac_exeext &&
18791 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018792 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018793else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018795sed 's/^/| /' conftest.$ac_ext >&5
18796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018797 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018799
18800rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018801 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018802fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018803ac_res=`eval echo '${'$as_ac_var'}'`
18804 { echo "$as_me:$LINENO: result: $ac_res" >&5
18805echo "${ECHO_T}$ac_res" >&6; }
18806if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018807 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018808#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018809_ACEOF
18810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018811/* confdefs.h. */
18812_ACEOF
18813cat confdefs.h >>conftest.$ac_ext
18814cat >>conftest.$ac_ext <<_ACEOF
18815/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018816#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018817int
18818main ()
18819{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018820getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018821 ;
18822 return 0;
18823}
18824_ACEOF
18825rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018826if { (ac_try="$ac_compile"
18827case "(($ac_try" in
18828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18829 *) ac_try_echo=$ac_try;;
18830esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018834 grep -v '^ *+' conftest.er1 >conftest.err
18835 rm -f conftest.er1
18836 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018838 (exit $ac_status); } && {
18839 test -z "$ac_c_werror_flag" ||
18840 test ! -s conftest.err
18841 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018842
18843cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018844#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018845_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018846
Martin v. Löwis11437992002-04-12 09:54:03 +000018847
Guido van Rossumf78abae1997-01-21 22:02:36 +000018848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018850sed 's/^/| /' conftest.$ac_ext >&5
18851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018852
Guido van Rossum627b2d71993-12-24 10:39:16 +000018853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018854
18855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018856
Guido van Rossum627b2d71993-12-24 10:39:16 +000018857fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018858done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018859
Jack Jansen150753c2003-03-29 22:07:47 +000018860
18861for ac_func in setpgrp
18862do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018863as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18864{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18865echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018866if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018867 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018868else
Martin v. Löwis11437992002-04-12 09:54:03 +000018869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018870/* confdefs.h. */
18871_ACEOF
18872cat confdefs.h >>conftest.$ac_ext
18873cat >>conftest.$ac_ext <<_ACEOF
18874/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018875/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18876 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18877#define $ac_func innocuous_$ac_func
18878
Jack Jansen150753c2003-03-29 22:07:47 +000018879/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018880 which can conflict with char $ac_func (); below.
18881 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018882 <limits.h> exists even on freestanding compilers. */
18883
18884#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018885# include <limits.h>
18886#else
18887# include <assert.h>
18888#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018889
18890#undef $ac_func
18891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018892/* Override any GCC internal prototype to avoid an error.
18893 Use char because int might match the return type of a GCC
18894 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018895#ifdef __cplusplus
18896extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018897#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018898char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018899/* The GNU C library defines this for functions which it implements
18900 to always fail with ENOSYS. Some functions are actually named
18901 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018902#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018903choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018904#endif
18905
Skip Montanaro6dead952003-09-25 14:50:04 +000018906int
18907main ()
18908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018909return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018910 ;
18911 return 0;
18912}
18913_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018914rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018915if { (ac_try="$ac_link"
18916case "(($ac_try" in
18917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18918 *) ac_try_echo=$ac_try;;
18919esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018921 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018923 grep -v '^ *+' conftest.er1 >conftest.err
18924 rm -f conftest.er1
18925 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018927 (exit $ac_status); } && {
18928 test -z "$ac_c_werror_flag" ||
18929 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018930 } && test -s conftest$ac_exeext &&
18931 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018932 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018933else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018935sed 's/^/| /' conftest.$ac_ext >&5
18936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018937 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018939
18940rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018941 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018942fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018943ac_res=`eval echo '${'$as_ac_var'}'`
18944 { echo "$as_me:$LINENO: result: $ac_res" >&5
18945echo "${ECHO_T}$ac_res" >&6; }
18946if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000018947 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018948#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000018949_ACEOF
18950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018951/* confdefs.h. */
18952_ACEOF
18953cat confdefs.h >>conftest.$ac_ext
18954cat >>conftest.$ac_ext <<_ACEOF
18955/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018956#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018957int
18958main ()
18959{
18960setpgrp(0,0);
18961 ;
18962 return 0;
18963}
18964_ACEOF
18965rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018966if { (ac_try="$ac_compile"
18967case "(($ac_try" in
18968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18969 *) ac_try_echo=$ac_try;;
18970esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018972 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018974 grep -v '^ *+' conftest.er1 >conftest.err
18975 rm -f conftest.er1
18976 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018978 (exit $ac_status); } && {
18979 test -z "$ac_c_werror_flag" ||
18980 test ! -s conftest.err
18981 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018982
18983cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018984#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018985_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018986
Jack Jansen150753c2003-03-29 22:07:47 +000018987
18988else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018990sed 's/^/| /' conftest.$ac_ext >&5
18991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018992
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018994
18995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018996
18997fi
18998done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018999
Martin v. Löwis11437992002-04-12 09:54:03 +000019000
Thomas Wouters3a584202000-08-05 23:28:51 +000019001for ac_func in gettimeofday
19002do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019003as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19004{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19005echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019006if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019007 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019008else
Martin v. Löwis11437992002-04-12 09:54:03 +000019009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019010/* confdefs.h. */
19011_ACEOF
19012cat confdefs.h >>conftest.$ac_ext
19013cat >>conftest.$ac_ext <<_ACEOF
19014/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019015/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19016 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19017#define $ac_func innocuous_$ac_func
19018
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019019/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019020 which can conflict with char $ac_func (); below.
19021 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019022 <limits.h> exists even on freestanding compilers. */
19023
19024#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019025# include <limits.h>
19026#else
19027# include <assert.h>
19028#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019029
19030#undef $ac_func
19031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019032/* Override any GCC internal prototype to avoid an error.
19033 Use char because int might match the return type of a GCC
19034 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019035#ifdef __cplusplus
19036extern "C"
19037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019038char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019039/* The GNU C library defines this for functions which it implements
19040 to always fail with ENOSYS. Some functions are actually named
19041 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019042#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019043choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019044#endif
19045
Skip Montanaro6dead952003-09-25 14:50:04 +000019046int
19047main ()
19048{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019049return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019050 ;
19051 return 0;
19052}
19053_ACEOF
19054rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019055if { (ac_try="$ac_link"
19056case "(($ac_try" in
19057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19058 *) ac_try_echo=$ac_try;;
19059esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019061 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019063 grep -v '^ *+' conftest.er1 >conftest.err
19064 rm -f conftest.er1
19065 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019067 (exit $ac_status); } && {
19068 test -z "$ac_c_werror_flag" ||
19069 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019070 } && test -s conftest$ac_exeext &&
19071 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019072 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019073else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019075sed 's/^/| /' conftest.$ac_ext >&5
19076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019077 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019079
19080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019081 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019082fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019083ac_res=`eval echo '${'$as_ac_var'}'`
19084 { echo "$as_me:$LINENO: result: $ac_res" >&5
19085echo "${ECHO_T}$ac_res" >&6; }
19086if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019087 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019088#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019089_ACEOF
19090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019091/* confdefs.h. */
19092_ACEOF
19093cat confdefs.h >>conftest.$ac_ext
19094cat >>conftest.$ac_ext <<_ACEOF
19095/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019096#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019097int
19098main ()
19099{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019100gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019101 ;
19102 return 0;
19103}
19104_ACEOF
19105rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019106if { (ac_try="$ac_compile"
19107case "(($ac_try" in
19108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19109 *) ac_try_echo=$ac_try;;
19110esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019114 grep -v '^ *+' conftest.er1 >conftest.err
19115 rm -f conftest.er1
19116 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019118 (exit $ac_status); } && {
19119 test -z "$ac_c_werror_flag" ||
19120 test ! -s conftest.err
19121 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019122 :
19123else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019125sed 's/^/| /' conftest.$ac_ext >&5
19126
Martin v. Löwis11437992002-04-12 09:54:03 +000019127
19128cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019129#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019130_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019131
Martin v. Löwis11437992002-04-12 09:54:03 +000019132
Guido van Rossum627b2d71993-12-24 10:39:16 +000019133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019134
19135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019136
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019137fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019138done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019139
Michael W. Hudson54241132001-12-07 15:38:26 +000019140
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019141{ echo "$as_me:$LINENO: checking for major" >&5
19142echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019144/* confdefs.h. */
19145_ACEOF
19146cat confdefs.h >>conftest.$ac_ext
19147cat >>conftest.$ac_ext <<_ACEOF
19148/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019149
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019150#if defined(MAJOR_IN_MKDEV)
19151#include <sys/mkdev.h>
19152#elif defined(MAJOR_IN_SYSMACROS)
19153#include <sys/sysmacros.h>
19154#else
19155#include <sys/types.h>
19156#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019157
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019158int
19159main ()
19160{
19161
19162 makedev(major(0),minor(0));
19163
19164 ;
19165 return 0;
19166}
19167_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019168rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019169if { (ac_try="$ac_link"
19170case "(($ac_try" in
19171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19172 *) ac_try_echo=$ac_try;;
19173esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019175 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019177 grep -v '^ *+' conftest.er1 >conftest.err
19178 rm -f conftest.er1
19179 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019181 (exit $ac_status); } && {
19182 test -z "$ac_c_werror_flag" ||
19183 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019184 } && test -s conftest$ac_exeext &&
19185 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019186
19187
19188cat >>confdefs.h <<\_ACEOF
19189#define HAVE_DEVICE_MACROS 1
19190_ACEOF
19191
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019192 { echo "$as_me:$LINENO: result: yes" >&5
19193echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019194
19195else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019197sed 's/^/| /' conftest.$ac_ext >&5
19198
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019199
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019200 { echo "$as_me:$LINENO: result: no" >&5
19201echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019202
19203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019204
19205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019206 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019207
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019208# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019209# for [no]getaddrinfo in netdb.h.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019210{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19211echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019213/* confdefs.h. */
19214_ACEOF
19215cat confdefs.h >>conftest.$ac_ext
19216cat >>conftest.$ac_ext <<_ACEOF
19217/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019218
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019219#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019220#include <sys/socket.h>
19221#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019222#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019223
Martin v. Löwis11437992002-04-12 09:54:03 +000019224int
19225main ()
19226{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019227
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019228getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019229
Martin v. Löwis11437992002-04-12 09:54:03 +000019230 ;
19231 return 0;
19232}
19233_ACEOF
19234rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019235if { (ac_try="$ac_link"
19236case "(($ac_try" in
19237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19238 *) ac_try_echo=$ac_try;;
19239esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019241 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019243 grep -v '^ *+' conftest.er1 >conftest.err
19244 rm -f conftest.er1
19245 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019247 (exit $ac_status); } && {
19248 test -z "$ac_c_werror_flag" ||
19249 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019250 } && test -s conftest$ac_exeext &&
19251 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019252
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019253{ echo "$as_me:$LINENO: result: yes" >&5
19254echo "${ECHO_T}yes" >&6; }
19255{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19256echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019257if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019258 { echo "$as_me:$LINENO: result: buggy" >&5
19259echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019260buggygetaddrinfo=yes
19261else
Martin v. Löwis11437992002-04-12 09:54:03 +000019262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019263/* confdefs.h. */
19264_ACEOF
19265cat confdefs.h >>conftest.$ac_ext
19266cat >>conftest.$ac_ext <<_ACEOF
19267/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019268
19269#include <sys/types.h>
19270#include <netdb.h>
19271#include <string.h>
19272#include <sys/socket.h>
19273#include <netinet/in.h>
19274
19275main()
19276{
19277 int passive, gaierr, inet4 = 0, inet6 = 0;
19278 struct addrinfo hints, *ai, *aitop;
19279 char straddr[INET6_ADDRSTRLEN], strport[16];
19280
19281 for (passive = 0; passive <= 1; passive++) {
19282 memset(&hints, 0, sizeof(hints));
19283 hints.ai_family = AF_UNSPEC;
19284 hints.ai_flags = passive ? AI_PASSIVE : 0;
19285 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019286 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019287 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19288 (void)gai_strerror(gaierr);
19289 goto bad;
19290 }
19291 for (ai = aitop; ai; ai = ai->ai_next) {
19292 if (ai->ai_addr == NULL ||
19293 ai->ai_addrlen == 0 ||
19294 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19295 straddr, sizeof(straddr), strport, sizeof(strport),
19296 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19297 goto bad;
19298 }
19299 switch (ai->ai_family) {
19300 case AF_INET:
19301 if (strcmp(strport, "54321") != 0) {
19302 goto bad;
19303 }
19304 if (passive) {
19305 if (strcmp(straddr, "0.0.0.0") != 0) {
19306 goto bad;
19307 }
19308 } else {
19309 if (strcmp(straddr, "127.0.0.1") != 0) {
19310 goto bad;
19311 }
19312 }
19313 inet4++;
19314 break;
19315 case AF_INET6:
19316 if (strcmp(strport, "54321") != 0) {
19317 goto bad;
19318 }
19319 if (passive) {
19320 if (strcmp(straddr, "::") != 0) {
19321 goto bad;
19322 }
19323 } else {
19324 if (strcmp(straddr, "::1") != 0) {
19325 goto bad;
19326 }
19327 }
19328 inet6++;
19329 break;
19330 case AF_UNSPEC:
19331 goto bad;
19332 break;
19333 default:
19334 /* another family support? */
19335 break;
19336 }
19337 }
19338 }
19339
19340 if (!(inet4 == 0 || inet4 == 2))
19341 goto bad;
19342 if (!(inet6 == 0 || inet6 == 2))
19343 goto bad;
19344
19345 if (aitop)
19346 freeaddrinfo(aitop);
19347 exit(0);
19348
19349 bad:
19350 if (aitop)
19351 freeaddrinfo(aitop);
19352 exit(1);
19353}
19354
Martin v. Löwis11437992002-04-12 09:54:03 +000019355_ACEOF
19356rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019357if { (ac_try="$ac_link"
19358case "(($ac_try" in
19359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19360 *) ac_try_echo=$ac_try;;
19361esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019363 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019364 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019366 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019367 { (case "(($ac_try" in
19368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19369 *) ac_try_echo=$ac_try;;
19370esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019372 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019373 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019375 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019376 { echo "$as_me:$LINENO: result: good" >&5
19377echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019378buggygetaddrinfo=no
19379else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019380 echo "$as_me: program exited with status $ac_status" >&5
19381echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019382sed 's/^/| /' conftest.$ac_ext >&5
19383
Martin v. Löwis11437992002-04-12 09:54:03 +000019384( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019385{ echo "$as_me:$LINENO: result: buggy" >&5
19386echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019387buggygetaddrinfo=yes
19388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019389rm -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 +000019390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019391
19392
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019393else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019395sed 's/^/| /' conftest.$ac_ext >&5
19396
Martin v. Löwis11437992002-04-12 09:54:03 +000019397
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019398{ echo "$as_me:$LINENO: result: no" >&5
19399echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019400buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019401
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019403
19404rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019405 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019406
19407if test "$buggygetaddrinfo" = "yes"; then
19408 if test "$ipv6" = "yes"; then
19409 echo 'Fatal: You must get working getaddrinfo() function.'
19410 echo ' or you can specify "--disable-ipv6"'.
19411 exit 1
19412 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019413else
Martin v. Löwis11437992002-04-12 09:54:03 +000019414
19415cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019416#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019417_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019418
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019420
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019421for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019422do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019423as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19424{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19425echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019426if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019427 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019428else
Martin v. Löwis11437992002-04-12 09:54:03 +000019429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019430/* confdefs.h. */
19431_ACEOF
19432cat confdefs.h >>conftest.$ac_ext
19433cat >>conftest.$ac_ext <<_ACEOF
19434/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019435/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19436 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19437#define $ac_func innocuous_$ac_func
19438
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019439/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019440 which can conflict with char $ac_func (); below.
19441 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019442 <limits.h> exists even on freestanding compilers. */
19443
19444#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019445# include <limits.h>
19446#else
19447# include <assert.h>
19448#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019449
19450#undef $ac_func
19451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019452/* Override any GCC internal prototype to avoid an error.
19453 Use char because int might match the return type of a GCC
19454 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019455#ifdef __cplusplus
19456extern "C"
19457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019458char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019459/* The GNU C library defines this for functions which it implements
19460 to always fail with ENOSYS. Some functions are actually named
19461 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019462#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019463choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019464#endif
19465
Skip Montanaro6dead952003-09-25 14:50:04 +000019466int
19467main ()
19468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019469return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019470 ;
19471 return 0;
19472}
19473_ACEOF
19474rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019475if { (ac_try="$ac_link"
19476case "(($ac_try" in
19477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19478 *) ac_try_echo=$ac_try;;
19479esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019481 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019483 grep -v '^ *+' conftest.er1 >conftest.err
19484 rm -f conftest.er1
19485 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019487 (exit $ac_status); } && {
19488 test -z "$ac_c_werror_flag" ||
19489 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019490 } && test -s conftest$ac_exeext &&
19491 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019492 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019493else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019495sed 's/^/| /' conftest.$ac_ext >&5
19496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019497 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019499
19500rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019501 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019502fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019503ac_res=`eval echo '${'$as_ac_var'}'`
19504 { echo "$as_me:$LINENO: result: $ac_res" >&5
19505echo "${ECHO_T}$ac_res" >&6; }
19506if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019507 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019508#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019509_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019510
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019511fi
19512done
19513
Michael W. Hudson54241132001-12-07 15:38:26 +000019514
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019515# checks for structures
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019516{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19517echo $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 +000019518if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019519 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019520else
Martin v. Löwis11437992002-04-12 09:54:03 +000019521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019522/* confdefs.h. */
19523_ACEOF
19524cat confdefs.h >>conftest.$ac_ext
19525cat >>conftest.$ac_ext <<_ACEOF
19526/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019527#include <sys/types.h>
19528#include <sys/time.h>
19529#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019530
Martin v. Löwis11437992002-04-12 09:54:03 +000019531int
19532main ()
19533{
19534if ((struct tm *) 0)
19535return 0;
19536 ;
19537 return 0;
19538}
19539_ACEOF
19540rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019541if { (ac_try="$ac_compile"
19542case "(($ac_try" in
19543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19544 *) ac_try_echo=$ac_try;;
19545esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019549 grep -v '^ *+' conftest.er1 >conftest.err
19550 rm -f conftest.er1
19551 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019553 (exit $ac_status); } && {
19554 test -z "$ac_c_werror_flag" ||
19555 test ! -s conftest.err
19556 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019557 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019558else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019560sed 's/^/| /' conftest.$ac_ext >&5
19561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019562 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019564
19565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019566fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019567{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19568echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019569if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019570
19571cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019572#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019573_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019574
19575fi
19576
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019577{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19578echo $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 +000019579if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019581else
Martin v. Löwis11437992002-04-12 09:54:03 +000019582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019583/* confdefs.h. */
19584_ACEOF
19585cat confdefs.h >>conftest.$ac_ext
19586cat >>conftest.$ac_ext <<_ACEOF
19587/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019588#include <sys/types.h>
19589#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019590
Martin v. Löwis11437992002-04-12 09:54:03 +000019591int
19592main ()
19593{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019594struct tm tm;
19595 int *p = &tm.tm_sec;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019596 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019597 ;
19598 return 0;
19599}
19600_ACEOF
19601rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019602if { (ac_try="$ac_compile"
19603case "(($ac_try" in
19604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19605 *) ac_try_echo=$ac_try;;
19606esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019610 grep -v '^ *+' conftest.er1 >conftest.err
19611 rm -f conftest.er1
19612 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019614 (exit $ac_status); } && {
19615 test -z "$ac_c_werror_flag" ||
19616 test ! -s conftest.err
19617 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019618 ac_cv_struct_tm=time.h
19619else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019621sed 's/^/| /' conftest.$ac_ext >&5
19622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019623 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019625
19626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019627fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019628{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19629echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019630if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019631
19632cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019633#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019634_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019635
19636fi
19637
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019638{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19639echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019640if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019642else
Martin v. Löwis11437992002-04-12 09:54:03 +000019643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019644/* confdefs.h. */
19645_ACEOF
19646cat confdefs.h >>conftest.$ac_ext
19647cat >>conftest.$ac_ext <<_ACEOF
19648/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019649#include <sys/types.h>
19650#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019651
19652
Martin v. Löwis11437992002-04-12 09:54:03 +000019653int
19654main ()
19655{
19656static struct tm ac_aggr;
19657if (ac_aggr.tm_zone)
19658return 0;
19659 ;
19660 return 0;
19661}
19662_ACEOF
19663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019664if { (ac_try="$ac_compile"
19665case "(($ac_try" in
19666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19667 *) ac_try_echo=$ac_try;;
19668esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019672 grep -v '^ *+' conftest.er1 >conftest.err
19673 rm -f conftest.er1
19674 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019676 (exit $ac_status); } && {
19677 test -z "$ac_c_werror_flag" ||
19678 test ! -s conftest.err
19679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019680 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019681else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019683sed 's/^/| /' conftest.$ac_ext >&5
19684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019686/* confdefs.h. */
19687_ACEOF
19688cat confdefs.h >>conftest.$ac_ext
19689cat >>conftest.$ac_ext <<_ACEOF
19690/* end confdefs.h. */
19691#include <sys/types.h>
19692#include <$ac_cv_struct_tm>
19693
19694
19695int
19696main ()
19697{
19698static struct tm ac_aggr;
19699if (sizeof ac_aggr.tm_zone)
19700return 0;
19701 ;
19702 return 0;
19703}
19704_ACEOF
19705rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019706if { (ac_try="$ac_compile"
19707case "(($ac_try" in
19708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19709 *) ac_try_echo=$ac_try;;
19710esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019712 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019714 grep -v '^ *+' conftest.er1 >conftest.err
19715 rm -f conftest.er1
19716 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019718 (exit $ac_status); } && {
19719 test -z "$ac_c_werror_flag" ||
19720 test ! -s conftest.err
19721 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019722 ac_cv_member_struct_tm_tm_zone=yes
19723else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019725sed 's/^/| /' conftest.$ac_ext >&5
19726
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019727 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019729
19730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019732
19733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019734fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019735{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19736echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19737if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019738
19739cat >>confdefs.h <<_ACEOF
19740#define HAVE_STRUCT_TM_TM_ZONE 1
19741_ACEOF
19742
19743
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019744fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019745
Martin v. Löwis11437992002-04-12 09:54:03 +000019746if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19747
19748cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019749#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019750_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019751
19752else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019753 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19754echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019755if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019756 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019757else
19758 cat >conftest.$ac_ext <<_ACEOF
19759/* confdefs.h. */
19760_ACEOF
19761cat confdefs.h >>conftest.$ac_ext
19762cat >>conftest.$ac_ext <<_ACEOF
19763/* end confdefs.h. */
19764#include <time.h>
19765
19766int
19767main ()
19768{
19769#ifndef tzname
19770 (void) tzname;
19771#endif
19772
19773 ;
19774 return 0;
19775}
19776_ACEOF
19777rm -f conftest.$ac_objext
19778if { (ac_try="$ac_compile"
19779case "(($ac_try" in
19780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19781 *) ac_try_echo=$ac_try;;
19782esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019784 (eval "$ac_compile") 2>conftest.er1
19785 ac_status=$?
19786 grep -v '^ *+' conftest.er1 >conftest.err
19787 rm -f conftest.er1
19788 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019790 (exit $ac_status); } && {
19791 test -z "$ac_c_werror_flag" ||
19792 test ! -s conftest.err
19793 } && test -s conftest.$ac_objext; then
19794 ac_cv_have_decl_tzname=yes
19795else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019796 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019797sed 's/^/| /' conftest.$ac_ext >&5
19798
19799 ac_cv_have_decl_tzname=no
19800fi
19801
19802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19803fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019804{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19805echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19806if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019807
19808cat >>confdefs.h <<_ACEOF
19809#define HAVE_DECL_TZNAME 1
19810_ACEOF
19811
19812
19813else
19814 cat >>confdefs.h <<_ACEOF
19815#define HAVE_DECL_TZNAME 0
19816_ACEOF
19817
19818
19819fi
19820
19821
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019822 { echo "$as_me:$LINENO: checking for tzname" >&5
19823echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019824if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019825 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019826else
Martin v. Löwis11437992002-04-12 09:54:03 +000019827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019828/* confdefs.h. */
19829_ACEOF
19830cat confdefs.h >>conftest.$ac_ext
19831cat >>conftest.$ac_ext <<_ACEOF
19832/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019833#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019834#if !HAVE_DECL_TZNAME
19835extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019837
Martin v. Löwis11437992002-04-12 09:54:03 +000019838int
19839main ()
19840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019841return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 ;
19843 return 0;
19844}
19845_ACEOF
19846rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019847if { (ac_try="$ac_link"
19848case "(($ac_try" in
19849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19850 *) ac_try_echo=$ac_try;;
19851esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019855 grep -v '^ *+' conftest.er1 >conftest.err
19856 rm -f conftest.er1
19857 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019859 (exit $ac_status); } && {
19860 test -z "$ac_c_werror_flag" ||
19861 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019862 } && test -s conftest$ac_exeext &&
19863 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019864 ac_cv_var_tzname=yes
19865else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019867sed 's/^/| /' conftest.$ac_ext >&5
19868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019869 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019871
19872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019873 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019874fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019875{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19876echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019877 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019878
19879cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019880#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019881_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019882
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019883 fi
19884fi
19885
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019886{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19887echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019888if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019889 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019890else
19891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019892/* confdefs.h. */
19893_ACEOF
19894cat confdefs.h >>conftest.$ac_ext
19895cat >>conftest.$ac_ext <<_ACEOF
19896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019897$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019898int
19899main ()
19900{
19901static struct stat ac_aggr;
19902if (ac_aggr.st_rdev)
19903return 0;
19904 ;
19905 return 0;
19906}
19907_ACEOF
19908rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019909if { (ac_try="$ac_compile"
19910case "(($ac_try" in
19911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19912 *) ac_try_echo=$ac_try;;
19913esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019917 grep -v '^ *+' conftest.er1 >conftest.err
19918 rm -f conftest.er1
19919 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019921 (exit $ac_status); } && {
19922 test -z "$ac_c_werror_flag" ||
19923 test ! -s conftest.err
19924 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019925 ac_cv_member_struct_stat_st_rdev=yes
19926else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019928sed 's/^/| /' conftest.$ac_ext >&5
19929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019931/* confdefs.h. */
19932_ACEOF
19933cat confdefs.h >>conftest.$ac_ext
19934cat >>conftest.$ac_ext <<_ACEOF
19935/* end confdefs.h. */
19936$ac_includes_default
19937int
19938main ()
19939{
19940static struct stat ac_aggr;
19941if (sizeof ac_aggr.st_rdev)
19942return 0;
19943 ;
19944 return 0;
19945}
19946_ACEOF
19947rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019948if { (ac_try="$ac_compile"
19949case "(($ac_try" in
19950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19951 *) ac_try_echo=$ac_try;;
19952esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019954 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019956 grep -v '^ *+' conftest.er1 >conftest.err
19957 rm -f conftest.er1
19958 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019960 (exit $ac_status); } && {
19961 test -z "$ac_c_werror_flag" ||
19962 test ! -s conftest.err
19963 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019964 ac_cv_member_struct_stat_st_rdev=yes
19965else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019967sed 's/^/| /' conftest.$ac_ext >&5
19968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019969 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019971
19972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019974
19975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019976fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019977{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19978echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
19979if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019980
19981cat >>confdefs.h <<_ACEOF
19982#define HAVE_STRUCT_STAT_ST_RDEV 1
19983_ACEOF
19984
19985
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019986fi
19987
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019988{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19989echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019990if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019991 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019992else
Martin v. Löwis11437992002-04-12 09:54:03 +000019993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019994/* confdefs.h. */
19995_ACEOF
19996cat confdefs.h >>conftest.$ac_ext
19997cat >>conftest.$ac_ext <<_ACEOF
19998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019999$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020000int
20001main ()
20002{
20003static struct stat ac_aggr;
20004if (ac_aggr.st_blksize)
20005return 0;
20006 ;
20007 return 0;
20008}
20009_ACEOF
20010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020011if { (ac_try="$ac_compile"
20012case "(($ac_try" in
20013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20014 *) ac_try_echo=$ac_try;;
20015esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020019 grep -v '^ *+' conftest.er1 >conftest.err
20020 rm -f conftest.er1
20021 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020023 (exit $ac_status); } && {
20024 test -z "$ac_c_werror_flag" ||
20025 test ! -s conftest.err
20026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020027 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020028else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020030sed 's/^/| /' conftest.$ac_ext >&5
20031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020033/* confdefs.h. */
20034_ACEOF
20035cat confdefs.h >>conftest.$ac_ext
20036cat >>conftest.$ac_ext <<_ACEOF
20037/* end confdefs.h. */
20038$ac_includes_default
20039int
20040main ()
20041{
20042static struct stat ac_aggr;
20043if (sizeof ac_aggr.st_blksize)
20044return 0;
20045 ;
20046 return 0;
20047}
20048_ACEOF
20049rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020050if { (ac_try="$ac_compile"
20051case "(($ac_try" in
20052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20053 *) ac_try_echo=$ac_try;;
20054esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020056 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020058 grep -v '^ *+' conftest.er1 >conftest.err
20059 rm -f conftest.er1
20060 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020062 (exit $ac_status); } && {
20063 test -z "$ac_c_werror_flag" ||
20064 test ! -s conftest.err
20065 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020066 ac_cv_member_struct_stat_st_blksize=yes
20067else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020069sed 's/^/| /' conftest.$ac_ext >&5
20070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020071 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020073
20074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020076
20077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020078fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020079{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20080echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20081if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020082
Martin v. Löwis11437992002-04-12 09:54:03 +000020083cat >>confdefs.h <<_ACEOF
20084#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20085_ACEOF
20086
20087
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020088fi
20089
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020090{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20091echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020092if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020093 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020094else
20095 cat >conftest.$ac_ext <<_ACEOF
20096/* confdefs.h. */
20097_ACEOF
20098cat confdefs.h >>conftest.$ac_ext
20099cat >>conftest.$ac_ext <<_ACEOF
20100/* end confdefs.h. */
20101$ac_includes_default
20102int
20103main ()
20104{
20105static struct stat ac_aggr;
20106if (ac_aggr.st_flags)
20107return 0;
20108 ;
20109 return 0;
20110}
20111_ACEOF
20112rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020113if { (ac_try="$ac_compile"
20114case "(($ac_try" in
20115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20116 *) ac_try_echo=$ac_try;;
20117esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020119 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020120 ac_status=$?
20121 grep -v '^ *+' conftest.er1 >conftest.err
20122 rm -f conftest.er1
20123 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020125 (exit $ac_status); } && {
20126 test -z "$ac_c_werror_flag" ||
20127 test ! -s conftest.err
20128 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020129 ac_cv_member_struct_stat_st_flags=yes
20130else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020131 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020132sed 's/^/| /' conftest.$ac_ext >&5
20133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020134 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020135/* confdefs.h. */
20136_ACEOF
20137cat confdefs.h >>conftest.$ac_ext
20138cat >>conftest.$ac_ext <<_ACEOF
20139/* end confdefs.h. */
20140$ac_includes_default
20141int
20142main ()
20143{
20144static struct stat ac_aggr;
20145if (sizeof ac_aggr.st_flags)
20146return 0;
20147 ;
20148 return 0;
20149}
20150_ACEOF
20151rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020152if { (ac_try="$ac_compile"
20153case "(($ac_try" in
20154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20155 *) ac_try_echo=$ac_try;;
20156esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020158 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020159 ac_status=$?
20160 grep -v '^ *+' conftest.er1 >conftest.err
20161 rm -f conftest.er1
20162 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020164 (exit $ac_status); } && {
20165 test -z "$ac_c_werror_flag" ||
20166 test ! -s conftest.err
20167 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020168 ac_cv_member_struct_stat_st_flags=yes
20169else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020170 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020171sed 's/^/| /' conftest.$ac_ext >&5
20172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020173 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020175
20176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020178
20179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020180fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020181{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20182echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20183if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020184
20185cat >>confdefs.h <<_ACEOF
20186#define HAVE_STRUCT_STAT_ST_FLAGS 1
20187_ACEOF
20188
20189
20190fi
20191
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020192{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20193echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020194if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020195 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020196else
20197 cat >conftest.$ac_ext <<_ACEOF
20198/* confdefs.h. */
20199_ACEOF
20200cat confdefs.h >>conftest.$ac_ext
20201cat >>conftest.$ac_ext <<_ACEOF
20202/* end confdefs.h. */
20203$ac_includes_default
20204int
20205main ()
20206{
20207static struct stat ac_aggr;
20208if (ac_aggr.st_gen)
20209return 0;
20210 ;
20211 return 0;
20212}
20213_ACEOF
20214rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020215if { (ac_try="$ac_compile"
20216case "(($ac_try" in
20217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20218 *) ac_try_echo=$ac_try;;
20219esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020222 ac_status=$?
20223 grep -v '^ *+' conftest.er1 >conftest.err
20224 rm -f conftest.er1
20225 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020227 (exit $ac_status); } && {
20228 test -z "$ac_c_werror_flag" ||
20229 test ! -s conftest.err
20230 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020231 ac_cv_member_struct_stat_st_gen=yes
20232else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020233 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020234sed 's/^/| /' conftest.$ac_ext >&5
20235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020236 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020237/* confdefs.h. */
20238_ACEOF
20239cat confdefs.h >>conftest.$ac_ext
20240cat >>conftest.$ac_ext <<_ACEOF
20241/* end confdefs.h. */
20242$ac_includes_default
20243int
20244main ()
20245{
20246static struct stat ac_aggr;
20247if (sizeof ac_aggr.st_gen)
20248return 0;
20249 ;
20250 return 0;
20251}
20252_ACEOF
20253rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020254if { (ac_try="$ac_compile"
20255case "(($ac_try" in
20256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20257 *) ac_try_echo=$ac_try;;
20258esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020260 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020261 ac_status=$?
20262 grep -v '^ *+' conftest.er1 >conftest.err
20263 rm -f conftest.er1
20264 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020266 (exit $ac_status); } && {
20267 test -z "$ac_c_werror_flag" ||
20268 test ! -s conftest.err
20269 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020270 ac_cv_member_struct_stat_st_gen=yes
20271else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020272 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020273sed 's/^/| /' conftest.$ac_ext >&5
20274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020275 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020277
20278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020280
20281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020282fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020283{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20284echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20285if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020286
20287cat >>confdefs.h <<_ACEOF
20288#define HAVE_STRUCT_STAT_ST_GEN 1
20289_ACEOF
20290
20291
20292fi
20293
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020294{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20295echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020296if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020297 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020298else
20299 cat >conftest.$ac_ext <<_ACEOF
20300/* confdefs.h. */
20301_ACEOF
20302cat confdefs.h >>conftest.$ac_ext
20303cat >>conftest.$ac_ext <<_ACEOF
20304/* end confdefs.h. */
20305$ac_includes_default
20306int
20307main ()
20308{
20309static struct stat ac_aggr;
20310if (ac_aggr.st_birthtime)
20311return 0;
20312 ;
20313 return 0;
20314}
20315_ACEOF
20316rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020317if { (ac_try="$ac_compile"
20318case "(($ac_try" in
20319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20320 *) ac_try_echo=$ac_try;;
20321esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020324 ac_status=$?
20325 grep -v '^ *+' conftest.er1 >conftest.err
20326 rm -f conftest.er1
20327 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020329 (exit $ac_status); } && {
20330 test -z "$ac_c_werror_flag" ||
20331 test ! -s conftest.err
20332 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020333 ac_cv_member_struct_stat_st_birthtime=yes
20334else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020335 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020336sed 's/^/| /' conftest.$ac_ext >&5
20337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020338 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020339/* confdefs.h. */
20340_ACEOF
20341cat confdefs.h >>conftest.$ac_ext
20342cat >>conftest.$ac_ext <<_ACEOF
20343/* end confdefs.h. */
20344$ac_includes_default
20345int
20346main ()
20347{
20348static struct stat ac_aggr;
20349if (sizeof ac_aggr.st_birthtime)
20350return 0;
20351 ;
20352 return 0;
20353}
20354_ACEOF
20355rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020356if { (ac_try="$ac_compile"
20357case "(($ac_try" in
20358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20359 *) ac_try_echo=$ac_try;;
20360esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020363 ac_status=$?
20364 grep -v '^ *+' conftest.er1 >conftest.err
20365 rm -f conftest.er1
20366 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020368 (exit $ac_status); } && {
20369 test -z "$ac_c_werror_flag" ||
20370 test ! -s conftest.err
20371 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020372 ac_cv_member_struct_stat_st_birthtime=yes
20373else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020374 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020375sed 's/^/| /' conftest.$ac_ext >&5
20376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020377 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020379
20380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020382
20383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020384fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020385{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20386echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20387if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020388
20389cat >>confdefs.h <<_ACEOF
20390#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20391_ACEOF
20392
20393
20394fi
20395
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020396{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20397echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020398if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020399 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020400else
Martin v. Löwis11437992002-04-12 09:54:03 +000020401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020402/* confdefs.h. */
20403_ACEOF
20404cat confdefs.h >>conftest.$ac_ext
20405cat >>conftest.$ac_ext <<_ACEOF
20406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020407$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020408int
20409main ()
20410{
20411static struct stat ac_aggr;
20412if (ac_aggr.st_blocks)
20413return 0;
20414 ;
20415 return 0;
20416}
20417_ACEOF
20418rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020419if { (ac_try="$ac_compile"
20420case "(($ac_try" in
20421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20422 *) ac_try_echo=$ac_try;;
20423esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020425 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020427 grep -v '^ *+' conftest.er1 >conftest.err
20428 rm -f conftest.er1
20429 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020431 (exit $ac_status); } && {
20432 test -z "$ac_c_werror_flag" ||
20433 test ! -s conftest.err
20434 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020435 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020436else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020438sed 's/^/| /' conftest.$ac_ext >&5
20439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020441/* confdefs.h. */
20442_ACEOF
20443cat confdefs.h >>conftest.$ac_ext
20444cat >>conftest.$ac_ext <<_ACEOF
20445/* end confdefs.h. */
20446$ac_includes_default
20447int
20448main ()
20449{
20450static struct stat ac_aggr;
20451if (sizeof ac_aggr.st_blocks)
20452return 0;
20453 ;
20454 return 0;
20455}
20456_ACEOF
20457rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020458if { (ac_try="$ac_compile"
20459case "(($ac_try" in
20460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20461 *) ac_try_echo=$ac_try;;
20462esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020464 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020466 grep -v '^ *+' conftest.er1 >conftest.err
20467 rm -f conftest.er1
20468 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020470 (exit $ac_status); } && {
20471 test -z "$ac_c_werror_flag" ||
20472 test ! -s conftest.err
20473 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020474 ac_cv_member_struct_stat_st_blocks=yes
20475else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020477sed 's/^/| /' conftest.$ac_ext >&5
20478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020479 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020481
20482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020484
20485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020486fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020487{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20488echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20489if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020490
Martin v. Löwis11437992002-04-12 09:54:03 +000020491cat >>confdefs.h <<_ACEOF
20492#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20493_ACEOF
20494
20495
20496cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020497#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020498_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020499
20500else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020501 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020502 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020503 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20504 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020505esac
20506
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020507fi
20508
Michael W. Hudson54241132001-12-07 15:38:26 +000020509
Martin v. Löwis11437992002-04-12 09:54:03 +000020510
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020511{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20512echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020513if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020515else
Martin v. Löwis11437992002-04-12 09:54:03 +000020516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020517/* confdefs.h. */
20518_ACEOF
20519cat confdefs.h >>conftest.$ac_ext
20520cat >>conftest.$ac_ext <<_ACEOF
20521/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020522#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020523int
20524main ()
20525{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020526return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020527 ;
20528 return 0;
20529}
20530_ACEOF
20531rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020532if { (ac_try="$ac_compile"
20533case "(($ac_try" in
20534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20535 *) ac_try_echo=$ac_try;;
20536esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020540 grep -v '^ *+' conftest.er1 >conftest.err
20541 rm -f conftest.er1
20542 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020544 (exit $ac_status); } && {
20545 test -z "$ac_c_werror_flag" ||
20546 test ! -s conftest.err
20547 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020548 ac_cv_header_time_altzone=yes
20549else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020551sed 's/^/| /' conftest.$ac_ext >&5
20552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020553 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020554fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20557fi
20558
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020559{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20560echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020561if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020562
20563cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020564#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020565_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020566
20567fi
20568
Guido van Rossumda88dad1995-01-26 00:46:29 +000020569was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020570{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20571echo $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 +000020572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020573/* confdefs.h. */
20574_ACEOF
20575cat confdefs.h >>conftest.$ac_ext
20576cat >>conftest.$ac_ext <<_ACEOF
20577/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020578
20579#include <sys/types.h>
20580#include <sys/select.h>
20581#include <sys/time.h>
20582
Martin v. Löwis11437992002-04-12 09:54:03 +000020583int
20584main ()
20585{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020586;
Martin v. Löwis11437992002-04-12 09:54:03 +000020587 ;
20588 return 0;
20589}
20590_ACEOF
20591rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020592if { (ac_try="$ac_compile"
20593case "(($ac_try" in
20594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20595 *) ac_try_echo=$ac_try;;
20596esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020600 grep -v '^ *+' conftest.er1 >conftest.err
20601 rm -f conftest.er1
20602 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020604 (exit $ac_status); } && {
20605 test -z "$ac_c_werror_flag" ||
20606 test ! -s conftest.err
20607 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020608
20609
20610cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020611#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020612_ACEOF
20613
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020614 was_it_defined=yes
20615
Guido van Rossumf78abae1997-01-21 22:02:36 +000020616else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020618sed 's/^/| /' conftest.$ac_ext >&5
20619
Thomas Wouters477c8d52006-05-27 19:21:47 +000020620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020621fi
20622
20623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020624{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20625echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020626
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020627{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20628echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020629if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020630 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020631else
Martin v. Löwis11437992002-04-12 09:54:03 +000020632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020633/* confdefs.h. */
20634_ACEOF
20635cat confdefs.h >>conftest.$ac_ext
20636cat >>conftest.$ac_ext <<_ACEOF
20637/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020638
20639# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020640int
20641main ()
20642{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020643struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020644 ;
20645 return 0;
20646}
20647_ACEOF
20648rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020649if { (ac_try="$ac_compile"
20650case "(($ac_try" in
20651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20652 *) ac_try_echo=$ac_try;;
20653esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020657 grep -v '^ *+' conftest.er1 >conftest.err
20658 rm -f conftest.er1
20659 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020661 (exit $ac_status); } && {
20662 test -z "$ac_c_werror_flag" ||
20663 test ! -s conftest.err
20664 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020665 ac_cv_struct_addrinfo=yes
20666else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020668sed 's/^/| /' conftest.$ac_ext >&5
20669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020670 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020671fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20674fi
20675
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020676{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20677echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020678if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020679
20680cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020681#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020682_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020683
20684fi
20685
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020686{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20687echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020688if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020689 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020690else
Martin v. Löwis11437992002-04-12 09:54:03 +000020691 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020692/* confdefs.h. */
20693_ACEOF
20694cat confdefs.h >>conftest.$ac_ext
20695cat >>conftest.$ac_ext <<_ACEOF
20696/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020697
20698# include <sys/types.h>
20699# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020700int
20701main ()
20702{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020703struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020704 ;
20705 return 0;
20706}
20707_ACEOF
20708rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020709if { (ac_try="$ac_compile"
20710case "(($ac_try" in
20711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20712 *) ac_try_echo=$ac_try;;
20713esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020717 grep -v '^ *+' conftest.er1 >conftest.err
20718 rm -f conftest.er1
20719 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020721 (exit $ac_status); } && {
20722 test -z "$ac_c_werror_flag" ||
20723 test ! -s conftest.err
20724 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020725 ac_cv_struct_sockaddr_storage=yes
20726else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020728sed 's/^/| /' conftest.$ac_ext >&5
20729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020730 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020731fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20734fi
20735
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020736{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20737echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020738if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020739
20740cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020741#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020742_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020743
20744fi
20745
Guido van Rossum627b2d71993-12-24 10:39:16 +000020746# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020747
Michael W. Hudson54241132001-12-07 15:38:26 +000020748
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020749{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20750echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020751if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020752 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020753else
Martin v. Löwis11437992002-04-12 09:54:03 +000020754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020755/* confdefs.h. */
20756_ACEOF
20757cat confdefs.h >>conftest.$ac_ext
20758cat >>conftest.$ac_ext <<_ACEOF
20759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020760$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020761int
20762main ()
20763{
20764static int test_array [1 - 2 * !(((char) -1) < 0)];
20765test_array [0] = 0
20766
20767 ;
20768 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020769}
Martin v. Löwis11437992002-04-12 09:54:03 +000020770_ACEOF
20771rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020772if { (ac_try="$ac_compile"
20773case "(($ac_try" in
20774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20775 *) ac_try_echo=$ac_try;;
20776esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020780 grep -v '^ *+' conftest.er1 >conftest.err
20781 rm -f conftest.er1
20782 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020784 (exit $ac_status); } && {
20785 test -z "$ac_c_werror_flag" ||
20786 test ! -s conftest.err
20787 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020788 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020789else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020791sed 's/^/| /' conftest.$ac_ext >&5
20792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020793 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020795
20796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020797fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020798{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20799echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020800if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020801 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020802#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020803_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020804
20805fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020806
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020807{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20808echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020809if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020810 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020811else
20812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020813/* confdefs.h. */
20814_ACEOF
20815cat confdefs.h >>conftest.$ac_ext
20816cat >>conftest.$ac_ext <<_ACEOF
20817/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020818
Martin v. Löwis11437992002-04-12 09:54:03 +000020819int
20820main ()
20821{
20822/* FIXME: Include the comments suggested by Paul. */
20823#ifndef __cplusplus
20824 /* Ultrix mips cc rejects this. */
20825 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020826 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020827 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020828 char const *const *pcpcc;
20829 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020830 /* NEC SVR4.0.2 mips cc rejects this. */
20831 struct point {int x, y;};
20832 static struct point const zero = {0,0};
20833 /* AIX XL C 1.02.0.0 rejects this.
20834 It does not let you subtract one const X* pointer from another in
20835 an arm of an if-expression whose if-part is not a constant
20836 expression */
20837 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020838 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020839 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020840 ++pcpcc;
20841 ppc = (char**) pcpcc;
20842 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020843 { /* SCO 3.2v4 cc rejects this. */
20844 char *t;
20845 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020846
Martin v. Löwis11437992002-04-12 09:54:03 +000020847 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020848 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020849 }
20850 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20851 int x[] = {25, 17};
20852 const int *foo = &x[0];
20853 ++foo;
20854 }
20855 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20856 typedef const int *iptr;
20857 iptr p = 0;
20858 ++p;
20859 }
20860 { /* AIX XL C 1.02.0.0 rejects this saying
20861 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20862 struct s { int j; const int *ap[3]; };
20863 struct s *b; b->j = 5;
20864 }
20865 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20866 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020867 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020868 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020869 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020870#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020871
Martin v. Löwis11437992002-04-12 09:54:03 +000020872 ;
20873 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020874}
Martin v. Löwis11437992002-04-12 09:54:03 +000020875_ACEOF
20876rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020877if { (ac_try="$ac_compile"
20878case "(($ac_try" in
20879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20880 *) ac_try_echo=$ac_try;;
20881esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020885 grep -v '^ *+' conftest.er1 >conftest.err
20886 rm -f conftest.er1
20887 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020889 (exit $ac_status); } && {
20890 test -z "$ac_c_werror_flag" ||
20891 test ! -s conftest.err
20892 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020893 ac_cv_c_const=yes
20894else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020896sed 's/^/| /' conftest.$ac_ext >&5
20897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020898 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020900
20901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020902fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020903{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20904echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020905if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020906
20907cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020908#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020909_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020910
20911fi
20912
Michael W. Hudson54241132001-12-07 15:38:26 +000020913
Guido van Rossumda88dad1995-01-26 00:46:29 +000020914works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020915{ echo "$as_me:$LINENO: checking for working volatile" >&5
20916echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020918/* confdefs.h. */
20919_ACEOF
20920cat confdefs.h >>conftest.$ac_ext
20921cat >>conftest.$ac_ext <<_ACEOF
20922/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020923
Martin v. Löwis11437992002-04-12 09:54:03 +000020924int
20925main ()
20926{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020927volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020928 ;
20929 return 0;
20930}
20931_ACEOF
20932rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020933if { (ac_try="$ac_compile"
20934case "(($ac_try" in
20935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20936 *) ac_try_echo=$ac_try;;
20937esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020939 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020941 grep -v '^ *+' conftest.er1 >conftest.err
20942 rm -f conftest.er1
20943 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020945 (exit $ac_status); } && {
20946 test -z "$ac_c_werror_flag" ||
20947 test ! -s conftest.err
20948 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020949 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020950else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020952sed 's/^/| /' conftest.$ac_ext >&5
20953
Martin v. Löwis11437992002-04-12 09:54:03 +000020954
20955cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020956#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000020957_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020958
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020959
Guido van Rossum627b2d71993-12-24 10:39:16 +000020960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020961
20962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020963{ echo "$as_me:$LINENO: result: $works" >&5
20964echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020965
Guido van Rossumda88dad1995-01-26 00:46:29 +000020966works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020967{ echo "$as_me:$LINENO: checking for working signed char" >&5
20968echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020970/* confdefs.h. */
20971_ACEOF
20972cat confdefs.h >>conftest.$ac_ext
20973cat >>conftest.$ac_ext <<_ACEOF
20974/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020975
Martin v. Löwis11437992002-04-12 09:54:03 +000020976int
20977main ()
20978{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020979signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020980 ;
20981 return 0;
20982}
20983_ACEOF
20984rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020985if { (ac_try="$ac_compile"
20986case "(($ac_try" in
20987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20988 *) ac_try_echo=$ac_try;;
20989esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020993 grep -v '^ *+' conftest.er1 >conftest.err
20994 rm -f conftest.er1
20995 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020997 (exit $ac_status); } && {
20998 test -z "$ac_c_werror_flag" ||
20999 test ! -s conftest.err
21000 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021001 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021002else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021004sed 's/^/| /' conftest.$ac_ext >&5
21005
Martin v. Löwis11437992002-04-12 09:54:03 +000021006
21007cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021008#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021009_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021010
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021011
Guido van Rossum7f43da71994-08-01 12:15:30 +000021012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021013
21014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021015{ echo "$as_me:$LINENO: result: $works" >&5
21016echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021017
Guido van Rossumda88dad1995-01-26 00:46:29 +000021018have_prototypes=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021019{ echo "$as_me:$LINENO: checking for prototypes" >&5
21020echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021022/* confdefs.h. */
21023_ACEOF
21024cat confdefs.h >>conftest.$ac_ext
21025cat >>conftest.$ac_ext <<_ACEOF
21026/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021027int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021028int
21029main ()
21030{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021031return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021032 ;
21033 return 0;
21034}
21035_ACEOF
21036rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021037if { (ac_try="$ac_compile"
21038case "(($ac_try" in
21039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21040 *) ac_try_echo=$ac_try;;
21041esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021045 grep -v '^ *+' conftest.er1 >conftest.err
21046 rm -f conftest.er1
21047 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021049 (exit $ac_status); } && {
21050 test -z "$ac_c_werror_flag" ||
21051 test ! -s conftest.err
21052 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021053
21054
21055cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021056#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021057_ACEOF
21058
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021059 have_prototypes=yes
21060
Guido van Rossumf78abae1997-01-21 22:02:36 +000021061else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021063sed 's/^/| /' conftest.$ac_ext >&5
21064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021065
Guido van Rossum7f43da71994-08-01 12:15:30 +000021066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021067
21068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021069{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21070echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021071
Guido van Rossumda88dad1995-01-26 00:46:29 +000021072works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021073{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21074echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021076/* confdefs.h. */
21077_ACEOF
21078cat confdefs.h >>conftest.$ac_ext
21079cat >>conftest.$ac_ext <<_ACEOF
21080/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021081
21082#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021083int foo(int x, ...) {
21084 va_list va;
21085 va_start(va, x);
21086 va_arg(va, int);
21087 va_arg(va, char *);
21088 va_arg(va, double);
21089 return 0;
21090}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021091
Martin v. Löwis11437992002-04-12 09:54:03 +000021092int
21093main ()
21094{
Guido van Rossum90eea071996-08-30 20:58:57 +000021095return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021096 ;
21097 return 0;
21098}
21099_ACEOF
21100rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021101if { (ac_try="$ac_compile"
21102case "(($ac_try" in
21103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21104 *) ac_try_echo=$ac_try;;
21105esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021109 grep -v '^ *+' conftest.er1 >conftest.err
21110 rm -f conftest.er1
21111 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021113 (exit $ac_status); } && {
21114 test -z "$ac_c_werror_flag" ||
21115 test ! -s conftest.err
21116 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021117
21118
21119cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021120#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021121_ACEOF
21122
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021123 works=yes
21124
Guido van Rossumf78abae1997-01-21 22:02:36 +000021125else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021127sed 's/^/| /' conftest.$ac_ext >&5
21128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021129
Guido van Rossum627b2d71993-12-24 10:39:16 +000021130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021131
21132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021133{ echo "$as_me:$LINENO: result: $works" >&5
21134echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021135
Martin v. Löwisd6320502004-08-12 13:45:08 +000021136# check for socketpair
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021137{ echo "$as_me:$LINENO: checking for socketpair" >&5
21138echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021139cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021140/* confdefs.h. */
21141_ACEOF
21142cat confdefs.h >>conftest.$ac_ext
21143cat >>conftest.$ac_ext <<_ACEOF
21144/* end confdefs.h. */
21145
21146#include <sys/types.h>
21147#include <sys/socket.h>
21148
21149int
21150main ()
21151{
21152void *x=socketpair
21153 ;
21154 return 0;
21155}
21156_ACEOF
21157rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021158if { (ac_try="$ac_compile"
21159case "(($ac_try" in
21160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21161 *) ac_try_echo=$ac_try;;
21162esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021166 grep -v '^ *+' conftest.er1 >conftest.err
21167 rm -f conftest.er1
21168 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021170 (exit $ac_status); } && {
21171 test -z "$ac_c_werror_flag" ||
21172 test ! -s conftest.err
21173 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021174
21175cat >>confdefs.h <<\_ACEOF
21176#define HAVE_SOCKETPAIR 1
21177_ACEOF
21178
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021179 { echo "$as_me:$LINENO: result: yes" >&5
21180echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021181else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021182 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021183sed 's/^/| /' conftest.$ac_ext >&5
21184
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021185 { echo "$as_me:$LINENO: result: no" >&5
21186echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021187
21188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021189
21190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021191
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021192# check if sockaddr has sa_len member
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021193{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21194echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021196/* confdefs.h. */
21197_ACEOF
21198cat confdefs.h >>conftest.$ac_ext
21199cat >>conftest.$ac_ext <<_ACEOF
21200/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021201#include <sys/types.h>
21202#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021203int
21204main ()
21205{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021206struct sockaddr x;
21207x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021208 ;
21209 return 0;
21210}
21211_ACEOF
21212rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021213if { (ac_try="$ac_compile"
21214case "(($ac_try" in
21215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21216 *) ac_try_echo=$ac_try;;
21217esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021219 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021221 grep -v '^ *+' conftest.er1 >conftest.err
21222 rm -f conftest.er1
21223 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021225 (exit $ac_status); } && {
21226 test -z "$ac_c_werror_flag" ||
21227 test ! -s conftest.err
21228 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021229 { echo "$as_me:$LINENO: result: yes" >&5
21230echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021231
21232cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021233#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021234_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021235
21236else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021238sed 's/^/| /' conftest.$ac_ext >&5
21239
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021240 { echo "$as_me:$LINENO: result: no" >&5
21241echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021243
21244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021245
Guido van Rossumda88dad1995-01-26 00:46:29 +000021246va_list_is_array=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021247{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21248echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021250/* confdefs.h. */
21251_ACEOF
21252cat confdefs.h >>conftest.$ac_ext
21253cat >>conftest.$ac_ext <<_ACEOF
21254/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021255
21256#ifdef HAVE_STDARG_PROTOTYPES
21257#include <stdarg.h>
21258#else
21259#include <varargs.h>
21260#endif
21261
Martin v. Löwis11437992002-04-12 09:54:03 +000021262int
21263main ()
21264{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021265va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021266 ;
21267 return 0;
21268}
21269_ACEOF
21270rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021271if { (ac_try="$ac_compile"
21272case "(($ac_try" in
21273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21274 *) ac_try_echo=$ac_try;;
21275esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021279 grep -v '^ *+' conftest.er1 >conftest.err
21280 rm -f conftest.er1
21281 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021283 (exit $ac_status); } && {
21284 test -z "$ac_c_werror_flag" ||
21285 test ! -s conftest.err
21286 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021287 :
21288else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021290sed 's/^/| /' conftest.$ac_ext >&5
21291
Martin v. Löwis11437992002-04-12 09:54:03 +000021292
21293
21294cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021295#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021296_ACEOF
21297
Guido van Rossumda88dad1995-01-26 00:46:29 +000021298 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021299
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021301
21302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021303{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21304echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021305
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021306# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021307
21308
21309
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021310{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21311echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021312if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021314else
Martin v. Löwis11437992002-04-12 09:54:03 +000021315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021316/* confdefs.h. */
21317_ACEOF
21318cat confdefs.h >>conftest.$ac_ext
21319cat >>conftest.$ac_ext <<_ACEOF
21320/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021321/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21322 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21323#define gethostbyname_r innocuous_gethostbyname_r
21324
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021325/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021326 which can conflict with char gethostbyname_r (); below.
21327 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021328 <limits.h> exists even on freestanding compilers. */
21329
21330#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021331# include <limits.h>
21332#else
21333# include <assert.h>
21334#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021335
21336#undef gethostbyname_r
21337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021338/* Override any GCC internal prototype to avoid an error.
21339 Use char because int might match the return type of a GCC
21340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021341#ifdef __cplusplus
21342extern "C"
21343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021344char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021345/* The GNU C library defines this for functions which it implements
21346 to always fail with ENOSYS. Some functions are actually named
21347 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021348#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021349choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021350#endif
21351
Skip Montanaro6dead952003-09-25 14:50:04 +000021352int
21353main ()
21354{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021355return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021356 ;
21357 return 0;
21358}
21359_ACEOF
21360rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021361if { (ac_try="$ac_link"
21362case "(($ac_try" in
21363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21364 *) ac_try_echo=$ac_try;;
21365esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021367 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021369 grep -v '^ *+' conftest.er1 >conftest.err
21370 rm -f conftest.er1
21371 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021373 (exit $ac_status); } && {
21374 test -z "$ac_c_werror_flag" ||
21375 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021376 } && test -s conftest$ac_exeext &&
21377 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021378 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021379else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021381sed 's/^/| /' conftest.$ac_ext >&5
21382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021383 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021385
21386rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021387 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021388fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021389{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21390echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21391if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021392
Martin v. Löwis11437992002-04-12 09:54:03 +000021393 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021394#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021395_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021396
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021397 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21398echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021399 OLD_CFLAGS=$CFLAGS
21400 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021402/* confdefs.h. */
21403_ACEOF
21404cat confdefs.h >>conftest.$ac_ext
21405cat >>conftest.$ac_ext <<_ACEOF
21406/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021407
21408# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021409
Martin v. Löwis11437992002-04-12 09:54:03 +000021410int
21411main ()
21412{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021413
21414 char *name;
21415 struct hostent *he, *res;
21416 char buffer[2048];
21417 int buflen = 2048;
21418 int h_errnop;
21419
21420 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021421
21422 ;
21423 return 0;
21424}
21425_ACEOF
21426rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021427if { (ac_try="$ac_compile"
21428case "(($ac_try" in
21429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21430 *) ac_try_echo=$ac_try;;
21431esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021433 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021435 grep -v '^ *+' conftest.er1 >conftest.err
21436 rm -f conftest.er1
21437 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021439 (exit $ac_status); } && {
21440 test -z "$ac_c_werror_flag" ||
21441 test ! -s conftest.err
21442 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021443
21444 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021445#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021446_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021447
Martin v. Löwis11437992002-04-12 09:54:03 +000021448
21449cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021450#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021451_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021452
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021453 { echo "$as_me:$LINENO: result: yes" >&5
21454echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021456else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021458sed 's/^/| /' conftest.$ac_ext >&5
21459
Martin v. Löwis11437992002-04-12 09:54:03 +000021460
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021461 { echo "$as_me:$LINENO: result: no" >&5
21462echo "${ECHO_T}no" >&6; }
21463 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21464echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021466/* confdefs.h. */
21467_ACEOF
21468cat confdefs.h >>conftest.$ac_ext
21469cat >>conftest.$ac_ext <<_ACEOF
21470/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021471
21472# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021473
Martin v. Löwis11437992002-04-12 09:54:03 +000021474int
21475main ()
21476{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021477
21478 char *name;
21479 struct hostent *he;
21480 char buffer[2048];
21481 int buflen = 2048;
21482 int h_errnop;
21483
21484 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021485
21486 ;
21487 return 0;
21488}
21489_ACEOF
21490rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021491if { (ac_try="$ac_compile"
21492case "(($ac_try" in
21493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21494 *) ac_try_echo=$ac_try;;
21495esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021499 grep -v '^ *+' conftest.er1 >conftest.err
21500 rm -f conftest.er1
21501 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021503 (exit $ac_status); } && {
21504 test -z "$ac_c_werror_flag" ||
21505 test ! -s conftest.err
21506 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021507
21508 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021509#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021510_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021511
Martin v. Löwis11437992002-04-12 09:54:03 +000021512
21513cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021514#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021515_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021516
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021517 { echo "$as_me:$LINENO: result: yes" >&5
21518echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021520else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021522sed 's/^/| /' conftest.$ac_ext >&5
21523
Martin v. Löwis11437992002-04-12 09:54:03 +000021524
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021525 { echo "$as_me:$LINENO: result: no" >&5
21526echo "${ECHO_T}no" >&6; }
21527 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21528echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021530/* confdefs.h. */
21531_ACEOF
21532cat confdefs.h >>conftest.$ac_ext
21533cat >>conftest.$ac_ext <<_ACEOF
21534/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021535
21536# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021537
Martin v. Löwis11437992002-04-12 09:54:03 +000021538int
21539main ()
21540{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021541
21542 char *name;
21543 struct hostent *he;
21544 struct hostent_data data;
21545
21546 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021547
21548 ;
21549 return 0;
21550}
21551_ACEOF
21552rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021553if { (ac_try="$ac_compile"
21554case "(($ac_try" in
21555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21556 *) ac_try_echo=$ac_try;;
21557esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021561 grep -v '^ *+' conftest.er1 >conftest.err
21562 rm -f conftest.er1
21563 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021565 (exit $ac_status); } && {
21566 test -z "$ac_c_werror_flag" ||
21567 test ! -s conftest.err
21568 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021569
21570 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021571#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021572_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021573
Martin v. Löwis11437992002-04-12 09:54:03 +000021574
21575cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021576#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021577_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021578
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021579 { echo "$as_me:$LINENO: result: yes" >&5
21580echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021581
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021582else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021584sed 's/^/| /' conftest.$ac_ext >&5
21585
Martin v. Löwis11437992002-04-12 09:54:03 +000021586
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021587 { echo "$as_me:$LINENO: result: no" >&5
21588echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021589
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021591
21592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021595
21596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021597
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021599
21600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021601 CFLAGS=$OLD_CFLAGS
21602
21603else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021604
Martin v. Löwis11437992002-04-12 09:54:03 +000021605
21606for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021607do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021608as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21609{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21610echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021611if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021613else
Martin v. Löwis11437992002-04-12 09:54:03 +000021614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021615/* confdefs.h. */
21616_ACEOF
21617cat confdefs.h >>conftest.$ac_ext
21618cat >>conftest.$ac_ext <<_ACEOF
21619/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021620/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21621 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21622#define $ac_func innocuous_$ac_func
21623
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021624/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021625 which can conflict with char $ac_func (); below.
21626 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021627 <limits.h> exists even on freestanding compilers. */
21628
21629#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021630# include <limits.h>
21631#else
21632# include <assert.h>
21633#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021634
21635#undef $ac_func
21636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021637/* Override any GCC internal prototype to avoid an error.
21638 Use char because int might match the return type of a GCC
21639 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021640#ifdef __cplusplus
21641extern "C"
21642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021643char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021644/* The GNU C library defines this for functions which it implements
21645 to always fail with ENOSYS. Some functions are actually named
21646 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021647#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021648choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021649#endif
21650
Skip Montanaro6dead952003-09-25 14:50:04 +000021651int
21652main ()
21653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021654return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021655 ;
21656 return 0;
21657}
21658_ACEOF
21659rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021660if { (ac_try="$ac_link"
21661case "(($ac_try" in
21662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21663 *) ac_try_echo=$ac_try;;
21664esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021666 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021668 grep -v '^ *+' conftest.er1 >conftest.err
21669 rm -f conftest.er1
21670 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021672 (exit $ac_status); } && {
21673 test -z "$ac_c_werror_flag" ||
21674 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021675 } && test -s conftest$ac_exeext &&
21676 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021677 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021678else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021680sed 's/^/| /' conftest.$ac_ext >&5
21681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021682 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021684
21685rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021686 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021687fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021688ac_res=`eval echo '${'$as_ac_var'}'`
21689 { echo "$as_me:$LINENO: result: $ac_res" >&5
21690echo "${ECHO_T}$ac_res" >&6; }
21691if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021692 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021693#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021694_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021695
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021696fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021697done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021698
Michael W. Hudson54241132001-12-07 15:38:26 +000021699
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021700fi
21701
Michael W. Hudson54241132001-12-07 15:38:26 +000021702
21703
21704
21705
21706
21707
Guido van Rossum627b2d71993-12-24 10:39:16 +000021708# checks for system services
21709# (none yet)
21710
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021711# Linux requires this for correct f.p. operations
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021712{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21713echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021714if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021715 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021716else
Martin v. Löwis11437992002-04-12 09:54:03 +000021717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021718/* confdefs.h. */
21719_ACEOF
21720cat confdefs.h >>conftest.$ac_ext
21721cat >>conftest.$ac_ext <<_ACEOF
21722/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021723/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21724 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21725#define __fpu_control innocuous___fpu_control
21726
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021727/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021728 which can conflict with char __fpu_control (); below.
21729 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021730 <limits.h> exists even on freestanding compilers. */
21731
21732#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021733# include <limits.h>
21734#else
21735# include <assert.h>
21736#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021737
21738#undef __fpu_control
21739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021740/* Override any GCC internal prototype to avoid an error.
21741 Use char because int might match the return type of a GCC
21742 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021743#ifdef __cplusplus
21744extern "C"
21745#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021746char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021747/* The GNU C library defines this for functions which it implements
21748 to always fail with ENOSYS. Some functions are actually named
21749 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021750#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021751choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021752#endif
21753
Skip Montanaro6dead952003-09-25 14:50:04 +000021754int
21755main ()
21756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021757return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021758 ;
21759 return 0;
21760}
21761_ACEOF
21762rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021763if { (ac_try="$ac_link"
21764case "(($ac_try" in
21765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21766 *) ac_try_echo=$ac_try;;
21767esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021769 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021771 grep -v '^ *+' conftest.er1 >conftest.err
21772 rm -f conftest.er1
21773 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021775 (exit $ac_status); } && {
21776 test -z "$ac_c_werror_flag" ||
21777 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021778 } && test -s conftest$ac_exeext &&
21779 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021780 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021781else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021783sed 's/^/| /' conftest.$ac_ext >&5
21784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021785 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021787
21788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021789 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021790fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021791{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21792echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21793if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021794 :
21795else
Martin v. Löwis11437992002-04-12 09:54:03 +000021796
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021797{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21798echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021799if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021801else
Martin v. Löwis11437992002-04-12 09:54:03 +000021802 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021803LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021805/* confdefs.h. */
21806_ACEOF
21807cat confdefs.h >>conftest.$ac_ext
21808cat >>conftest.$ac_ext <<_ACEOF
21809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021811/* Override any GCC internal prototype to avoid an error.
21812 Use char because int might match the return type of a GCC
21813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021814#ifdef __cplusplus
21815extern "C"
21816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021817char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021818int
21819main ()
21820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021821return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021822 ;
21823 return 0;
21824}
21825_ACEOF
21826rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021827if { (ac_try="$ac_link"
21828case "(($ac_try" in
21829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21830 *) ac_try_echo=$ac_try;;
21831esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021833 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021835 grep -v '^ *+' conftest.er1 >conftest.err
21836 rm -f conftest.er1
21837 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021839 (exit $ac_status); } && {
21840 test -z "$ac_c_werror_flag" ||
21841 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021842 } && test -s conftest$ac_exeext &&
21843 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021844 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021845else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021847sed 's/^/| /' conftest.$ac_ext >&5
21848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021849 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021851
21852rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021853 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021854LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021855fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021856{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21857echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21858if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021859 cat >>confdefs.h <<_ACEOF
21860#define HAVE_LIBIEEE 1
21861_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021862
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021863 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021864
Guido van Rossum627b2d71993-12-24 10:39:16 +000021865fi
21866
Michael W. Hudson54241132001-12-07 15:38:26 +000021867
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021868fi
21869
Michael W. Hudson54241132001-12-07 15:38:26 +000021870
Guido van Rossum7f253911997-05-09 02:42:48 +000021871# Check for --with-fpectl
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021872{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21873echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021875# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021876if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021877 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021878if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021879then
21880
21881cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021882#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021883_ACEOF
21884
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021885 { echo "$as_me:$LINENO: result: yes" >&5
21886echo "${ECHO_T}yes" >&6; }
21887else { echo "$as_me:$LINENO: result: no" >&5
21888echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021889fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021890else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021891 { echo "$as_me:$LINENO: result: no" >&5
21892echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021893fi
21894
Guido van Rossum7f253911997-05-09 02:42:48 +000021895
Guido van Rossum7f43da71994-08-01 12:15:30 +000021896# check for --with-libm=...
21897
Guido van Rossum563e7081996-09-10 18:20:48 +000021898case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021899Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021900*) LIBM=-lm
21901esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021902{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21903echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021905# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021906if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021907 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021908if test "$withval" = no
21909then LIBM=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021910 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21911echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021912elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021913then LIBM=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021914 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21915echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21916else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21917echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021918 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021919fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021920else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021921 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21922echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021923fi
21924
Guido van Rossum7f43da71994-08-01 12:15:30 +000021925
21926# check for --with-libc=...
21927
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021928{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21929echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021931# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021932if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021933 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021934if test "$withval" = no
21935then LIBC=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021936 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21937echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021938elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021939then LIBC=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021940 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21941echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
21942else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21943echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021944 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021945fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021946else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021947 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21948echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021949fi
21950
Guido van Rossum7f43da71994-08-01 12:15:30 +000021951
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021952# **************************************************
21953# * Check for various properties of floating point *
21954# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021955
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021956{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
21957echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021958if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021959 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021960else
21961
21962if test "$cross_compiling" = yes; then
21963 ac_cv_little_endian_double=no
21964else
21965 cat >conftest.$ac_ext <<_ACEOF
21966/* confdefs.h. */
21967_ACEOF
21968cat confdefs.h >>conftest.$ac_ext
21969cat >>conftest.$ac_ext <<_ACEOF
21970/* end confdefs.h. */
21971
21972#include <string.h>
21973int main() {
21974 double x = 9006104071832581.0;
21975 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
21976 return 0;
21977 else
21978 return 1;
21979}
21980
21981_ACEOF
21982rm -f conftest$ac_exeext
21983if { (ac_try="$ac_link"
21984case "(($ac_try" in
21985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21986 *) ac_try_echo=$ac_try;;
21987esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021989 (eval "$ac_link") 2>&5
21990 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021992 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21993 { (case "(($ac_try" in
21994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21995 *) ac_try_echo=$ac_try;;
21996esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021998 (eval "$ac_try") 2>&5
21999 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022001 (exit $ac_status); }; }; then
22002 ac_cv_little_endian_double=yes
22003else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022004 echo "$as_me: program exited with status $ac_status" >&5
22005echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022006sed 's/^/| /' conftest.$ac_ext >&5
22007
22008( exit $ac_status )
22009ac_cv_little_endian_double=no
22010fi
22011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22012fi
22013
22014
22015fi
22016
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022017{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22018echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022019if test "$ac_cv_little_endian_double" = yes
22020then
22021
22022cat >>confdefs.h <<\_ACEOF
22023#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22024_ACEOF
22025
22026fi
22027
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022028{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22029echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022030if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022031 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022032else
22033
22034if test "$cross_compiling" = yes; then
22035 ac_cv_big_endian_double=no
22036else
22037 cat >conftest.$ac_ext <<_ACEOF
22038/* confdefs.h. */
22039_ACEOF
22040cat confdefs.h >>conftest.$ac_ext
22041cat >>conftest.$ac_ext <<_ACEOF
22042/* end confdefs.h. */
22043
22044#include <string.h>
22045int main() {
22046 double x = 9006104071832581.0;
22047 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22048 return 0;
22049 else
22050 return 1;
22051}
22052
22053_ACEOF
22054rm -f conftest$ac_exeext
22055if { (ac_try="$ac_link"
22056case "(($ac_try" in
22057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22058 *) ac_try_echo=$ac_try;;
22059esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022061 (eval "$ac_link") 2>&5
22062 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22065 { (case "(($ac_try" in
22066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22067 *) ac_try_echo=$ac_try;;
22068esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022070 (eval "$ac_try") 2>&5
22071 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022073 (exit $ac_status); }; }; then
22074 ac_cv_big_endian_double=yes
22075else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022076 echo "$as_me: program exited with status $ac_status" >&5
22077echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022078sed 's/^/| /' conftest.$ac_ext >&5
22079
22080( exit $ac_status )
22081ac_cv_big_endian_double=no
22082fi
22083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22084fi
22085
22086
22087fi
22088
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022089{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22090echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022091if test "$ac_cv_big_endian_double" = yes
22092then
22093
22094cat >>confdefs.h <<\_ACEOF
22095#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22096_ACEOF
22097
22098fi
22099
22100# Some ARM platforms use a mixed-endian representation for doubles.
22101# While Python doesn't currently have full support for these platforms
22102# (see e.g., issue 1762561), we can at least make sure that float <-> string
22103# conversions work.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022104{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22105echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022106if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022107 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022108else
22109
22110if test "$cross_compiling" = yes; then
22111 ac_cv_mixed_endian_double=no
22112else
22113 cat >conftest.$ac_ext <<_ACEOF
22114/* confdefs.h. */
22115_ACEOF
22116cat confdefs.h >>conftest.$ac_ext
22117cat >>conftest.$ac_ext <<_ACEOF
22118/* end confdefs.h. */
22119
22120#include <string.h>
22121int main() {
22122 double x = 9006104071832581.0;
22123 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22124 return 0;
22125 else
22126 return 1;
22127}
22128
22129_ACEOF
22130rm -f conftest$ac_exeext
22131if { (ac_try="$ac_link"
22132case "(($ac_try" in
22133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22134 *) ac_try_echo=$ac_try;;
22135esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022137 (eval "$ac_link") 2>&5
22138 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22141 { (case "(($ac_try" in
22142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22143 *) ac_try_echo=$ac_try;;
22144esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022146 (eval "$ac_try") 2>&5
22147 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022149 (exit $ac_status); }; }; then
22150 ac_cv_mixed_endian_double=yes
22151else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022152 echo "$as_me: program exited with status $ac_status" >&5
22153echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022154sed 's/^/| /' conftest.$ac_ext >&5
22155
22156( exit $ac_status )
22157ac_cv_mixed_endian_double=no
22158fi
22159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22160fi
22161
22162
22163fi
22164
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022165{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22166echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022167if test "$ac_cv_mixed_endian_double" = yes
22168then
22169
22170cat >>confdefs.h <<\_ACEOF
22171#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22172_ACEOF
22173
22174fi
22175
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022176# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022177# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022178# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022179# rounding; this is a problem on x86, where the x87 FPU has a default
22180# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22181# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022182if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22183then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022184 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022185 # x87 control word. It should be, but you never know...
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022186 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22187echo $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 +000022188 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022189/* confdefs.h. */
22190_ACEOF
22191cat confdefs.h >>conftest.$ac_ext
22192cat >>conftest.$ac_ext <<_ACEOF
22193/* end confdefs.h. */
22194
22195int
22196main ()
22197{
22198
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022199 unsigned short cw;
22200 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22201 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022202
22203 ;
22204 return 0;
22205}
22206_ACEOF
22207rm -f conftest.$ac_objext
22208if { (ac_try="$ac_compile"
22209case "(($ac_try" in
22210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22211 *) ac_try_echo=$ac_try;;
22212esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022214 (eval "$ac_compile") 2>conftest.er1
22215 ac_status=$?
22216 grep -v '^ *+' conftest.er1 >conftest.err
22217 rm -f conftest.er1
22218 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022220 (exit $ac_status); } && {
22221 test -z "$ac_c_werror_flag" ||
22222 test ! -s conftest.err
22223 } && test -s conftest.$ac_objext; then
22224 have_gcc_asm_for_x87=yes
22225else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022226 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022227sed 's/^/| /' conftest.$ac_ext >&5
22228
22229 have_gcc_asm_for_x87=no
22230fi
22231
22232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022233 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22234echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022235 if test "$have_gcc_asm_for_x87" = yes
22236 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022237
22238cat >>confdefs.h <<\_ACEOF
22239#define HAVE_GCC_ASM_FOR_X87 1
22240_ACEOF
22241
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022242 fi
22243fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022244
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022245# Detect whether system arithmetic is subject to x87-style double
22246# rounding issues. The result of this test has little meaning on non
22247# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22248# mode is round-to-nearest and double rounding issues are present, and
22249# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022250{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22251echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022252# $BASECFLAGS may affect the result
22253ac_save_cc="$CC"
22254CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022255if test "$cross_compiling" = yes; then
22256 ac_cv_x87_double_rounding=no
22257else
22258 cat >conftest.$ac_ext <<_ACEOF
22259/* confdefs.h. */
22260_ACEOF
22261cat confdefs.h >>conftest.$ac_ext
22262cat >>conftest.$ac_ext <<_ACEOF
22263/* end confdefs.h. */
22264
22265#include <stdlib.h>
22266#include <math.h>
22267int main() {
22268 volatile double x, y, z;
22269 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22270 x = 0.99999999999999989; /* 1-2**-53 */
22271 y = 1./x;
22272 if (y != 1.)
22273 exit(0);
22274 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22275 x = 1e16;
22276 y = 2.99999;
22277 z = x + y;
22278 if (z != 1e16+4.)
22279 exit(0);
22280 /* both tests show evidence of double rounding */
22281 exit(1);
22282}
22283
22284_ACEOF
22285rm -f conftest$ac_exeext
22286if { (ac_try="$ac_link"
22287case "(($ac_try" in
22288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22289 *) ac_try_echo=$ac_try;;
22290esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022292 (eval "$ac_link") 2>&5
22293 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022295 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22296 { (case "(($ac_try" in
22297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22298 *) ac_try_echo=$ac_try;;
22299esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022301 (eval "$ac_try") 2>&5
22302 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022304 (exit $ac_status); }; }; then
22305 ac_cv_x87_double_rounding=no
22306else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022307 echo "$as_me: program exited with status $ac_status" >&5
22308echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022309sed 's/^/| /' conftest.$ac_ext >&5
22310
22311( exit $ac_status )
22312ac_cv_x87_double_rounding=yes
22313fi
22314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22315fi
22316
22317
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022318CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022319{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22320echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022321if test "$ac_cv_x87_double_rounding" = yes
22322then
22323
22324cat >>confdefs.h <<\_ACEOF
22325#define X87_DOUBLE_ROUNDING 1
22326_ACEOF
22327
22328fi
22329
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022330# ************************************
22331# * Check for mathematical functions *
22332# ************************************
22333
22334LIBS_SAVE=$LIBS
22335LIBS="$LIBS $LIBM"
22336
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022337# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22338# -0. on some architectures.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022339{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22340echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022341if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022342 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022343else
22344
22345if test "$cross_compiling" = yes; then
22346 ac_cv_tanh_preserves_zero_sign=no
22347else
22348 cat >conftest.$ac_ext <<_ACEOF
22349/* confdefs.h. */
22350_ACEOF
22351cat confdefs.h >>conftest.$ac_ext
22352cat >>conftest.$ac_ext <<_ACEOF
22353/* end confdefs.h. */
22354
22355#include <math.h>
22356#include <stdlib.h>
22357int main() {
22358 /* return 0 if either negative zeros don't exist
22359 on this platform or if negative zeros exist
22360 and tanh(-0.) == -0. */
22361 if (atan2(0., -1.) == atan2(-0., -1.) ||
22362 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22363 else exit(1);
22364}
22365
22366_ACEOF
22367rm -f conftest$ac_exeext
22368if { (ac_try="$ac_link"
22369case "(($ac_try" in
22370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22371 *) ac_try_echo=$ac_try;;
22372esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022374 (eval "$ac_link") 2>&5
22375 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022377 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22378 { (case "(($ac_try" in
22379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22380 *) ac_try_echo=$ac_try;;
22381esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022383 (eval "$ac_try") 2>&5
22384 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022386 (exit $ac_status); }; }; then
22387 ac_cv_tanh_preserves_zero_sign=yes
22388else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022389 echo "$as_me: program exited with status $ac_status" >&5
22390echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022391sed 's/^/| /' conftest.$ac_ext >&5
22392
22393( exit $ac_status )
22394ac_cv_tanh_preserves_zero_sign=no
22395fi
22396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22397fi
22398
22399
22400fi
22401
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022402{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22403echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022404if test "$ac_cv_tanh_preserves_zero_sign" = yes
22405then
22406
22407cat >>confdefs.h <<\_ACEOF
22408#define TANH_PRESERVES_ZERO_SIGN 1
22409_ACEOF
22410
22411fi
22412
22413
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022414
Michael W. Hudson54241132001-12-07 15:38:26 +000022415
Christian Heimes99170a52007-12-19 02:07:34 +000022416
22417
22418
22419
22420
Mark Dickinsonf2537862009-04-18 13:58:18 +000022421
22422for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022423do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022424as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22425{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22426echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022427if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022428 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022429else
22430 cat >conftest.$ac_ext <<_ACEOF
22431/* confdefs.h. */
22432_ACEOF
22433cat confdefs.h >>conftest.$ac_ext
22434cat >>conftest.$ac_ext <<_ACEOF
22435/* end confdefs.h. */
22436/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22437 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22438#define $ac_func innocuous_$ac_func
22439
22440/* System header to define __stub macros and hopefully few prototypes,
22441 which can conflict with char $ac_func (); below.
22442 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22443 <limits.h> exists even on freestanding compilers. */
22444
22445#ifdef __STDC__
22446# include <limits.h>
22447#else
22448# include <assert.h>
22449#endif
22450
22451#undef $ac_func
22452
22453/* Override any GCC internal prototype to avoid an error.
22454 Use char because int might match the return type of a GCC
22455 builtin and then its argument prototype would still apply. */
22456#ifdef __cplusplus
22457extern "C"
22458#endif
22459char $ac_func ();
22460/* The GNU C library defines this for functions which it implements
22461 to always fail with ENOSYS. Some functions are actually named
22462 something starting with __ and the normal name is an alias. */
22463#if defined __stub_$ac_func || defined __stub___$ac_func
22464choke me
22465#endif
22466
22467int
22468main ()
22469{
22470return $ac_func ();
22471 ;
22472 return 0;
22473}
22474_ACEOF
22475rm -f conftest.$ac_objext conftest$ac_exeext
22476if { (ac_try="$ac_link"
22477case "(($ac_try" in
22478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22479 *) ac_try_echo=$ac_try;;
22480esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022482 (eval "$ac_link") 2>conftest.er1
22483 ac_status=$?
22484 grep -v '^ *+' conftest.er1 >conftest.err
22485 rm -f conftest.er1
22486 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022488 (exit $ac_status); } && {
22489 test -z "$ac_c_werror_flag" ||
22490 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022491 } && test -s conftest$ac_exeext &&
22492 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022493 eval "$as_ac_var=yes"
22494else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022495 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022496sed 's/^/| /' conftest.$ac_ext >&5
22497
22498 eval "$as_ac_var=no"
22499fi
22500
22501rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22502 conftest$ac_exeext conftest.$ac_ext
22503fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022504ac_res=`eval echo '${'$as_ac_var'}'`
22505 { echo "$as_me:$LINENO: result: $ac_res" >&5
22506echo "${ECHO_T}$ac_res" >&6; }
22507if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022508 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022509#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022510_ACEOF
22511
22512fi
22513done
22514
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022515{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22516echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022517if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022518 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022519else
22520 cat >conftest.$ac_ext <<_ACEOF
22521/* confdefs.h. */
22522_ACEOF
22523cat confdefs.h >>conftest.$ac_ext
22524cat >>conftest.$ac_ext <<_ACEOF
22525/* end confdefs.h. */
22526#include <math.h>
22527
22528int
22529main ()
22530{
22531#ifndef isinf
22532 (void) isinf;
22533#endif
22534
22535 ;
22536 return 0;
22537}
22538_ACEOF
22539rm -f conftest.$ac_objext
22540if { (ac_try="$ac_compile"
22541case "(($ac_try" in
22542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22543 *) ac_try_echo=$ac_try;;
22544esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022546 (eval "$ac_compile") 2>conftest.er1
22547 ac_status=$?
22548 grep -v '^ *+' conftest.er1 >conftest.err
22549 rm -f conftest.er1
22550 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022552 (exit $ac_status); } && {
22553 test -z "$ac_c_werror_flag" ||
22554 test ! -s conftest.err
22555 } && test -s conftest.$ac_objext; then
22556 ac_cv_have_decl_isinf=yes
22557else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022558 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022559sed 's/^/| /' conftest.$ac_ext >&5
22560
22561 ac_cv_have_decl_isinf=no
22562fi
22563
22564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22565fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022566{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22567echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22568if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022569
22570cat >>confdefs.h <<_ACEOF
22571#define HAVE_DECL_ISINF 1
22572_ACEOF
22573
22574
22575else
22576 cat >>confdefs.h <<_ACEOF
22577#define HAVE_DECL_ISINF 0
22578_ACEOF
22579
22580
22581fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022582{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22583echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022584if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022585 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022586else
22587 cat >conftest.$ac_ext <<_ACEOF
22588/* confdefs.h. */
22589_ACEOF
22590cat confdefs.h >>conftest.$ac_ext
22591cat >>conftest.$ac_ext <<_ACEOF
22592/* end confdefs.h. */
22593#include <math.h>
22594
22595int
22596main ()
22597{
22598#ifndef isnan
22599 (void) isnan;
22600#endif
22601
22602 ;
22603 return 0;
22604}
22605_ACEOF
22606rm -f conftest.$ac_objext
22607if { (ac_try="$ac_compile"
22608case "(($ac_try" in
22609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22610 *) ac_try_echo=$ac_try;;
22611esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022613 (eval "$ac_compile") 2>conftest.er1
22614 ac_status=$?
22615 grep -v '^ *+' conftest.er1 >conftest.err
22616 rm -f conftest.er1
22617 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022619 (exit $ac_status); } && {
22620 test -z "$ac_c_werror_flag" ||
22621 test ! -s conftest.err
22622 } && test -s conftest.$ac_objext; then
22623 ac_cv_have_decl_isnan=yes
22624else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022625 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022626sed 's/^/| /' conftest.$ac_ext >&5
22627
22628 ac_cv_have_decl_isnan=no
22629fi
22630
22631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22632fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022633{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22634echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22635if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022636
22637cat >>confdefs.h <<_ACEOF
22638#define HAVE_DECL_ISNAN 1
22639_ACEOF
22640
22641
22642else
22643 cat >>confdefs.h <<_ACEOF
22644#define HAVE_DECL_ISNAN 0
22645_ACEOF
22646
22647
22648fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022649{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22650echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022651if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022652 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022653else
22654 cat >conftest.$ac_ext <<_ACEOF
22655/* confdefs.h. */
22656_ACEOF
22657cat confdefs.h >>conftest.$ac_ext
22658cat >>conftest.$ac_ext <<_ACEOF
22659/* end confdefs.h. */
22660#include <math.h>
22661
22662int
22663main ()
22664{
22665#ifndef isfinite
22666 (void) isfinite;
22667#endif
22668
22669 ;
22670 return 0;
22671}
22672_ACEOF
22673rm -f conftest.$ac_objext
22674if { (ac_try="$ac_compile"
22675case "(($ac_try" in
22676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22677 *) ac_try_echo=$ac_try;;
22678esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022680 (eval "$ac_compile") 2>conftest.er1
22681 ac_status=$?
22682 grep -v '^ *+' conftest.er1 >conftest.err
22683 rm -f conftest.er1
22684 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022686 (exit $ac_status); } && {
22687 test -z "$ac_c_werror_flag" ||
22688 test ! -s conftest.err
22689 } && test -s conftest.$ac_objext; then
22690 ac_cv_have_decl_isfinite=yes
22691else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022692 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022693sed 's/^/| /' conftest.$ac_ext >&5
22694
22695 ac_cv_have_decl_isfinite=no
22696fi
22697
22698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022700{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22701echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22702if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022703
22704cat >>confdefs.h <<_ACEOF
22705#define HAVE_DECL_ISFINITE 1
22706_ACEOF
22707
22708
22709else
22710 cat >>confdefs.h <<_ACEOF
22711#define HAVE_DECL_ISFINITE 0
22712_ACEOF
22713
22714
22715fi
22716
22717
Christian Heimes99170a52007-12-19 02:07:34 +000022718
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022719LIBS=$LIBS_SAVE
22720
Mark Dickinson875ada42009-11-28 12:52:39 +000022721# For multiprocessing module, check that sem_open
22722# actually works. For FreeBSD versions <= 7.2,
22723# the kernel module that provides POSIX semaphores
22724# isn't loaded by default, so an attempt to call
22725# sem_open results in a 'Signal 12' error.
22726{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
22727echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
22728if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
22729 echo $ECHO_N "(cached) $ECHO_C" >&6
22730else
22731 if test "$cross_compiling" = yes; then
22732 ac_cv_posix_semaphores_enabled=yes
22733else
22734 cat >conftest.$ac_ext <<_ACEOF
22735/* confdefs.h. */
22736_ACEOF
22737cat confdefs.h >>conftest.$ac_ext
22738cat >>conftest.$ac_ext <<_ACEOF
22739/* end confdefs.h. */
22740
22741#include <unistd.h>
22742#include <fcntl.h>
22743#include <stdio.h>
22744#include <semaphore.h>
22745#include <sys/stat.h>
22746
22747int main(void) {
22748 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22749 if (a == SEM_FAILED) {
22750 perror("sem_open");
22751 return 1;
22752 }
22753 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022754 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000022755 return 0;
22756}
22757
22758_ACEOF
22759rm -f conftest$ac_exeext
22760if { (ac_try="$ac_link"
22761case "(($ac_try" in
22762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22763 *) ac_try_echo=$ac_try;;
22764esac
22765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22766 (eval "$ac_link") 2>&5
22767 ac_status=$?
22768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22769 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22770 { (case "(($ac_try" in
22771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22772 *) ac_try_echo=$ac_try;;
22773esac
22774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22775 (eval "$ac_try") 2>&5
22776 ac_status=$?
22777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22778 (exit $ac_status); }; }; then
22779 ac_cv_posix_semaphores_enabled=yes
22780else
22781 echo "$as_me: program exited with status $ac_status" >&5
22782echo "$as_me: failed program was:" >&5
22783sed 's/^/| /' conftest.$ac_ext >&5
22784
22785( exit $ac_status )
22786ac_cv_posix_semaphores_enabled=no
22787fi
22788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22789fi
22790
22791
22792
22793fi
22794
22795{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
22796echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
22797if test $ac_cv_posix_semaphores_enabled = no
22798then
22799
22800cat >>confdefs.h <<\_ACEOF
22801#define POSIX_SEMAPHORES_NOT_ENABLED 1
22802_ACEOF
22803
22804fi
22805
Mark Dickinson10683072009-04-18 21:18:19 +000022806# Multiprocessing check for broken sem_getvalue
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022807{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22808echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022809if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022810 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022811See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022812echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022813See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022814 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022815else
22816 cat >conftest.$ac_ext <<_ACEOF
22817/* confdefs.h. */
22818_ACEOF
22819cat confdefs.h >>conftest.$ac_ext
22820cat >>conftest.$ac_ext <<_ACEOF
22821/* end confdefs.h. */
22822
22823#include <unistd.h>
22824#include <fcntl.h>
22825#include <stdio.h>
22826#include <semaphore.h>
22827#include <sys/stat.h>
22828
22829int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022830 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000022831 int count;
22832 int res;
22833 if(a==SEM_FAILED){
22834 perror("sem_open");
22835 return 1;
22836
22837 }
22838 res = sem_getvalue(a, &count);
22839 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022840 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000022841 return res==-1 ? 1 : 0;
22842}
22843
22844
22845_ACEOF
22846rm -f conftest$ac_exeext
22847if { (ac_try="$ac_link"
22848case "(($ac_try" in
22849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22850 *) ac_try_echo=$ac_try;;
22851esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022853 (eval "$ac_link") 2>&5
22854 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22857 { (case "(($ac_try" in
22858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22859 *) ac_try_echo=$ac_try;;
22860esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022862 (eval "$ac_try") 2>&5
22863 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022865 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022866 { echo "$as_me:$LINENO: result: no" >&5
22867echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022868else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022869 echo "$as_me: program exited with status $ac_status" >&5
22870echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022871sed 's/^/| /' conftest.$ac_ext >&5
22872
22873( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022874{ echo "$as_me:$LINENO: result: yes" >&5
22875echo "${ECHO_T}yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022876
22877cat >>confdefs.h <<\_ACEOF
22878#define HAVE_BROKEN_SEM_GETVALUE 1
22879_ACEOF
22880
22881
22882fi
22883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22884fi
22885
22886
22887
Mark Dickinsonbd792642009-03-18 20:06:12 +000022888# determine what size digit to use for Python's longs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022889{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22890echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022891# Check whether --enable-big-digits was given.
22892if test "${enable_big_digits+set}" = set; then
22893 enableval=$enable_big_digits; case $enable_big_digits in
22894yes)
22895 enable_big_digits=30 ;;
22896no)
22897 enable_big_digits=15 ;;
2289815|30)
22899 ;;
22900*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022901 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22902echo "$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 +000022903 { (exit 1); exit 1; }; } ;;
22904esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022905{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22906echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022907
22908cat >>confdefs.h <<_ACEOF
22909#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22910_ACEOF
22911
22912
22913else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022914 { echo "$as_me:$LINENO: result: no value specified" >&5
22915echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022916fi
22917
22918
Guido van Rossumef2255b2000-03-10 22:30:29 +000022919# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022920if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022921 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22922echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022923if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022924 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022925fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022926{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22927echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022928else
Martin v. Löwis11437992002-04-12 09:54:03 +000022929 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022930{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22931echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022932cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022933/* confdefs.h. */
22934_ACEOF
22935cat confdefs.h >>conftest.$ac_ext
22936cat >>conftest.$ac_ext <<_ACEOF
22937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022938$ac_includes_default
22939#include <wchar.h>
22940_ACEOF
22941rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022942if { (ac_try="$ac_compile"
22943case "(($ac_try" in
22944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22945 *) ac_try_echo=$ac_try;;
22946esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022950 grep -v '^ *+' conftest.er1 >conftest.err
22951 rm -f conftest.er1
22952 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022954 (exit $ac_status); } && {
22955 test -z "$ac_c_werror_flag" ||
22956 test ! -s conftest.err
22957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022958 ac_header_compiler=yes
22959else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022961sed 's/^/| /' conftest.$ac_ext >&5
22962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022963 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022965
22966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022967{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22968echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022969
22970# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022971{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22972echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022974/* confdefs.h. */
22975_ACEOF
22976cat confdefs.h >>conftest.$ac_ext
22977cat >>conftest.$ac_ext <<_ACEOF
22978/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022979#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022980_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022981if { (ac_try="$ac_cpp conftest.$ac_ext"
22982case "(($ac_try" in
22983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22984 *) ac_try_echo=$ac_try;;
22985esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022987 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022988 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022989 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022990 rm -f conftest.er1
22991 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022993 (exit $ac_status); } >/dev/null && {
22994 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22995 test ! -s conftest.err
22996 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022997 ac_header_preproc=yes
22998else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023000sed 's/^/| /' conftest.$ac_ext >&5
23001
Martin v. Löwis11437992002-04-12 09:54:03 +000023002 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023004
Martin v. Löwis11437992002-04-12 09:54:03 +000023005rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023006{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23007echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023008
23009# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023010case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23011 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023012 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23013echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23014 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23015echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023016 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023017 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023018 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023019 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23020echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23021 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23022echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23023 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23024echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23025 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23026echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23027 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23028echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23029 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23030echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023031 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023032## -------------------------------------- ##
23033## Report this to http://bugs.python.org/ ##
23034## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023035_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023036 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023037 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023038esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023039{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23040echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023041if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023042 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023043else
23044 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023045fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023046{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23047echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023048
23049fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023050if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023051
23052
23053cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023054#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023055_ACEOF
23056
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023057 wchar_h="yes"
23058
Guido van Rossumef2255b2000-03-10 22:30:29 +000023059else
Martin v. Löwis11437992002-04-12 09:54:03 +000023060 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023061
23062fi
23063
Michael W. Hudson54241132001-12-07 15:38:26 +000023064
Martin v. Löwis11437992002-04-12 09:54:03 +000023065
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023066# determine wchar_t size
23067if test "$wchar_h" = yes
23068then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023069 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23070echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23071if test "${ac_cv_type_wchar_t+set}" = set; then
23072 echo $ECHO_N "(cached) $ECHO_C" >&6
23073else
23074 cat >conftest.$ac_ext <<_ACEOF
23075/* confdefs.h. */
23076_ACEOF
23077cat confdefs.h >>conftest.$ac_ext
23078cat >>conftest.$ac_ext <<_ACEOF
23079/* end confdefs.h. */
23080#include <wchar.h>
23081
23082typedef wchar_t ac__type_new_;
23083int
23084main ()
23085{
23086if ((ac__type_new_ *) 0)
23087 return 0;
23088if (sizeof (ac__type_new_))
23089 return 0;
23090 ;
23091 return 0;
23092}
23093_ACEOF
23094rm -f conftest.$ac_objext
23095if { (ac_try="$ac_compile"
23096case "(($ac_try" in
23097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23098 *) ac_try_echo=$ac_try;;
23099esac
23100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23101 (eval "$ac_compile") 2>conftest.er1
23102 ac_status=$?
23103 grep -v '^ *+' conftest.er1 >conftest.err
23104 rm -f conftest.er1
23105 cat conftest.err >&5
23106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23107 (exit $ac_status); } && {
23108 test -z "$ac_c_werror_flag" ||
23109 test ! -s conftest.err
23110 } && test -s conftest.$ac_objext; then
23111 ac_cv_type_wchar_t=yes
23112else
23113 echo "$as_me: failed program was:" >&5
23114sed 's/^/| /' conftest.$ac_ext >&5
23115
23116 ac_cv_type_wchar_t=no
23117fi
23118
23119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23120fi
23121{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23122echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23123
23124# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023125# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23126# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23127# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023128{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23129echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023130if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023131 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023132else
Martin v. Löwis11437992002-04-12 09:54:03 +000023133 if test "$cross_compiling" = yes; then
23134 # Depending upon the size, compute the lo and hi bounds.
23135cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023136/* confdefs.h. */
23137_ACEOF
23138cat confdefs.h >>conftest.$ac_ext
23139cat >>conftest.$ac_ext <<_ACEOF
23140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023141#include <wchar.h>
23142
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023143 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023144int
23145main ()
23146{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023148test_array [0] = 0
23149
23150 ;
23151 return 0;
23152}
23153_ACEOF
23154rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023155if { (ac_try="$ac_compile"
23156case "(($ac_try" in
23157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23158 *) ac_try_echo=$ac_try;;
23159esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023163 grep -v '^ *+' conftest.er1 >conftest.err
23164 rm -f conftest.er1
23165 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023167 (exit $ac_status); } && {
23168 test -z "$ac_c_werror_flag" ||
23169 test ! -s conftest.err
23170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023171 ac_lo=0 ac_mid=0
23172 while :; do
23173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023174/* confdefs.h. */
23175_ACEOF
23176cat confdefs.h >>conftest.$ac_ext
23177cat >>conftest.$ac_ext <<_ACEOF
23178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023179#include <wchar.h>
23180
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023181 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023182int
23183main ()
23184{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023185static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023186test_array [0] = 0
23187
23188 ;
23189 return 0;
23190}
23191_ACEOF
23192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023193if { (ac_try="$ac_compile"
23194case "(($ac_try" in
23195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23196 *) ac_try_echo=$ac_try;;
23197esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023201 grep -v '^ *+' conftest.er1 >conftest.err
23202 rm -f conftest.er1
23203 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023205 (exit $ac_status); } && {
23206 test -z "$ac_c_werror_flag" ||
23207 test ! -s conftest.err
23208 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023209 ac_hi=$ac_mid; break
23210else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023212sed 's/^/| /' conftest.$ac_ext >&5
23213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023214 ac_lo=`expr $ac_mid + 1`
23215 if test $ac_lo -le $ac_mid; then
23216 ac_lo= ac_hi=
23217 break
23218 fi
23219 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023221
23222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023223 done
23224else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023226sed 's/^/| /' conftest.$ac_ext >&5
23227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023228 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023229/* confdefs.h. */
23230_ACEOF
23231cat confdefs.h >>conftest.$ac_ext
23232cat >>conftest.$ac_ext <<_ACEOF
23233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023234#include <wchar.h>
23235
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023236 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023237int
23238main ()
23239{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023241test_array [0] = 0
23242
23243 ;
23244 return 0;
23245}
23246_ACEOF
23247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023248if { (ac_try="$ac_compile"
23249case "(($ac_try" in
23250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23251 *) ac_try_echo=$ac_try;;
23252esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023256 grep -v '^ *+' conftest.er1 >conftest.err
23257 rm -f conftest.er1
23258 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023260 (exit $ac_status); } && {
23261 test -z "$ac_c_werror_flag" ||
23262 test ! -s conftest.err
23263 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023264 ac_hi=-1 ac_mid=-1
23265 while :; do
23266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023267/* confdefs.h. */
23268_ACEOF
23269cat confdefs.h >>conftest.$ac_ext
23270cat >>conftest.$ac_ext <<_ACEOF
23271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023272#include <wchar.h>
23273
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023274 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023275int
23276main ()
23277{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023278static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023279test_array [0] = 0
23280
23281 ;
23282 return 0;
23283}
23284_ACEOF
23285rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023286if { (ac_try="$ac_compile"
23287case "(($ac_try" in
23288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23289 *) ac_try_echo=$ac_try;;
23290esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023292 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023294 grep -v '^ *+' conftest.er1 >conftest.err
23295 rm -f conftest.er1
23296 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023298 (exit $ac_status); } && {
23299 test -z "$ac_c_werror_flag" ||
23300 test ! -s conftest.err
23301 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023302 ac_lo=$ac_mid; break
23303else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023305sed 's/^/| /' conftest.$ac_ext >&5
23306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023307 ac_hi=`expr '(' $ac_mid ')' - 1`
23308 if test $ac_mid -le $ac_hi; then
23309 ac_lo= ac_hi=
23310 break
23311 fi
23312 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023314
23315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023316 done
23317else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023319sed 's/^/| /' conftest.$ac_ext >&5
23320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023321 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023323
23324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023326
23327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023328# Binary search between lo and hi bounds.
23329while test "x$ac_lo" != "x$ac_hi"; do
23330 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023332/* confdefs.h. */
23333_ACEOF
23334cat confdefs.h >>conftest.$ac_ext
23335cat >>conftest.$ac_ext <<_ACEOF
23336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023337#include <wchar.h>
23338
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023339 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023340int
23341main ()
23342{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023343static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023344test_array [0] = 0
23345
23346 ;
23347 return 0;
23348}
23349_ACEOF
23350rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023351if { (ac_try="$ac_compile"
23352case "(($ac_try" in
23353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23354 *) ac_try_echo=$ac_try;;
23355esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023359 grep -v '^ *+' conftest.er1 >conftest.err
23360 rm -f conftest.er1
23361 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023363 (exit $ac_status); } && {
23364 test -z "$ac_c_werror_flag" ||
23365 test ! -s conftest.err
23366 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023367 ac_hi=$ac_mid
23368else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023370sed 's/^/| /' conftest.$ac_ext >&5
23371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023372 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023374
23375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023376done
23377case $ac_lo in
23378?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023379'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023380 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023381See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023382echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023383See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023384 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023385 else
23386 ac_cv_sizeof_wchar_t=0
23387 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023388esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023389else
Martin v. Löwis11437992002-04-12 09:54:03 +000023390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023391/* confdefs.h. */
23392_ACEOF
23393cat confdefs.h >>conftest.$ac_ext
23394cat >>conftest.$ac_ext <<_ACEOF
23395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023396#include <wchar.h>
23397
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023398 typedef wchar_t ac__type_sizeof_;
23399static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23400static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023401#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023402#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023403int
23404main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023405{
Martin v. Löwis11437992002-04-12 09:54:03 +000023406
23407 FILE *f = fopen ("conftest.val", "w");
23408 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023409 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023410 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023411 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023412 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023413 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023414 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023415 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023416 }
23417 else
23418 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023419 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023420 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023421 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023422 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023423 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023424 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023425
23426 ;
23427 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023428}
Martin v. Löwis11437992002-04-12 09:54:03 +000023429_ACEOF
23430rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023431if { (ac_try="$ac_link"
23432case "(($ac_try" in
23433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23434 *) ac_try_echo=$ac_try;;
23435esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023437 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023438 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023440 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023441 { (case "(($ac_try" in
23442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23443 *) ac_try_echo=$ac_try;;
23444esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023446 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023447 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023449 (exit $ac_status); }; }; then
23450 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023451else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023452 echo "$as_me: program exited with status $ac_status" >&5
23453echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023454sed 's/^/| /' conftest.$ac_ext >&5
23455
Martin v. Löwis11437992002-04-12 09:54:03 +000023456( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023457if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023458 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023459See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023460echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023461See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023462 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023463 else
23464 ac_cv_sizeof_wchar_t=0
23465 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023467rm -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 +000023468fi
23469rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023470fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023471{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23472echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023473
23474
23475
Martin v. Löwis11437992002-04-12 09:54:03 +000023476cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023477#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023478_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023479
Michael W. Hudson54241132001-12-07 15:38:26 +000023480
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023481fi
23482
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023483{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23484echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023485have_ucs4_tcl=no
23486cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023487/* confdefs.h. */
23488_ACEOF
23489cat confdefs.h >>conftest.$ac_ext
23490cat >>conftest.$ac_ext <<_ACEOF
23491/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023492
23493#include <tcl.h>
23494#if TCL_UTF_MAX != 6
23495# error "NOT UCS4_TCL"
23496#endif
23497int
23498main ()
23499{
23500
23501 ;
23502 return 0;
23503}
23504_ACEOF
23505rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023506if { (ac_try="$ac_compile"
23507case "(($ac_try" in
23508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23509 *) ac_try_echo=$ac_try;;
23510esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023514 grep -v '^ *+' conftest.er1 >conftest.err
23515 rm -f conftest.er1
23516 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023518 (exit $ac_status); } && {
23519 test -z "$ac_c_werror_flag" ||
23520 test ! -s conftest.err
23521 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023522
23523
23524cat >>confdefs.h <<\_ACEOF
23525#define HAVE_UCS4_TCL 1
23526_ACEOF
23527
23528 have_ucs4_tcl=yes
23529
23530else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023532sed 's/^/| /' conftest.$ac_ext >&5
23533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023534
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023536
23537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023538{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23539echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023540
Skip Montanaro6dead952003-09-25 14:50:04 +000023541# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023542if test "$wchar_h" = yes
23543then
23544 # check whether wchar_t is signed or not
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023545 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23546echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023547 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023548 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023549else
23550
23551 if test "$cross_compiling" = yes; then
23552 ac_cv_wchar_t_signed=yes
23553else
23554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023555/* confdefs.h. */
23556_ACEOF
23557cat confdefs.h >>conftest.$ac_ext
23558cat >>conftest.$ac_ext <<_ACEOF
23559/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023560
23561 #include <wchar.h>
23562 int main()
23563 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023564 /* Success: exit code 0 */
23565 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023566 }
23567
23568_ACEOF
23569rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023570if { (ac_try="$ac_link"
23571case "(($ac_try" in
23572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23573 *) ac_try_echo=$ac_try;;
23574esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023576 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023577 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023579 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023580 { (case "(($ac_try" in
23581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23582 *) ac_try_echo=$ac_try;;
23583esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023585 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023586 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023588 (exit $ac_status); }; }; then
23589 ac_cv_wchar_t_signed=yes
23590else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023591 echo "$as_me: program exited with status $ac_status" >&5
23592echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023593sed 's/^/| /' conftest.$ac_ext >&5
23594
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023595( exit $ac_status )
23596ac_cv_wchar_t_signed=no
23597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023598rm -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 +000023599fi
23600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023601
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023602fi
23603
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023604 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23605echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023606fi
23607
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023608{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23609echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023610
23611# Check whether --with-wide-unicode was given.
23612if test "${with_wide_unicode+set}" = set; then
23613 withval=$with_wide_unicode;
23614if test "$withval" != no
23615then unicode_size="4"
23616else unicode_size="2"
23617fi
23618
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023619else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023620
Georg Brandl52d168a2008-01-07 18:10:24 +000023621case "$have_ucs4_tcl" in
23622 yes) unicode_size="4" ;;
23623 *) unicode_size="2" ;;
23624esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023625
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023626fi
23627
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023628
23629
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023630
Georg Brandl52d168a2008-01-07 18:10:24 +000023631case "$unicode_size" in
23632 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023633#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023634_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023635 ;;
23636 *) cat >>confdefs.h <<\_ACEOF
23637#define Py_UNICODE_SIZE 2
23638_ACEOF
23639 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023640esac
23641
Michael W. Hudson54241132001-12-07 15:38:26 +000023642
Martin v. Löwis11437992002-04-12 09:54:03 +000023643
23644
Georg Brandl52d168a2008-01-07 18:10:24 +000023645# wchar_t is only usable if it maps to an unsigned type
23646if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023647 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023648then
23649 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023650
Martin v. Löwis11437992002-04-12 09:54:03 +000023651cat >>confdefs.h <<\_ACEOF
23652#define HAVE_USABLE_WCHAR_T 1
23653_ACEOF
23654
Georg Brandl52d168a2008-01-07 18:10:24 +000023655 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023656#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023657_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023658
Georg Brandl52d168a2008-01-07 18:10:24 +000023659elif test "$ac_cv_sizeof_short" = "$unicode_size"
23660then
23661 PY_UNICODE_TYPE="unsigned short"
23662 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023663#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023664_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023665
Georg Brandl52d168a2008-01-07 18:10:24 +000023666elif test "$ac_cv_sizeof_long" = "$unicode_size"
23667then
23668 PY_UNICODE_TYPE="unsigned long"
23669 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023670#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023671_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023672
Georg Brandl52d168a2008-01-07 18:10:24 +000023673else
23674 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023675fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023676{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23677echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023678
23679# check for endianness
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023680{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23681echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023682if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023683 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023684else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023685 # See if sys/param.h defines the BYTE_ORDER macro.
23686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023687/* confdefs.h. */
23688_ACEOF
23689cat confdefs.h >>conftest.$ac_ext
23690cat >>conftest.$ac_ext <<_ACEOF
23691/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023692#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023693#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023694
Martin v. Löwis11437992002-04-12 09:54:03 +000023695int
23696main ()
23697{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023698#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23699 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23700 bogus endian macros
23701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023702
23703 ;
23704 return 0;
23705}
23706_ACEOF
23707rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023708if { (ac_try="$ac_compile"
23709case "(($ac_try" in
23710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23711 *) ac_try_echo=$ac_try;;
23712esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023716 grep -v '^ *+' conftest.er1 >conftest.err
23717 rm -f conftest.er1
23718 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023720 (exit $ac_status); } && {
23721 test -z "$ac_c_werror_flag" ||
23722 test ! -s conftest.err
23723 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023724 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023725cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023726/* confdefs.h. */
23727_ACEOF
23728cat confdefs.h >>conftest.$ac_ext
23729cat >>conftest.$ac_ext <<_ACEOF
23730/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023731#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023732#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023733
Martin v. Löwis11437992002-04-12 09:54:03 +000023734int
23735main ()
23736{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023737#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023738 not big endian
23739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023740
23741 ;
23742 return 0;
23743}
23744_ACEOF
23745rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023746if { (ac_try="$ac_compile"
23747case "(($ac_try" in
23748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23749 *) ac_try_echo=$ac_try;;
23750esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023754 grep -v '^ *+' conftest.er1 >conftest.err
23755 rm -f conftest.er1
23756 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023758 (exit $ac_status); } && {
23759 test -z "$ac_c_werror_flag" ||
23760 test ! -s conftest.err
23761 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023762 ac_cv_c_bigendian=yes
23763else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023765sed 's/^/| /' conftest.$ac_ext >&5
23766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023767 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023769
23770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023771else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023773sed 's/^/| /' conftest.$ac_ext >&5
23774
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023775 # It does not; compile a test program.
23776if test "$cross_compiling" = yes; then
23777 # try to guess the endianness by grepping values into an object file
23778 ac_cv_c_bigendian=unknown
23779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023780/* confdefs.h. */
23781_ACEOF
23782cat confdefs.h >>conftest.$ac_ext
23783cat >>conftest.$ac_ext <<_ACEOF
23784/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023785short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23786short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23787void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23788short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23789short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23790void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023791int
23792main ()
23793{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023794 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023795 ;
23796 return 0;
23797}
23798_ACEOF
23799rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023800if { (ac_try="$ac_compile"
23801case "(($ac_try" in
23802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23803 *) ac_try_echo=$ac_try;;
23804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023808 grep -v '^ *+' conftest.er1 >conftest.err
23809 rm -f conftest.er1
23810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023812 (exit $ac_status); } && {
23813 test -z "$ac_c_werror_flag" ||
23814 test ! -s conftest.err
23815 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023816 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023817 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000023818fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023819if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23820 if test "$ac_cv_c_bigendian" = unknown; then
23821 ac_cv_c_bigendian=no
23822 else
23823 # finding both strings is unlikely to happen, but who knows?
23824 ac_cv_c_bigendian=unknown
23825 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023826fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023827else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023829sed 's/^/| /' conftest.$ac_ext >&5
23830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023831
Martin v. Löwis11437992002-04-12 09:54:03 +000023832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023833
23834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023835else
23836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023837/* confdefs.h. */
23838_ACEOF
23839cat confdefs.h >>conftest.$ac_ext
23840cat >>conftest.$ac_ext <<_ACEOF
23841/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023842$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023843int
23844main ()
23845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023846
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023847 /* Are we little or big endian? From Harbison&Steele. */
23848 union
23849 {
23850 long int l;
23851 char c[sizeof (long int)];
23852 } u;
23853 u.l = 1;
23854 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023855
23856 ;
23857 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023858}
Martin v. Löwis11437992002-04-12 09:54:03 +000023859_ACEOF
23860rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023861if { (ac_try="$ac_link"
23862case "(($ac_try" in
23863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23864 *) ac_try_echo=$ac_try;;
23865esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023867 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023868 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023870 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023871 { (case "(($ac_try" in
23872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23873 *) ac_try_echo=$ac_try;;
23874esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023876 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023877 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023879 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023880 ac_cv_c_bigendian=no
23881else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023882 echo "$as_me: program exited with status $ac_status" >&5
23883echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023884sed 's/^/| /' conftest.$ac_ext >&5
23885
Martin v. Löwis11437992002-04-12 09:54:03 +000023886( exit $ac_status )
23887ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023889rm -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 +000023890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023891
23892
Martin v. Löwis11437992002-04-12 09:54:03 +000023893fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023894
23895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23896fi
23897{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23898echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23899case $ac_cv_c_bigendian in
23900 yes)
Benjamin Petersona8332062009-09-11 22:36:27 +000023901
23902cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023903#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000023904_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023905 ;;
23906 no)
23907 ;;
23908 *)
23909 { { echo "$as_me:$LINENO: error: unknown endianness
23910presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23911echo "$as_me: error: unknown endianness
23912presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023913 { (exit 1); exit 1; }; } ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023914esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023915
Michael W. Hudson54241132001-12-07 15:38:26 +000023916
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023917# Check whether right shifting a negative integer extends the sign bit
23918# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023919{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23920echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023921if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023922 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023923else
Martin v. Löwis11437992002-04-12 09:54:03 +000023924
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023925if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023926 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023927else
Martin v. Löwis11437992002-04-12 09:54:03 +000023928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023929/* confdefs.h. */
23930_ACEOF
23931cat confdefs.h >>conftest.$ac_ext
23932cat >>conftest.$ac_ext <<_ACEOF
23933/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023934
23935int main()
23936{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023937 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023938}
23939
Martin v. Löwis11437992002-04-12 09:54:03 +000023940_ACEOF
23941rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023942if { (ac_try="$ac_link"
23943case "(($ac_try" in
23944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23945 *) ac_try_echo=$ac_try;;
23946esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023948 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023949 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023951 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023952 { (case "(($ac_try" in
23953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23954 *) ac_try_echo=$ac_try;;
23955esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023957 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023958 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023960 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023961 ac_cv_rshift_extends_sign=yes
23962else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023963 echo "$as_me: program exited with status $ac_status" >&5
23964echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023965sed 's/^/| /' conftest.$ac_ext >&5
23966
Martin v. Löwis11437992002-04-12 09:54:03 +000023967( exit $ac_status )
23968ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023970rm -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 +000023971fi
23972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023973
23974fi
23975
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023976{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23977echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023978if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023979then
Martin v. Löwis11437992002-04-12 09:54:03 +000023980
23981cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023982#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023983_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023984
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023985fi
23986
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023987# check for getc_unlocked and related locking functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023988{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23989echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023990if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023991 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023992else
Martin v. Löwis11437992002-04-12 09:54:03 +000023993
23994cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023995/* confdefs.h. */
23996_ACEOF
23997cat confdefs.h >>conftest.$ac_ext
23998cat >>conftest.$ac_ext <<_ACEOF
23999/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024000#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024001int
24002main ()
24003{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024004
24005 FILE *f = fopen("/dev/null", "r");
24006 flockfile(f);
24007 getc_unlocked(f);
24008 funlockfile(f);
24009
Martin v. Löwis11437992002-04-12 09:54:03 +000024010 ;
24011 return 0;
24012}
24013_ACEOF
24014rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024015if { (ac_try="$ac_link"
24016case "(($ac_try" in
24017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24018 *) ac_try_echo=$ac_try;;
24019esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024021 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024023 grep -v '^ *+' conftest.er1 >conftest.err
24024 rm -f conftest.er1
24025 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024027 (exit $ac_status); } && {
24028 test -z "$ac_c_werror_flag" ||
24029 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024030 } && test -s conftest$ac_exeext &&
24031 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024032 ac_cv_have_getc_unlocked=yes
24033else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024035sed 's/^/| /' conftest.$ac_ext >&5
24036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024037 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024039
24040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024041 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024042fi
24043
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024044{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24045echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024046if test "$ac_cv_have_getc_unlocked" = yes
24047then
Martin v. Löwis11437992002-04-12 09:54:03 +000024048
24049cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024050#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024051_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024052
24053fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024054
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024055# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024056# save the value of LIBS so we don't actually link Python with readline
24057LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024058
Gregory P. Smith18820942008-09-07 06:24:49 +000024059# On some systems we need to link readline to a termcap compatible
24060# library. NOTE: Keep the precedence of listed libraries synchronised
24061# with setup.py.
24062py_cv_lib_readline=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024063{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24064echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024065for py_libtermcap in "" ncursesw ncurses curses termcap; do
24066 if test -z "$py_libtermcap"; then
24067 READLINE_LIBS="-lreadline"
24068 else
24069 READLINE_LIBS="-lreadline -l$py_libtermcap"
24070 fi
24071 LIBS="$READLINE_LIBS $LIBS_no_readline"
24072 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024073/* confdefs.h. */
24074_ACEOF
24075cat confdefs.h >>conftest.$ac_ext
24076cat >>conftest.$ac_ext <<_ACEOF
24077/* end confdefs.h. */
24078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024079/* Override any GCC internal prototype to avoid an error.
24080 Use char because int might match the return type of a GCC
24081 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024082#ifdef __cplusplus
24083extern "C"
24084#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024085char readline ();
24086int
24087main ()
24088{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024089return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024090 ;
24091 return 0;
24092}
24093_ACEOF
24094rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024095if { (ac_try="$ac_link"
24096case "(($ac_try" in
24097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24098 *) ac_try_echo=$ac_try;;
24099esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024101 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024102 ac_status=$?
24103 grep -v '^ *+' conftest.er1 >conftest.err
24104 rm -f conftest.er1
24105 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024107 (exit $ac_status); } && {
24108 test -z "$ac_c_werror_flag" ||
24109 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024110 } && test -s conftest$ac_exeext &&
24111 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024112 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024113else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024114 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024115sed 's/^/| /' conftest.$ac_ext >&5
24116
Gregory P. Smith18820942008-09-07 06:24:49 +000024117
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024119
24120rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024121 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024122 if test $py_cv_lib_readline = yes; then
24123 break
24124 fi
24125done
24126# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24127#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024128if test $py_cv_lib_readline = no; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024129 { echo "$as_me:$LINENO: result: none" >&5
24130echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024131else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024132 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24133echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024134
24135cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024136#define HAVE_LIBREADLINE 1
24137_ACEOF
24138
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024139fi
24140
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024141# check for readline 2.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024142{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24143echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024144if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024145 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024146else
24147 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024148LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024149cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024150/* confdefs.h. */
24151_ACEOF
24152cat confdefs.h >>conftest.$ac_ext
24153cat >>conftest.$ac_ext <<_ACEOF
24154/* end confdefs.h. */
24155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024156/* Override any GCC internal prototype to avoid an error.
24157 Use char because int might match the return type of a GCC
24158 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024159#ifdef __cplusplus
24160extern "C"
24161#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024162char rl_callback_handler_install ();
24163int
24164main ()
24165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024166return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024167 ;
24168 return 0;
24169}
24170_ACEOF
24171rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024172if { (ac_try="$ac_link"
24173case "(($ac_try" in
24174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24175 *) ac_try_echo=$ac_try;;
24176esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024178 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024180 grep -v '^ *+' conftest.er1 >conftest.err
24181 rm -f conftest.er1
24182 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024184 (exit $ac_status); } && {
24185 test -z "$ac_c_werror_flag" ||
24186 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024187 } && test -s conftest$ac_exeext &&
24188 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024189 ac_cv_lib_readline_rl_callback_handler_install=yes
24190else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024191 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024192sed 's/^/| /' conftest.$ac_ext >&5
24193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024194 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024196
24197rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024198 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024199LIBS=$ac_check_lib_save_LIBS
24200fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024201{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24202echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24203if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024204
24205cat >>confdefs.h <<\_ACEOF
24206#define HAVE_RL_CALLBACK 1
24207_ACEOF
24208
24209fi
24210
24211
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024212# check for readline 2.2
24213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024214/* confdefs.h. */
24215_ACEOF
24216cat confdefs.h >>conftest.$ac_ext
24217cat >>conftest.$ac_ext <<_ACEOF
24218/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024219#include <readline/readline.h>
24220_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024221if { (ac_try="$ac_cpp conftest.$ac_ext"
24222case "(($ac_try" in
24223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24224 *) ac_try_echo=$ac_try;;
24225esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024227 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024228 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024229 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024230 rm -f conftest.er1
24231 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024233 (exit $ac_status); } >/dev/null && {
24234 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24235 test ! -s conftest.err
24236 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024237 have_readline=yes
24238else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024240sed 's/^/| /' conftest.$ac_ext >&5
24241
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024242 have_readline=no
24243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024244
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024245rm -f conftest.err conftest.$ac_ext
24246if test $have_readline = yes
24247then
24248 cat >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
24256_ACEOF
24257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024258 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024259
24260cat >>confdefs.h <<\_ACEOF
24261#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24262_ACEOF
24263
24264fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000024265rm -f -r conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000024266
24267 cat >conftest.$ac_ext <<_ACEOF
24268/* confdefs.h. */
24269_ACEOF
24270cat confdefs.h >>conftest.$ac_ext
24271cat >>conftest.$ac_ext <<_ACEOF
24272/* end confdefs.h. */
24273#include <readline/readline.h>
24274
24275_ACEOF
24276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24277 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24278
24279cat >>confdefs.h <<\_ACEOF
24280#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24281_ACEOF
24282
24283fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000024284rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024285
24286fi
24287
Martin v. Löwis0daad592001-09-30 21:09:59 +000024288# check for readline 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024289{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24290echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024291if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024293else
Martin v. Löwis11437992002-04-12 09:54:03 +000024294 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024295LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024296cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024297/* confdefs.h. */
24298_ACEOF
24299cat confdefs.h >>conftest.$ac_ext
24300cat >>conftest.$ac_ext <<_ACEOF
24301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024303/* Override any GCC internal prototype to avoid an error.
24304 Use char because int might match the return type of a GCC
24305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024306#ifdef __cplusplus
24307extern "C"
24308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024309char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024310int
24311main ()
24312{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024313return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024314 ;
24315 return 0;
24316}
24317_ACEOF
24318rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024319if { (ac_try="$ac_link"
24320case "(($ac_try" in
24321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24322 *) ac_try_echo=$ac_try;;
24323esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024325 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024327 grep -v '^ *+' conftest.er1 >conftest.err
24328 rm -f conftest.er1
24329 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024331 (exit $ac_status); } && {
24332 test -z "$ac_c_werror_flag" ||
24333 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024334 } && test -s conftest$ac_exeext &&
24335 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024336 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024337else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024339sed 's/^/| /' conftest.$ac_ext >&5
24340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024341 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024343
24344rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024346LIBS=$ac_check_lib_save_LIBS
24347fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024348{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24349echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24350if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024351
Martin v. Löwis11437992002-04-12 09:54:03 +000024352cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024353#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024354_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024355
Martin v. Löwis0daad592001-09-30 21:09:59 +000024356fi
24357
Michael W. Hudson54241132001-12-07 15:38:26 +000024358
Thomas Wouters89d996e2007-09-08 17:39:28 +000024359# also in 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024360{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24361echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024362if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024363 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024364else
24365 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024366LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024367cat >conftest.$ac_ext <<_ACEOF
24368/* confdefs.h. */
24369_ACEOF
24370cat confdefs.h >>conftest.$ac_ext
24371cat >>conftest.$ac_ext <<_ACEOF
24372/* end confdefs.h. */
24373
24374/* Override any GCC internal prototype to avoid an error.
24375 Use char because int might match the return type of a GCC
24376 builtin and then its argument prototype would still apply. */
24377#ifdef __cplusplus
24378extern "C"
24379#endif
24380char rl_completion_display_matches_hook ();
24381int
24382main ()
24383{
24384return rl_completion_display_matches_hook ();
24385 ;
24386 return 0;
24387}
24388_ACEOF
24389rm -f conftest.$ac_objext conftest$ac_exeext
24390if { (ac_try="$ac_link"
24391case "(($ac_try" in
24392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24393 *) ac_try_echo=$ac_try;;
24394esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024396 (eval "$ac_link") 2>conftest.er1
24397 ac_status=$?
24398 grep -v '^ *+' conftest.er1 >conftest.err
24399 rm -f conftest.er1
24400 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024402 (exit $ac_status); } && {
24403 test -z "$ac_c_werror_flag" ||
24404 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024405 } && test -s conftest$ac_exeext &&
24406 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024407 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24408else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024409 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024410sed 's/^/| /' conftest.$ac_ext >&5
24411
24412 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24413fi
24414
24415rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24416 conftest$ac_exeext conftest.$ac_ext
24417LIBS=$ac_check_lib_save_LIBS
24418fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024419{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24420echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24421if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024422
24423cat >>confdefs.h <<\_ACEOF
24424#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24425_ACEOF
24426
24427fi
24428
24429
Martin v. Löwis0daad592001-09-30 21:09:59 +000024430# check for readline 4.2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024431{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24432echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024433if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024434 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024435else
Martin v. Löwis11437992002-04-12 09:54:03 +000024436 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024437LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024439/* confdefs.h. */
24440_ACEOF
24441cat confdefs.h >>conftest.$ac_ext
24442cat >>conftest.$ac_ext <<_ACEOF
24443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024445/* Override any GCC internal prototype to avoid an error.
24446 Use char because int might match the return type of a GCC
24447 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024448#ifdef __cplusplus
24449extern "C"
24450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024451char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024452int
24453main ()
24454{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024455return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024456 ;
24457 return 0;
24458}
24459_ACEOF
24460rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024461if { (ac_try="$ac_link"
24462case "(($ac_try" in
24463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24464 *) ac_try_echo=$ac_try;;
24465esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024467 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024469 grep -v '^ *+' conftest.er1 >conftest.err
24470 rm -f conftest.er1
24471 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024473 (exit $ac_status); } && {
24474 test -z "$ac_c_werror_flag" ||
24475 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024476 } && test -s conftest$ac_exeext &&
24477 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024478 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024479else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024481sed 's/^/| /' conftest.$ac_ext >&5
24482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024483 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024485
24486rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024488LIBS=$ac_check_lib_save_LIBS
24489fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024490{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24491echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24492if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024493
Martin v. Löwis11437992002-04-12 09:54:03 +000024494cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024495#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024496_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024497
Guido van Rossum353ae582001-07-10 16:45:32 +000024498fi
24499
Jack Jansendd19cf82001-12-06 22:36:17 +000024500
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024501# also in readline 4.2
24502cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024503/* confdefs.h. */
24504_ACEOF
24505cat confdefs.h >>conftest.$ac_ext
24506cat >>conftest.$ac_ext <<_ACEOF
24507/* end confdefs.h. */
24508#include <readline/readline.h>
24509_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024510if { (ac_try="$ac_cpp conftest.$ac_ext"
24511case "(($ac_try" in
24512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24513 *) ac_try_echo=$ac_try;;
24514esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024516 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024517 ac_status=$?
24518 grep -v '^ *+' conftest.er1 >conftest.err
24519 rm -f conftest.er1
24520 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024522 (exit $ac_status); } >/dev/null && {
24523 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24524 test ! -s conftest.err
24525 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024526 have_readline=yes
24527else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024528 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024529sed 's/^/| /' conftest.$ac_ext >&5
24530
24531 have_readline=no
24532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024533
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024534rm -f conftest.err conftest.$ac_ext
24535if test $have_readline = yes
24536then
24537 cat >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
24545_ACEOF
24546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24547 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24548
24549cat >>confdefs.h <<\_ACEOF
24550#define HAVE_RL_CATCH_SIGNAL 1
24551_ACEOF
24552
24553fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000024554rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024555
24556fi
24557
Martin v. Löwis82bca632006-02-10 20:49:30 +000024558# End of readline checks: restore LIBS
24559LIBS=$LIBS_no_readline
24560
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024561{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24562echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024563if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024564 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024565else
Martin v. Löwis11437992002-04-12 09:54:03 +000024566
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024567if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024568 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024569else
Martin v. Löwis11437992002-04-12 09:54:03 +000024570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024571/* confdefs.h. */
24572_ACEOF
24573cat confdefs.h >>conftest.$ac_ext
24574cat >>conftest.$ac_ext <<_ACEOF
24575/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024576
24577int main()
24578{
24579 int val1 = nice(1);
24580 if (val1 != -1 && val1 == nice(2))
24581 exit(0);
24582 exit(1);
24583}
24584
Martin v. Löwis11437992002-04-12 09:54:03 +000024585_ACEOF
24586rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024587if { (ac_try="$ac_link"
24588case "(($ac_try" in
24589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24590 *) ac_try_echo=$ac_try;;
24591esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024593 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024594 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024596 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024597 { (case "(($ac_try" in
24598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24599 *) ac_try_echo=$ac_try;;
24600esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024602 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024603 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024605 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024606 ac_cv_broken_nice=yes
24607else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024608 echo "$as_me: program exited with status $ac_status" >&5
24609echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024610sed 's/^/| /' conftest.$ac_ext >&5
24611
Martin v. Löwis11437992002-04-12 09:54:03 +000024612( exit $ac_status )
24613ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024615rm -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 +000024616fi
24617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024618
24619fi
24620
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024621{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24622echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024623if test "$ac_cv_broken_nice" = yes
24624then
Martin v. Löwis11437992002-04-12 09:54:03 +000024625
24626cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024627#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024628_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024629
24630fi
24631
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024632{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24633echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024634if test "$cross_compiling" = yes; then
24635 ac_cv_broken_poll=no
24636else
24637 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024638/* confdefs.h. */
24639_ACEOF
24640cat confdefs.h >>conftest.$ac_ext
24641cat >>conftest.$ac_ext <<_ACEOF
24642/* end confdefs.h. */
24643
24644#include <poll.h>
24645
24646int main (void)
24647 {
24648 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24649
24650 close (42);
24651
24652 int poll_test = poll (&poll_struct, 1, 0);
24653
24654 if (poll_test < 0)
24655 {
24656 exit(0);
24657 }
24658 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24659 {
24660 exit(0);
24661 }
24662 else
24663 {
24664 exit(1);
24665 }
24666 }
24667
24668_ACEOF
24669rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024670if { (ac_try="$ac_link"
24671case "(($ac_try" in
24672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24673 *) ac_try_echo=$ac_try;;
24674esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024676 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024677 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024679 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024680 { (case "(($ac_try" in
24681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24682 *) ac_try_echo=$ac_try;;
24683esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024685 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024686 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024688 (exit $ac_status); }; }; then
24689 ac_cv_broken_poll=yes
24690else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024691 echo "$as_me: program exited with status $ac_status" >&5
24692echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024693sed 's/^/| /' conftest.$ac_ext >&5
24694
24695( exit $ac_status )
24696ac_cv_broken_poll=no
24697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024698rm -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 +000024699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024700
24701
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024702{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24703echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024704if test "$ac_cv_broken_poll" = yes
24705then
24706
24707cat >>confdefs.h <<\_ACEOF
24708#define HAVE_BROKEN_POLL 1
24709_ACEOF
24710
24711fi
24712
Brett Cannon43802422005-02-10 20:48:03 +000024713# 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 +000024714# (which is not required by ISO C or UNIX spec) and/or if we support
24715# tzname[]
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024716{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24717echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024718if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024719 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024720else
24721 cat >conftest.$ac_ext <<_ACEOF
24722/* confdefs.h. */
24723_ACEOF
24724cat confdefs.h >>conftest.$ac_ext
24725cat >>conftest.$ac_ext <<_ACEOF
24726/* end confdefs.h. */
24727#include <sys/types.h>
24728#include <$ac_cv_struct_tm>
24729
24730
24731int
24732main ()
24733{
24734static struct tm ac_aggr;
24735if (ac_aggr.tm_zone)
24736return 0;
24737 ;
24738 return 0;
24739}
24740_ACEOF
24741rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024742if { (ac_try="$ac_compile"
24743case "(($ac_try" in
24744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24745 *) ac_try_echo=$ac_try;;
24746esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024748 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024749 ac_status=$?
24750 grep -v '^ *+' conftest.er1 >conftest.err
24751 rm -f conftest.er1
24752 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024754 (exit $ac_status); } && {
24755 test -z "$ac_c_werror_flag" ||
24756 test ! -s conftest.err
24757 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024758 ac_cv_member_struct_tm_tm_zone=yes
24759else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024760 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024761sed 's/^/| /' conftest.$ac_ext >&5
24762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024763 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024764/* confdefs.h. */
24765_ACEOF
24766cat confdefs.h >>conftest.$ac_ext
24767cat >>conftest.$ac_ext <<_ACEOF
24768/* end confdefs.h. */
24769#include <sys/types.h>
24770#include <$ac_cv_struct_tm>
24771
24772
24773int
24774main ()
24775{
24776static struct tm ac_aggr;
24777if (sizeof ac_aggr.tm_zone)
24778return 0;
24779 ;
24780 return 0;
24781}
24782_ACEOF
24783rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024784if { (ac_try="$ac_compile"
24785case "(($ac_try" in
24786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24787 *) ac_try_echo=$ac_try;;
24788esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024790 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024791 ac_status=$?
24792 grep -v '^ *+' conftest.er1 >conftest.err
24793 rm -f conftest.er1
24794 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024796 (exit $ac_status); } && {
24797 test -z "$ac_c_werror_flag" ||
24798 test ! -s conftest.err
24799 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024800 ac_cv_member_struct_tm_tm_zone=yes
24801else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024802 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024803sed 's/^/| /' conftest.$ac_ext >&5
24804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024805 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024807
24808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024810
24811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024812fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024813{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24814echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24815if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024816
24817cat >>confdefs.h <<_ACEOF
24818#define HAVE_STRUCT_TM_TM_ZONE 1
24819_ACEOF
24820
24821
24822fi
24823
24824if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24825
24826cat >>confdefs.h <<\_ACEOF
24827#define HAVE_TM_ZONE 1
24828_ACEOF
24829
24830else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024831 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24832echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024833if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024834 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024835else
24836 cat >conftest.$ac_ext <<_ACEOF
24837/* confdefs.h. */
24838_ACEOF
24839cat confdefs.h >>conftest.$ac_ext
24840cat >>conftest.$ac_ext <<_ACEOF
24841/* end confdefs.h. */
24842#include <time.h>
24843
24844int
24845main ()
24846{
24847#ifndef tzname
24848 (void) tzname;
24849#endif
24850
24851 ;
24852 return 0;
24853}
24854_ACEOF
24855rm -f conftest.$ac_objext
24856if { (ac_try="$ac_compile"
24857case "(($ac_try" in
24858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24859 *) ac_try_echo=$ac_try;;
24860esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024862 (eval "$ac_compile") 2>conftest.er1
24863 ac_status=$?
24864 grep -v '^ *+' conftest.er1 >conftest.err
24865 rm -f conftest.er1
24866 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024868 (exit $ac_status); } && {
24869 test -z "$ac_c_werror_flag" ||
24870 test ! -s conftest.err
24871 } && test -s conftest.$ac_objext; then
24872 ac_cv_have_decl_tzname=yes
24873else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024874 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024875sed 's/^/| /' conftest.$ac_ext >&5
24876
24877 ac_cv_have_decl_tzname=no
24878fi
24879
24880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24881fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024882{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24883echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24884if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024885
24886cat >>confdefs.h <<_ACEOF
24887#define HAVE_DECL_TZNAME 1
24888_ACEOF
24889
24890
24891else
24892 cat >>confdefs.h <<_ACEOF
24893#define HAVE_DECL_TZNAME 0
24894_ACEOF
24895
24896
24897fi
24898
24899
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024900 { echo "$as_me:$LINENO: checking for tzname" >&5
24901echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024902if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024903 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024904else
24905 cat >conftest.$ac_ext <<_ACEOF
24906/* confdefs.h. */
24907_ACEOF
24908cat confdefs.h >>conftest.$ac_ext
24909cat >>conftest.$ac_ext <<_ACEOF
24910/* end confdefs.h. */
24911#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024912#if !HAVE_DECL_TZNAME
24913extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024914#endif
24915
24916int
24917main ()
24918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024919return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024920 ;
24921 return 0;
24922}
24923_ACEOF
24924rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024925if { (ac_try="$ac_link"
24926case "(($ac_try" in
24927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24928 *) ac_try_echo=$ac_try;;
24929esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024931 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024932 ac_status=$?
24933 grep -v '^ *+' conftest.er1 >conftest.err
24934 rm -f conftest.er1
24935 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024937 (exit $ac_status); } && {
24938 test -z "$ac_c_werror_flag" ||
24939 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024940 } && test -s conftest$ac_exeext &&
24941 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024942 ac_cv_var_tzname=yes
24943else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024944 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024945sed 's/^/| /' conftest.$ac_ext >&5
24946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024947 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024949
24950rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024951 conftest$ac_exeext conftest.$ac_ext
24952fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024953{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24954echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024955 if test $ac_cv_var_tzname = yes; then
24956
24957cat >>confdefs.h <<\_ACEOF
24958#define HAVE_TZNAME 1
24959_ACEOF
24960
24961 fi
24962fi
24963
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024964
Martin v. Löwis1d459062005-03-14 21:23:33 +000024965# check tzset(3) exists and works like we expect it to
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024966{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24967echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024968if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024970else
24971
24972if test "$cross_compiling" = yes; then
24973 ac_cv_working_tzset=no
24974else
24975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024976/* confdefs.h. */
24977_ACEOF
24978cat confdefs.h >>conftest.$ac_ext
24979cat >>conftest.$ac_ext <<_ACEOF
24980/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024981
24982#include <stdlib.h>
24983#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024984#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024985
24986#if HAVE_TZNAME
24987extern char *tzname[];
24988#endif
24989
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024990int main()
24991{
Brett Cannon18367812003-09-19 00:59:16 +000024992 /* Note that we need to ensure that not only does tzset(3)
24993 do 'something' with localtime, but it works as documented
24994 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024995 This includes making sure that tzname is set properly if
24996 tm->tm_zone does not exist since it is the alternative way
24997 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024998
24999 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025000 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025001 */
25002
Martin v. Löwis1d459062005-03-14 21:23:33 +000025003 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025004 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25005
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025006 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025007 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025008 if (localtime(&groundhogday)->tm_hour != 0)
25009 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025010#if HAVE_TZNAME
25011 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25012 if (strcmp(tzname[0], "UTC") ||
25013 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25014 exit(1);
25015#endif
Brett Cannon18367812003-09-19 00:59:16 +000025016
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025017 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025018 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025019 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025020 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025021#if HAVE_TZNAME
25022 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25023 exit(1);
25024#endif
Brett Cannon18367812003-09-19 00:59:16 +000025025
25026 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25027 tzset();
25028 if (localtime(&groundhogday)->tm_hour != 11)
25029 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025030#if HAVE_TZNAME
25031 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25032 exit(1);
25033#endif
25034
25035#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025036 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25037 exit(1);
25038 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25039 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025040#endif
Brett Cannon18367812003-09-19 00:59:16 +000025041
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025042 exit(0);
25043}
25044
25045_ACEOF
25046rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025047if { (ac_try="$ac_link"
25048case "(($ac_try" in
25049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25050 *) ac_try_echo=$ac_try;;
25051esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025053 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025054 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025057 { (case "(($ac_try" in
25058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25059 *) ac_try_echo=$ac_try;;
25060esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025062 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025063 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025065 (exit $ac_status); }; }; then
25066 ac_cv_working_tzset=yes
25067else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025068 echo "$as_me: program exited with status $ac_status" >&5
25069echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025070sed 's/^/| /' conftest.$ac_ext >&5
25071
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025072( exit $ac_status )
25073ac_cv_working_tzset=no
25074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025075rm -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 +000025076fi
25077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025078
25079fi
25080
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025081{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25082echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025083if test "$ac_cv_working_tzset" = yes
25084then
25085
25086cat >>confdefs.h <<\_ACEOF
25087#define HAVE_WORKING_TZSET 1
25088_ACEOF
25089
25090fi
25091
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025092# Look for subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025093{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25094echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025095if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025096 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025097else
25098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025099/* confdefs.h. */
25100_ACEOF
25101cat confdefs.h >>conftest.$ac_ext
25102cat >>conftest.$ac_ext <<_ACEOF
25103/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025104#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025105int
25106main ()
25107{
25108
25109struct stat st;
25110st.st_mtim.tv_nsec = 1;
25111
25112 ;
25113 return 0;
25114}
25115_ACEOF
25116rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025117if { (ac_try="$ac_compile"
25118case "(($ac_try" in
25119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25120 *) ac_try_echo=$ac_try;;
25121esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025125 grep -v '^ *+' conftest.er1 >conftest.err
25126 rm -f conftest.er1
25127 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025129 (exit $ac_status); } && {
25130 test -z "$ac_c_werror_flag" ||
25131 test ! -s conftest.err
25132 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025133 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025134else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025136sed 's/^/| /' conftest.$ac_ext >&5
25137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025138 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025139fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25142fi
25143
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025144{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25145echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025146if test "$ac_cv_stat_tv_nsec" = yes
25147then
25148
25149cat >>confdefs.h <<\_ACEOF
25150#define HAVE_STAT_TV_NSEC 1
25151_ACEOF
25152
25153fi
25154
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025155# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025156{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25157echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025158if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025159 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025160else
25161 cat >conftest.$ac_ext <<_ACEOF
25162/* confdefs.h. */
25163_ACEOF
25164cat confdefs.h >>conftest.$ac_ext
25165cat >>conftest.$ac_ext <<_ACEOF
25166/* end confdefs.h. */
25167#include <sys/stat.h>
25168int
25169main ()
25170{
25171
25172struct stat st;
25173st.st_mtimespec.tv_nsec = 1;
25174
25175 ;
25176 return 0;
25177}
25178_ACEOF
25179rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025180if { (ac_try="$ac_compile"
25181case "(($ac_try" in
25182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25183 *) ac_try_echo=$ac_try;;
25184esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025187 ac_status=$?
25188 grep -v '^ *+' conftest.er1 >conftest.err
25189 rm -f conftest.er1
25190 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025192 (exit $ac_status); } && {
25193 test -z "$ac_c_werror_flag" ||
25194 test ! -s conftest.err
25195 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025196 ac_cv_stat_tv_nsec2=yes
25197else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025198 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025199sed 's/^/| /' conftest.$ac_ext >&5
25200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025201 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025202fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25205fi
25206
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025207{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25208echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025209if test "$ac_cv_stat_tv_nsec2" = yes
25210then
25211
25212cat >>confdefs.h <<\_ACEOF
25213#define HAVE_STAT_TV_NSEC2 1
25214_ACEOF
25215
25216fi
25217
Jack Jansen666b1e72001-10-31 12:11:48 +000025218# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025219{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25220echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025221if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025222 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025223else
Martin v. Löwis11437992002-04-12 09:54:03 +000025224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025225/* confdefs.h. */
25226_ACEOF
25227cat confdefs.h >>conftest.$ac_ext
25228cat >>conftest.$ac_ext <<_ACEOF
25229/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025230#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025231int
25232main ()
25233{
Jack Jansen666b1e72001-10-31 12:11:48 +000025234
25235 int rtn;
25236 rtn = mvwdelch(0,0,0);
25237
Martin v. Löwis11437992002-04-12 09:54:03 +000025238 ;
25239 return 0;
25240}
25241_ACEOF
25242rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025243if { (ac_try="$ac_compile"
25244case "(($ac_try" in
25245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25246 *) ac_try_echo=$ac_try;;
25247esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025251 grep -v '^ *+' conftest.er1 >conftest.err
25252 rm -f conftest.er1
25253 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025255 (exit $ac_status); } && {
25256 test -z "$ac_c_werror_flag" ||
25257 test ! -s conftest.err
25258 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025259 ac_cv_mvwdelch_is_expression=yes
25260else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025262sed 's/^/| /' conftest.$ac_ext >&5
25263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025264 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025265fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25268fi
25269
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025270{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25271echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025272
25273if test "$ac_cv_mvwdelch_is_expression" = yes
25274then
Martin v. Löwis11437992002-04-12 09:54:03 +000025275
25276cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025277#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025278_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025279
25280fi
25281
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025282{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25283echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025284if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025285 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025286else
Martin v. Löwis11437992002-04-12 09:54:03 +000025287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025288/* confdefs.h. */
25289_ACEOF
25290cat confdefs.h >>conftest.$ac_ext
25291cat >>conftest.$ac_ext <<_ACEOF
25292/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025293#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025294int
25295main ()
25296{
Jack Jansen666b1e72001-10-31 12:11:48 +000025297
25298 WINDOW *w;
25299 w->_flags = 0;
25300
Martin v. Löwis11437992002-04-12 09:54:03 +000025301 ;
25302 return 0;
25303}
25304_ACEOF
25305rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025306if { (ac_try="$ac_compile"
25307case "(($ac_try" in
25308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25309 *) ac_try_echo=$ac_try;;
25310esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025314 grep -v '^ *+' conftest.er1 >conftest.err
25315 rm -f conftest.er1
25316 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025318 (exit $ac_status); } && {
25319 test -z "$ac_c_werror_flag" ||
25320 test ! -s conftest.err
25321 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025322 ac_cv_window_has_flags=yes
25323else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025325sed 's/^/| /' conftest.$ac_ext >&5
25326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025327 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025328fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25331fi
25332
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025333{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25334echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025335
Jack Jansen666b1e72001-10-31 12:11:48 +000025336
25337if test "$ac_cv_window_has_flags" = yes
25338then
Martin v. Löwis11437992002-04-12 09:54:03 +000025339
25340cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025341#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025342_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025343
25344fi
25345
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025346{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25347echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025348cat >conftest.$ac_ext <<_ACEOF
25349/* confdefs.h. */
25350_ACEOF
25351cat confdefs.h >>conftest.$ac_ext
25352cat >>conftest.$ac_ext <<_ACEOF
25353/* end confdefs.h. */
25354#include <curses.h>
25355int
25356main ()
25357{
25358void *x=is_term_resized
25359 ;
25360 return 0;
25361}
25362_ACEOF
25363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025364if { (ac_try="$ac_compile"
25365case "(($ac_try" in
25366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25367 *) ac_try_echo=$ac_try;;
25368esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025370 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025371 ac_status=$?
25372 grep -v '^ *+' conftest.er1 >conftest.err
25373 rm -f conftest.er1
25374 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025376 (exit $ac_status); } && {
25377 test -z "$ac_c_werror_flag" ||
25378 test ! -s conftest.err
25379 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025380
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025381cat >>confdefs.h <<\_ACEOF
25382#define HAVE_CURSES_IS_TERM_RESIZED 1
25383_ACEOF
25384
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025385 { echo "$as_me:$LINENO: result: yes" >&5
25386echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025387else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025388 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025389sed 's/^/| /' conftest.$ac_ext >&5
25390
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025391 { echo "$as_me:$LINENO: result: no" >&5
25392echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025393
25394fi
25395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25397
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025398{ echo "$as_me:$LINENO: checking for resize_term" >&5
25399echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025400cat >conftest.$ac_ext <<_ACEOF
25401/* confdefs.h. */
25402_ACEOF
25403cat confdefs.h >>conftest.$ac_ext
25404cat >>conftest.$ac_ext <<_ACEOF
25405/* end confdefs.h. */
25406#include <curses.h>
25407int
25408main ()
25409{
25410void *x=resize_term
25411 ;
25412 return 0;
25413}
25414_ACEOF
25415rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025416if { (ac_try="$ac_compile"
25417case "(($ac_try" in
25418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25419 *) ac_try_echo=$ac_try;;
25420esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025422 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025423 ac_status=$?
25424 grep -v '^ *+' conftest.er1 >conftest.err
25425 rm -f conftest.er1
25426 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025428 (exit $ac_status); } && {
25429 test -z "$ac_c_werror_flag" ||
25430 test ! -s conftest.err
25431 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025432
25433cat >>confdefs.h <<\_ACEOF
25434#define HAVE_CURSES_RESIZE_TERM 1
25435_ACEOF
25436
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025437 { echo "$as_me:$LINENO: result: yes" >&5
25438echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025439else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025440 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025441sed 's/^/| /' conftest.$ac_ext >&5
25442
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025443 { echo "$as_me:$LINENO: result: no" >&5
25444echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025445
25446fi
25447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25449
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025450{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25451echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025452cat >conftest.$ac_ext <<_ACEOF
25453/* confdefs.h. */
25454_ACEOF
25455cat confdefs.h >>conftest.$ac_ext
25456cat >>conftest.$ac_ext <<_ACEOF
25457/* end confdefs.h. */
25458#include <curses.h>
25459int
25460main ()
25461{
25462void *x=resizeterm
25463 ;
25464 return 0;
25465}
25466_ACEOF
25467rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025468if { (ac_try="$ac_compile"
25469case "(($ac_try" in
25470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25471 *) ac_try_echo=$ac_try;;
25472esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025474 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025475 ac_status=$?
25476 grep -v '^ *+' conftest.er1 >conftest.err
25477 rm -f conftest.er1
25478 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025480 (exit $ac_status); } && {
25481 test -z "$ac_c_werror_flag" ||
25482 test ! -s conftest.err
25483 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025484
25485cat >>confdefs.h <<\_ACEOF
25486#define HAVE_CURSES_RESIZETERM 1
25487_ACEOF
25488
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025489 { echo "$as_me:$LINENO: result: yes" >&5
25490echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025491else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025492 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025493sed 's/^/| /' conftest.$ac_ext >&5
25494
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025495 { echo "$as_me:$LINENO: result: no" >&5
25496echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025497
25498fi
25499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25501
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025502{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25503echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025504
25505if test -r /dev/ptmx
25506then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025507 { echo "$as_me:$LINENO: result: yes" >&5
25508echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025509
25510cat >>confdefs.h <<\_ACEOF
25511#define HAVE_DEV_PTMX 1
25512_ACEOF
25513
Thomas Wouters89f507f2006-12-13 04:49:30 +000025514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025515 { echo "$as_me:$LINENO: result: no" >&5
25516echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025517fi
25518
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025519{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25520echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025521
25522if test -r /dev/ptc
25523then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025524 { echo "$as_me:$LINENO: result: yes" >&5
25525echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025526
25527cat >>confdefs.h <<\_ACEOF
25528#define HAVE_DEV_PTC 1
25529_ACEOF
25530
Thomas Wouters89f507f2006-12-13 04:49:30 +000025531else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025532 { echo "$as_me:$LINENO: result: no" >&5
25533echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025534fi
25535
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025536{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25537echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025538if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025539 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025540See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025541echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025542See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025543 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025544else
25545 cat >conftest.$ac_ext <<_ACEOF
25546/* confdefs.h. */
25547_ACEOF
25548cat confdefs.h >>conftest.$ac_ext
25549cat >>conftest.$ac_ext <<_ACEOF
25550/* end confdefs.h. */
25551#include <stdio.h>
25552#include <stddef.h>
25553#include <string.h>
25554
Christian Heimes2c181612007-12-17 20:04:13 +000025555#ifdef HAVE_SYS_TYPES_H
25556#include <sys/types.h>
25557#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025558
25559#ifdef HAVE_SSIZE_T
25560typedef ssize_t Py_ssize_t;
25561#elif SIZEOF_VOID_P == SIZEOF_LONG
25562typedef long Py_ssize_t;
25563#else
25564typedef int Py_ssize_t;
25565#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025566
Christian Heimes2c181612007-12-17 20:04:13 +000025567int main()
25568{
25569 char buffer[256];
25570
Thomas Wouters477c8d52006-05-27 19:21:47 +000025571 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25572 return 1;
25573
Thomas Wouters89f507f2006-12-13 04:49:30 +000025574 if (strcmp(buffer, "123"))
25575 return 1;
25576
25577 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25578 return 1;
25579
25580 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025581 return 1;
25582
25583 return 0;
25584}
25585_ACEOF
25586rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025587if { (ac_try="$ac_link"
25588case "(($ac_try" in
25589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25590 *) ac_try_echo=$ac_try;;
25591esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025593 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025594 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025596 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025597 { (case "(($ac_try" in
25598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25599 *) ac_try_echo=$ac_try;;
25600esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025602 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025603 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025605 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025606 { echo "$as_me:$LINENO: result: yes" >&5
25607echo "${ECHO_T}yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025608
25609cat >>confdefs.h <<\_ACEOF
25610#define PY_FORMAT_SIZE_T "z"
25611_ACEOF
25612
25613else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025614 echo "$as_me: program exited with status $ac_status" >&5
25615echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025616sed 's/^/| /' conftest.$ac_ext >&5
25617
25618( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025619{ echo "$as_me:$LINENO: result: no" >&5
25620echo "${ECHO_T}no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025622rm -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 +000025623fi
25624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025625
25626
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025627{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25628echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025629if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025631else
Martin v. Löwis11437992002-04-12 09:54:03 +000025632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025633/* confdefs.h. */
25634_ACEOF
25635cat confdefs.h >>conftest.$ac_ext
25636cat >>conftest.$ac_ext <<_ACEOF
25637/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025638
25639#ifdef HAVE_SYS_TYPES_H
25640#include <sys/types.h>
25641#endif
25642#ifdef HAVE_SYS_SOCKET_H
25643#include <sys/socket.h>
25644#endif
25645
25646
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025647typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025648int
25649main ()
25650{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025651if ((ac__type_new_ *) 0)
25652 return 0;
25653if (sizeof (ac__type_new_))
25654 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025655 ;
25656 return 0;
25657}
25658_ACEOF
25659rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025660if { (ac_try="$ac_compile"
25661case "(($ac_try" in
25662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25663 *) ac_try_echo=$ac_try;;
25664esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025668 grep -v '^ *+' conftest.er1 >conftest.err
25669 rm -f conftest.er1
25670 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025672 (exit $ac_status); } && {
25673 test -z "$ac_c_werror_flag" ||
25674 test ! -s conftest.err
25675 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025676 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025677else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025679sed 's/^/| /' conftest.$ac_ext >&5
25680
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025681 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025683
25684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025685fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025686{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25687echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25688if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025689 :
25690else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025691
Martin v. Löwis01c04012002-11-11 14:58:44 +000025692cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025693#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025694_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025695
25696fi
25697
Michael W. Hudson54241132001-12-07 15:38:26 +000025698
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025699{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25700echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025701if test "$cross_compiling" = yes; then
25702 ac_cv_broken_mbstowcs=no
25703else
25704 cat >conftest.$ac_ext <<_ACEOF
25705/* confdefs.h. */
25706_ACEOF
25707cat confdefs.h >>conftest.$ac_ext
25708cat >>conftest.$ac_ext <<_ACEOF
25709/* end confdefs.h. */
25710
25711#include<stdlib.h>
25712int main() {
25713 size_t len = -1;
25714 const char *str = "text";
25715 len = mbstowcs(NULL, str, 0);
25716 return (len != 4);
25717}
25718
25719_ACEOF
25720rm -f conftest$ac_exeext
25721if { (ac_try="$ac_link"
25722case "(($ac_try" in
25723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25724 *) ac_try_echo=$ac_try;;
25725esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025727 (eval "$ac_link") 2>&5
25728 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25731 { (case "(($ac_try" in
25732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25733 *) ac_try_echo=$ac_try;;
25734esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025736 (eval "$ac_try") 2>&5
25737 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025739 (exit $ac_status); }; }; then
25740 ac_cv_broken_mbstowcs=no
25741else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025742 echo "$as_me: program exited with status $ac_status" >&5
25743echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025744sed 's/^/| /' conftest.$ac_ext >&5
25745
25746( exit $ac_status )
25747ac_cv_broken_mbstowcs=yes
25748fi
25749rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25750fi
25751
25752
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025753{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25754echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025755if test "$ac_cv_broken_mbstowcs" = yes
25756then
25757
25758cat >>confdefs.h <<\_ACEOF
25759#define HAVE_BROKEN_MBSTOWCS 1
25760_ACEOF
25761
25762fi
25763
Antoine Pitroub52ec782009-01-25 16:34:23 +000025764# Check for --with-computed-gotos
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025765{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25766echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025767
25768# Check whether --with-computed-gotos was given.
25769if test "${with_computed_gotos+set}" = set; then
25770 withval=$with_computed_gotos;
25771if test "$withval" != no
25772then
25773
25774cat >>confdefs.h <<\_ACEOF
25775#define USE_COMPUTED_GOTOS 1
25776_ACEOF
25777
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025778 { echo "$as_me:$LINENO: result: yes" >&5
25779echo "${ECHO_T}yes" >&6; }
25780else { echo "$as_me:$LINENO: result: no" >&5
25781echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025782fi
25783else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025784 { echo "$as_me:$LINENO: result: no" >&5
25785echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025786fi
25787
25788
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000025789if test $ac_sys_system = Darwin
25790then
25791 LIBS="$LIBS -framework CoreFoundation"
25792fi
25793
25794
Antoine Pitroub52ec782009-01-25 16:34:23 +000025795
Michael W. Hudson54241132001-12-07 15:38:26 +000025796
25797
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025798for h in `(cd $srcdir;echo Python/thread_*.h)`
25799do
25800 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25801done
25802
Michael W. Hudson54241132001-12-07 15:38:26 +000025803
Neal Norwitzd24499d2005-12-18 21:36:39 +000025804SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025805{ echo "$as_me:$LINENO: checking for build directories" >&5
25806echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025807for dir in $SRCDIRS; do
25808 if test ! -d $dir; then
25809 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025810 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025811done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025812{ echo "$as_me:$LINENO: result: done" >&5
25813echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025814
Guido van Rossum627b2d71993-12-24 10:39:16 +000025815# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025816ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025817
Martin v. Löwis11437992002-04-12 09:54:03 +000025818cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025819# This file is a shell script that caches the results of configure
25820# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025821# scripts and configure runs, see configure's option --config-cache.
25822# It is not useful on other systems. If it contains results you don't
25823# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025824#
Martin v. Löwis11437992002-04-12 09:54:03 +000025825# config.status only pays attention to the cache file if you give it
25826# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025827#
Skip Montanaro6dead952003-09-25 14:50:04 +000025828# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025829# loading this file, other *unset* `ac_cv_foo' will be assigned the
25830# following values.
25831
25832_ACEOF
25833
Guido van Rossumf78abae1997-01-21 22:02:36 +000025834# The following way of writing the cache mishandles newlines in values,
25835# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025836# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025837# Ultrix sh set writes to stderr and can't be redirected directly,
25838# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025839(
25840 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25841 eval ac_val=\$$ac_var
25842 case $ac_val in #(
25843 *${as_nl}*)
25844 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025845 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25846echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025847 esac
25848 case $ac_var in #(
25849 _ | IFS | as_nl) ;; #(
25850 *) $as_unset $ac_var ;;
25851 esac ;;
25852 esac
25853 done
25854
Martin v. Löwis11437992002-04-12 09:54:03 +000025855 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025856 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25857 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025858 # `set' does not quote correctly, so add quotes (double-quote
25859 # substitution turns \\\\ into \\, and sed turns \\ into \).
25860 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025861 "s/'/'\\\\''/g;
25862 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025863 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025864 *)
25865 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025866 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025867 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025868 esac |
25869 sort
25870) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025871 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025872 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025873 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025874 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025875 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25876 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025877 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25878 :end' >>confcache
25879if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25880 if test -w "$cache_file"; then
25881 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025882 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25883echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025884 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025885 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025886 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25887echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025888 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025889fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025890rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025891
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025892test "x$prefix" = xNONE && prefix=$ac_default_prefix
25893# Let make expand exec_prefix.
25894test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025895
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025896DEFS=-DHAVE_CONFIG_H
25897
Skip Montanaro6dead952003-09-25 14:50:04 +000025898ac_libobjs=
25899ac_ltlibobjs=
25900for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25901 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025902 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025903 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025904 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25905 # will be set to the directory where LIBOBJS objects are built.
25906 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25907 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025908done
25909LIBOBJS=$ac_libobjs
25910
25911LTLIBOBJS=$ac_ltlibobjs
25912
25913
Martin v. Löwis11437992002-04-12 09:54:03 +000025914
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025915: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025916ac_clean_files_save=$ac_clean_files
25917ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025918{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25919echo "$as_me: creating $CONFIG_STATUS" >&6;}
25920cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025921#! $SHELL
25922# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025923# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025924# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025925# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025926
Martin v. Löwis11437992002-04-12 09:54:03 +000025927debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025928ac_cs_recheck=false
25929ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025930SHELL=\${CONFIG_SHELL-$SHELL}
25931_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025932
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025933cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025934## --------------------- ##
25935## M4sh Initialization. ##
25936## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025938# Be more Bourne compatible
25939DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025940if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25941 emulate sh
25942 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025943 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025944 # is contrary to our usage. Disable this feature.
25945 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025946 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025947else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025948 case `(set -o) 2>/dev/null` in
25949 *posix*) set -o posix ;;
25950esac
25951
Michael W. Hudson54241132001-12-07 15:38:26 +000025952fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000025953
25954
Michael W. Hudson54241132001-12-07 15:38:26 +000025955
Michael W. Hudson54241132001-12-07 15:38:26 +000025956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025957# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025958# Avoid depending upon Character Ranges.
25959as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25960as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25961as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25962as_cr_digits='0123456789'
25963as_cr_alnum=$as_cr_Letters$as_cr_digits
25964
25965# The user is always right.
25966if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025967 echo "#! /bin/sh" >conf$$.sh
25968 echo "exit 0" >>conf$$.sh
25969 chmod +x conf$$.sh
25970 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
25971 PATH_SEPARATOR=';'
25972 else
25973 PATH_SEPARATOR=:
25974 fi
25975 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025976fi
25977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025978# Support unset when possible.
25979if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25980 as_unset=unset
25981else
25982 as_unset=false
25983fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025985
25986# IFS
25987# We need space, tab and new line, in precisely that order. Quoting is
25988# there to prevent editors from complaining about space-tab.
25989# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25990# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025991as_nl='
25992'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025993IFS=" "" $as_nl"
25994
25995# Find who we are. Look in the path if we contain no directory separator.
25996case $0 in
25997 *[\\/]* ) as_myself=$0 ;;
25998 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025999for as_dir in $PATH
26000do
26001 IFS=$as_save_IFS
26002 test -z "$as_dir" && as_dir=.
26003 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026005IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026007 ;;
26008esac
26009# We did not find ourselves, most probably we were run as `sh COMMAND'
26010# in which case we are not to be found in the path.
26011if test "x$as_myself" = x; then
26012 as_myself=$0
26013fi
26014if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026015 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026016 { (exit 1); exit 1; }
26017fi
26018
26019# Work around bugs in pre-3.0 UWIN ksh.
26020for as_var in ENV MAIL MAILPATH
26021do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26022done
26023PS1='$ '
26024PS2='> '
26025PS4='+ '
26026
26027# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026028for as_var in \
26029 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26030 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26031 LC_TELEPHONE LC_TIME
26032do
26033 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26034 eval $as_var=C; export $as_var
26035 else
26036 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26037 fi
26038done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026039
26040# Required to use basename.
26041if expr a : '\(a\)' >/dev/null 2>&1 &&
26042 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26043 as_expr=expr
26044else
26045 as_expr=false
26046fi
26047
26048if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26049 as_basename=basename
26050else
26051 as_basename=false
26052fi
26053
26054
26055# Name of the executable.
26056as_me=`$as_basename -- "$0" ||
26057$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26058 X"$0" : 'X\(//\)$' \| \
26059 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026060echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026061 sed '/^.*\/\([^/][^/]*\)\/*$/{
26062 s//\1/
26063 q
26064 }
26065 /^X\/\(\/\/\)$/{
26066 s//\1/
26067 q
26068 }
26069 /^X\/\(\/\).*/{
26070 s//\1/
26071 q
26072 }
26073 s/.*/./; q'`
26074
26075# CDPATH.
26076$as_unset CDPATH
26077
26078
26079
Martin v. Löwis11437992002-04-12 09:54:03 +000026080 as_lineno_1=$LINENO
26081 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026082 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026083 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026084
Martin v. Löwis11437992002-04-12 09:54:03 +000026085 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26086 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026087 # line-number line after each line using $LINENO; the second 'sed'
26088 # does the real work. The second script uses 'N' to pair each
26089 # line-number line with the line containing $LINENO, and appends
26090 # trailing '-' during substitution so that $LINENO is not a special
26091 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026092 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026093 # scripts with optimization help from Paolo Bonzini. Blame Lee
26094 # E. McMahon (1931-1989) for sed's syntax. :-)
26095 sed -n '
26096 p
26097 /[$]LINENO/=
26098 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026099 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026100 s/[$]LINENO.*/&-/
26101 t lineno
26102 b
26103 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026104 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026105 :loop
26106 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026107 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026108 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026109 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026110 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026111 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026112 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026113
Martin v. Löwis11437992002-04-12 09:54:03 +000026114 # Don't try to exec as it changes $[0], causing all sort of problems
26115 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026116 # original and so on. Autoconf is especially sensitive to this).
26117 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026118 # Exit status is that of the last command.
26119 exit
26120}
26121
26122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026123if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26124 as_dirname=dirname
26125else
26126 as_dirname=false
26127fi
26128
26129ECHO_C= ECHO_N= ECHO_T=
26130case `echo -n x` in
26131-n*)
26132 case `echo 'x\c'` in
26133 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26134 *) ECHO_C='\c';;
26135 esac;;
26136*)
26137 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026138esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026140if expr a : '\(a\)' >/dev/null 2>&1 &&
26141 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026142 as_expr=expr
26143else
26144 as_expr=false
26145fi
26146
26147rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026148if test -d conf$$.dir; then
26149 rm -f conf$$.dir/conf$$.file
26150else
26151 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026152 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026153fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026154echo >conf$$.file
26155if ln -s conf$$.file conf$$ 2>/dev/null; then
26156 as_ln_s='ln -s'
26157 # ... but there are two gotchas:
26158 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26159 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26160 # In both cases, we have to default to `cp -p'.
26161 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026162 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026163elif ln conf$$.file conf$$ 2>/dev/null; then
26164 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026165else
26166 as_ln_s='cp -p'
26167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026168rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26169rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026170
Skip Montanaro6dead952003-09-25 14:50:04 +000026171if mkdir -p . 2>/dev/null; then
26172 as_mkdir_p=:
26173else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026174 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026175 as_mkdir_p=false
26176fi
26177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026178if test -x / >/dev/null 2>&1; then
26179 as_test_x='test -x'
26180else
26181 if ls -dL / >/dev/null 2>&1; then
26182 as_ls_L_option=L
26183 else
26184 as_ls_L_option=
26185 fi
26186 as_test_x='
26187 eval sh -c '\''
26188 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026189 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026190 else
26191 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026192 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026193 esac;
26194 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26195 ???[sx]*):;;*)false;;esac;fi
26196 '\'' sh
26197 '
26198fi
26199as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026200
26201# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026202as_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 +000026203
26204# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026205as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026206
26207
Martin v. Löwis11437992002-04-12 09:54:03 +000026208exec 6>&1
26209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026210# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026211# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026212# values after options handling.
26213ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026214This file was extended by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026215generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026216
26217 CONFIG_FILES = $CONFIG_FILES
26218 CONFIG_HEADERS = $CONFIG_HEADERS
26219 CONFIG_LINKS = $CONFIG_LINKS
26220 CONFIG_COMMANDS = $CONFIG_COMMANDS
26221 $ $0 $@
26222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026223on `(hostname || uname -n) 2>/dev/null | sed 1q`
26224"
26225
Martin v. Löwis11437992002-04-12 09:54:03 +000026226_ACEOF
26227
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026228cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026229# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026230config_files="$ac_config_files"
26231config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026233_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026234
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026235cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026236ac_cs_usage="\
26237\`$as_me' instantiates files from templates according to the
26238current configuration.
26239
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026240Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026241
26242 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026243 -V, --version print version number and configuration settings, then exit
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026244 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026245 -d, --debug don't remove temporary files
26246 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026247 --file=FILE[:TEMPLATE]
26248 instantiate the configuration file FILE
26249 --header=FILE[:TEMPLATE]
26250 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026251
26252Configuration files:
26253$config_files
26254
26255Configuration headers:
26256$config_headers
26257
26258Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026260_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026261cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026262ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026263python config.status 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026264configured by $0, generated by GNU Autoconf 2.61,
26265 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026266
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026267Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026268This config.status script is free software; the Free Software Foundation
26269gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026270
26271ac_pwd='$ac_pwd'
26272srcdir='$srcdir'
26273INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026274_ACEOF
26275
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026276cat >>$CONFIG_STATUS <<\_ACEOF
26277# If no file are specified by the user, then we need to provide default
26278# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026279ac_need_defaults=:
26280while test $# != 0
26281do
26282 case $1 in
26283 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026284 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26285 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026286 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026287 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026288 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026289 ac_option=$1
26290 ac_optarg=$2
26291 ac_shift=shift
26292 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026293 esac
26294
Skip Montanaro6dead952003-09-25 14:50:04 +000026295 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026296 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026297 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26298 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026299 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026300 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026301 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026302 debug=: ;;
26303 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026304 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026305 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026306 ac_need_defaults=false;;
26307 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026308 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026309 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026310 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026311 --he | --h)
26312 # Conflict between --help and --header
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026313 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026314Try \`$0 --help' for more information." >&2
26315 { (exit 1); exit 1; }; };;
26316 --help | --hel | -h )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026317 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026318 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26319 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26320 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026321
26322 # This is an error.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026323 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026324Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026325 { (exit 1); exit 1; }; } ;;
26326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026327 *) ac_config_targets="$ac_config_targets $1"
26328 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026329
26330 esac
26331 shift
26332done
26333
Skip Montanaro6dead952003-09-25 14:50:04 +000026334ac_configure_extra_args=
26335
26336if $ac_cs_silent; then
26337 exec 6>/dev/null
26338 ac_configure_extra_args="$ac_configure_extra_args --silent"
26339fi
26340
26341_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026342cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026343if \$ac_cs_recheck; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026344 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26345 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026346 export CONFIG_SHELL
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026347 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026348fi
26349
Martin v. Löwis11437992002-04-12 09:54:03 +000026350_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026351cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026352exec 5>>config.log
26353{
26354 echo
26355 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26356## Running $as_me. ##
26357_ASBOX
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026358 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026359} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026361_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026362cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026363_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026364
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026365cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026366
26367# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026368for ac_config_target in $ac_config_targets
26369do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026370 case $ac_config_target in
26371 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26372 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26373 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026374 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26375 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026376 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26377 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026378 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026379
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026380 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26381echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026382 { (exit 1); exit 1; }; };;
26383 esac
26384done
26385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026386
Martin v. Löwis11437992002-04-12 09:54:03 +000026387# If the user did not use the arguments to specify the items to instantiate,
26388# then the envvar interface is used. Set only those that are not.
26389# We use the long form for the default assignment because of an extremely
26390# bizarre bug on SunOS 4.1.3.
26391if $ac_need_defaults; then
26392 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26393 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26394fi
26395
Skip Montanaro6dead952003-09-25 14:50:04 +000026396# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026397# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026398# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026399# Hook for its removal unless debugging.
26400# Note that there is a small window in which the directory will not be cleaned:
26401# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026402$debug ||
26403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026404 tmp=
26405 trap 'exit_status=$?
26406 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26407' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026408 trap '{ (exit 1); exit 1; }' 1 2 13 15
26409}
Martin v. Löwis11437992002-04-12 09:54:03 +000026410# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026411
Martin v. Löwis11437992002-04-12 09:54:03 +000026412{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026413 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026414 test -n "$tmp" && test -d "$tmp"
26415} ||
26416{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026417 tmp=./conf$$-$RANDOM
26418 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026419} ||
26420{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026421 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026422 { (exit 1); exit 1; }
26423}
26424
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026425#
26426# Set up the sed scripts for CONFIG_FILES section.
26427#
26428
26429# No need to generate the scripts if there are no CONFIG_FILES.
26430# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026431if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026432
26433_ACEOF
26434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026435
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026437ac_delim='%!_!# '
26438for ac_last_try in false false false false false :; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026439 cat >conf$$subs.sed <<_ACEOF
26440SHELL!$SHELL$ac_delim
26441PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26442PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26443PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26444PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26445PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26446PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26447exec_prefix!$exec_prefix$ac_delim
26448prefix!$prefix$ac_delim
26449program_transform_name!$program_transform_name$ac_delim
26450bindir!$bindir$ac_delim
26451sbindir!$sbindir$ac_delim
26452libexecdir!$libexecdir$ac_delim
26453datarootdir!$datarootdir$ac_delim
26454datadir!$datadir$ac_delim
26455sysconfdir!$sysconfdir$ac_delim
26456sharedstatedir!$sharedstatedir$ac_delim
26457localstatedir!$localstatedir$ac_delim
26458includedir!$includedir$ac_delim
26459oldincludedir!$oldincludedir$ac_delim
26460docdir!$docdir$ac_delim
26461infodir!$infodir$ac_delim
26462htmldir!$htmldir$ac_delim
26463dvidir!$dvidir$ac_delim
26464pdfdir!$pdfdir$ac_delim
26465psdir!$psdir$ac_delim
26466libdir!$libdir$ac_delim
26467localedir!$localedir$ac_delim
26468mandir!$mandir$ac_delim
26469DEFS!$DEFS$ac_delim
26470ECHO_C!$ECHO_C$ac_delim
26471ECHO_N!$ECHO_N$ac_delim
26472ECHO_T!$ECHO_T$ac_delim
26473LIBS!$LIBS$ac_delim
26474build_alias!$build_alias$ac_delim
26475host_alias!$host_alias$ac_delim
26476target_alias!$target_alias$ac_delim
26477VERSION!$VERSION$ac_delim
26478SOVERSION!$SOVERSION$ac_delim
26479CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26480UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26481ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
26482PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26483PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26484PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26485PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26486PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26487FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26488FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26489FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26490FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26491FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26492MACHDEP!$MACHDEP$ac_delim
26493SGI_ABI!$SGI_ABI$ac_delim
26494CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26495EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26496CC!$CC$ac_delim
26497CFLAGS!$CFLAGS$ac_delim
26498LDFLAGS!$LDFLAGS$ac_delim
26499CPPFLAGS!$CPPFLAGS$ac_delim
26500ac_ct_CC!$ac_ct_CC$ac_delim
26501EXEEXT!$EXEEXT$ac_delim
26502OBJEXT!$OBJEXT$ac_delim
26503CXX!$CXX$ac_delim
26504MAINCC!$MAINCC$ac_delim
26505CPP!$CPP$ac_delim
26506GREP!$GREP$ac_delim
26507EGREP!$EGREP$ac_delim
26508BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26509LIBRARY!$LIBRARY$ac_delim
26510LDLIBRARY!$LDLIBRARY$ac_delim
26511DLLLIBRARY!$DLLLIBRARY$ac_delim
26512BLDLIBRARY!$BLDLIBRARY$ac_delim
26513LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26514INSTSONAME!$INSTSONAME$ac_delim
26515RUNSHARED!$RUNSHARED$ac_delim
26516LINKCC!$LINKCC$ac_delim
26517GNULD!$GNULD$ac_delim
26518RANLIB!$RANLIB$ac_delim
26519AR!$AR$ac_delim
26520ARFLAGS!$ARFLAGS$ac_delim
26521SVNVERSION!$SVNVERSION$ac_delim
26522INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26523INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26524INSTALL_DATA!$INSTALL_DATA$ac_delim
26525LN!$LN$ac_delim
26526OPT!$OPT$ac_delim
26527BASECFLAGS!$BASECFLAGS$ac_delim
26528UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26529OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26530LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26531SO!$SO$ac_delim
26532LDSHARED!$LDSHARED$ac_delim
26533BLDSHARED!$BLDSHARED$ac_delim
26534CCSHARED!$CCSHARED$ac_delim
26535LINKFORSHARED!$LINKFORSHARED$ac_delim
26536CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26537_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026538
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026539 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026540 break
26541 elif $ac_last_try; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026542 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26543echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026544 { (exit 1); exit 1; }; }
26545 else
26546 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026548done
26549
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026550ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26551if test -n "$ac_eof"; then
26552 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26553 ac_eof=`expr $ac_eof + 1`
26554fi
26555
26556cat >>$CONFIG_STATUS <<_ACEOF
26557cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26558/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026559_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026560sed '
26561s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26562s/^/s,@/; s/!/@,|#_!!_#|/
26563:n
26564t n
26565s/'"$ac_delim"'$/,g/; t
26566s/$/\\/; p
26567N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26568' >>$CONFIG_STATUS <conf$$subs.sed
26569rm -f conf$$subs.sed
26570cat >>$CONFIG_STATUS <<_ACEOF
26571CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026572_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026573
26574
26575ac_delim='%!_!# '
26576for ac_last_try in false false false false false :; do
26577 cat >conf$$subs.sed <<_ACEOF
26578SHLIBS!$SHLIBS$ac_delim
26579USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26580SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26581USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26582LDLAST!$LDLAST$ac_delim
26583THREADOBJ!$THREADOBJ$ac_delim
26584DLINCLDIR!$DLINCLDIR$ac_delim
26585DYNLOADFILE!$DYNLOADFILE$ac_delim
26586MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26587TRUE!$TRUE$ac_delim
26588LIBOBJS!$LIBOBJS$ac_delim
26589HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26590HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26591HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26592HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26593HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26594LIBM!$LIBM$ac_delim
26595LIBC!$LIBC$ac_delim
26596THREADHEADERS!$THREADHEADERS$ac_delim
26597SRCDIRS!$SRCDIRS$ac_delim
26598LTLIBOBJS!$LTLIBOBJS$ac_delim
26599_ACEOF
26600
26601 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
26602 break
26603 elif $ac_last_try; then
26604 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26605echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026606 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026607 else
26608 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26609 fi
26610done
26611
26612ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26613if test -n "$ac_eof"; then
26614 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26615 ac_eof=`expr $ac_eof + 1`
26616fi
26617
26618cat >>$CONFIG_STATUS <<_ACEOF
26619cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26620/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026621_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026622sed '
26623s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26624s/^/s,@/; s/!/@,|#_!!_#|/
26625:n
26626t n
26627s/'"$ac_delim"'$/,g/; t
26628s/$/\\/; p
26629N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26630' >>$CONFIG_STATUS <conf$$subs.sed
26631rm -f conf$$subs.sed
26632cat >>$CONFIG_STATUS <<_ACEOF
26633:end
26634s/|#_!!_#|//g
26635CEOF$ac_eof
26636_ACEOF
26637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026638
26639# VPATH may cause trouble with some makes, so we remove $(srcdir),
26640# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26641# trailing colons and then remove the whole line if VPATH becomes empty
26642# (actually we leave an empty line to preserve line numbers).
26643if test "x$srcdir" = x.; then
26644 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26645s/:*\$(srcdir):*/:/
26646s/:*\${srcdir}:*/:/
26647s/:*@srcdir@:*/:/
26648s/^\([^=]*=[ ]*\):*/\1/
26649s/:*$//
26650s/^[^=]*=[ ]*$//
26651}'
26652fi
26653
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026654cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026655fi # test -n "$CONFIG_FILES"
26656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026657
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026658for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026659do
26660 case $ac_tag in
26661 :[FHLC]) ac_mode=$ac_tag; continue;;
26662 esac
26663 case $ac_mode$ac_tag in
26664 :[FHL]*:*);;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026665 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26666echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026667 { (exit 1); exit 1; }; };;
26668 :[FH]-) ac_tag=-:-;;
26669 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26670 esac
26671 ac_save_IFS=$IFS
26672 IFS=:
26673 set x $ac_tag
26674 IFS=$ac_save_IFS
26675 shift
26676 ac_file=$1
26677 shift
26678
26679 case $ac_mode in
26680 :L) ac_source=$1;;
26681 :[FH])
26682 ac_file_inputs=
26683 for ac_f
26684 do
26685 case $ac_f in
26686 -) ac_f="$tmp/stdin";;
26687 *) # Look for the file first in the build tree, then in the source tree
26688 # (if the path is not absolute). The absolute path cannot be DOS-style,
26689 # because $ac_f cannot contain `:'.
26690 test -f "$ac_f" ||
26691 case $ac_f in
26692 [\\/$]*) false;;
26693 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26694 esac ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026695 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26696echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026697 { (exit 1); exit 1; }; };;
26698 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026699 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026700 done
26701
26702 # Let's still pretend it is `configure' which instantiates (i.e., don't
26703 # use $as_me), people would be surprised to read:
26704 # /* config.h. Generated by config.status. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026705 configure_input="Generated from "`IFS=:
26706 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026707 if test x"$ac_file" != x-; then
26708 configure_input="$ac_file. $configure_input"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026709 { echo "$as_me:$LINENO: creating $ac_file" >&5
26710echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026711 fi
26712
26713 case $ac_tag in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026714 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026715 esac
26716 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026717 esac
26718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026719 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026720$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026721 X"$ac_file" : 'X\(//\)[^/]' \| \
26722 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026723 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026724echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026725 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26726 s//\1/
26727 q
26728 }
26729 /^X\(\/\/\)[^/].*/{
26730 s//\1/
26731 q
26732 }
26733 /^X\(\/\/\)$/{
26734 s//\1/
26735 q
26736 }
26737 /^X\(\/\).*/{
26738 s//\1/
26739 q
26740 }
26741 s/.*/./; q'`
26742 { as_dir="$ac_dir"
26743 case $as_dir in #(
26744 -*) as_dir=./$as_dir;;
26745 esac
26746 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026747 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026748 while :; do
26749 case $as_dir in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026750 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026751 *) as_qdir=$as_dir;;
26752 esac
26753 as_dirs="'$as_qdir' $as_dirs"
26754 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026755$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026756 X"$as_dir" : 'X\(//\)[^/]' \| \
26757 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026758 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026759echo X"$as_dir" |
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 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026778 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026779 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026780 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26781echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026782 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026783 ac_builddir=.
26784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026785case "$ac_dir" in
26786.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26787*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026788 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026789 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026790 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026791 case $ac_top_builddir_sub in
26792 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26793 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26794 esac ;;
26795esac
26796ac_abs_top_builddir=$ac_pwd
26797ac_abs_builddir=$ac_pwd$ac_dir_suffix
26798# for backward compatibility:
26799ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026800
26801case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026802 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026803 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026804 ac_top_srcdir=$ac_top_builddir_sub
26805 ac_abs_top_srcdir=$ac_pwd ;;
26806 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026807 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026808 ac_top_srcdir=$srcdir
26809 ac_abs_top_srcdir=$srcdir ;;
26810 *) # Relative name.
26811 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26812 ac_top_srcdir=$ac_top_build_prefix$srcdir
26813 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026814esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026815ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026816
Martin v. Löwis11437992002-04-12 09:54:03 +000026817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026818 case $ac_mode in
26819 :F)
26820 #
26821 # CONFIG_FILE
26822 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026823
26824 case $INSTALL in
26825 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026826 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026827 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026828_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026829
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026830cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026831# If the template does not know about datarootdir, expand it.
26832# FIXME: This hack should be removed a few years after 2.60.
26833ac_datarootdir_hack=; ac_datarootdir_seen=
26834
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026835case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026836 p
26837 q
26838}
26839/@datadir@/p
26840/@docdir@/p
26841/@infodir@/p
26842/@localedir@/p
26843/@mandir@/p
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026844' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026845*datarootdir*) ac_datarootdir_seen=yes;;
26846*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026847 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26848echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026849_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026850cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026851 ac_datarootdir_hack='
26852 s&@datadir@&$datadir&g
26853 s&@docdir@&$docdir&g
26854 s&@infodir@&$infodir&g
26855 s&@localedir@&$localedir&g
26856 s&@mandir@&$mandir&g
26857 s&\\\${datarootdir}&$datarootdir&g' ;;
26858esac
26859_ACEOF
26860
26861# Neutralize VPATH when `$srcdir' = `.'.
26862# Shell code in configure.ac might set extrasub.
26863# FIXME: do we really want to maintain this feature?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026864cat >>$CONFIG_STATUS <<_ACEOF
26865 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026866$extrasub
26867_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026868cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026869:t
26870/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026871s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026872s&@top_builddir@&$ac_top_builddir_sub&;t t
26873s&@srcdir@&$ac_srcdir&;t t
26874s&@abs_srcdir@&$ac_abs_srcdir&;t t
26875s&@top_srcdir@&$ac_top_srcdir&;t t
26876s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26877s&@builddir@&$ac_builddir&;t t
26878s&@abs_builddir@&$ac_abs_builddir&;t t
26879s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26880s&@INSTALL@&$ac_INSTALL&;t t
26881$ac_datarootdir_hack
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026882" $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 +000026883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026884test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26885 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26886 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026887 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026888which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026889echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026890which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026892 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026893 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026894 -) cat "$tmp/out"; rm -f "$tmp/out";;
26895 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26896 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026897 ;;
26898 :H)
26899 #
26900 # CONFIG_HEADER
26901 #
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026902_ACEOF
26903
26904# Transform confdefs.h into a sed script `conftest.defines', that
26905# substitutes the proper values into config.h.in to produce config.h.
26906rm -f conftest.defines conftest.tail
26907# First, append a space to every undef/define line, to ease matching.
26908echo 's/$/ /' >conftest.defines
26909# Then, protect against being on the right side of a sed subst, or in
26910# an unquoted here document, in config.status. If some macros were
26911# called several times there might be several #defines for the same
26912# symbol, which is useless. But do not sort them, since the last
26913# AC_DEFINE must be honored.
26914ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26915# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26916# NAME is the cpp macro being defined, VALUE is the value it is being given.
26917# PARAMS is the parameter list in the macro definition--in most cases, it's
26918# just an empty string.
26919ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26920ac_dB='\\)[ (].*,\\1define\\2'
26921ac_dC=' '
26922ac_dD=' ,'
26923
26924uniq confdefs.h |
26925 sed -n '
26926 t rset
26927 :rset
26928 s/^[ ]*#[ ]*define[ ][ ]*//
26929 t ok
26930 d
26931 :ok
26932 s/[\\&,]/\\&/g
26933 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26934 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26935 ' >>conftest.defines
26936
26937# Remove the space that was appended to ease matching.
26938# Then replace #undef with comments. This is necessary, for
26939# example, in the case of _POSIX_SOURCE, which is predefined and required
26940# on some systems where configure will not decide to define it.
26941# (The regexp can be short, since the line contains either #define or #undef.)
26942echo 's/ $//
26943s,^[ #]*u.*,/* & */,' >>conftest.defines
26944
26945# Break up conftest.defines:
26946ac_max_sed_lines=50
26947
26948# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26949# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26950# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26951# et cetera.
26952ac_in='$ac_file_inputs'
26953ac_out='"$tmp/out1"'
26954ac_nxt='"$tmp/out2"'
26955
26956while :
26957do
26958 # Write a here document:
26959 cat >>$CONFIG_STATUS <<_ACEOF
26960 # First, check the format of the line:
26961 cat >"\$tmp/defines.sed" <<\\CEOF
26962/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26963/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26964b
26965:def
26966_ACEOF
26967 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
26968 echo 'CEOF
26969 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26970 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26971 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26972 grep . conftest.tail >/dev/null || break
26973 rm -f conftest.defines
26974 mv conftest.tail conftest.defines
26975done
26976rm -f conftest.defines conftest.tail
26977
26978echo "ac_result=$ac_in" >>$CONFIG_STATUS
26979cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026980 if test x"$ac_file" != x-; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026981 echo "/* $configure_input */" >"$tmp/config.h"
26982 cat "$ac_result" >>"$tmp/config.h"
26983 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
26984 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26985echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026986 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026987 rm -f $ac_file
26988 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026989 fi
26990 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026991 echo "/* $configure_input */"
26992 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026993 fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026994 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026995 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026997
26998 esac
26999
27000done # for ac_tag
27001
Guido van Rossum627b2d71993-12-24 10:39:16 +000027002
Martin v. Löwis11437992002-04-12 09:54:03 +000027003{ (exit 0); exit 0; }
27004_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027005chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027006ac_clean_files=$ac_clean_files_save
27007
27008
27009# configure is writing to config.log, and then calls config.status.
27010# config.status does its own redirection, appending to config.log.
27011# Unfortunately, on DOS this fails, as config.log is still kept open
27012# by configure, so config.status won't be able to write to it; its
27013# output is simply discarded. So we exec the FD to /dev/null,
27014# effectively closing config.log, so it can be properly (re)opened and
27015# appended to by config.status. When coming back to configure, we
27016# need to make the FD available again.
27017if test "$no_create" != yes; then
27018 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027019 ac_config_status_args=
27020 test "$silent" = yes &&
27021 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027022 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027023 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027024 exec 5>>config.log
27025 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27026 # would make configure fail if this is the last instruction.
27027 $ac_cs_success || { (exit 1); exit 1; }
27028fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027029
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027030
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027031echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027032if test ! -f Modules/Setup
27033then
27034 cp $srcdir/Modules/Setup.dist Modules/Setup
27035fi
27036
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027037echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027038if test ! -f Modules/Setup.local
27039then
27040 echo "# Edit this file for local setup changes" >Modules/Setup.local
27041fi
27042
27043echo "creating Makefile"
27044$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27045 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027046 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027047mv config.c Modules