blob: 82542b3b2a7b0fb26cfa03ecd17f7787f3fdc004 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandlbcd64a32009-03-31 21:45:18 +00002# From configure.in Revision: 70730 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis174440b2008-10-03 08:59:41 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 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
Martin v. Löwiseba40652007-08-30 20:10:57 +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=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +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
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Skip Montanaro6dead952003-09-25 14:50:04 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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.)
69as_nl='
70'
71IFS=" "" $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
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +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
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (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.
106for 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
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
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 ||
138echo X/"$0" |
139 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
164 if test $as_have_required = yes && (eval ":
165(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
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +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=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # 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=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # 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 Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +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
347 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+"$@"}
351fi
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.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
485
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 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'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +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'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
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>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_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
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +0000660ARCH_RUN_32BIT
Martin v. Löwiseba40652007-08-30 20:10:57 +0000661PYTHONFRAMEWORK
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000662PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698RANLIB
699AR
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
Ronald Oussoren5640ce22008-06-05 12:58:24 +0000707UNIVERSAL_ARCH_FLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000708OTHER_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
734UNICODE_OBJS
735THREADHEADERS
736SRCDIRS
737LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
745LIBS
746CPPFLAGS
747CPP'
748
Guido van Rossum627b2d71993-12-24 10:39:16 +0000749
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000751ac_init_help=
752ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# The variables have the same names as the options, with
754# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000755cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758no_recursion=
759prefix=NONE
760program_prefix=NONE
761program_suffix=NONE
762program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767x_includes=NONE
768x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000769
770# Installation directory options.
771# These are left unexpanded so users can "make install exec_prefix=/foo"
772# and all the variables that are supposed to be based on exec_prefix
773# by default will actually change.
774# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000775# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776bindir='${exec_prefix}/bin'
777sbindir='${exec_prefix}/sbin'
778libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000779datarootdir='${prefix}/share'
780datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781sysconfdir='${prefix}/etc'
782sharedstatedir='${prefix}/com'
783localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784includedir='${prefix}/include'
785oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000786docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
787infodir='${datarootdir}/info'
788htmldir='${docdir}'
789dvidir='${docdir}'
790pdfdir='${docdir}'
791psdir='${docdir}'
792libdir='${exec_prefix}/lib'
793localedir='${datarootdir}/locale'
794mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000797ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 # If the previous option needs an argument, assign it.
801 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 ac_prev=
804 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 case $ac_option in
808 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
809 *) ac_optarg=yes ;;
810 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812 # Accept the important Cygnus configure options, so we can diagnose typos.
813
Martin v. Löwiseba40652007-08-30 20:10:57 +0000814 case $ac_dashdash$ac_option in
815 --)
816 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
819 ac_prev=bindir ;;
820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822
823 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828 -cache-file | --cache-file | --cache-fil | --cache-fi \
829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
830 ac_prev=cache_file ;;
831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 cache_file=$ac_optarg ;;
834
835 --config-cache | -C)
836 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
844 | --dataroo | --dataro | --datar)
845 ac_prev=datarootdir ;;
846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
848 datarootdir=$ac_optarg ;;
849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
855 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
857 eval enable_$ac_feature=no ;;
858
859 -docdir | --docdir | --docdi | --doc | --do)
860 ac_prev=docdir ;;
861 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
862 docdir=$ac_optarg ;;
863
864 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
865 ac_prev=dvidir ;;
866 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
867 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
869 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
874 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
876 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
879 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
880 | --exec | --exe | --ex)
881 ac_prev=exec_prefix ;;
882 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
883 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
884 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
887 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Obsolete; use --with-gas.
889 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 -help | --help | --hel | --he | -h)
892 ac_init_help=long ;;
893 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
894 ac_init_help=recursive ;;
895 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
896 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Martin v. Löwiseba40652007-08-30 20:10:57 +0000903 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
904 ac_prev=htmldir ;;
905 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
906 | --ht=*)
907 htmldir=$ac_optarg ;;
908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -includedir | --includedir | --includedi | --included | --include \
910 | --includ | --inclu | --incl | --inc)
911 ac_prev=includedir ;;
912 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
913 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -infodir | --infodir | --infodi | --infod | --info | --inf)
917 ac_prev=infodir ;;
918 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -libdir | --libdir | --libdi | --libd)
922 ac_prev=libdir ;;
923 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
927 | --libexe | --libex | --libe)
928 ac_prev=libexecdir ;;
929 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
930 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Martin v. Löwiseba40652007-08-30 20:10:57 +0000933 -localedir | --localedir | --localedi | --localed | --locale)
934 ac_prev=localedir ;;
935 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
936 localedir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=localstatedir ;;
941 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
946 ac_prev=mandir ;;
947 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Obsolete; use --without-fp.
952 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 no_create=yes ;;
957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
960 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
963 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
964 | --oldin | --oldi | --old | --ol | --o)
965 ac_prev=oldincludedir ;;
966 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
967 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
968 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
972 ac_prev=prefix ;;
973 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -program-prefix | --program-prefix | --program-prefi | --program-pref \
977 | --program-pre | --program-pr | --program-p)
978 ac_prev=program_prefix ;;
979 -program-prefix=* | --program-prefix=* | --program-prefi=* \
980 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-suffix | --program-suffix | --program-suffi | --program-suff \
984 | --program-suf | --program-su | --program-s)
985 ac_prev=program_suffix ;;
986 -program-suffix=* | --program-suffix=* | --program-suffi=* \
987 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-transform-name | --program-transform-name \
991 | --program-transform-nam | --program-transform-na \
992 | --program-transform-n | --program-transform- \
993 | --program-transform | --program-transfor \
994 | --program-transfo | --program-transf \
995 | --program-trans | --program-tran \
996 | --progr-tra | --program-tr | --program-t)
997 ac_prev=program_transform_name ;;
998 -program-transform-name=* | --program-transform-name=* \
999 | --program-transform-nam=* | --program-transform-na=* \
1000 | --program-transform-n=* | --program-transform-=* \
1001 | --program-transform=* | --program-transfor=* \
1002 | --program-transfo=* | --program-transf=* \
1003 | --program-trans=* | --program-tran=* \
1004 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Martin v. Löwiseba40652007-08-30 20:10:57 +00001007 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1008 ac_prev=pdfdir ;;
1009 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1010 pdfdir=$ac_optarg ;;
1011
1012 -psdir | --psdir | --psdi | --psd | --ps)
1013 ac_prev=psdir ;;
1014 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1015 psdir=$ac_optarg ;;
1016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1018 | -silent | --silent | --silen | --sile | --sil)
1019 silent=yes ;;
1020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022 ac_prev=sbindir ;;
1023 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029 | --sharedst | --shareds | --shared | --share | --shar \
1030 | --sha | --sh)
1031 ac_prev=sharedstatedir ;;
1032 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -site | --site | --sit)
1039 ac_prev=site ;;
1040 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044 ac_prev=srcdir ;;
1045 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049 | --syscon | --sysco | --sysc | --sys | --sy)
1050 ac_prev=sysconfdir ;;
1051 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061 verbose=yes ;;
1062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -version | --version | --versio | --versi | --vers | -V)
1064 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { echo "$as_me: error: invalid package name: $ac_package" >&2
1071 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { echo "$as_me: error: invalid package name: $ac_package" >&2
1080 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 --x)
1085 # Obsolete; use --with-x.
1086 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1089 | --x-incl | --x-inc | --x-in | --x-i)
1090 ac_prev=x_includes ;;
1091 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1092 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1096 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1097 ac_prev=x_libraries ;;
1098 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1099 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 -*) { echo "$as_me: error: unrecognized option: $ac_option
1103Try \`$0 --help' for more information." >&2
1104 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 ;;
1106
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 *=*)
1108 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1109 # Reject names that are not valid shell variable names.
1110 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1111 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1112 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001113 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 export $ac_envvar ;;
1115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 # FIXME: should be removed in autoconf 3.0.
1118 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1119 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1120 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1121 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 ;;
1123
1124 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125done
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1129 { echo "$as_me: error: missing argument to $ac_option" >&2
1130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131fi
1132
Martin v. Löwiseba40652007-08-30 20:10:57 +00001133# Be sure to have absolute directory names.
1134for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1135 datadir sysconfdir sharedstatedir localstatedir includedir \
1136 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1137 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 [\\/$]* | ?:[\\/]* ) continue;;
1142 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1145 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148# There might be people who depend on the old broken behavior: `$host'
1149# used to hold the argument of --host etc.
1150# FIXME: To remove some day.
1151build=$build_alias
1152host=$host_alias
1153target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# FIXME: To remove some day.
1156if test "x$host_alias" != x; then
1157 if test "x$build_alias" = x; then
1158 cross_compiling=maybe
1159 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1160 If a cross compiler is detected then cross compile mode will be used." >&2
1161 elif test "x$build_alias" != "x$host_alias"; then
1162 cross_compiling=yes
1163 fi
1164fi
1165
1166ac_tool_prefix=
1167test -n "$host_alias" && ac_tool_prefix=$host_alias-
1168
1169test "$silent" = yes && exec 6>/dev/null
1170
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
Martin v. Löwiseba40652007-08-30 20:10:57 +00001172ac_pwd=`pwd` && test -n "$ac_pwd" &&
1173ac_ls_di=`ls -di .` &&
1174ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1175 { echo "$as_me: error: Working directory cannot be determined" >&2
1176 { (exit 1); exit 1; }; }
1177test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1178 { echo "$as_me: error: pwd does not report name of working directory" >&2
1179 { (exit 1); exit 1; }; }
1180
1181
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182# Find the source files, if location was not specified.
1183if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001185 # Try the directory containing this script, then the parent directory.
1186 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001187$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001188 X"$0" : 'X\(//\)[^/]' \| \
1189 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001191echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)[^/].*/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\/\)$/{
1201 s//\1/
1202 q
1203 }
1204 /^X\(\/\).*/{
1205 s//\1/
1206 q
1207 }
1208 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001210 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211 srcdir=..
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
1214 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216if test ! -r "$srcdir/$ac_unique_file"; then
1217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1218 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001221ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1222ac_abs_confdir=`(
1223 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001224 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001225 pwd)`
1226# When building in place, set srcdir=.
1227if test "$ac_abs_confdir" = "$ac_pwd"; then
1228 srcdir=.
1229fi
1230# Remove unnecessary trailing slashes from srcdir.
1231# Double slashes in file names in object file debugging info
1232# mess up M-x gdb in Emacs.
1233case $srcdir in
1234*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1235esac
1236for ac_var in $ac_precious_vars; do
1237 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_env_${ac_var}_value=\$${ac_var}
1239 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1241done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243#
1244# Report the --help message.
1245#
1246if test "$ac_init_help" = "long"; then
1247 # Omit some internal or obsolete options to make the list less imposing.
1248 # This message is too long to be a string in the A/UX 3.1 sh.
1249 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001250\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001251
1252Usage: $0 [OPTION]... [VAR=VALUE]...
1253
1254To assign environment variables (e.g., CC, CFLAGS...), specify them as
1255VAR=VALUE. See below for descriptions of some of the useful variables.
1256
1257Defaults for the options are specified in brackets.
1258
1259Configuration:
1260 -h, --help display this help and exit
1261 --help=short display options specific to this package
1262 --help=recursive display the short help of all the included packages
1263 -V, --version display version information and exit
1264 -q, --quiet, --silent do not print \`checking...' messages
1265 --cache-file=FILE cache test results in FILE [disabled]
1266 -C, --config-cache alias for \`--cache-file=config.cache'
1267 -n, --no-create do not create output files
1268 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270Installation directories:
1271 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001274 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
1276By default, \`make install' will install all the files in
1277\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1278an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1279for instance \`--prefix=\$HOME'.
1280
1281For better control, use the options below.
1282
1283Fine tuning of the installation directories:
1284 --bindir=DIR user executables [EPREFIX/bin]
1285 --sbindir=DIR system admin executables [EPREFIX/sbin]
1286 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1288 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1289 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1290 --libdir=DIR object code libraries [EPREFIX/lib]
1291 --includedir=DIR C header files [PREFIX/include]
1292 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1294 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1295 --infodir=DIR info documentation [DATAROOTDIR/info]
1296 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1297 --mandir=DIR man documentation [DATAROOTDIR/man]
1298 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1299 --htmldir=DIR html documentation [DOCDIR]
1300 --dvidir=DIR dvi documentation [DOCDIR]
1301 --pdfdir=DIR pdf documentation [DOCDIR]
1302 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001303_ACEOF
1304
1305 cat <<\_ACEOF
1306_ACEOF
1307fi
1308
1309if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001311 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 cat <<\_ACEOF
1314
1315Optional Features:
1316 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1317 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001318 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001319 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320 --enable-framework[=INSTALLDIR]
1321 Build (MacOSX|Darwin) framework
1322 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001323 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001324 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1325 --enable-ipv6 Enable ipv6 (with ipv4) support
1326 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001327 --enable-big-digits[=BITS]
1328 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001329 --enable-unicode[=ucs[24]]
1330 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332Optional Packages:
1333 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1334 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001335 --with-universal-archs=ARCH
1336 select architectures for universal build ("32-bit",
1337 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001338 --with-framework-name=FRAMEWORK
1339 specify an alternate name of the framework built
1340 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001342 --with-cxx-main=<compiler>
1343 compile main() and link python executable with C++
1344 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with-suffix=.exe set executable suffix
1346 --with-pydebug build with Py_DEBUG defined
1347 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001348 --with-system-ffi build _ctypes module using an installed ffi library
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
Martin v. Löwis11437992002-04-12 09:54:03 +00001363
1364Some influential environment variables:
1365 CC C compiler command
1366 CFLAGS C compiler flags
1367 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1368 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001369 LIBS libraries to pass to the linker, e.g. -l<library>
1370 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1371 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 CPP C preprocessor
1373
1374Use these variables to override the choices made by `configure' or to help
1375it to find libraries and programs with nonstandard names/locations.
1376
Martin v. Löwis1d459062005-03-14 21:23:33 +00001377Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001378_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001379ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001380fi
1381
1382if test "$ac_init_help" = "recursive"; then
1383 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 ac_builddir=.
1387
Martin v. Löwiseba40652007-08-30 20:10:57 +00001388case "$ac_dir" in
1389.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1390*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001392 # A ".." for each directory in $ac_dir_suffix.
1393 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1394 case $ac_top_builddir_sub in
1395 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1397 esac ;;
1398esac
1399ac_abs_top_builddir=$ac_pwd
1400ac_abs_builddir=$ac_pwd$ac_dir_suffix
1401# for backward compatibility:
1402ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407 ac_top_srcdir=$ac_top_builddir_sub
1408 ac_abs_top_srcdir=$ac_pwd ;;
1409 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 ac_top_srcdir=$srcdir
1412 ac_abs_top_srcdir=$srcdir ;;
1413 *) # Relative name.
1414 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1415 ac_top_srcdir=$ac_top_build_prefix$srcdir
1416 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001417esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001419
Martin v. Löwiseba40652007-08-30 20:10:57 +00001420 cd "$ac_dir" || { ac_status=$?; continue; }
1421 # Check for guested configure.
1422 if test -f "$ac_srcdir/configure.gnu"; then
1423 echo &&
1424 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1425 elif test -f "$ac_srcdir/configure"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 else
1429 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430 fi || ac_status=$?
1431 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 done
1433fi
1434
Martin v. Löwiseba40652007-08-30 20:10:57 +00001435test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001436if $ac_init_version; then
1437 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001438python configure 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001440
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14422002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001443This configure script is free software; the Free Software Foundation
1444gives unlimited permission to copy, distribute and modify it.
1445_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001448cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This file contains any messages produced by compilers while
1450running configure, to aid debugging if configure makes a mistake.
1451
Martin v. Löwis174440b2008-10-03 08:59:41 +00001452It was created by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001453generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001454
1455 $ $0 $@
1456
1457_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001458exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001459{
1460cat <<_ASUNAME
1461## --------- ##
1462## Platform. ##
1463## --------- ##
1464
1465hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1466uname -m = `(uname -m) 2>/dev/null || echo unknown`
1467uname -r = `(uname -r) 2>/dev/null || echo unknown`
1468uname -s = `(uname -s) 2>/dev/null || echo unknown`
1469uname -v = `(uname -v) 2>/dev/null || echo unknown`
1470
1471/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1472/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1473
1474/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1475/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1476/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001477/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001478/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1479/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1480/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1481
1482_ASUNAME
1483
1484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1485for as_dir in $PATH
1486do
1487 IFS=$as_save_IFS
1488 test -z "$as_dir" && as_dir=.
1489 echo "PATH: $as_dir"
1490done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001491IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001492
1493} >&5
1494
1495cat >&5 <<_ACEOF
1496
1497
1498## ----------- ##
1499## Core tests. ##
1500## ----------- ##
1501
1502_ACEOF
1503
1504
1505# Keep a trace of the command line.
1506# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001507# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001509# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001511ac_configure_args0=
1512ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001513ac_must_keep_next=false
1514for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001515do
Skip Montanaro6dead952003-09-25 14:50:04 +00001516 for ac_arg
1517 do
1518 case $ac_arg in
1519 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1520 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1521 | -silent | --silent | --silen | --sile | --sil)
1522 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001523 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1525 esac
1526 case $ac_pass in
1527 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1528 2)
1529 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1530 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001532 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001533 case $ac_arg in
1534 *=* | --config-cache | -C | -disable-* | --disable-* \
1535 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1536 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1537 | -with-* | --with-* | -without-* | --without-* | --x)
1538 case "$ac_configure_args0 " in
1539 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1540 esac
1541 ;;
1542 -* ) ac_must_keep_next=true ;;
1543 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001544 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001546 ;;
1547 esac
1548 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001549done
Skip Montanaro6dead952003-09-25 14:50:04 +00001550$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1551$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 +00001552
1553# When interrupted or exit'd, cleanup temporary files, and complete
1554# config.log. We remove comments because anyway the quotes in there
1555# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001556# WARNING: Use '\'' to represent an apostrophe within the trap.
1557# 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 +00001558trap 'exit_status=$?
1559 # Save into config.log some information that might help in debugging.
1560 {
1561 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001562
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 cat <<\_ASBOX
1564## ---------------- ##
1565## Cache variables. ##
1566## ---------------- ##
1567_ASBOX
1568 echo
1569 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001570(
1571 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1572 eval ac_val=\$$ac_var
1573 case $ac_val in #(
1574 *${as_nl}*)
1575 case $ac_var in #(
1576 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1577echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1578 esac
1579 case $ac_var in #(
1580 _ | IFS | as_nl) ;; #(
1581 *) $as_unset $ac_var ;;
1582 esac ;;
1583 esac
1584 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1587 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001589 "s/'\''/'\''\\\\'\'''\''/g;
1590 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1591 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001592 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001594 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 esac |
1596 sort
1597)
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001599
1600 cat <<\_ASBOX
1601## ----------------- ##
1602## Output variables. ##
1603## ----------------- ##
1604_ASBOX
1605 echo
1606 for ac_var in $ac_subst_vars
1607 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001608 eval ac_val=\$$ac_var
1609 case $ac_val in
1610 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1611 esac
1612 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001613 done | sort
1614 echo
1615
1616 if test -n "$ac_subst_files"; then
1617 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618## ------------------- ##
1619## File substitutions. ##
1620## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001621_ASBOX
1622 echo
1623 for ac_var in $ac_subst_files
1624 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001625 eval ac_val=\$$ac_var
1626 case $ac_val in
1627 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1628 esac
1629 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001630 done | sort
1631 echo
1632 fi
1633
Martin v. Löwis11437992002-04-12 09:54:03 +00001634 if test -s confdefs.h; then
1635 cat <<\_ASBOX
1636## ----------- ##
1637## confdefs.h. ##
1638## ----------- ##
1639_ASBOX
1640 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001641 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 echo
1643 fi
1644 test "$ac_signal" != 0 &&
1645 echo "$as_me: caught signal $ac_signal"
1646 echo "$as_me: exit $exit_status"
1647 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001648 rm -f core *.core core.conftest.* &&
1649 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001651' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001652for ac_signal in 1 2 13 15; do
1653 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1654done
1655ac_signal=0
1656
1657# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001658rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001659
1660# Predefined preprocessor variables.
1661
1662cat >>confdefs.h <<_ACEOF
1663#define PACKAGE_NAME "$PACKAGE_NAME"
1664_ACEOF
1665
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_VERSION "$PACKAGE_VERSION"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_STRING "$PACKAGE_STRING"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1684_ACEOF
1685
1686
1687# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001688# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001689if test -n "$CONFIG_SITE"; then
1690 set x "$CONFIG_SITE"
1691elif test "x$prefix" != xNONE; then
1692 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1693else
1694 set x "$ac_default_prefix/share/config.site" \
1695 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697shift
1698for ac_site_file
1699do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001700 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1702echo "$as_me: loading site script $ac_site_file" >&6;}
1703 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704 . "$ac_site_file"
1705 fi
1706done
1707
1708if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 # Some versions of bash will fail to source /dev/null (special
1710 # files actually), so we avoid doing that.
1711 if test -f "$cache_file"; then
1712 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1713echo "$as_me: loading cache $cache_file" >&6;}
1714 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001715 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1716 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 esac
1718 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001719else
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1721echo "$as_me: creating cache $cache_file" >&6;}
1722 >$cache_file
1723fi
1724
1725# Check that the precious variables saved in the cache have kept the same
1726# value.
1727ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001728for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001729 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1730 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001731 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1732 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001733 case $ac_old_set,$ac_new_set in
1734 set,)
1735 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1736echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1737 ac_cache_corrupted=: ;;
1738 ,set)
1739 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1740echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1741 ac_cache_corrupted=: ;;
1742 ,);;
1743 *)
1744 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001746echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001747 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001748echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001749 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001750echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001751 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001752 fi;;
1753 esac
1754 # Pass precious variables to config.status.
1755 if test "$ac_new_set" = set; then
1756 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001757 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 *) ac_arg=$ac_var=$ac_new_val ;;
1759 esac
1760 case " $ac_configure_args " in
1761 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1762 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1763 esac
1764 fi
1765done
1766if $ac_cache_corrupted; then
1767 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1768echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1769 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1770echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1771 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001772fi
1773
Martin v. Löwiseba40652007-08-30 20:10:57 +00001774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
Guido van Rossum7f43da71994-08-01 12:15:30 +00001798ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1802ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001803
Guido van Rossum627b2d71993-12-24 10:39:16 +00001804
Michael W. Hudson54241132001-12-07 15:38:26 +00001805
Martin v. Löwiseba40652007-08-30 20:10:57 +00001806ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001807
1808
Martin v. Löwis11437992002-04-12 09:54:03 +00001809
Georg Brandlbcd64a32009-03-31 21:45:18 +00001810if test "$prefix" != "/"; then
1811 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1812fi
1813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001817
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001818
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001819# We don't use PACKAGE_ variables, and they cause conflicts
1820# with other autoconf-based packages that include Python.h
1821grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1822rm confdefs.h
1823mv confdefs.h.new confdefs.h
1824
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001825
Martin v. Löwis174440b2008-10-03 08:59:41 +00001826VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001827
Martin v. Löwis1142de32002-03-29 16:28:31 +00001828
1829SOVERSION=1.0
1830
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001831# The later defininition of _XOPEN_SOURCE disables certain features
1832# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1833
1834cat >>confdefs.h <<\_ACEOF
1835#define _GNU_SOURCE 1
1836_ACEOF
1837
1838
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001839# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1840# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1841# them.
1842
1843cat >>confdefs.h <<\_ACEOF
1844#define _NETBSD_SOURCE 1
1845_ACEOF
1846
1847
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001848# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1849# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1850# them.
1851
1852cat >>confdefs.h <<\_ACEOF
1853#define __BSD_VISIBLE 1
1854_ACEOF
1855
1856
Martin v. Löwisd6320502004-08-12 13:45:08 +00001857# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1858# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define _BSD_TYPES 1
1862_ACEOF
1863
1864
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1867# them.
1868
1869cat >>confdefs.h <<\_ACEOF
1870#define _DARWIN_C_SOURCE 1
1871_ACEOF
1872
1873
1874
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001875define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001876
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001877# Arguments passed to configure.
1878
1879CONFIG_ARGS="$ac_configure_args"
1880
Martin v. Löwiseba40652007-08-30 20:10:57 +00001881# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001882if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001883 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001884 case $enableval in
1885 yes)
1886 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1887 ;;
1888 esac
1889 case $enableval in
1890 no)
1891 UNIVERSALSDK=
1892 enable_universalsdk=
1893 ;;
1894 *)
1895 UNIVERSALSDK=$enableval
1896 ;;
1897 esac
1898
1899else
1900
1901 UNIVERSALSDK=
1902 enable_universalsdk=
1903
Martin v. Löwiseba40652007-08-30 20:10:57 +00001904fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001905
1906
Martin v. Löwiseba40652007-08-30 20:10:57 +00001907
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001908ARCH_RUN_32BIT=
1909
1910
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001911UNIVERSAL_ARCHS="32-bit"
1912{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1913echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1914
1915# Check whether --with-universal-archs was given.
1916if test "${with_universal_archs+set}" = set; then
1917 withval=$with_universal_archs;
1918 { echo "$as_me:$LINENO: result: $withval" >&5
1919echo "${ECHO_T}$withval" >&6; }
1920 UNIVERSAL_ARCHS="$withval"
1921
1922else
1923
1924 { echo "$as_me:$LINENO: result: 32-bit" >&5
1925echo "${ECHO_T}32-bit" >&6; }
1926
1927fi
1928
1929
1930
1931
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001932
1933# Check whether --with-framework-name was given.
1934if test "${with_framework_name+set}" = set; then
1935 withval=$with_framework_name;
1936 PYTHONFRAMEWORK=${withval}
1937 PYTHONFRAMEWORKDIR=${withval}.framework
1938 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1939
1940else
1941
1942 PYTHONFRAMEWORK=Python
1943 PYTHONFRAMEWORKDIR=Python.framework
1944 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1945
1946fi
1947
Martin v. Löwiseba40652007-08-30 20:10:57 +00001948# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001949if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001950 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001951 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001952 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001953 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001954 esac
1955 case $enableval in
1956 no)
1957 PYTHONFRAMEWORK=
1958 PYTHONFRAMEWORKDIR=no-framework
1959 PYTHONFRAMEWORKPREFIX=
1960 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001961 FRAMEWORKINSTALLFIRST=
1962 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001963 FRAMEWORKALTINSTALLFIRST=
1964 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001965 if test "x${prefix}" = "xNONE"; then
1966 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1967 else
1968 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1969 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001970 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001971 ;;
1972 *)
1973 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001974 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001975 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001976 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1977 if test "$UNIVERSAL_ARCHS" = "all"
1978 then
1979 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001980 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001981 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001982 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001983 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1984 fi
1985
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001986 if test "x${prefix}" = "xNONE" ; then
1987 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1988 else
1989 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1990 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001991 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001992
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001993 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001994 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001995 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001996
Martin v. Löwiseba40652007-08-30 20:10:57 +00001997 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001998
Martin v. Löwiseba40652007-08-30 20:10:57 +00001999 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002000
Ronald Oussoren580c7fe2008-05-02 19:45:11 +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=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002017 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
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002024 if test "$UNIVERSAL_ARCHS" = "all"
2025 then
2026 FRAMEWORKINSTALLLAST=update4wayuniversal
2027 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2028 fi
2029
Martin v. Löwiseba40652007-08-30 20:10:57 +00002030fi
2031
Michael W. Hudson54241132001-12-07 15:38:26 +00002032
2033
2034
2035
Jack Jansene578a632001-08-15 01:27:14 +00002036
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002037
2038
Ronald Oussoren5b787322006-06-06 19:50:24 +00002039
2040
2041
Ronald Oussoren580c7fe2008-05-02 19:45:11 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002054 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2055 -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.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002088 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +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 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +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 Petersoneac68f42008-11-16 17:54:55 +00002102 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +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öwisbb86d832008-11-04 20:40:09 +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 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +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 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +00002213{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2214echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002215
Jack Jansen83f898c2002-12-30 22:23:40 +00002216# And add extra plat-mac for darwin
2217
Jack Jansen7b59b422003-03-17 15:44:10 +00002218
Martin v. Löwiseba40652007-08-30 20:10:57 +00002219{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2220echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002221if test -z "$EXTRAPLATDIR"
2222then
2223 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002224 darwin)
2225 EXTRAPLATDIR="\$(PLATMACDIRS)"
2226 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2227 ;;
2228 *)
2229 EXTRAPLATDIR=""
2230 EXTRAMACHDEPPATH=""
2231 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002232 esac
2233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002234{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2235echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002236
Jack Jansen6b08a402004-06-03 12:41:45 +00002237# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2238# it may influence the way we can build extensions, so distutils
2239# needs to check it
2240
Ronald Oussoren988117f2006-04-29 11:31:35 +00002241
Jack Jansen6b08a402004-06-03 12:41:45 +00002242CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002243EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002244
Mark Dickinson65134662008-04-25 16:11:04 +00002245{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2246echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2247ac_sys_machine=`uname -m`
2248{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2249echo "${ECHO_T}$ac_sys_machine" >&6; }
2250
Guido van Rossum627b2d71993-12-24 10:39:16 +00002251# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002252
2253# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2254# for debug/optimization stuff. BASECFLAGS is for flags that are required
2255# just to get things to compile and link. Users are free to override OPT
2256# when running configure or make. The build should not break if they do.
2257# BASECFLAGS should generally not be messed with, however.
2258
2259# XXX shouldn't some/most/all of this code be merged with the stuff later
2260# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002261{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2262echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002263
Martin v. Löwiseba40652007-08-30 20:10:57 +00002264# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002265if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002266 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002267 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002268 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002269 without_gcc=yes;;
2270 yes) CC=gcc
2271 without_gcc=no;;
2272 *) CC=$withval
2273 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002274 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002275else
Martin v. Löwis11437992002-04-12 09:54:03 +00002276
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002277 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002278 AIX*) CC=cc_r
2279 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002280 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002281 case $BE_HOST_CPU in
2282 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002283 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002284 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002285 BASECFLAGS="$BASECFLAGS -export pragma"
2286 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002287 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002288 ;;
2289 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002290 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002291 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002292 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 ;;
2294 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002295 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2296echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2297 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002298 ;;
2299 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002300 AR="\$(srcdir)/Modules/ar_beos"
2301 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002302 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002303 Monterey*)
2304 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002305 without_gcc=;;
2306 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002307 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002308fi
2309
2310{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2311echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002312
Guido van Rossum8b131c51995-03-09 14:10:13 +00002313# If the user switches compilers, we can't believe the cache
2314if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2315then
Martin v. Löwis11437992002-04-12 09:54:03 +00002316 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2317(it is also a good idea to do 'make clean' before compiling)" >&5
2318echo "$as_me: error: cached CC is different -- throw away $cache_file
2319(it is also a good idea to do 'make clean' before compiling)" >&2;}
2320 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002321fi
2322
Martin v. Löwis11437992002-04-12 09:54:03 +00002323ac_ext=c
2324ac_cpp='$CPP $CPPFLAGS'
2325ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2326ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2327ac_compiler_gnu=$ac_cv_c_compiler_gnu
2328if test -n "$ac_tool_prefix"; then
2329 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2330set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002331{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2332echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002333if test "${ac_cv_prog_CC+set}" = set; then
2334 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002335else
2336 if test -n "$CC"; then
2337 ac_cv_prog_CC="$CC" # Let the user override the test.
2338else
Martin v. Löwis11437992002-04-12 09:54:03 +00002339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2340for as_dir in $PATH
2341do
2342 IFS=$as_save_IFS
2343 test -z "$as_dir" && as_dir=.
2344 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002345 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 +00002346 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2347 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2348 break 2
2349 fi
2350done
2351done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002352IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002353
Jack Jansendd19cf82001-12-06 22:36:17 +00002354fi
2355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002356CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002357if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002358 { echo "$as_me:$LINENO: result: $CC" >&5
2359echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002360else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002361 { echo "$as_me:$LINENO: result: no" >&5
2362echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002363fi
2364
Martin v. Löwiseba40652007-08-30 20:10:57 +00002365
Martin v. Löwis11437992002-04-12 09:54:03 +00002366fi
2367if test -z "$ac_cv_prog_CC"; then
2368 ac_ct_CC=$CC
2369 # Extract the first word of "gcc", so it can be a program name with args.
2370set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002371{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2372echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002373if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2374 echo $ECHO_N "(cached) $ECHO_C" >&6
2375else
2376 if test -n "$ac_ct_CC"; then
2377 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2378else
2379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380for as_dir in $PATH
2381do
2382 IFS=$as_save_IFS
2383 test -z "$as_dir" && as_dir=.
2384 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002385 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 +00002386 ac_cv_prog_ac_ct_CC="gcc"
2387 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2388 break 2
2389 fi
2390done
2391done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394fi
2395fi
2396ac_ct_CC=$ac_cv_prog_ac_ct_CC
2397if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002398 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2399echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002400else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401 { echo "$as_me:$LINENO: result: no" >&5
2402echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002403fi
2404
Martin v. Löwiseba40652007-08-30 20:10:57 +00002405 if test "x$ac_ct_CC" = x; then
2406 CC=""
2407 else
2408 case $cross_compiling:$ac_tool_warned in
2409yes:)
2410{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2411whose name does not start with the host triplet. If you think this
2412configuration is useful to you, please write to autoconf@gnu.org." >&5
2413echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2414whose name does not start with the host triplet. If you think this
2415configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2416ac_tool_warned=yes ;;
2417esac
2418 CC=$ac_ct_CC
2419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002420else
2421 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002422fi
2423
Jack Jansendd19cf82001-12-06 22:36:17 +00002424if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002425 if test -n "$ac_tool_prefix"; then
2426 # 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 +00002427set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002428{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2429echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002430if test "${ac_cv_prog_CC+set}" = set; then
2431 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002432else
2433 if test -n "$CC"; then
2434 ac_cv_prog_CC="$CC" # Let the user override the test.
2435else
Martin v. Löwis11437992002-04-12 09:54:03 +00002436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2437for as_dir in $PATH
2438do
2439 IFS=$as_save_IFS
2440 test -z "$as_dir" && as_dir=.
2441 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002442 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 +00002443 ac_cv_prog_CC="${ac_tool_prefix}cc"
2444 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2445 break 2
2446 fi
2447done
2448done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002449IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451fi
2452fi
2453CC=$ac_cv_prog_CC
2454if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455 { echo "$as_me:$LINENO: result: $CC" >&5
2456echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002457else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002458 { echo "$as_me:$LINENO: result: no" >&5
2459echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002460fi
2461
Martin v. Löwiseba40652007-08-30 20:10:57 +00002462
Martin v. Löwis11437992002-04-12 09:54:03 +00002463 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002464fi
2465if test -z "$CC"; then
2466 # Extract the first word of "cc", so it can be a program name with args.
2467set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2469echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002470if test "${ac_cv_prog_CC+set}" = set; then
2471 echo $ECHO_N "(cached) $ECHO_C" >&6
2472else
2473 if test -n "$CC"; then
2474 ac_cv_prog_CC="$CC" # Let the user override the test.
2475else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002476 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2478for as_dir in $PATH
2479do
2480 IFS=$as_save_IFS
2481 test -z "$as_dir" && as_dir=.
2482 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002483 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 +00002484 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2485 ac_prog_rejected=yes
2486 continue
2487 fi
2488 ac_cv_prog_CC="cc"
2489 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2490 break 2
2491 fi
2492done
2493done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002495
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002496if test $ac_prog_rejected = yes; then
2497 # We found a bogon in the path, so make sure we never use it.
2498 set dummy $ac_cv_prog_CC
2499 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002501 # We chose a different compiler from the bogus one.
2502 # However, it has the same basename, so the bogon will be chosen
2503 # first if we set CC to just the basename; use the full file name.
2504 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002506 fi
2507fi
2508fi
2509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002510CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002511if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512 { echo "$as_me:$LINENO: result: $CC" >&5
2513echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002514else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002515 { echo "$as_me:$LINENO: result: no" >&5
2516echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002517fi
2518
Martin v. Löwiseba40652007-08-30 20:10:57 +00002519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520fi
2521if test -z "$CC"; then
2522 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002523 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 do
2525 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2526set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002527{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2528echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002529if test "${ac_cv_prog_CC+set}" = set; then
2530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002531else
2532 if test -n "$CC"; then
2533 ac_cv_prog_CC="$CC" # Let the user override the test.
2534else
Martin v. Löwis11437992002-04-12 09:54:03 +00002535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2536for as_dir in $PATH
2537do
2538 IFS=$as_save_IFS
2539 test -z "$as_dir" && as_dir=.
2540 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541 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 +00002542 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2543 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2544 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002545 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002546done
2547done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002548IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002549
2550fi
2551fi
2552CC=$ac_cv_prog_CC
2553if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554 { echo "$as_me:$LINENO: result: $CC" >&5
2555echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002556else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002557 { echo "$as_me:$LINENO: result: no" >&5
2558echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002559fi
2560
Martin v. Löwiseba40652007-08-30 20:10:57 +00002561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 test -n "$CC" && break
2563 done
2564fi
2565if test -z "$CC"; then
2566 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002567 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002568do
2569 # Extract the first word of "$ac_prog", so it can be a program name with args.
2570set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2572echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002573if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2574 echo $ECHO_N "(cached) $ECHO_C" >&6
2575else
2576 if test -n "$ac_ct_CC"; then
2577 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2578else
2579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2580for as_dir in $PATH
2581do
2582 IFS=$as_save_IFS
2583 test -z "$as_dir" && as_dir=.
2584 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585 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 +00002586 ac_cv_prog_ac_ct_CC="$ac_prog"
2587 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2588 break 2
2589 fi
2590done
2591done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594fi
2595fi
2596ac_ct_CC=$ac_cv_prog_ac_ct_CC
2597if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002598 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2599echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002600else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 { echo "$as_me:$LINENO: result: no" >&5
2602echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002603fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002604
Martin v. Löwiseba40652007-08-30 20:10:57 +00002605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 test -n "$ac_ct_CC" && break
2607done
Michael W. Hudson54241132001-12-07 15:38:26 +00002608
Martin v. Löwiseba40652007-08-30 20:10:57 +00002609 if test "x$ac_ct_CC" = x; then
2610 CC=""
2611 else
2612 case $cross_compiling:$ac_tool_warned in
2613yes:)
2614{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2615whose name does not start with the host triplet. If you think this
2616configuration is useful to you, please write to autoconf@gnu.org." >&5
2617echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2618whose name does not start with the host triplet. If you think this
2619configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2620ac_tool_warned=yes ;;
2621esac
2622 CC=$ac_ct_CC
2623 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002624fi
2625
2626fi
2627
2628
Skip Montanaro6dead952003-09-25 14:50:04 +00002629test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2630See \`config.log' for more details." >&5
2631echo "$as_me: error: no acceptable C compiler found in \$PATH
2632See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 { (exit 1); exit 1; }; }
2634
2635# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002637ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002638{ (ac_try="$ac_compiler --version >&5"
2639case "(($ac_try" in
2640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2641 *) ac_try_echo=$ac_try;;
2642esac
2643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2644 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 ac_status=$?
2646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2647 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002648{ (ac_try="$ac_compiler -v >&5"
2649case "(($ac_try" in
2650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2651 *) ac_try_echo=$ac_try;;
2652esac
2653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2654 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 ac_status=$?
2656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2657 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658{ (ac_try="$ac_compiler -V >&5"
2659case "(($ac_try" in
2660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2661 *) ac_try_echo=$ac_try;;
2662esac
2663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2664 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 ac_status=$?
2666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2667 (exit $ac_status); }
2668
2669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002670/* confdefs.h. */
2671_ACEOF
2672cat confdefs.h >>conftest.$ac_ext
2673cat >>conftest.$ac_ext <<_ACEOF
2674/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676int
2677main ()
2678{
2679
2680 ;
2681 return 0;
2682}
2683_ACEOF
2684ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002685ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002686# Try to create an executable without -o first, disregard a.out.
2687# It will help us diagnose broken compilers, and finding out an intuition
2688# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002689{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2690echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002691ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002692#
2693# List of possible output files, starting from the most likely.
2694# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2695# only as a last resort. b.out is created by i960 compilers.
2696ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2697#
2698# The IRIX 6 linker writes into existing files which may not be
2699# executable, retaining their permissions. Remove them first so a
2700# subsequent execution test works.
2701ac_rmfiles=
2702for ac_file in $ac_files
2703do
2704 case $ac_file in
2705 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2706 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2707 esac
2708done
2709rm -f $ac_rmfiles
2710
2711if { (ac_try="$ac_link_default"
2712case "(($ac_try" in
2713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2714 *) ac_try_echo=$ac_try;;
2715esac
2716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2717 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 ac_status=$?
2719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2720 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002721 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2722# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2723# in a Makefile. We should not override ac_cv_exeext if it was cached,
2724# so that the user can short-circuit this test for compilers unknown to
2725# Autoconf.
2726for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002727do
2728 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002731 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002732 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 # We found the default executable, but exeext='' is most
2734 # certainly right.
2735 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002736 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002737 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2738 then :; else
2739 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2740 fi
2741 # We set ac_cv_exeext here because the later test for it is not
2742 # safe: cross compilers may not add the suffix if given an `-o'
2743 # argument, so we may need to know it at that point already.
2744 # Even if this section looks crufty: it has the advantage of
2745 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002746 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002747 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002748 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 esac
2750done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002751test "$ac_cv_exeext" = no && ac_cv_exeext=
2752
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002753else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002754 ac_file=''
2755fi
2756
2757{ echo "$as_me:$LINENO: result: $ac_file" >&5
2758echo "${ECHO_T}$ac_file" >&6; }
2759if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002761sed 's/^/| /' conftest.$ac_ext >&5
2762
2763{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2764See \`config.log' for more details." >&5
2765echo "$as_me: error: C compiler cannot create executables
2766See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002768fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002769
Martin v. Löwis11437992002-04-12 09:54:03 +00002770ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002771
Martin v. Löwiseba40652007-08-30 20:10:57 +00002772# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002773# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002774{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2775echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002776# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2777# If not cross compiling, check that we can run a simple program.
2778if test "$cross_compiling" != yes; then
2779 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002780 { (case "(($ac_try" in
2781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2782 *) ac_try_echo=$ac_try;;
2783esac
2784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2785 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002786 ac_status=$?
2787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2788 (exit $ac_status); }; }; then
2789 cross_compiling=no
2790 else
2791 if test "$cross_compiling" = maybe; then
2792 cross_compiling=yes
2793 else
2794 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002795If you meant to cross compile, use \`--host'.
2796See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002797echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002798If you meant to cross compile, use \`--host'.
2799See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002800 { (exit 1); exit 1; }; }
2801 fi
2802 fi
2803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002804{ echo "$as_me:$LINENO: result: yes" >&5
2805echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002806
Skip Montanaro6dead952003-09-25 14:50:04 +00002807rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002808ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002810# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002811{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2812echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2813{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2814echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002815
Martin v. Löwiseba40652007-08-30 20:10:57 +00002816{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2817echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2818if { (ac_try="$ac_link"
2819case "(($ac_try" in
2820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2821 *) ac_try_echo=$ac_try;;
2822esac
2823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2824 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 ac_status=$?
2826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2827 (exit $ac_status); }; then
2828 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2829# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2830# work properly (i.e., refer to `conftest.exe'), while it won't with
2831# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002832for ac_file in conftest.exe conftest conftest.*; do
2833 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002835 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002837 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 * ) break;;
2839 esac
2840done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002841else
Skip Montanaro6dead952003-09-25 14:50:04 +00002842 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2843See \`config.log' for more details." >&5
2844echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2845See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002846 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002847fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002848
Martin v. Löwis11437992002-04-12 09:54:03 +00002849rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002850{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2851echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002852
2853rm -f conftest.$ac_ext
2854EXEEXT=$ac_cv_exeext
2855ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002856{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2857echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002858if test "${ac_cv_objext+set}" = set; then
2859 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002860else
Martin v. Löwis11437992002-04-12 09:54:03 +00002861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002862/* confdefs.h. */
2863_ACEOF
2864cat confdefs.h >>conftest.$ac_ext
2865cat >>conftest.$ac_ext <<_ACEOF
2866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002867
Martin v. Löwis11437992002-04-12 09:54:03 +00002868int
2869main ()
2870{
2871
2872 ;
2873 return 0;
2874}
2875_ACEOF
2876rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002877if { (ac_try="$ac_compile"
2878case "(($ac_try" in
2879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2880 *) ac_try_echo=$ac_try;;
2881esac
2882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2883 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002884 ac_status=$?
2885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2886 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002887 for ac_file in conftest.o conftest.obj conftest.*; do
2888 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002890 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002891 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2892 break;;
2893 esac
2894done
2895else
2896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002897sed 's/^/| /' conftest.$ac_ext >&5
2898
2899{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2900See \`config.log' for more details." >&5
2901echo "$as_me: error: cannot compute suffix of object files: cannot compile
2902See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 { (exit 1); exit 1; }; }
2904fi
2905
2906rm -f conftest.$ac_cv_objext conftest.$ac_ext
2907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002908{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2909echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002910OBJEXT=$ac_cv_objext
2911ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002912{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2913echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002914if test "${ac_cv_c_compiler_gnu+set}" = set; then
2915 echo $ECHO_N "(cached) $ECHO_C" >&6
2916else
2917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002918/* confdefs.h. */
2919_ACEOF
2920cat confdefs.h >>conftest.$ac_ext
2921cat >>conftest.$ac_ext <<_ACEOF
2922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002923
Martin v. Löwis11437992002-04-12 09:54:03 +00002924int
2925main ()
2926{
2927#ifndef __GNUC__
2928 choke me
2929#endif
2930
2931 ;
2932 return 0;
2933}
2934_ACEOF
2935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002936if { (ac_try="$ac_compile"
2937case "(($ac_try" in
2938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2939 *) ac_try_echo=$ac_try;;
2940esac
2941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002944 grep -v '^ *+' conftest.er1 >conftest.err
2945 rm -f conftest.er1
2946 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002948 (exit $ac_status); } && {
2949 test -z "$ac_c_werror_flag" ||
2950 test ! -s conftest.err
2951 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 ac_compiler_gnu=yes
2953else
2954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002955sed 's/^/| /' conftest.$ac_ext >&5
2956
Martin v. Löwiseba40652007-08-30 20:10:57 +00002957 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002959
2960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002961ac_cv_c_compiler_gnu=$ac_compiler_gnu
2962
2963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002964{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2965echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002966GCC=`test $ac_compiler_gnu = yes && echo yes`
2967ac_test_CFLAGS=${CFLAGS+set}
2968ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002969{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2970echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002971if test "${ac_cv_prog_cc_g+set}" = set; then
2972 echo $ECHO_N "(cached) $ECHO_C" >&6
2973else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002974 ac_save_c_werror_flag=$ac_c_werror_flag
2975 ac_c_werror_flag=yes
2976 ac_cv_prog_cc_g=no
2977 CFLAGS="-g"
2978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002979/* confdefs.h. */
2980_ACEOF
2981cat confdefs.h >>conftest.$ac_ext
2982cat >>conftest.$ac_ext <<_ACEOF
2983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
Martin v. Löwis11437992002-04-12 09:54:03 +00002985int
2986main ()
2987{
2988
2989 ;
2990 return 0;
2991}
2992_ACEOF
2993rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002994if { (ac_try="$ac_compile"
2995case "(($ac_try" in
2996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2997 *) ac_try_echo=$ac_try;;
2998esac
2999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3000 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003002 grep -v '^ *+' conftest.er1 >conftest.err
3003 rm -f conftest.er1
3004 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006 (exit $ac_status); } && {
3007 test -z "$ac_c_werror_flag" ||
3008 test ! -s conftest.err
3009 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003010 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003011else
Martin v. Löwis11437992002-04-12 09:54:03 +00003012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003013sed 's/^/| /' conftest.$ac_ext >&5
3014
Martin v. Löwiseba40652007-08-30 20:10:57 +00003015 CFLAGS=""
3016 cat >conftest.$ac_ext <<_ACEOF
3017/* confdefs.h. */
3018_ACEOF
3019cat confdefs.h >>conftest.$ac_ext
3020cat >>conftest.$ac_ext <<_ACEOF
3021/* end confdefs.h. */
3022
3023int
3024main ()
3025{
3026
3027 ;
3028 return 0;
3029}
3030_ACEOF
3031rm -f conftest.$ac_objext
3032if { (ac_try="$ac_compile"
3033case "(($ac_try" in
3034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3035 *) ac_try_echo=$ac_try;;
3036esac
3037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3038 (eval "$ac_compile") 2>conftest.er1
3039 ac_status=$?
3040 grep -v '^ *+' conftest.er1 >conftest.err
3041 rm -f conftest.er1
3042 cat conftest.err >&5
3043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3044 (exit $ac_status); } && {
3045 test -z "$ac_c_werror_flag" ||
3046 test ! -s conftest.err
3047 } && test -s conftest.$ac_objext; then
3048 :
3049else
3050 echo "$as_me: failed program was:" >&5
3051sed 's/^/| /' conftest.$ac_ext >&5
3052
3053 ac_c_werror_flag=$ac_save_c_werror_flag
3054 CFLAGS="-g"
3055 cat >conftest.$ac_ext <<_ACEOF
3056/* confdefs.h. */
3057_ACEOF
3058cat confdefs.h >>conftest.$ac_ext
3059cat >>conftest.$ac_ext <<_ACEOF
3060/* end confdefs.h. */
3061
3062int
3063main ()
3064{
3065
3066 ;
3067 return 0;
3068}
3069_ACEOF
3070rm -f conftest.$ac_objext
3071if { (ac_try="$ac_compile"
3072case "(($ac_try" in
3073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3074 *) ac_try_echo=$ac_try;;
3075esac
3076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3077 (eval "$ac_compile") 2>conftest.er1
3078 ac_status=$?
3079 grep -v '^ *+' conftest.er1 >conftest.err
3080 rm -f conftest.er1
3081 cat conftest.err >&5
3082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3083 (exit $ac_status); } && {
3084 test -z "$ac_c_werror_flag" ||
3085 test ! -s conftest.err
3086 } && test -s conftest.$ac_objext; then
3087 ac_cv_prog_cc_g=yes
3088else
3089 echo "$as_me: failed program was:" >&5
3090sed 's/^/| /' conftest.$ac_ext >&5
3091
3092
Guido van Rossum627b2d71993-12-24 10:39:16 +00003093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003094
3095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097
3098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3099fi
3100
3101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3102 ac_c_werror_flag=$ac_save_c_werror_flag
3103fi
3104{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3105echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003106if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003107 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003108elif test $ac_cv_prog_cc_g = yes; then
3109 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003110 CFLAGS="-g -O2"
3111 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003112 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003113 fi
3114else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003115 if test "$GCC" = yes; then
3116 CFLAGS="-O2"
3117 else
3118 CFLAGS=
3119 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003121{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3122echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3123if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003124 echo $ECHO_N "(cached) $ECHO_C" >&6
3125else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003126 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003127ac_save_CC=$CC
3128cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003129/* confdefs.h. */
3130_ACEOF
3131cat confdefs.h >>conftest.$ac_ext
3132cat >>conftest.$ac_ext <<_ACEOF
3133/* end confdefs.h. */
3134#include <stdarg.h>
3135#include <stdio.h>
3136#include <sys/types.h>
3137#include <sys/stat.h>
3138/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3139struct buf { int x; };
3140FILE * (*rcsopen) (struct buf *, struct stat *, int);
3141static char *e (p, i)
3142 char **p;
3143 int i;
3144{
3145 return p[i];
3146}
3147static char *f (char * (*g) (char **, int), char **p, ...)
3148{
3149 char *s;
3150 va_list v;
3151 va_start (v,p);
3152 s = g (p, va_arg (v,int));
3153 va_end (v);
3154 return s;
3155}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003156
3157/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3158 function prototypes and stuff, but not '\xHH' hex character constants.
3159 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003160 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003161 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3162 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003163 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003164int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3165
Martin v. Löwiseba40652007-08-30 20:10:57 +00003166/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3167 inside strings and character constants. */
3168#define FOO(x) 'x'
3169int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3170
Skip Montanaro6dead952003-09-25 14:50:04 +00003171int test (int i, double x);
3172struct s1 {int (*f) (int a);};
3173struct s2 {int (*f) (double a);};
3174int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3175int argc;
3176char **argv;
3177int
3178main ()
3179{
3180return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3181 ;
3182 return 0;
3183}
3184_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003185for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3186 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003187do
3188 CC="$ac_save_CC $ac_arg"
3189 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003190if { (ac_try="$ac_compile"
3191case "(($ac_try" in
3192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3193 *) ac_try_echo=$ac_try;;
3194esac
3195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3196 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003198 grep -v '^ *+' conftest.er1 >conftest.err
3199 rm -f conftest.er1
3200 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003202 (exit $ac_status); } && {
3203 test -z "$ac_c_werror_flag" ||
3204 test ! -s conftest.err
3205 } && test -s conftest.$ac_objext; then
3206 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003207else
3208 echo "$as_me: failed program was:" >&5
3209sed 's/^/| /' conftest.$ac_ext >&5
3210
Martin v. Löwiseba40652007-08-30 20:10:57 +00003211
Skip Montanaro6dead952003-09-25 14:50:04 +00003212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213
3214rm -f core conftest.err conftest.$ac_objext
3215 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003216done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003217rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003218CC=$ac_save_CC
3219
3220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221# AC_CACHE_VAL
3222case "x$ac_cv_prog_cc_c89" in
3223 x)
3224 { echo "$as_me:$LINENO: result: none needed" >&5
3225echo "${ECHO_T}none needed" >&6; } ;;
3226 xno)
3227 { echo "$as_me:$LINENO: result: unsupported" >&5
3228echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003229 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003230 CC="$CC $ac_cv_prog_cc_c89"
3231 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3232echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003233esac
3234
Skip Montanaro6dead952003-09-25 14:50:04 +00003235
Martin v. Löwis11437992002-04-12 09:54:03 +00003236ac_ext=c
3237ac_cpp='$CPP $CPPFLAGS'
3238ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3239ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3240ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003241
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003242
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003243
3244
Martin v. Löwiseba40652007-08-30 20:10:57 +00003245{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3246echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003247
Martin v. Löwiseba40652007-08-30 20:10:57 +00003248# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003249if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003251
3252 case $withval in
3253 no) with_cxx_main=no
3254 MAINCC='$(CC)';;
3255 yes) with_cxx_main=yes
3256 MAINCC='$(CXX)';;
3257 *) with_cxx_main=yes
3258 MAINCC=$withval
3259 if test -z "$CXX"
3260 then
3261 CXX=$withval
3262 fi;;
3263 esac
3264else
3265
3266 with_cxx_main=no
3267 MAINCC='$(CC)'
3268
Martin v. Löwiseba40652007-08-30 20:10:57 +00003269fi
3270
3271{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3272echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003273
3274preset_cxx="$CXX"
3275if test -z "$CXX"
3276then
3277 case "$CC" in
3278 gcc) # Extract the first word of "g++", so it can be a program name with args.
3279set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003280{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3281echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003282if test "${ac_cv_path_CXX+set}" = set; then
3283 echo $ECHO_N "(cached) $ECHO_C" >&6
3284else
3285 case $CXX in
3286 [\\/]* | ?:[\\/]*)
3287 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3288 ;;
3289 *)
3290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3291for as_dir in notfound
3292do
3293 IFS=$as_save_IFS
3294 test -z "$as_dir" && as_dir=.
3295 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003296 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003297 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3298 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3299 break 2
3300 fi
3301done
3302done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003303IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003304
3305 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3306 ;;
3307esac
3308fi
3309CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003310if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003311 { echo "$as_me:$LINENO: result: $CXX" >&5
3312echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003313else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003314 { echo "$as_me:$LINENO: result: no" >&5
3315echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003317
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003318 ;;
3319 cc) # Extract the first word of "c++", so it can be a program name with args.
3320set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003321{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3322echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003323if test "${ac_cv_path_CXX+set}" = set; then
3324 echo $ECHO_N "(cached) $ECHO_C" >&6
3325else
3326 case $CXX in
3327 [\\/]* | ?:[\\/]*)
3328 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3329 ;;
3330 *)
3331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3332for as_dir in notfound
3333do
3334 IFS=$as_save_IFS
3335 test -z "$as_dir" && as_dir=.
3336 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003337 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003338 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3340 break 2
3341 fi
3342done
3343done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003344IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003345
3346 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3347 ;;
3348esac
3349fi
3350CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003351if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003352 { echo "$as_me:$LINENO: result: $CXX" >&5
3353echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003354else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003355 { echo "$as_me:$LINENO: result: no" >&5
3356echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003358
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003359 ;;
3360 esac
3361 if test "$CXX" = "notfound"
3362 then
3363 CXX=""
3364 fi
3365fi
3366if test -z "$CXX"
3367then
3368 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3369do
3370 # Extract the first word of "$ac_prog", so it can be a program name with args.
3371set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003372{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3373echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003374if test "${ac_cv_prog_CXX+set}" = set; then
3375 echo $ECHO_N "(cached) $ECHO_C" >&6
3376else
3377 if test -n "$CXX"; then
3378 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3379else
3380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3381for as_dir in $PATH
3382do
3383 IFS=$as_save_IFS
3384 test -z "$as_dir" && as_dir=.
3385 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003386 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003387 ac_cv_prog_CXX="$ac_prog"
3388 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3389 break 2
3390 fi
3391done
3392done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003394
3395fi
3396fi
3397CXX=$ac_cv_prog_CXX
3398if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003399 { echo "$as_me:$LINENO: result: $CXX" >&5
3400echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003401else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003402 { echo "$as_me:$LINENO: result: no" >&5
3403echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003404fi
3405
Martin v. Löwiseba40652007-08-30 20:10:57 +00003406
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003407 test -n "$CXX" && break
3408done
3409test -n "$CXX" || CXX="notfound"
3410
3411 if test "$CXX" = "notfound"
3412 then
3413 CXX=""
3414 fi
3415fi
3416if test "$preset_cxx" != "$CXX"
3417then
3418 { echo "$as_me:$LINENO: WARNING:
3419
3420 By default, distutils will build C++ extension modules with \"$CXX\".
3421 If this is not intended, then set CXX on the configure command line.
3422 " >&5
3423echo "$as_me: WARNING:
3424
3425 By default, distutils will build C++ extension modules with \"$CXX\".
3426 If this is not intended, then set CXX on the configure command line.
3427 " >&2;}
3428fi
3429
3430
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003431# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003432
3433ac_ext=c
3434ac_cpp='$CPP $CPPFLAGS'
3435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3437ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3439echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003440# On Suns, sometimes $CPP names a directory.
3441if test -n "$CPP" && test -d "$CPP"; then
3442 CPP=
3443fi
3444if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003445 if test "${ac_cv_prog_CPP+set}" = set; then
3446 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003447else
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 # Double quotes because CPP needs to be expanded
3449 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3450 do
3451 ac_preproc_ok=false
3452for ac_c_preproc_warn_flag in '' yes
3453do
3454 # Use a header file that comes with gcc, so configuring glibc
3455 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003456 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3457 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003458 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 # not just through cpp. "Syntax error" is here to catch this case.
3460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003461/* confdefs.h. */
3462_ACEOF
3463cat confdefs.h >>conftest.$ac_ext
3464cat >>conftest.$ac_ext <<_ACEOF
3465/* end confdefs.h. */
3466#ifdef __STDC__
3467# include <limits.h>
3468#else
3469# include <assert.h>
3470#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003471 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003472_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003473if { (ac_try="$ac_cpp conftest.$ac_ext"
3474case "(($ac_try" in
3475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3476 *) ac_try_echo=$ac_try;;
3477esac
3478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3479 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003480 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003481 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 rm -f conftest.er1
3483 cat conftest.err >&5
3484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485 (exit $ac_status); } >/dev/null && {
3486 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3487 test ! -s conftest.err
3488 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003489 :
3490else
Martin v. Löwis11437992002-04-12 09:54:03 +00003491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003492sed 's/^/| /' conftest.$ac_ext >&5
3493
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 # Broken: fails on valid input.
3495continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497
Martin v. Löwis11437992002-04-12 09:54:03 +00003498rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003499
Martin v. Löwiseba40652007-08-30 20:10:57 +00003500 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 # can be detected and how.
3502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003503/* confdefs.h. */
3504_ACEOF
3505cat confdefs.h >>conftest.$ac_ext
3506cat >>conftest.$ac_ext <<_ACEOF
3507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003508#include <ac_nonexistent.h>
3509_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003510if { (ac_try="$ac_cpp conftest.$ac_ext"
3511case "(($ac_try" in
3512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3513 *) ac_try_echo=$ac_try;;
3514esac
3515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3516 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003518 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 rm -f conftest.er1
3520 cat conftest.err >&5
3521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522 (exit $ac_status); } >/dev/null && {
3523 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3524 test ! -s conftest.err
3525 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003526 # Broken: success on invalid input.
3527continue
3528else
3529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003530sed 's/^/| /' conftest.$ac_ext >&5
3531
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 # Passes both tests.
3533ac_preproc_ok=:
3534break
3535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003536
Martin v. Löwis11437992002-04-12 09:54:03 +00003537rm -f conftest.err conftest.$ac_ext
3538
3539done
3540# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3541rm -f conftest.err conftest.$ac_ext
3542if $ac_preproc_ok; then
3543 break
3544fi
3545
3546 done
3547 ac_cv_prog_CPP=$CPP
3548
3549fi
3550 CPP=$ac_cv_prog_CPP
3551else
3552 ac_cv_prog_CPP=$CPP
3553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003554{ echo "$as_me:$LINENO: result: $CPP" >&5
3555echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003556ac_preproc_ok=false
3557for ac_c_preproc_warn_flag in '' yes
3558do
3559 # Use a header file that comes with gcc, so configuring glibc
3560 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003561 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3562 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 # On the NeXT, cc -E runs the code through the compiler's parser,
3564 # not just through cpp. "Syntax error" is here to catch this case.
3565 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003566/* confdefs.h. */
3567_ACEOF
3568cat confdefs.h >>conftest.$ac_ext
3569cat >>conftest.$ac_ext <<_ACEOF
3570/* end confdefs.h. */
3571#ifdef __STDC__
3572# include <limits.h>
3573#else
3574# include <assert.h>
3575#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003576 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003577_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003578if { (ac_try="$ac_cpp conftest.$ac_ext"
3579case "(($ac_try" in
3580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3581 *) ac_try_echo=$ac_try;;
3582esac
3583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3584 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003586 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 rm -f conftest.er1
3588 cat conftest.err >&5
3589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003590 (exit $ac_status); } >/dev/null && {
3591 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3592 test ! -s conftest.err
3593 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 :
3595else
3596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003597sed 's/^/| /' conftest.$ac_ext >&5
3598
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 # Broken: fails on valid input.
3600continue
3601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003602
Martin v. Löwis11437992002-04-12 09:54:03 +00003603rm -f conftest.err conftest.$ac_ext
3604
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 # can be detected and how.
3607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003608/* confdefs.h. */
3609_ACEOF
3610cat confdefs.h >>conftest.$ac_ext
3611cat >>conftest.$ac_ext <<_ACEOF
3612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003613#include <ac_nonexistent.h>
3614_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615if { (ac_try="$ac_cpp conftest.$ac_ext"
3616case "(($ac_try" in
3617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3618 *) ac_try_echo=$ac_try;;
3619esac
3620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3621 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003623 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 rm -f conftest.er1
3625 cat conftest.err >&5
3626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003627 (exit $ac_status); } >/dev/null && {
3628 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3629 test ! -s conftest.err
3630 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 # Broken: success on invalid input.
3632continue
3633else
3634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003635sed 's/^/| /' conftest.$ac_ext >&5
3636
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 # Passes both tests.
3638ac_preproc_ok=:
3639break
3640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003641
Martin v. Löwis11437992002-04-12 09:54:03 +00003642rm -f conftest.err conftest.$ac_ext
3643
3644done
3645# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3646rm -f conftest.err conftest.$ac_ext
3647if $ac_preproc_ok; then
3648 :
3649else
Skip Montanaro6dead952003-09-25 14:50:04 +00003650 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3651See \`config.log' for more details." >&5
3652echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3653See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003654 { (exit 1); exit 1; }; }
3655fi
3656
3657ac_ext=c
3658ac_cpp='$CPP $CPPFLAGS'
3659ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3660ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3661ac_compiler_gnu=$ac_cv_c_compiler_gnu
3662
3663
Martin v. Löwiseba40652007-08-30 20:10:57 +00003664{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3665echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3666if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003667 echo $ECHO_N "(cached) $ECHO_C" >&6
3668else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003669 # Extract the first word of "grep ggrep" to use in msg output
3670if test -z "$GREP"; then
3671set dummy grep ggrep; ac_prog_name=$2
3672if test "${ac_cv_path_GREP+set}" = set; then
3673 echo $ECHO_N "(cached) $ECHO_C" >&6
3674else
3675 ac_path_GREP_found=false
3676# Loop through the user's path and test for each of PROGNAME-LIST
3677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3679do
3680 IFS=$as_save_IFS
3681 test -z "$as_dir" && as_dir=.
3682 for ac_prog in grep ggrep; do
3683 for ac_exec_ext in '' $ac_executable_extensions; do
3684 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3685 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3686 # Check for GNU ac_path_GREP and select it if it is found.
3687 # Check for GNU $ac_path_GREP
3688case `"$ac_path_GREP" --version 2>&1` in
3689*GNU*)
3690 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3691*)
3692 ac_count=0
3693 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3694 while :
3695 do
3696 cat "conftest.in" "conftest.in" >"conftest.tmp"
3697 mv "conftest.tmp" "conftest.in"
3698 cp "conftest.in" "conftest.nl"
3699 echo 'GREP' >> "conftest.nl"
3700 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3701 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3702 ac_count=`expr $ac_count + 1`
3703 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3704 # Best one so far, save it but keep looking for a better one
3705 ac_cv_path_GREP="$ac_path_GREP"
3706 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003707 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708 # 10*(2^10) chars as input seems more than enough
3709 test $ac_count -gt 10 && break
3710 done
3711 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3712esac
3713
3714
3715 $ac_path_GREP_found && break 3
3716 done
3717done
3718
3719done
3720IFS=$as_save_IFS
3721
3722
Skip Montanaro6dead952003-09-25 14:50:04 +00003723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003724
3725GREP="$ac_cv_path_GREP"
3726if test -z "$GREP"; then
3727 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3728echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3729 { (exit 1); exit 1; }; }
3730fi
3731
3732else
3733 ac_cv_path_GREP=$GREP
3734fi
3735
3736
3737fi
3738{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3739echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3740 GREP="$ac_cv_path_GREP"
3741
3742
3743{ echo "$as_me:$LINENO: checking for egrep" >&5
3744echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3745if test "${ac_cv_path_EGREP+set}" = set; then
3746 echo $ECHO_N "(cached) $ECHO_C" >&6
3747else
3748 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3749 then ac_cv_path_EGREP="$GREP -E"
3750 else
3751 # Extract the first word of "egrep" to use in msg output
3752if test -z "$EGREP"; then
3753set dummy egrep; ac_prog_name=$2
3754if test "${ac_cv_path_EGREP+set}" = set; then
3755 echo $ECHO_N "(cached) $ECHO_C" >&6
3756else
3757 ac_path_EGREP_found=false
3758# Loop through the user's path and test for each of PROGNAME-LIST
3759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3760for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3761do
3762 IFS=$as_save_IFS
3763 test -z "$as_dir" && as_dir=.
3764 for ac_prog in egrep; do
3765 for ac_exec_ext in '' $ac_executable_extensions; do
3766 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3767 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3768 # Check for GNU ac_path_EGREP and select it if it is found.
3769 # Check for GNU $ac_path_EGREP
3770case `"$ac_path_EGREP" --version 2>&1` in
3771*GNU*)
3772 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3773*)
3774 ac_count=0
3775 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3776 while :
3777 do
3778 cat "conftest.in" "conftest.in" >"conftest.tmp"
3779 mv "conftest.tmp" "conftest.in"
3780 cp "conftest.in" "conftest.nl"
3781 echo 'EGREP' >> "conftest.nl"
3782 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3783 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3784 ac_count=`expr $ac_count + 1`
3785 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3786 # Best one so far, save it but keep looking for a better one
3787 ac_cv_path_EGREP="$ac_path_EGREP"
3788 ac_path_EGREP_max=$ac_count
3789 fi
3790 # 10*(2^10) chars as input seems more than enough
3791 test $ac_count -gt 10 && break
3792 done
3793 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3794esac
3795
3796
3797 $ac_path_EGREP_found && break 3
3798 done
3799done
3800
3801done
3802IFS=$as_save_IFS
3803
3804
3805fi
3806
3807EGREP="$ac_cv_path_EGREP"
3808if test -z "$EGREP"; then
3809 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3810echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3811 { (exit 1); exit 1; }; }
3812fi
3813
3814else
3815 ac_cv_path_EGREP=$EGREP
3816fi
3817
3818
3819 fi
3820fi
3821{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3822echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3823 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003824
3825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826
Martin v. Löwiseba40652007-08-30 20:10:57 +00003827{ echo "$as_me:$LINENO: checking for AIX" >&5
3828echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003830/* confdefs.h. */
3831_ACEOF
3832cat confdefs.h >>conftest.$ac_ext
3833cat >>conftest.$ac_ext <<_ACEOF
3834/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003835#ifdef _AIX
3836 yes
3837#endif
3838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003841 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003842 { echo "$as_me:$LINENO: result: yes" >&5
3843echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003844cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003845#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003846_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003847
3848else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003849 { echo "$as_me:$LINENO: result: no" >&5
3850echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003851fi
3852rm -f conftest*
3853
Michael W. Hudson54241132001-12-07 15:38:26 +00003854
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003855
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003856# Check for unsupported systems
3857case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003858atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003859 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3860 echo See README for details.
3861 exit 1;;
3862esac
3863
Michael W. Hudson54241132001-12-07 15:38:26 +00003864
Martin v. Löwiseba40652007-08-30 20:10:57 +00003865{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3866echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
Martin v. Löwiseba40652007-08-30 20:10:57 +00003868# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003869if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003870 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003871 case $withval in
3872 no) EXEEXT=;;
3873 yes) EXEEXT=.exe;;
3874 *) EXEEXT=$withval;;
3875 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003876fi
3877
3878{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3879echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003880
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003881# Test whether we're running on a non-case-sensitive system, in which
3882# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003883
Martin v. Löwiseba40652007-08-30 20:10:57 +00003884{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3885echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003886if test ! -d CaseSensitiveTestDir; then
3887mkdir CaseSensitiveTestDir
3888fi
3889
3890if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003891then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003892 { echo "$as_me:$LINENO: result: yes" >&5
3893echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003894 BUILDEXEEXT=.exe
3895else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896 { echo "$as_me:$LINENO: result: no" >&5
3897echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003898 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003899fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003900rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003901
Guido van Rossumdd997f71998-10-07 19:58:26 +00003902case $MACHDEP in
3903bsdos*)
3904 case $CC in
3905 gcc) CC="$CC -D_HAVE_BSDI";;
3906 esac;;
3907esac
3908
Guido van Rossum24b1e751997-08-21 02:29:16 +00003909case $ac_sys_system in
3910hp*|HP*)
3911 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003912 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003913 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003914Monterey*)
3915 case $CC in
3916 cc) CC="$CC -Wl,-Bexport";;
3917 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003918SunOS*)
3919 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003920
3921cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003922#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003923_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003924
3925 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003926esac
3927
Michael W. Hudson54241132001-12-07 15:38:26 +00003928
3929
Martin v. Löwiseba40652007-08-30 20:10:57 +00003930{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3931echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003932if test -z "$LIBRARY"
3933then
3934 LIBRARY='libpython$(VERSION).a'
3935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003936{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3937echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003938
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003939# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003940# name of the library into which to insert object files). BLDLIBRARY is also
3941# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3942# is blank as the main program is not linked directly against LDLIBRARY.
3943# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3944# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3945# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3946# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003947#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003948# RUNSHARED is used to run shared python without installed libraries
3949#
3950# INSTSONAME is the name of the shared library that will be use to install
3951# on the system - some systems like version suffix, others don't
3952
3953
Michael W. Hudson54241132001-12-07 15:38:26 +00003954
3955
3956
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003957
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003958LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003959BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003960INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003961DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003962LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003963RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003964
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003965# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003966# If CXX is set, and if it is needed to link a main function that was
3967# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3968# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003969# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003970# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003971
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972{ echo "$as_me:$LINENO: checking LINKCC" >&5
3973echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003974if test -z "$LINKCC"
3975then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003976 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003977 case $ac_sys_system in
3978 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003979 exp_extra="\"\""
3980 if test $ac_sys_release -ge 5 -o \
3981 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3982 exp_extra="."
3983 fi
3984 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003985 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003986 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003987 QNX*)
3988 # qcc must be used because the other compilers do not
3989 # support -N.
3990 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003991 esac
3992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003993{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3994echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003995
Martin v. Löwiseba40652007-08-30 20:10:57 +00003996{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3997echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3998# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003999if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004000 enableval=$enable_shared;
4001fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004002
Martin v. Löwis1142de32002-03-29 16:28:31 +00004003
4004if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00004005then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004006 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004007 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004008 enable_shared="yes";;
4009 *)
4010 enable_shared="no";;
4011 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004013{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4014echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004015
Martin v. Löwiseba40652007-08-30 20:10:57 +00004016{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4017echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4018# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004019if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004020 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004021 CC="$CC -pg"
4022 if test "$cross_compiling" = yes; then
4023 ac_enable_profiling="no"
4024else
4025 cat >conftest.$ac_ext <<_ACEOF
4026/* confdefs.h. */
4027_ACEOF
4028cat confdefs.h >>conftest.$ac_ext
4029cat >>conftest.$ac_ext <<_ACEOF
4030/* end confdefs.h. */
4031int main() { return 0; }
4032_ACEOF
4033rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004034if { (ac_try="$ac_link"
4035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
4039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4040 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004041 ac_status=$?
4042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004044 { (case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
4048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4049 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004050 ac_status=$?
4051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052 (exit $ac_status); }; }; then
4053 ac_enable_profiling="yes"
4054else
4055 echo "$as_me: program exited with status $ac_status" >&5
4056echo "$as_me: failed program was:" >&5
4057sed 's/^/| /' conftest.$ac_ext >&5
4058
4059( exit $ac_status )
4060ac_enable_profiling="no"
4061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004064
4065
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004066 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004067fi
4068
4069{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4070echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004071
4072case "$ac_enable_profiling" in
4073 "yes")
4074 BASECFLAGS="-pg $BASECFLAGS"
4075 LDFLAGS="-pg $LDFLAGS"
4076 ;;
4077esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004078
Martin v. Löwiseba40652007-08-30 20:10:57 +00004079{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4080echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004081
Guido van Rossumb8552162001-09-05 14:58:11 +00004082# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4083# library that we build, but we do not want to link against it (we
4084# will find it with a -framework option). For this reason there is an
4085# extra variable BLDLIBRARY against which Python and the extension
4086# modules are linked, BLDLIBRARY. This is normally the same as
4087# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004088if test "$enable_framework"
4089then
4090 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004091 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004092 BLDLIBRARY=''
4093else
4094 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004095fi
Jack Jansene578a632001-08-15 01:27:14 +00004096
Martin v. Löwis1142de32002-03-29 16:28:31 +00004097# Other platforms follow
4098if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004099
4100cat >>confdefs.h <<\_ACEOF
4101#define Py_ENABLE_SHARED 1
4102_ACEOF
4103
Martin v. Löwis1142de32002-03-29 16:28:31 +00004104 case $ac_sys_system in
4105 BeOS*)
4106 LDLIBRARY='libpython$(VERSION).so'
4107 ;;
4108 CYGWIN*)
4109 LDLIBRARY='libpython$(VERSION).dll.a'
4110 DLLLIBRARY='libpython$(VERSION).dll'
4111 ;;
4112 SunOS*)
4113 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004114 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004115 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004116 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004117 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004118 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004119 LDLIBRARY='libpython$(VERSION).so'
4120 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004121 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004122 case $ac_sys_system in
4123 FreeBSD*)
4124 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4125 ;;
4126 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004127 INSTSONAME="$LDLIBRARY".$SOVERSION
4128 ;;
4129 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004130 case `uname -m` in
4131 ia64)
4132 LDLIBRARY='libpython$(VERSION).so'
4133 ;;
4134 *)
4135 LDLIBRARY='libpython$(VERSION).sl'
4136 ;;
4137 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004138 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004139 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004140 ;;
4141 OSF*)
4142 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004143 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004144 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004145 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004146 atheos*)
4147 LDLIBRARY='libpython$(VERSION).so'
4148 BLDLIBRARY='-L. -lpython$(VERSION)'
4149 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4150 ;;
Ronald Oussoren79f90492009-01-02 10:44:46 +00004151 Darwin*)
4152 LDLIBRARY='libpython$(VERSION).dylib'
4153 BLDLIBRARY='-L. -lpython$(VERSION)'
4154 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4155 ;;
4156
Martin v. Löwis1142de32002-03-29 16:28:31 +00004157 esac
Jason Tishler30765592003-09-04 11:04:06 +00004158else # shared is disabled
4159 case $ac_sys_system in
4160 CYGWIN*)
4161 BLDLIBRARY='$(LIBRARY)'
4162 LDLIBRARY='libpython$(VERSION).dll.a'
4163 ;;
4164 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004165fi
4166
Martin v. Löwiseba40652007-08-30 20:10:57 +00004167{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4168echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004169
Martin v. Löwis11437992002-04-12 09:54:03 +00004170if test -n "$ac_tool_prefix"; then
4171 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4172set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004173{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4174echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004175if test "${ac_cv_prog_RANLIB+set}" = set; then
4176 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177else
4178 if test -n "$RANLIB"; then
4179 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4180else
Martin v. Löwis11437992002-04-12 09:54:03 +00004181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4182for as_dir in $PATH
4183do
4184 IFS=$as_save_IFS
4185 test -z "$as_dir" && as_dir=.
4186 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004187 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 +00004188 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4189 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4190 break 2
4191 fi
4192done
4193done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004194IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004195
Guido van Rossum627b2d71993-12-24 10:39:16 +00004196fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004198RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004200 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4201echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004202else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004203 { echo "$as_me:$LINENO: result: no" >&5
4204echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004205fi
4206
Martin v. Löwiseba40652007-08-30 20:10:57 +00004207
Martin v. Löwis11437992002-04-12 09:54:03 +00004208fi
4209if test -z "$ac_cv_prog_RANLIB"; then
4210 ac_ct_RANLIB=$RANLIB
4211 # Extract the first word of "ranlib", so it can be a program name with args.
4212set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004213{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4214echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004215if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4216 echo $ECHO_N "(cached) $ECHO_C" >&6
4217else
4218 if test -n "$ac_ct_RANLIB"; then
4219 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4220else
4221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4222for as_dir in $PATH
4223do
4224 IFS=$as_save_IFS
4225 test -z "$as_dir" && as_dir=.
4226 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227 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 +00004228 ac_cv_prog_ac_ct_RANLIB="ranlib"
4229 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4230 break 2
4231 fi
4232done
4233done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004234IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004235
Martin v. Löwis11437992002-04-12 09:54:03 +00004236fi
4237fi
4238ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4239if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004240 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4241echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004242else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004243 { echo "$as_me:$LINENO: result: no" >&5
4244echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004245fi
4246
Martin v. Löwiseba40652007-08-30 20:10:57 +00004247 if test "x$ac_ct_RANLIB" = x; then
4248 RANLIB=":"
4249 else
4250 case $cross_compiling:$ac_tool_warned in
4251yes:)
4252{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4253whose name does not start with the host triplet. If you think this
4254configuration is useful to you, please write to autoconf@gnu.org." >&5
4255echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4256whose name does not start with the host triplet. If you think this
4257configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4258ac_tool_warned=yes ;;
4259esac
4260 RANLIB=$ac_ct_RANLIB
4261 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004262else
4263 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004265
4266
Guido van Rossum7f43da71994-08-01 12:15:30 +00004267for ac_prog in ar aal
4268do
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004271{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004273if test "${ac_cv_prog_AR+set}" = set; then
4274 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275else
4276 if test -n "$AR"; then
4277 ac_cv_prog_AR="$AR" # Let the user override the test.
4278else
Martin v. Löwis11437992002-04-12 09:54:03 +00004279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4280for as_dir in $PATH
4281do
4282 IFS=$as_save_IFS
4283 test -z "$as_dir" && as_dir=.
4284 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004285 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 +00004286 ac_cv_prog_AR="$ac_prog"
4287 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4288 break 2
4289 fi
4290done
4291done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004292IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004293
Guido van Rossum7f43da71994-08-01 12:15:30 +00004294fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004296AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004297if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004298 { echo "$as_me:$LINENO: result: $AR" >&5
4299echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004301 { echo "$as_me:$LINENO: result: no" >&5
4302echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004303fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004304
Martin v. Löwiseba40652007-08-30 20:10:57 +00004305
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004307done
4308test -n "$AR" || AR="ar"
4309
Michael W. Hudson54241132001-12-07 15:38:26 +00004310
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004311
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004312# Extract the first word of "svnversion", so it can be a program name with args.
4313set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004314{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4315echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004316if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4317 echo $ECHO_N "(cached) $ECHO_C" >&6
4318else
4319 if test -n "$SVNVERSION"; then
4320 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4321else
4322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4323for as_dir in $PATH
4324do
4325 IFS=$as_save_IFS
4326 test -z "$as_dir" && as_dir=.
4327 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004328 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004329 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004330 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4331 break 2
4332 fi
4333done
4334done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004336
Martin v. Löwisff600232006-04-03 19:12:32 +00004337 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004338fi
4339fi
4340SVNVERSION=$ac_cv_prog_SVNVERSION
4341if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004342 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4343echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004344else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004345 { echo "$as_me:$LINENO: result: no" >&5
4346echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004347fi
4348
Martin v. Löwiseba40652007-08-30 20:10:57 +00004349
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004350if test $SVNVERSION = found
4351then
4352 SVNVERSION="svnversion \$(srcdir)"
4353else
4354 SVNVERSION="echo exported"
4355fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004356
Neil Schemenauera42c8272001-03-31 00:01:55 +00004357case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004358bsdos*|hp*|HP*)
4359 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004360 if test -z "$INSTALL"
4361 then
4362 INSTALL="${srcdir}/install-sh -c"
4363 fi
4364esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004365ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004366for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4367 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004368 ac_aux_dir=$ac_dir
4369 ac_install_sh="$ac_aux_dir/install-sh -c"
4370 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004371 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004372 ac_aux_dir=$ac_dir
4373 ac_install_sh="$ac_aux_dir/install.sh -c"
4374 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004375 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004376 ac_aux_dir=$ac_dir
4377 ac_install_sh="$ac_aux_dir/shtool install -c"
4378 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004379 fi
4380done
4381if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004382 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4383echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004384 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386
4387# These three variables are undocumented and unsupported,
4388# and are intended to be withdrawn in a future Autoconf release.
4389# They can cause serious problems if a builder's source tree is in a directory
4390# whose full name contains unusual characters.
4391ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4392ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4393ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4394
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004395
4396# Find a good install program. We prefer a C program (faster),
4397# so one script is as good as another. But avoid the broken or
4398# incompatible versions:
4399# SysV /etc/install, /usr/sbin/install
4400# SunOS /usr/etc/install
4401# IRIX /sbin/install
4402# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004403# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004404# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4405# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4406# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004407# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004408# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004409{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4410echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004411if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004412if test "${ac_cv_path_install+set}" = set; then
4413 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004414else
Martin v. Löwis11437992002-04-12 09:54:03 +00004415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4416for as_dir in $PATH
4417do
4418 IFS=$as_save_IFS
4419 test -z "$as_dir" && as_dir=.
4420 # Account for people who put trailing slashes in PATH elements.
4421case $as_dir/ in
4422 ./ | .// | /cC/* | \
4423 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004424 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004425 /usr/ucb/* ) ;;
4426 *)
4427 # OSF1 and SCO ODT 3.0 have their own names for install.
4428 # Don't use installbsd from OSF since it installs stuff as root
4429 # by default.
4430 for ac_prog in ginstall scoinst install; do
4431 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004432 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00004433 if test $ac_prog = install &&
4434 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4435 # AIX install. It has an incompatible calling convention.
4436 :
4437 elif test $ac_prog = install &&
4438 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4439 # program-specific install script used by HP pwplus--don't use.
4440 :
4441 else
4442 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4443 break 3
4444 fi
4445 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004446 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004447 done
4448 ;;
4449esac
4450done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004451IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004452
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004453
4454fi
4455 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004456 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004457 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004458 # As a last resort, use the slow shell script. Don't cache a
4459 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004460 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004461 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004462 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004463 fi
4464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004465{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4466echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004467
4468# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4469# It thinks the first close brace ends the variable substitution.
4470test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4471
Martin v. Löwis11437992002-04-12 09:54:03 +00004472test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004473
4474test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4475
Michael W. Hudson54241132001-12-07 15:38:26 +00004476
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004477# Not every filesystem supports hard links
4478
4479if test -z "$LN" ; then
4480 case $ac_sys_system in
4481 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004482 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004483 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004484 *) LN=ln;;
4485 esac
4486fi
4487
Fred Drake109d9862001-07-11 06:27:56 +00004488# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004489{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4490echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004491
Martin v. Löwiseba40652007-08-30 20:10:57 +00004492# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004493if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004494 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004495if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004496then
4497
4498cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004499#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004500_ACEOF
4501
Martin v. Löwiseba40652007-08-30 20:10:57 +00004502 { echo "$as_me:$LINENO: result: yes" >&5
4503echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004504 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004505else { echo "$as_me:$LINENO: result: no" >&5
4506echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004507fi
4508else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004509 { echo "$as_me:$LINENO: result: no" >&5
4510echo "${ECHO_T}no" >&6; }
4511fi
4512
Fred Drake109d9862001-07-11 06:27:56 +00004513
Skip Montanarodecc6a42003-01-01 20:07:49 +00004514# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4515# merged with this chunk of code?
4516
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004517# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004518# ------------------------
4519# (The following bit of code is complicated enough - please keep things
4520# indented properly. Just pretend you're editing Python code. ;-)
4521
4522# There are two parallel sets of case statements below, one that checks to
4523# see if OPT was set and one that does BASECFLAGS setting based upon
4524# compiler and platform. BASECFLAGS tweaks need to be made even if the
4525# user set OPT.
4526
4527# tweak OPT based on compiler and platform, only if the user didn't set
4528# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004529
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004530if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004531then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004532 case $GCC in
4533 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004534 if test "$CC" != 'g++' ; then
4535 STRICT_PROTO="-Wstrict-prototypes"
4536 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004537 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4538 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4539 WRAP="-fwrapv"
4540 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004541 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004542 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004543 if test "$Py_DEBUG" = 'true' ; then
4544 # Optimization messes up debuggers, so turn it off for
4545 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004546 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004547 else
Thomas Hellere5529592007-12-13 21:20:29 +00004548 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004549 fi
4550 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004551 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004552 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004553 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004554 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004555 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004556 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4557 ;;
4558 esac
Fred Drake109d9862001-07-11 06:27:56 +00004559 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004560
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004561 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004562 OPT="-O"
4563 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004564 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004565
4566 # The current (beta) Monterey compiler dies with optimizations
4567 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004568 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004569 Monterey*)
4570 OPT=""
4571 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004572 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004573
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004574fi
4575
Skip Montanarodecc6a42003-01-01 20:07:49 +00004576
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004577
4578# The -arch flags for universal builds on OSX
4579UNIVERSAL_ARCH_FLAGS=
4580
4581
Skip Montanarodecc6a42003-01-01 20:07:49 +00004582# tweak BASECFLAGS based on compiler and platform
4583case $GCC in
4584yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004585 # Python violates C99 rules, by casting between incompatible
4586 # pointer types. GCC may generate bad code as a result of that,
4587 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004588 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4589echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004590 ac_save_cc="$CC"
4591 CC="$CC -fno-strict-aliasing"
4592 if test "$cross_compiling" = yes; then
4593 ac_cv_no_strict_aliasing_ok=no
4594else
4595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004596/* confdefs.h. */
4597_ACEOF
4598cat confdefs.h >>conftest.$ac_ext
4599cat >>conftest.$ac_ext <<_ACEOF
4600/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004601int main() { return 0; }
4602_ACEOF
4603rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004604if { (ac_try="$ac_link"
4605case "(($ac_try" in
4606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4607 *) ac_try_echo=$ac_try;;
4608esac
4609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4610 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004611 ac_status=$?
4612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004614 { (case "(($ac_try" in
4615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4616 *) ac_try_echo=$ac_try;;
4617esac
4618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4619 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004620 ac_status=$?
4621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4622 (exit $ac_status); }; }; then
4623 ac_cv_no_strict_aliasing_ok=yes
4624else
4625 echo "$as_me: program exited with status $ac_status" >&5
4626echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004627sed 's/^/| /' conftest.$ac_ext >&5
4628
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004629( exit $ac_status )
4630ac_cv_no_strict_aliasing_ok=no
4631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004634
4635
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004636 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004637 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4638echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004639 if test $ac_cv_no_strict_aliasing_ok = yes
4640 then
4641 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4642 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004643
4644 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4645 # support. Without this, treatment of subnormals doesn't follow
4646 # the standard.
4647 case $ac_sys_machine in
4648 alpha*)
4649 BASECFLAGS="$BASECFLAGS -mieee"
4650 ;;
4651 esac
4652
Skip Montanarodecc6a42003-01-01 20:07:49 +00004653 case $ac_sys_system in
4654 SCO_SV*)
4655 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4656 ;;
4657 # is there any other compiler on Darwin besides gcc?
4658 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004659 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4660 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004661
4662
Ronald Oussoren988117f2006-04-29 11:31:35 +00004663 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004664 UNIVERSAL_ARCH_FLAGS=""
4665 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4666 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004667 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004668
4669 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4670 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4671
4672 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4673 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004674 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004675
4676 else
4677 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4678echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4679 { (exit 1); exit 1; }; }
4680
4681 fi
4682
4683
4684 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004685 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004686 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4687 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4688 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004689 fi
4690
Benjamin Peterson4347c442008-07-17 15:59:24 +00004691 # Calculate the right deployment target for this build.
4692 #
4693 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4694 if test ${cur_target} '>' 10.2; then
4695 cur_target=10.3
4696 fi
4697 if test "${UNIVERSAL_ARCHS}" = "all"; then
4698 # Ensure that the default platform for a 4-way
4699 # universal build is OSX 10.5, that's the first
4700 # OS release where 4-way builds make sense.
4701 cur_target='10.5'
4702 fi
4703 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4704
4705 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4706 # environment with a value that is the same as what we'll use
4707 # in the Makefile to ensure that we'll get the same compiler
4708 # environment during configure and build time.
4709 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4710 export MACOSX_DEPLOYMENT_TARGET
4711 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4712
Skip Montanarodecc6a42003-01-01 20:07:49 +00004713 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004714 OSF*)
4715 BASECFLAGS="$BASECFLAGS -mieee"
4716 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004717 esac
4718 ;;
4719
4720*)
4721 case $ac_sys_system in
4722 OpenUNIX*|UnixWare*)
4723 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4724 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004725 OSF*)
4726 BASECFLAGS="$BASECFLAGS -ieee -std"
4727 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004728 SCO_SV*)
4729 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4730 ;;
4731 esac
4732 ;;
4733esac
4734
Fred Drakee1ceaa02001-12-04 20:55:47 +00004735if test "$Py_DEBUG" = 'true'; then
4736 :
4737else
4738 OPT="-DNDEBUG $OPT"
4739fi
4740
Guido van Rossum563e7081996-09-10 18:20:48 +00004741if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004742then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004743 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004744fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004745
Neal Norwitz020c46a2006-01-07 21:39:28 +00004746# disable check for icc since it seems to pass, but generates a warning
4747if test "$CC" = icc
4748then
4749 ac_cv_opt_olimit_ok=no
4750fi
4751
Martin v. Löwiseba40652007-08-30 20:10:57 +00004752{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4753echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004754if test "${ac_cv_opt_olimit_ok+set}" = set; then
4755 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004756else
4757 ac_save_cc="$CC"
4758CC="$CC -OPT:Olimit=0"
4759if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004760 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004761else
Martin v. Löwis11437992002-04-12 09:54:03 +00004762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004763/* confdefs.h. */
4764_ACEOF
4765cat confdefs.h >>conftest.$ac_ext
4766cat >>conftest.$ac_ext <<_ACEOF
4767/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004768int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004769_ACEOF
4770rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004771if { (ac_try="$ac_link"
4772case "(($ac_try" in
4773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4774 *) ac_try_echo=$ac_try;;
4775esac
4776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4777 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004778 ac_status=$?
4779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4780 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004781 { (case "(($ac_try" in
4782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4783 *) ac_try_echo=$ac_try;;
4784esac
4785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4786 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004787 ac_status=$?
4788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4789 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004790 ac_cv_opt_olimit_ok=yes
4791else
Martin v. Löwis11437992002-04-12 09:54:03 +00004792 echo "$as_me: program exited with status $ac_status" >&5
4793echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004794sed 's/^/| /' conftest.$ac_ext >&5
4795
Martin v. Löwis11437992002-04-12 09:54:03 +00004796( exit $ac_status )
4797ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00004800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004801
4802
Guido van Rossum91922671997-10-09 20:24:13 +00004803CC="$ac_save_cc"
4804fi
4805
Martin v. Löwiseba40652007-08-30 20:10:57 +00004806{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4807echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004808if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004809 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004810 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4811 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4812 # environment?
4813 Darwin*)
4814 ;;
4815 *)
4816 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4817 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004818 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004819else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004820 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4821echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004822 if test "${ac_cv_olimit_ok+set}" = set; then
4823 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004824else
4825 ac_save_cc="$CC"
4826 CC="$CC -Olimit 1500"
4827 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004828 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004829else
Martin v. Löwis11437992002-04-12 09:54:03 +00004830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004831/* confdefs.h. */
4832_ACEOF
4833cat confdefs.h >>conftest.$ac_ext
4834cat >>conftest.$ac_ext <<_ACEOF
4835/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004836int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004837_ACEOF
4838rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004839if { (ac_try="$ac_link"
4840case "(($ac_try" in
4841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4842 *) ac_try_echo=$ac_try;;
4843esac
4844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4845 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004846 ac_status=$?
4847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4848 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004849 { (case "(($ac_try" in
4850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4851 *) ac_try_echo=$ac_try;;
4852esac
4853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4854 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004855 ac_status=$?
4856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4857 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004858 ac_cv_olimit_ok=yes
4859else
Martin v. Löwis11437992002-04-12 09:54:03 +00004860 echo "$as_me: program exited with status $ac_status" >&5
4861echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004862sed 's/^/| /' conftest.$ac_ext >&5
4863
Martin v. Löwis11437992002-04-12 09:54:03 +00004864( exit $ac_status )
4865ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004869
4870
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004871 CC="$ac_save_cc"
4872fi
4873
Martin v. Löwiseba40652007-08-30 20:10:57 +00004874 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4875echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004876 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004877 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004878 fi
4879fi
4880
Martin v. Löwisaac13162006-10-19 10:58:46 +00004881# Check whether GCC supports PyArg_ParseTuple format
4882if test "$GCC" = "yes"
4883then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004884 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4885echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004886 save_CFLAGS=$CFLAGS
4887 CFLAGS="$CFLAGS -Werror"
4888 cat >conftest.$ac_ext <<_ACEOF
4889/* confdefs.h. */
4890_ACEOF
4891cat confdefs.h >>conftest.$ac_ext
4892cat >>conftest.$ac_ext <<_ACEOF
4893/* end confdefs.h. */
4894
4895 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4896
4897int
4898main ()
4899{
4900
4901 ;
4902 return 0;
4903}
4904_ACEOF
4905rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004906if { (ac_try="$ac_compile"
4907case "(($ac_try" in
4908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4909 *) ac_try_echo=$ac_try;;
4910esac
4911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004913 ac_status=$?
4914 grep -v '^ *+' conftest.er1 >conftest.err
4915 rm -f conftest.er1
4916 cat conftest.err >&5
4917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004918 (exit $ac_status); } && {
4919 test -z "$ac_c_werror_flag" ||
4920 test ! -s conftest.err
4921 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004922
4923cat >>confdefs.h <<\_ACEOF
4924#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4925_ACEOF
4926
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927 { echo "$as_me:$LINENO: result: yes" >&5
4928echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004929else
4930 echo "$as_me: failed program was:" >&5
4931sed 's/^/| /' conftest.$ac_ext >&5
4932
Martin v. Löwiseba40652007-08-30 20:10:57 +00004933 { echo "$as_me:$LINENO: result: no" >&5
4934echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004935
4936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004937
4938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004939 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004940fi
4941
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004942# On some compilers, pthreads are available without further options
4943# (e.g. MacOS X). On some of these systems, the compiler will not
4944# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4945# So we have to see first whether pthreads are available without
4946# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004947{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4948echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004949if test "${ac_cv_pthread_is_default+set}" = set; then
4950 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004951else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004952 if test "$cross_compiling" = yes; then
4953 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004954else
Martin v. Löwis11437992002-04-12 09:54:03 +00004955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004956/* confdefs.h. */
4957_ACEOF
4958cat confdefs.h >>conftest.$ac_ext
4959cat >>conftest.$ac_ext <<_ACEOF
4960/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004961
Martin v. Löwis130fb172001-07-19 11:00:41 +00004962#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004963
4964void* routine(void* p){return NULL;}
4965
4966int main(){
4967 pthread_t p;
4968 if(pthread_create(&p,NULL,routine,NULL)!=0)
4969 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004970 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004971 return 0;
4972}
4973
Martin v. Löwis11437992002-04-12 09:54:03 +00004974_ACEOF
4975rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004976if { (ac_try="$ac_link"
4977case "(($ac_try" in
4978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4979 *) ac_try_echo=$ac_try;;
4980esac
4981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4982 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004986 { (case "(($ac_try" in
4987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4988 *) ac_try_echo=$ac_try;;
4989esac
4990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4991 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 ac_status=$?
4993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004995
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004996 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004997 ac_cv_kthread=no
4998 ac_cv_pthread=no
4999
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005000else
Martin v. Löwis11437992002-04-12 09:54:03 +00005001 echo "$as_me: program exited with status $ac_status" >&5
5002echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005003sed 's/^/| /' conftest.$ac_ext >&5
5004
Martin v. Löwis11437992002-04-12 09:54:03 +00005005( exit $ac_status )
5006ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005009fi
5010
Martin v. Löwiseba40652007-08-30 20:10:57 +00005011
5012
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005013fi
5014
Martin v. Löwiseba40652007-08-30 20:10:57 +00005015{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5016echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005017
Michael W. Hudson54241132001-12-07 15:38:26 +00005018
Martin v. Löwis11437992002-04-12 09:54:03 +00005019if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005020then
5021 ac_cv_kpthread=no
5022else
5023# -Kpthread, if available, provides the right #defines
5024# and linker options to make pthread_create available
5025# Some compilers won't report that they do not support -Kpthread,
5026# so we need to run a program to see whether it really made the
5027# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005028{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5029echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005030if test "${ac_cv_kpthread+set}" = set; then
5031 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005032else
5033 ac_save_cc="$CC"
5034CC="$CC -Kpthread"
5035if test "$cross_compiling" = yes; then
5036 ac_cv_kpthread=no
5037else
Martin v. Löwis11437992002-04-12 09:54:03 +00005038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005039/* confdefs.h. */
5040_ACEOF
5041cat confdefs.h >>conftest.$ac_ext
5042cat >>conftest.$ac_ext <<_ACEOF
5043/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005044
5045#include <pthread.h>
5046
5047void* routine(void* p){return NULL;}
5048
5049int main(){
5050 pthread_t p;
5051 if(pthread_create(&p,NULL,routine,NULL)!=0)
5052 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005053 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005054 return 0;
5055}
5056
Martin v. Löwis11437992002-04-12 09:54:03 +00005057_ACEOF
5058rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005059if { (ac_try="$ac_link"
5060case "(($ac_try" in
5061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5062 *) ac_try_echo=$ac_try;;
5063esac
5064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5065 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005066 ac_status=$?
5067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005069 { (case "(($ac_try" in
5070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5071 *) ac_try_echo=$ac_try;;
5072esac
5073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5074 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005075 ac_status=$?
5076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5077 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005078 ac_cv_kpthread=yes
5079else
Martin v. Löwis11437992002-04-12 09:54:03 +00005080 echo "$as_me: program exited with status $ac_status" >&5
5081echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005082sed 's/^/| /' conftest.$ac_ext >&5
5083
Martin v. Löwis11437992002-04-12 09:54:03 +00005084( exit $ac_status )
5085ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005089
5090
Martin v. Löwis130fb172001-07-19 11:00:41 +00005091CC="$ac_save_cc"
5092fi
5093
Martin v. Löwiseba40652007-08-30 20:10:57 +00005094{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5095echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005096fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005097
Skip Montanarod8d39a02003-07-10 20:44:10 +00005098if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005099then
5100# -Kthread, if available, provides the right #defines
5101# and linker options to make pthread_create available
5102# Some compilers won't report that they do not support -Kthread,
5103# so we need to run a program to see whether it really made the
5104# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005105{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5106echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005107if test "${ac_cv_kthread+set}" = set; then
5108 echo $ECHO_N "(cached) $ECHO_C" >&6
5109else
5110 ac_save_cc="$CC"
5111CC="$CC -Kthread"
5112if test "$cross_compiling" = yes; then
5113 ac_cv_kthread=no
5114else
5115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005116/* confdefs.h. */
5117_ACEOF
5118cat confdefs.h >>conftest.$ac_ext
5119cat >>conftest.$ac_ext <<_ACEOF
5120/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005121
5122#include <pthread.h>
5123
5124void* routine(void* p){return NULL;}
5125
5126int main(){
5127 pthread_t p;
5128 if(pthread_create(&p,NULL,routine,NULL)!=0)
5129 return 1;
5130 (void)pthread_detach(p);
5131 return 0;
5132}
5133
5134_ACEOF
5135rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005136if { (ac_try="$ac_link"
5137case "(($ac_try" in
5138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5139 *) ac_try_echo=$ac_try;;
5140esac
5141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5142 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005143 ac_status=$?
5144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5145 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005146 { (case "(($ac_try" in
5147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5148 *) ac_try_echo=$ac_try;;
5149esac
5150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5151 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005152 ac_status=$?
5153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5154 (exit $ac_status); }; }; then
5155 ac_cv_kthread=yes
5156else
5157 echo "$as_me: program exited with status $ac_status" >&5
5158echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005159sed 's/^/| /' conftest.$ac_ext >&5
5160
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005161( exit $ac_status )
5162ac_cv_kthread=no
5163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005166
5167
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005168CC="$ac_save_cc"
5169fi
5170
Martin v. Löwiseba40652007-08-30 20:10:57 +00005171{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5172echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005173fi
5174
Skip Montanarod8d39a02003-07-10 20:44:10 +00005175if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005176then
5177# -pthread, if available, provides the right #defines
5178# and linker options to make pthread_create available
5179# Some compilers won't report that they do not support -pthread,
5180# so we need to run a program to see whether it really made the
5181# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005182{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5183echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005184if test "${ac_cv_thread+set}" = set; then
5185 echo $ECHO_N "(cached) $ECHO_C" >&6
5186else
5187 ac_save_cc="$CC"
5188CC="$CC -pthread"
5189if test "$cross_compiling" = yes; then
5190 ac_cv_pthread=no
5191else
5192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005193/* confdefs.h. */
5194_ACEOF
5195cat confdefs.h >>conftest.$ac_ext
5196cat >>conftest.$ac_ext <<_ACEOF
5197/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005198
5199#include <pthread.h>
5200
5201void* routine(void* p){return NULL;}
5202
5203int main(){
5204 pthread_t p;
5205 if(pthread_create(&p,NULL,routine,NULL)!=0)
5206 return 1;
5207 (void)pthread_detach(p);
5208 return 0;
5209}
5210
5211_ACEOF
5212rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005213if { (ac_try="$ac_link"
5214case "(($ac_try" in
5215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5216 *) ac_try_echo=$ac_try;;
5217esac
5218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5219 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005220 ac_status=$?
5221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005223 { (case "(($ac_try" in
5224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5225 *) ac_try_echo=$ac_try;;
5226esac
5227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5228 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005229 ac_status=$?
5230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5231 (exit $ac_status); }; }; then
5232 ac_cv_pthread=yes
5233else
5234 echo "$as_me: program exited with status $ac_status" >&5
5235echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005236sed 's/^/| /' conftest.$ac_ext >&5
5237
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005238( exit $ac_status )
5239ac_cv_pthread=no
5240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005241rm -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 +00005242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005243
5244
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005245CC="$ac_save_cc"
5246fi
5247
Martin v. Löwiseba40652007-08-30 20:10:57 +00005248{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5249echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005250fi
5251
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005252# If we have set a CC compiler flag for thread support then
5253# check if it works for CXX, too.
5254ac_cv_cxx_thread=no
5255if test ! -z "$CXX"
5256then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005257{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5258echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005259ac_save_cxx="$CXX"
5260
5261if test "$ac_cv_kpthread" = "yes"
5262then
5263 CXX="$CXX -Kpthread"
5264 ac_cv_cxx_thread=yes
5265elif test "$ac_cv_kthread" = "yes"
5266then
5267 CXX="$CXX -Kthread"
5268 ac_cv_cxx_thread=yes
5269elif test "$ac_cv_pthread" = "yes"
5270then
5271 CXX="$CXX -pthread"
5272 ac_cv_cxx_thread=yes
5273fi
5274
5275if test $ac_cv_cxx_thread = yes
5276then
5277 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5278 $CXX -c conftest.$ac_ext 2>&5
5279 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5280 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5281 then
5282 ac_cv_cxx_thread=yes
5283 else
5284 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005285 fi
5286 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005288{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5289echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005290fi
5291CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005292
Michael W. Hudson54241132001-12-07 15:38:26 +00005293
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005294# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005295{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5296echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005297if test "${ac_cv_header_stdc+set}" = set; then
5298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005299else
Martin v. Löwis11437992002-04-12 09:54:03 +00005300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005301/* confdefs.h. */
5302_ACEOF
5303cat confdefs.h >>conftest.$ac_ext
5304cat >>conftest.$ac_ext <<_ACEOF
5305/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005306#include <stdlib.h>
5307#include <stdarg.h>
5308#include <string.h>
5309#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005310
Skip Montanaro6dead952003-09-25 14:50:04 +00005311int
5312main ()
5313{
5314
5315 ;
5316 return 0;
5317}
Martin v. Löwis11437992002-04-12 09:54:03 +00005318_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005320if { (ac_try="$ac_compile"
5321case "(($ac_try" in
5322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5323 *) ac_try_echo=$ac_try;;
5324esac
5325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005328 grep -v '^ *+' conftest.er1 >conftest.err
5329 rm -f conftest.er1
5330 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005332 (exit $ac_status); } && {
5333 test -z "$ac_c_werror_flag" ||
5334 test ! -s conftest.err
5335 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005336 ac_cv_header_stdc=yes
5337else
Martin v. Löwis11437992002-04-12 09:54:03 +00005338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005339sed 's/^/| /' conftest.$ac_ext >&5
5340
Martin v. Löwiseba40652007-08-30 20:10:57 +00005341 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005343
5344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005345
5346if test $ac_cv_header_stdc = yes; then
5347 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005354#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005355
5356_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005358 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005359 :
5360else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005361 ac_cv_header_stdc=no
5362fi
5363rm -f conftest*
5364
5365fi
5366
5367if test $ac_cv_header_stdc = yes; then
5368 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005370/* confdefs.h. */
5371_ACEOF
5372cat confdefs.h >>conftest.$ac_ext
5373cat >>conftest.$ac_ext <<_ACEOF
5374/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005375#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005376
5377_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005379 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005380 :
5381else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005382 ac_cv_header_stdc=no
5383fi
5384rm -f conftest*
5385
5386fi
5387
5388if test $ac_cv_header_stdc = yes; then
5389 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005390 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005391 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005392else
Martin v. Löwis11437992002-04-12 09:54:03 +00005393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005394/* confdefs.h. */
5395_ACEOF
5396cat confdefs.h >>conftest.$ac_ext
5397cat >>conftest.$ac_ext <<_ACEOF
5398/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005399#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005400#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005401#if ((' ' & 0x0FF) == 0x020)
5402# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5403# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5404#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005405# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005406 (('a' <= (c) && (c) <= 'i') \
5407 || ('j' <= (c) && (c) <= 'r') \
5408 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005409# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5410#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005411
Martin v. Löwis11437992002-04-12 09:54:03 +00005412#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5413int
5414main ()
5415{
5416 int i;
5417 for (i = 0; i < 256; i++)
5418 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005419 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005420 return 2;
5421 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005422}
5423_ACEOF
5424rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005425if { (ac_try="$ac_link"
5426case "(($ac_try" in
5427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5428 *) ac_try_echo=$ac_try;;
5429esac
5430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5431 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005432 ac_status=$?
5433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005435 { (case "(($ac_try" in
5436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5437 *) ac_try_echo=$ac_try;;
5438esac
5439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5440 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005441 ac_status=$?
5442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5443 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005444 :
5445else
Martin v. Löwis11437992002-04-12 09:54:03 +00005446 echo "$as_me: program exited with status $ac_status" >&5
5447echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005448sed 's/^/| /' conftest.$ac_ext >&5
5449
Martin v. Löwis11437992002-04-12 09:54:03 +00005450( exit $ac_status )
5451ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5454fi
5455
5456
Michael W. Hudson54241132001-12-07 15:38:26 +00005457fi
5458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005459{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5460echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005461if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005462
5463cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005464#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005465_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005466
5467fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005468
Skip Montanarob9820a32004-01-17 00:16:12 +00005469# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005480 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005481do
5482as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005483{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5484echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5485if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005486 echo $ECHO_N "(cached) $ECHO_C" >&6
5487else
5488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005489/* confdefs.h. */
5490_ACEOF
5491cat confdefs.h >>conftest.$ac_ext
5492cat >>conftest.$ac_ext <<_ACEOF
5493/* end confdefs.h. */
5494$ac_includes_default
5495
5496#include <$ac_header>
5497_ACEOF
5498rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005499if { (ac_try="$ac_compile"
5500case "(($ac_try" in
5501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5502 *) ac_try_echo=$ac_try;;
5503esac
5504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5505 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005507 grep -v '^ *+' conftest.er1 >conftest.err
5508 rm -f conftest.er1
5509 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005511 (exit $ac_status); } && {
5512 test -z "$ac_c_werror_flag" ||
5513 test ! -s conftest.err
5514 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005515 eval "$as_ac_Header=yes"
5516else
5517 echo "$as_me: failed program was:" >&5
5518sed 's/^/| /' conftest.$ac_ext >&5
5519
Martin v. Löwiseba40652007-08-30 20:10:57 +00005520 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005522
5523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005525ac_res=`eval echo '${'$as_ac_Header'}'`
5526 { echo "$as_me:$LINENO: result: $ac_res" >&5
5527echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005528if test `eval echo '${'$as_ac_Header'}'` = yes; then
5529 cat >>confdefs.h <<_ACEOF
5530#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5531_ACEOF
5532
5533fi
5534
5535done
5536
5537
Martin v. Löwis11437992002-04-12 09:54:03 +00005538
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
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
Anthony Baxter8a560de2004-10-13 15:30:56 +00005574
Martin v. Löwisc3001752005-01-23 09:27:24 +00005575
Martin v. Löwis11017b12006-01-14 18:12:57 +00005576
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005577
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005578
5579
5580
5581
5582
5583
5584
5585
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005586
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005587
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005588
5589
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005590
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005591
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005592for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5593fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005594ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005595shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005596unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005597sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5598sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005599sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005600sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005601sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00005602sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005603bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005604do
Martin v. Löwis11437992002-04-12 09:54:03 +00005605as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005606if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5607 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5608echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5609if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005610 echo $ECHO_N "(cached) $ECHO_C" >&6
5611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005612ac_res=`eval echo '${'$as_ac_Header'}'`
5613 { echo "$as_me:$LINENO: result: $ac_res" >&5
5614echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005615else
Martin v. Löwis11437992002-04-12 09:54:03 +00005616 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005617{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5618echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005619cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005620/* confdefs.h. */
5621_ACEOF
5622cat confdefs.h >>conftest.$ac_ext
5623cat >>conftest.$ac_ext <<_ACEOF
5624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005625$ac_includes_default
5626#include <$ac_header>
5627_ACEOF
5628rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005629if { (ac_try="$ac_compile"
5630case "(($ac_try" in
5631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5632 *) ac_try_echo=$ac_try;;
5633esac
5634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005637 grep -v '^ *+' conftest.er1 >conftest.err
5638 rm -f conftest.er1
5639 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005641 (exit $ac_status); } && {
5642 test -z "$ac_c_werror_flag" ||
5643 test ! -s conftest.err
5644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005645 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005646else
Martin v. Löwis11437992002-04-12 09:54:03 +00005647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005648sed 's/^/| /' conftest.$ac_ext >&5
5649
Martin v. Löwiseba40652007-08-30 20:10:57 +00005650 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005652
5653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5654{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5655echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005656
5657# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005658{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5659echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005660cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005661/* confdefs.h. */
5662_ACEOF
5663cat confdefs.h >>conftest.$ac_ext
5664cat >>conftest.$ac_ext <<_ACEOF
5665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005666#include <$ac_header>
5667_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005668if { (ac_try="$ac_cpp conftest.$ac_ext"
5669case "(($ac_try" in
5670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5671 *) ac_try_echo=$ac_try;;
5672esac
5673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5674 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005676 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005677 rm -f conftest.er1
5678 cat conftest.err >&5
5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005680 (exit $ac_status); } >/dev/null && {
5681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5682 test ! -s conftest.err
5683 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_header_preproc=yes
5685else
5686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005687sed 's/^/| /' conftest.$ac_ext >&5
5688
Martin v. Löwis11437992002-04-12 09:54:03 +00005689 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005691
Martin v. Löwis11437992002-04-12 09:54:03 +00005692rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005693{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5694echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005695
5696# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005697case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5698 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005699 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5700echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005701 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5702echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5703 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005704 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005705 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005706 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5707echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005708 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5709echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5710 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5711echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5712 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5713echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005714 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5715echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005716 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5717echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005718 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005719## ------------------------------------------------ ##
5720## Report this to http://www.python.org/python-bugs ##
5721## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005722_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005723 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005724 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005725esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005726{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5727echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5728if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005730else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005731 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005733ac_res=`eval echo '${'$as_ac_Header'}'`
5734 { echo "$as_me:$LINENO: result: $ac_res" >&5
5735echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005736
5737fi
5738if test `eval echo '${'$as_ac_Header'}'` = yes; then
5739 cat >>confdefs.h <<_ACEOF
5740#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5741_ACEOF
5742
5743fi
5744
Guido van Rossum627b2d71993-12-24 10:39:16 +00005745done
5746
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
5748
5749
5750
5751
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005753for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5754 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005755{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5756echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5757if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005759else
Martin v. Löwis11437992002-04-12 09:54:03 +00005760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005761/* confdefs.h. */
5762_ACEOF
5763cat confdefs.h >>conftest.$ac_ext
5764cat >>conftest.$ac_ext <<_ACEOF
5765/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005766#include <sys/types.h>
5767#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005768
Martin v. Löwis11437992002-04-12 09:54:03 +00005769int
5770main ()
5771{
5772if ((DIR *) 0)
5773return 0;
5774 ;
5775 return 0;
5776}
5777_ACEOF
5778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005779if { (ac_try="$ac_compile"
5780case "(($ac_try" in
5781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5782 *) ac_try_echo=$ac_try;;
5783esac
5784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005787 grep -v '^ *+' conftest.er1 >conftest.err
5788 rm -f conftest.er1
5789 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005791 (exit $ac_status); } && {
5792 test -z "$ac_c_werror_flag" ||
5793 test ! -s conftest.err
5794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005795 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005796else
Martin v. Löwis11437992002-04-12 09:54:03 +00005797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005798sed 's/^/| /' conftest.$ac_ext >&5
5799
Martin v. Löwiseba40652007-08-30 20:10:57 +00005800 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005802
5803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005805ac_res=`eval echo '${'$as_ac_Header'}'`
5806 { echo "$as_me:$LINENO: result: $ac_res" >&5
5807echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005808if test `eval echo '${'$as_ac_Header'}'` = yes; then
5809 cat >>confdefs.h <<_ACEOF
5810#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5811_ACEOF
5812
5813ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816done
5817# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5818if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005819 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5820echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005821if test "${ac_cv_search_opendir+set}" = set; then
5822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005823else
Martin v. Löwis11437992002-04-12 09:54:03 +00005824 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005825cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005826/* confdefs.h. */
5827_ACEOF
5828cat confdefs.h >>conftest.$ac_ext
5829cat >>conftest.$ac_ext <<_ACEOF
5830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005831
Martin v. Löwiseba40652007-08-30 20:10:57 +00005832/* Override any GCC internal prototype to avoid an error.
5833 Use char because int might match the return type of a GCC
5834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005835#ifdef __cplusplus
5836extern "C"
5837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005838char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005839int
5840main ()
5841{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005842return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005843 ;
5844 return 0;
5845}
5846_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005847for ac_lib in '' dir; do
5848 if test -z "$ac_lib"; then
5849 ac_res="none required"
5850 else
5851 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005852 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853 fi
5854 rm -f conftest.$ac_objext conftest$ac_exeext
5855if { (ac_try="$ac_link"
5856case "(($ac_try" in
5857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5858 *) ac_try_echo=$ac_try;;
5859esac
5860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5861 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005862 ac_status=$?
5863 grep -v '^ *+' conftest.er1 >conftest.err
5864 rm -f conftest.er1
5865 cat conftest.err >&5
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005867 (exit $ac_status); } && {
5868 test -z "$ac_c_werror_flag" ||
5869 test ! -s conftest.err
5870 } && test -s conftest$ac_exeext &&
5871 $as_test_x conftest$ac_exeext; then
5872 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005873else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005874 echo "$as_me: failed program was:" >&5
5875sed 's/^/| /' conftest.$ac_ext >&5
5876
Martin v. Löwiseba40652007-08-30 20:10:57 +00005877
Brett Cannon19fab762007-06-02 03:02:29 +00005878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005879
5880rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5881 conftest$ac_exeext
5882 if test "${ac_cv_search_opendir+set}" = set; then
5883 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005885done
5886if test "${ac_cv_search_opendir+set}" = set; then
5887 :
5888else
5889 ac_cv_search_opendir=no
5890fi
5891rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005892LIBS=$ac_func_search_save_LIBS
5893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005894{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5895echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5896ac_res=$ac_cv_search_opendir
5897if test "$ac_res" != no; then
5898 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005899
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005901
Michael W. Hudson54241132001-12-07 15:38:26 +00005902else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005903 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5904echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005905if test "${ac_cv_search_opendir+set}" = set; then
5906 echo $ECHO_N "(cached) $ECHO_C" >&6
5907else
5908 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005910/* confdefs.h. */
5911_ACEOF
5912cat confdefs.h >>conftest.$ac_ext
5913cat >>conftest.$ac_ext <<_ACEOF
5914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005915
Martin v. Löwiseba40652007-08-30 20:10:57 +00005916/* Override any GCC internal prototype to avoid an error.
5917 Use char because int might match the return type of a GCC
5918 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005919#ifdef __cplusplus
5920extern "C"
5921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005922char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005923int
5924main ()
5925{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005926return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005927 ;
5928 return 0;
5929}
5930_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931for ac_lib in '' x; do
5932 if test -z "$ac_lib"; then
5933 ac_res="none required"
5934 else
5935 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005936 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005937 fi
5938 rm -f conftest.$ac_objext conftest$ac_exeext
5939if { (ac_try="$ac_link"
5940case "(($ac_try" in
5941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5942 *) ac_try_echo=$ac_try;;
5943esac
5944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5945 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005946 ac_status=$?
5947 grep -v '^ *+' conftest.er1 >conftest.err
5948 rm -f conftest.er1
5949 cat conftest.err >&5
5950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005951 (exit $ac_status); } && {
5952 test -z "$ac_c_werror_flag" ||
5953 test ! -s conftest.err
5954 } && test -s conftest$ac_exeext &&
5955 $as_test_x conftest$ac_exeext; then
5956 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005957else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005958 echo "$as_me: failed program was:" >&5
5959sed 's/^/| /' conftest.$ac_ext >&5
5960
Martin v. Löwiseba40652007-08-30 20:10:57 +00005961
Brett Cannon19fab762007-06-02 03:02:29 +00005962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005963
5964rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5965 conftest$ac_exeext
5966 if test "${ac_cv_search_opendir+set}" = set; then
5967 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005969done
5970if test "${ac_cv_search_opendir+set}" = set; then
5971 :
5972else
5973 ac_cv_search_opendir=no
5974fi
5975rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005976LIBS=$ac_func_search_save_LIBS
5977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005978{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5979echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5980ac_res=$ac_cv_search_opendir
5981if test "$ac_res" != no; then
5982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005983
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005984fi
5985
5986fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005987
Martin v. Löwiseba40652007-08-30 20:10:57 +00005988{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5989echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005990if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5991 echo $ECHO_N "(cached) $ECHO_C" >&6
5992else
5993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005994/* confdefs.h. */
5995_ACEOF
5996cat confdefs.h >>conftest.$ac_ext
5997cat >>conftest.$ac_ext <<_ACEOF
5998/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005999#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006000int
6001main ()
6002{
6003return makedev(0, 0);
6004 ;
6005 return 0;
6006}
6007_ACEOF
6008rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009if { (ac_try="$ac_link"
6010case "(($ac_try" in
6011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6012 *) ac_try_echo=$ac_try;;
6013esac
6014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6015 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006017 grep -v '^ *+' conftest.er1 >conftest.err
6018 rm -f conftest.er1
6019 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021 (exit $ac_status); } && {
6022 test -z "$ac_c_werror_flag" ||
6023 test ! -s conftest.err
6024 } && test -s conftest$ac_exeext &&
6025 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026 ac_cv_header_sys_types_h_makedev=yes
6027else
6028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006029sed 's/^/| /' conftest.$ac_ext >&5
6030
Martin v. Löwiseba40652007-08-30 20:10:57 +00006031 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033
6034rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036
6037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006038{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6039echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040
6041if test $ac_cv_header_sys_types_h_makedev = no; then
6042if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006043 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6044echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6046 echo $ECHO_N "(cached) $ECHO_C" >&6
6047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006048{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6049echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050else
6051 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006052{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6053echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006055/* confdefs.h. */
6056_ACEOF
6057cat confdefs.h >>conftest.$ac_ext
6058cat >>conftest.$ac_ext <<_ACEOF
6059/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060$ac_includes_default
6061#include <sys/mkdev.h>
6062_ACEOF
6063rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006064if { (ac_try="$ac_compile"
6065case "(($ac_try" in
6066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6067 *) ac_try_echo=$ac_try;;
6068esac
6069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006072 grep -v '^ *+' conftest.er1 >conftest.err
6073 rm -f conftest.er1
6074 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006076 (exit $ac_status); } && {
6077 test -z "$ac_c_werror_flag" ||
6078 test ! -s conftest.err
6079 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080 ac_header_compiler=yes
6081else
6082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006083sed 's/^/| /' conftest.$ac_ext >&5
6084
Martin v. Löwiseba40652007-08-30 20:10:57 +00006085 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006087
6088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6089{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6090echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091
6092# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006093{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6094echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006096/* confdefs.h. */
6097_ACEOF
6098cat confdefs.h >>conftest.$ac_ext
6099cat >>conftest.$ac_ext <<_ACEOF
6100/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101#include <sys/mkdev.h>
6102_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006103if { (ac_try="$ac_cpp conftest.$ac_ext"
6104case "(($ac_try" in
6105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6106 *) ac_try_echo=$ac_try;;
6107esac
6108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6109 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006110 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006111 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112 rm -f conftest.er1
6113 cat conftest.err >&5
6114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006115 (exit $ac_status); } >/dev/null && {
6116 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6117 test ! -s conftest.err
6118 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 ac_header_preproc=yes
6120else
6121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006122sed 's/^/| /' conftest.$ac_ext >&5
6123
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124 ac_header_preproc=no
6125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006126
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006127rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006128{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6129echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130
6131# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006132case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6133 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6135echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6138 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006139 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006140 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006141 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6142echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006143 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6144echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6145 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6146echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6147 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6148echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006149 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6150echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006151 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6152echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006153 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006154## ------------------------------------------------ ##
6155## Report this to http://www.python.org/python-bugs ##
6156## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006157_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006158 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006159 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6162echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6164 echo $ECHO_N "(cached) $ECHO_C" >&6
6165else
6166 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006168{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6169echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170
6171fi
6172if test $ac_cv_header_sys_mkdev_h = yes; then
6173
6174cat >>confdefs.h <<\_ACEOF
6175#define MAJOR_IN_MKDEV 1
6176_ACEOF
6177
6178fi
6179
6180
6181
6182 if test $ac_cv_header_sys_mkdev_h = no; then
6183 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006184 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6185echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6187 echo $ECHO_N "(cached) $ECHO_C" >&6
6188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006189{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6190echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191else
6192 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006193{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6194echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006196/* confdefs.h. */
6197_ACEOF
6198cat confdefs.h >>conftest.$ac_ext
6199cat >>conftest.$ac_ext <<_ACEOF
6200/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201$ac_includes_default
6202#include <sys/sysmacros.h>
6203_ACEOF
6204rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006205if { (ac_try="$ac_compile"
6206case "(($ac_try" in
6207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6208 *) ac_try_echo=$ac_try;;
6209esac
6210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006213 grep -v '^ *+' conftest.er1 >conftest.err
6214 rm -f conftest.er1
6215 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006217 (exit $ac_status); } && {
6218 test -z "$ac_c_werror_flag" ||
6219 test ! -s conftest.err
6220 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221 ac_header_compiler=yes
6222else
6223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006224sed 's/^/| /' conftest.$ac_ext >&5
6225
Martin v. Löwiseba40652007-08-30 20:10:57 +00006226 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006228
6229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6230{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6231echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232
6233# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006234{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6235echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006237/* confdefs.h. */
6238_ACEOF
6239cat confdefs.h >>conftest.$ac_ext
6240cat >>conftest.$ac_ext <<_ACEOF
6241/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242#include <sys/sysmacros.h>
6243_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006244if { (ac_try="$ac_cpp conftest.$ac_ext"
6245case "(($ac_try" in
6246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6247 *) ac_try_echo=$ac_try;;
6248esac
6249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6250 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006252 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253 rm -f conftest.er1
6254 cat conftest.err >&5
6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006256 (exit $ac_status); } >/dev/null && {
6257 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6258 test ! -s conftest.err
6259 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 ac_header_preproc=yes
6261else
6262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006263sed 's/^/| /' conftest.$ac_ext >&5
6264
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265 ac_header_preproc=no
6266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006268rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006269{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6270echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271
6272# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006273case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6274 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6276echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006277 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6278echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6279 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006280 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006281 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006282 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6283echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006284 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6285echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6286 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6287echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6288 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6289echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006290 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6291echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006292 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6293echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006294 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006295## ------------------------------------------------ ##
6296## Report this to http://www.python.org/python-bugs ##
6297## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006298_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006299 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006300 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006302{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6303echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6305 echo $ECHO_N "(cached) $ECHO_C" >&6
6306else
6307 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006309{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6310echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006311
6312fi
6313if test $ac_cv_header_sys_sysmacros_h = yes; then
6314
6315cat >>confdefs.h <<\_ACEOF
6316#define MAJOR_IN_SYSMACROS 1
6317_ACEOF
6318
6319fi
6320
6321
6322 fi
6323fi
6324
Michael W. Hudson54241132001-12-07 15:38:26 +00006325
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006326# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006327
6328for ac_header in term.h
6329do
6330as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006331{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6332echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6333if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006334 echo $ECHO_N "(cached) $ECHO_C" >&6
6335else
6336 cat >conftest.$ac_ext <<_ACEOF
6337/* confdefs.h. */
6338_ACEOF
6339cat confdefs.h >>conftest.$ac_ext
6340cat >>conftest.$ac_ext <<_ACEOF
6341/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006342
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006343#ifdef HAVE_CURSES_H
6344#include <curses.h>
6345#endif
6346
6347
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006348#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006349_ACEOF
6350rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006351if { (ac_try="$ac_compile"
6352case "(($ac_try" in
6353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6354 *) ac_try_echo=$ac_try;;
6355esac
6356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358 ac_status=$?
6359 grep -v '^ *+' conftest.er1 >conftest.err
6360 rm -f conftest.er1
6361 cat conftest.err >&5
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006363 (exit $ac_status); } && {
6364 test -z "$ac_c_werror_flag" ||
6365 test ! -s conftest.err
6366 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006367 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006368else
6369 echo "$as_me: failed program was:" >&5
6370sed 's/^/| /' conftest.$ac_ext >&5
6371
Martin v. Löwiseba40652007-08-30 20:10:57 +00006372 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006374
6375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006377ac_res=`eval echo '${'$as_ac_Header'}'`
6378 { echo "$as_me:$LINENO: result: $ac_res" >&5
6379echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006380if test `eval echo '${'$as_ac_Header'}'` = yes; then
6381 cat >>confdefs.h <<_ACEOF
6382#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6383_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006384
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006385fi
6386
6387done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388
6389
Martin v. Löwis11017b12006-01-14 18:12:57 +00006390# On Linux, netlink.h requires asm/types.h
6391
6392for ac_header in linux/netlink.h
6393do
6394as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006395{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6396echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6397if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006398 echo $ECHO_N "(cached) $ECHO_C" >&6
6399else
6400 cat >conftest.$ac_ext <<_ACEOF
6401/* confdefs.h. */
6402_ACEOF
6403cat confdefs.h >>conftest.$ac_ext
6404cat >>conftest.$ac_ext <<_ACEOF
6405/* end confdefs.h. */
6406
6407#ifdef HAVE_ASM_TYPES_H
6408#include <asm/types.h>
6409#endif
6410#ifdef HAVE_SYS_SOCKET_H
6411#include <sys/socket.h>
6412#endif
6413
6414
6415#include <$ac_header>
6416_ACEOF
6417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006418if { (ac_try="$ac_compile"
6419case "(($ac_try" in
6420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6421 *) ac_try_echo=$ac_try;;
6422esac
6423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006425 ac_status=$?
6426 grep -v '^ *+' conftest.er1 >conftest.err
6427 rm -f conftest.er1
6428 cat conftest.err >&5
6429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006430 (exit $ac_status); } && {
6431 test -z "$ac_c_werror_flag" ||
6432 test ! -s conftest.err
6433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006434 eval "$as_ac_Header=yes"
6435else
6436 echo "$as_me: failed program was:" >&5
6437sed 's/^/| /' conftest.$ac_ext >&5
6438
Martin v. Löwiseba40652007-08-30 20:10:57 +00006439 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006441
6442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006444ac_res=`eval echo '${'$as_ac_Header'}'`
6445 { echo "$as_me:$LINENO: result: $ac_res" >&5
6446echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006447if test `eval echo '${'$as_ac_Header'}'` = yes; then
6448 cat >>confdefs.h <<_ACEOF
6449#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6450_ACEOF
6451
6452fi
6453
6454done
6455
6456
Guido van Rossum627b2d71993-12-24 10:39:16 +00006457# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006458was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006459{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6460echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006462/* confdefs.h. */
6463_ACEOF
6464cat confdefs.h >>conftest.$ac_ext
6465cat >>conftest.$ac_ext <<_ACEOF
6466/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006468
6469_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006471 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006472 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006473else
Martin v. Löwis11437992002-04-12 09:54:03 +00006474
6475
6476cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006477#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006478_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006479
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006480
Guido van Rossum627b2d71993-12-24 10:39:16 +00006481fi
6482rm -f conftest*
6483
Martin v. Löwiseba40652007-08-30 20:10:57 +00006484{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6485echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006486
Neal Norwitz11690112002-07-30 01:08:28 +00006487# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006488{ echo "$as_me:$LINENO: checking for makedev" >&5
6489echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006491/* confdefs.h. */
6492_ACEOF
6493cat confdefs.h >>conftest.$ac_ext
6494cat >>conftest.$ac_ext <<_ACEOF
6495/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006496#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006497int
6498main ()
6499{
6500 makedev(0, 0)
6501 ;
6502 return 0;
6503}
6504_ACEOF
6505rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006506if { (ac_try="$ac_link"
6507case "(($ac_try" in
6508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6509 *) ac_try_echo=$ac_try;;
6510esac
6511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6512 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006514 grep -v '^ *+' conftest.er1 >conftest.err
6515 rm -f conftest.er1
6516 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006518 (exit $ac_status); } && {
6519 test -z "$ac_c_werror_flag" ||
6520 test ! -s conftest.err
6521 } && test -s conftest$ac_exeext &&
6522 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006523 ac_cv_has_makedev=yes
6524else
6525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006526sed 's/^/| /' conftest.$ac_ext >&5
6527
Martin v. Löwiseba40652007-08-30 20:10:57 +00006528 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006530
6531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006532 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006533if test "$ac_cv_has_makedev" = "no"; then
6534 # we didn't link, try if _OSF_SOURCE will allow us to link
6535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006536/* confdefs.h. */
6537_ACEOF
6538cat confdefs.h >>conftest.$ac_ext
6539cat >>conftest.$ac_ext <<_ACEOF
6540/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006541
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006542#define _OSF_SOURCE 1
6543#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006544
Neal Norwitz11690112002-07-30 01:08:28 +00006545int
6546main ()
6547{
6548 makedev(0, 0)
6549 ;
6550 return 0;
6551}
6552_ACEOF
6553rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006554if { (ac_try="$ac_link"
6555case "(($ac_try" in
6556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6557 *) ac_try_echo=$ac_try;;
6558esac
6559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6560 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006562 grep -v '^ *+' conftest.er1 >conftest.err
6563 rm -f conftest.er1
6564 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566 (exit $ac_status); } && {
6567 test -z "$ac_c_werror_flag" ||
6568 test ! -s conftest.err
6569 } && test -s conftest$ac_exeext &&
6570 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006571 ac_cv_has_makedev=yes
6572else
6573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006574sed 's/^/| /' conftest.$ac_ext >&5
6575
Martin v. Löwiseba40652007-08-30 20:10:57 +00006576 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006578
6579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006580 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006581 if test "$ac_cv_has_makedev" = "yes"; then
6582
6583cat >>confdefs.h <<\_ACEOF
6584#define _OSF_SOURCE 1
6585_ACEOF
6586
6587 fi
6588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006589{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6590echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006591if test "$ac_cv_has_makedev" = "yes"; then
6592
6593cat >>confdefs.h <<\_ACEOF
6594#define HAVE_MAKEDEV 1
6595_ACEOF
6596
6597fi
6598
Martin v. Löwis399a6892002-10-04 10:22:02 +00006599# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6600# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6601# defined, but the compiler does not support pragma redefine_extname,
6602# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6603# structures (such as rlimit64) without declaring them. As a
6604# work-around, disable LFS on such configurations
6605
6606use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006607{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6608echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006610/* confdefs.h. */
6611_ACEOF
6612cat confdefs.h >>conftest.$ac_ext
6613cat >>conftest.$ac_ext <<_ACEOF
6614/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006615
6616#define _LARGEFILE_SOURCE 1
6617#define _FILE_OFFSET_BITS 64
6618#include <sys/resource.h>
6619
Martin v. Löwis399a6892002-10-04 10:22:02 +00006620int
6621main ()
6622{
6623struct rlimit foo;
6624 ;
6625 return 0;
6626}
6627_ACEOF
6628rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006629if { (ac_try="$ac_compile"
6630case "(($ac_try" in
6631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6632 *) ac_try_echo=$ac_try;;
6633esac
6634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006637 grep -v '^ *+' conftest.er1 >conftest.err
6638 rm -f conftest.er1
6639 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006641 (exit $ac_status); } && {
6642 test -z "$ac_c_werror_flag" ||
6643 test ! -s conftest.err
6644 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006645 sol_lfs_bug=no
6646else
6647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006648sed 's/^/| /' conftest.$ac_ext >&5
6649
Martin v. Löwiseba40652007-08-30 20:10:57 +00006650 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006652
6653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6654{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6655echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006656if test "$sol_lfs_bug" = "yes"; then
6657 use_lfs=no
6658fi
6659
6660if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006661# Two defines needed to enable largefile support on various platforms
6662# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006663
Martin v. Löwis11437992002-04-12 09:54:03 +00006664cat >>confdefs.h <<\_ACEOF
6665#define _LARGEFILE_SOURCE 1
6666_ACEOF
6667
6668
6669cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006670#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006671_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006672
Martin v. Löwis399a6892002-10-04 10:22:02 +00006673fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006674
Guido van Rossum84e7b241996-08-19 21:59:00 +00006675# Add some code to confdefs.h so that the test for off_t works on SCO
6676cat >> confdefs.h <<\EOF
6677#if defined(SCO_DS)
6678#undef _OFF_T
6679#endif
6680EOF
6681
Guido van Rossumef2255b2000-03-10 22:30:29 +00006682# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683{ echo "$as_me:$LINENO: checking for mode_t" >&5
6684echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006685if test "${ac_cv_type_mode_t+set}" = set; then
6686 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006687else
Martin v. Löwis11437992002-04-12 09:54:03 +00006688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006689/* confdefs.h. */
6690_ACEOF
6691cat confdefs.h >>conftest.$ac_ext
6692cat >>conftest.$ac_ext <<_ACEOF
6693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006694$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006695typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006696int
6697main ()
6698{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006699if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006700 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006701if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006702 return 0;
6703 ;
6704 return 0;
6705}
6706_ACEOF
6707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006708if { (ac_try="$ac_compile"
6709case "(($ac_try" in
6710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6711 *) ac_try_echo=$ac_try;;
6712esac
6713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006716 grep -v '^ *+' conftest.er1 >conftest.err
6717 rm -f conftest.er1
6718 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006720 (exit $ac_status); } && {
6721 test -z "$ac_c_werror_flag" ||
6722 test ! -s conftest.err
6723 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006724 ac_cv_type_mode_t=yes
6725else
Martin v. Löwis11437992002-04-12 09:54:03 +00006726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006727sed 's/^/| /' conftest.$ac_ext >&5
6728
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006731
6732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006734{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6735echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006736if test $ac_cv_type_mode_t = yes; then
6737 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006738else
Martin v. Löwis11437992002-04-12 09:54:03 +00006739
6740cat >>confdefs.h <<_ACEOF
6741#define mode_t int
6742_ACEOF
6743
6744fi
6745
Martin v. Löwiseba40652007-08-30 20:10:57 +00006746{ echo "$as_me:$LINENO: checking for off_t" >&5
6747echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006748if test "${ac_cv_type_off_t+set}" = set; then
6749 echo $ECHO_N "(cached) $ECHO_C" >&6
6750else
6751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006752/* confdefs.h. */
6753_ACEOF
6754cat confdefs.h >>conftest.$ac_ext
6755cat >>conftest.$ac_ext <<_ACEOF
6756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006757$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006758typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006759int
6760main ()
6761{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006763 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006764if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006765 return 0;
6766 ;
6767 return 0;
6768}
6769_ACEOF
6770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006771if { (ac_try="$ac_compile"
6772case "(($ac_try" in
6773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6774 *) ac_try_echo=$ac_try;;
6775esac
6776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006779 grep -v '^ *+' conftest.er1 >conftest.err
6780 rm -f conftest.er1
6781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783 (exit $ac_status); } && {
6784 test -z "$ac_c_werror_flag" ||
6785 test ! -s conftest.err
6786 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006787 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006788else
Martin v. Löwis11437992002-04-12 09:54:03 +00006789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006790sed 's/^/| /' conftest.$ac_ext >&5
6791
Martin v. Löwiseba40652007-08-30 20:10:57 +00006792 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794
6795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006797{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6798echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006799if test $ac_cv_type_off_t = yes; then
6800 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006801else
Martin v. Löwis11437992002-04-12 09:54:03 +00006802
6803cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006804#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006805_ACEOF
6806
6807fi
6808
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809{ echo "$as_me:$LINENO: checking for pid_t" >&5
6810echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006811if test "${ac_cv_type_pid_t+set}" = set; then
6812 echo $ECHO_N "(cached) $ECHO_C" >&6
6813else
6814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006815/* confdefs.h. */
6816_ACEOF
6817cat confdefs.h >>conftest.$ac_ext
6818cat >>conftest.$ac_ext <<_ACEOF
6819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006820$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006821typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006822int
6823main ()
6824{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006825if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006826 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006827if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006828 return 0;
6829 ;
6830 return 0;
6831}
6832_ACEOF
6833rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006834if { (ac_try="$ac_compile"
6835case "(($ac_try" in
6836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6837 *) ac_try_echo=$ac_try;;
6838esac
6839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006842 grep -v '^ *+' conftest.er1 >conftest.err
6843 rm -f conftest.er1
6844 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006846 (exit $ac_status); } && {
6847 test -z "$ac_c_werror_flag" ||
6848 test ! -s conftest.err
6849 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006850 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006851else
Martin v. Löwis11437992002-04-12 09:54:03 +00006852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006853sed 's/^/| /' conftest.$ac_ext >&5
6854
Martin v. Löwiseba40652007-08-30 20:10:57 +00006855 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006857
6858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006860{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6861echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006862if test $ac_cv_type_pid_t = yes; then
6863 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006864else
Martin v. Löwis11437992002-04-12 09:54:03 +00006865
6866cat >>confdefs.h <<_ACEOF
6867#define pid_t int
6868_ACEOF
6869
6870fi
6871
Martin v. Löwiseba40652007-08-30 20:10:57 +00006872{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6873echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006874if test "${ac_cv_type_signal+set}" = set; then
6875 echo $ECHO_N "(cached) $ECHO_C" >&6
6876else
6877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006878/* confdefs.h. */
6879_ACEOF
6880cat confdefs.h >>conftest.$ac_ext
6881cat >>conftest.$ac_ext <<_ACEOF
6882/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006883#include <sys/types.h>
6884#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886int
6887main ()
6888{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006889return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006890 ;
6891 return 0;
6892}
6893_ACEOF
6894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006895if { (ac_try="$ac_compile"
6896case "(($ac_try" in
6897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6898 *) ac_try_echo=$ac_try;;
6899esac
6900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006903 grep -v '^ *+' conftest.er1 >conftest.err
6904 rm -f conftest.er1
6905 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907 (exit $ac_status); } && {
6908 test -z "$ac_c_werror_flag" ||
6909 test ! -s conftest.err
6910 } && test -s conftest.$ac_objext; then
6911 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006912else
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006914sed 's/^/| /' conftest.$ac_ext >&5
6915
Martin v. Löwiseba40652007-08-30 20:10:57 +00006916 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006918
6919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006921{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6922echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006923
Martin v. Löwis11437992002-04-12 09:54:03 +00006924cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006925#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006926_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006927
Michael W. Hudson54241132001-12-07 15:38:26 +00006928
Martin v. Löwiseba40652007-08-30 20:10:57 +00006929{ echo "$as_me:$LINENO: checking for size_t" >&5
6930echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006931if test "${ac_cv_type_size_t+set}" = set; then
6932 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006933else
Martin v. Löwis11437992002-04-12 09:54:03 +00006934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006935/* confdefs.h. */
6936_ACEOF
6937cat confdefs.h >>conftest.$ac_ext
6938cat >>conftest.$ac_ext <<_ACEOF
6939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006940$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006942int
6943main ()
6944{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006945if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006946 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006947if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006948 return 0;
6949 ;
6950 return 0;
6951}
6952_ACEOF
6953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006954if { (ac_try="$ac_compile"
6955case "(($ac_try" in
6956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6957 *) ac_try_echo=$ac_try;;
6958esac
6959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006962 grep -v '^ *+' conftest.er1 >conftest.err
6963 rm -f conftest.er1
6964 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966 (exit $ac_status); } && {
6967 test -z "$ac_c_werror_flag" ||
6968 test ! -s conftest.err
6969 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006970 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006971else
Martin v. Löwis11437992002-04-12 09:54:03 +00006972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006973sed 's/^/| /' conftest.$ac_ext >&5
6974
Martin v. Löwiseba40652007-08-30 20:10:57 +00006975 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006977
6978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006980{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6981echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006982if test $ac_cv_type_size_t = yes; then
6983 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006984else
Martin v. Löwis11437992002-04-12 09:54:03 +00006985
6986cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006987#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006988_ACEOF
6989
6990fi
6991
Martin v. Löwiseba40652007-08-30 20:10:57 +00006992{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6993echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006994if test "${ac_cv_type_uid_t+set}" = set; then
6995 echo $ECHO_N "(cached) $ECHO_C" >&6
6996else
6997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006998/* confdefs.h. */
6999_ACEOF
7000cat confdefs.h >>conftest.$ac_ext
7001cat >>conftest.$ac_ext <<_ACEOF
7002/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007004
7005_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007007 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007008 ac_cv_type_uid_t=yes
7009else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007010 ac_cv_type_uid_t=no
7011fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007012rm -f conftest*
7013
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007015{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7016echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007017if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007018
Martin v. Löwis11437992002-04-12 09:54:03 +00007019cat >>confdefs.h <<\_ACEOF
7020#define uid_t int
7021_ACEOF
7022
7023
7024cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007025#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007026_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007027
7028fi
7029
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007030
7031 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7032echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
7033if test "${ac_cv_c_uint32_t+set}" = set; then
7034 echo $ECHO_N "(cached) $ECHO_C" >&6
7035else
7036 ac_cv_c_uint32_t=no
7037 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7038 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7039 cat >conftest.$ac_ext <<_ACEOF
7040/* confdefs.h. */
7041_ACEOF
7042cat confdefs.h >>conftest.$ac_ext
7043cat >>conftest.$ac_ext <<_ACEOF
7044/* end confdefs.h. */
7045$ac_includes_default
7046int
7047main ()
7048{
7049static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7050test_array [0] = 0
7051
7052 ;
7053 return 0;
7054}
7055_ACEOF
7056rm -f conftest.$ac_objext
7057if { (ac_try="$ac_compile"
7058case "(($ac_try" in
7059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7060 *) ac_try_echo=$ac_try;;
7061esac
7062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7063 (eval "$ac_compile") 2>conftest.er1
7064 ac_status=$?
7065 grep -v '^ *+' conftest.er1 >conftest.err
7066 rm -f conftest.er1
7067 cat conftest.err >&5
7068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069 (exit $ac_status); } && {
7070 test -z "$ac_c_werror_flag" ||
7071 test ! -s conftest.err
7072 } && test -s conftest.$ac_objext; then
7073 case $ac_type in
7074 uint32_t) ac_cv_c_uint32_t=yes ;;
7075 *) ac_cv_c_uint32_t=$ac_type ;;
7076esac
7077
7078else
7079 echo "$as_me: failed program was:" >&5
7080sed 's/^/| /' conftest.$ac_ext >&5
7081
7082
7083fi
7084
7085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7086 test "$ac_cv_c_uint32_t" != no && break
7087 done
7088fi
7089{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7090echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
7091 case $ac_cv_c_uint32_t in #(
7092 no|yes) ;; #(
7093 *)
7094
7095cat >>confdefs.h <<\_ACEOF
7096#define _UINT32_T 1
7097_ACEOF
7098
7099
7100cat >>confdefs.h <<_ACEOF
7101#define uint32_t $ac_cv_c_uint32_t
7102_ACEOF
7103;;
7104 esac
7105
7106
7107 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7108echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
7109if test "${ac_cv_c_uint64_t+set}" = set; then
7110 echo $ECHO_N "(cached) $ECHO_C" >&6
7111else
7112 ac_cv_c_uint64_t=no
7113 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7114 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7115 cat >conftest.$ac_ext <<_ACEOF
7116/* confdefs.h. */
7117_ACEOF
7118cat confdefs.h >>conftest.$ac_ext
7119cat >>conftest.$ac_ext <<_ACEOF
7120/* end confdefs.h. */
7121$ac_includes_default
7122int
7123main ()
7124{
7125static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7126test_array [0] = 0
7127
7128 ;
7129 return 0;
7130}
7131_ACEOF
7132rm -f conftest.$ac_objext
7133if { (ac_try="$ac_compile"
7134case "(($ac_try" in
7135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7136 *) ac_try_echo=$ac_try;;
7137esac
7138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7139 (eval "$ac_compile") 2>conftest.er1
7140 ac_status=$?
7141 grep -v '^ *+' conftest.er1 >conftest.err
7142 rm -f conftest.er1
7143 cat conftest.err >&5
7144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7145 (exit $ac_status); } && {
7146 test -z "$ac_c_werror_flag" ||
7147 test ! -s conftest.err
7148 } && test -s conftest.$ac_objext; then
7149 case $ac_type in
7150 uint64_t) ac_cv_c_uint64_t=yes ;;
7151 *) ac_cv_c_uint64_t=$ac_type ;;
7152esac
7153
7154else
7155 echo "$as_me: failed program was:" >&5
7156sed 's/^/| /' conftest.$ac_ext >&5
7157
7158
7159fi
7160
7161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7162 test "$ac_cv_c_uint64_t" != no && break
7163 done
7164fi
7165{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7166echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
7167 case $ac_cv_c_uint64_t in #(
7168 no|yes) ;; #(
7169 *)
7170
7171cat >>confdefs.h <<\_ACEOF
7172#define _UINT64_T 1
7173_ACEOF
7174
7175
7176cat >>confdefs.h <<_ACEOF
7177#define uint64_t $ac_cv_c_uint64_t
7178_ACEOF
7179;;
7180 esac
7181
7182
7183 { echo "$as_me:$LINENO: checking for int32_t" >&5
7184echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
7185if test "${ac_cv_c_int32_t+set}" = set; then
7186 echo $ECHO_N "(cached) $ECHO_C" >&6
7187else
7188 ac_cv_c_int32_t=no
7189 for ac_type in 'int32_t' 'int' 'long int' \
7190 'long long int' 'short int' 'signed char'; do
7191 cat >conftest.$ac_ext <<_ACEOF
7192/* confdefs.h. */
7193_ACEOF
7194cat confdefs.h >>conftest.$ac_ext
7195cat >>conftest.$ac_ext <<_ACEOF
7196/* end confdefs.h. */
7197$ac_includes_default
7198int
7199main ()
7200{
7201static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7202test_array [0] = 0
7203
7204 ;
7205 return 0;
7206}
7207_ACEOF
7208rm -f conftest.$ac_objext
7209if { (ac_try="$ac_compile"
7210case "(($ac_try" in
7211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7212 *) ac_try_echo=$ac_try;;
7213esac
7214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7215 (eval "$ac_compile") 2>conftest.er1
7216 ac_status=$?
7217 grep -v '^ *+' conftest.er1 >conftest.err
7218 rm -f conftest.er1
7219 cat conftest.err >&5
7220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7221 (exit $ac_status); } && {
7222 test -z "$ac_c_werror_flag" ||
7223 test ! -s conftest.err
7224 } && test -s conftest.$ac_objext; then
7225 cat >conftest.$ac_ext <<_ACEOF
7226/* confdefs.h. */
7227_ACEOF
7228cat confdefs.h >>conftest.$ac_ext
7229cat >>conftest.$ac_ext <<_ACEOF
7230/* end confdefs.h. */
7231$ac_includes_default
7232int
7233main ()
7234{
7235static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
7236 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
7237test_array [0] = 0
7238
7239 ;
7240 return 0;
7241}
7242_ACEOF
7243rm -f conftest.$ac_objext
7244if { (ac_try="$ac_compile"
7245case "(($ac_try" in
7246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7247 *) ac_try_echo=$ac_try;;
7248esac
7249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7250 (eval "$ac_compile") 2>conftest.er1
7251 ac_status=$?
7252 grep -v '^ *+' conftest.er1 >conftest.err
7253 rm -f conftest.er1
7254 cat conftest.err >&5
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); } && {
7257 test -z "$ac_c_werror_flag" ||
7258 test ! -s conftest.err
7259 } && test -s conftest.$ac_objext; then
7260 :
7261else
7262 echo "$as_me: failed program was:" >&5
7263sed 's/^/| /' conftest.$ac_ext >&5
7264
7265 case $ac_type in
7266 int32_t) ac_cv_c_int32_t=yes ;;
7267 *) ac_cv_c_int32_t=$ac_type ;;
7268esac
7269
7270fi
7271
7272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7273else
7274 echo "$as_me: failed program was:" >&5
7275sed 's/^/| /' conftest.$ac_ext >&5
7276
7277
7278fi
7279
7280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7281 test "$ac_cv_c_int32_t" != no && break
7282 done
7283fi
7284{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7285echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
7286 case $ac_cv_c_int32_t in #(
7287 no|yes) ;; #(
7288 *)
7289
7290cat >>confdefs.h <<_ACEOF
7291#define int32_t $ac_cv_c_int32_t
7292_ACEOF
7293;;
7294 esac
7295
7296
7297 { echo "$as_me:$LINENO: checking for int64_t" >&5
7298echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
7299if test "${ac_cv_c_int64_t+set}" = set; then
7300 echo $ECHO_N "(cached) $ECHO_C" >&6
7301else
7302 ac_cv_c_int64_t=no
7303 for ac_type in 'int64_t' 'int' 'long int' \
7304 'long long int' 'short int' 'signed char'; do
7305 cat >conftest.$ac_ext <<_ACEOF
7306/* confdefs.h. */
7307_ACEOF
7308cat confdefs.h >>conftest.$ac_ext
7309cat >>conftest.$ac_ext <<_ACEOF
7310/* end confdefs.h. */
7311$ac_includes_default
7312int
7313main ()
7314{
7315static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7316test_array [0] = 0
7317
7318 ;
7319 return 0;
7320}
7321_ACEOF
7322rm -f conftest.$ac_objext
7323if { (ac_try="$ac_compile"
7324case "(($ac_try" in
7325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7326 *) ac_try_echo=$ac_try;;
7327esac
7328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7329 (eval "$ac_compile") 2>conftest.er1
7330 ac_status=$?
7331 grep -v '^ *+' conftest.er1 >conftest.err
7332 rm -f conftest.er1
7333 cat conftest.err >&5
7334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7335 (exit $ac_status); } && {
7336 test -z "$ac_c_werror_flag" ||
7337 test ! -s conftest.err
7338 } && test -s conftest.$ac_objext; then
7339 cat >conftest.$ac_ext <<_ACEOF
7340/* confdefs.h. */
7341_ACEOF
7342cat confdefs.h >>conftest.$ac_ext
7343cat >>conftest.$ac_ext <<_ACEOF
7344/* end confdefs.h. */
7345$ac_includes_default
7346int
7347main ()
7348{
7349static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
7350 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
7351test_array [0] = 0
7352
7353 ;
7354 return 0;
7355}
7356_ACEOF
7357rm -f conftest.$ac_objext
7358if { (ac_try="$ac_compile"
7359case "(($ac_try" in
7360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7361 *) ac_try_echo=$ac_try;;
7362esac
7363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7364 (eval "$ac_compile") 2>conftest.er1
7365 ac_status=$?
7366 grep -v '^ *+' conftest.er1 >conftest.err
7367 rm -f conftest.er1
7368 cat conftest.err >&5
7369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7370 (exit $ac_status); } && {
7371 test -z "$ac_c_werror_flag" ||
7372 test ! -s conftest.err
7373 } && test -s conftest.$ac_objext; then
7374 :
7375else
7376 echo "$as_me: failed program was:" >&5
7377sed 's/^/| /' conftest.$ac_ext >&5
7378
7379 case $ac_type in
7380 int64_t) ac_cv_c_int64_t=yes ;;
7381 *) ac_cv_c_int64_t=$ac_type ;;
7382esac
7383
7384fi
7385
7386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7387else
7388 echo "$as_me: failed program was:" >&5
7389sed 's/^/| /' conftest.$ac_ext >&5
7390
7391
7392fi
7393
7394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7395 test "$ac_cv_c_int64_t" != no && break
7396 done
7397fi
7398{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7399echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
7400 case $ac_cv_c_int64_t in #(
7401 no|yes) ;; #(
7402 *)
7403
7404cat >>confdefs.h <<_ACEOF
7405#define int64_t $ac_cv_c_int64_t
7406_ACEOF
7407;;
7408 esac
7409
Martin v. Löwiseba40652007-08-30 20:10:57 +00007410{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7411echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007412if test "${ac_cv_type_ssize_t+set}" = set; then
7413 echo $ECHO_N "(cached) $ECHO_C" >&6
7414else
7415 cat >conftest.$ac_ext <<_ACEOF
7416/* confdefs.h. */
7417_ACEOF
7418cat confdefs.h >>conftest.$ac_ext
7419cat >>conftest.$ac_ext <<_ACEOF
7420/* end confdefs.h. */
7421$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007422typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007423int
7424main ()
7425{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007426if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007427 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007428if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007429 return 0;
7430 ;
7431 return 0;
7432}
7433_ACEOF
7434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007435if { (ac_try="$ac_compile"
7436case "(($ac_try" in
7437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7438 *) ac_try_echo=$ac_try;;
7439esac
7440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007442 ac_status=$?
7443 grep -v '^ *+' conftest.er1 >conftest.err
7444 rm -f conftest.er1
7445 cat conftest.err >&5
7446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007447 (exit $ac_status); } && {
7448 test -z "$ac_c_werror_flag" ||
7449 test ! -s conftest.err
7450 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007451 ac_cv_type_ssize_t=yes
7452else
7453 echo "$as_me: failed program was:" >&5
7454sed 's/^/| /' conftest.$ac_ext >&5
7455
Martin v. Löwiseba40652007-08-30 20:10:57 +00007456 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007458
7459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007461{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7462echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007463if test $ac_cv_type_ssize_t = yes; then
7464
7465cat >>confdefs.h <<\_ACEOF
7466#define HAVE_SSIZE_T 1
7467_ACEOF
7468
7469fi
7470
Jack Jansendd19cf82001-12-06 22:36:17 +00007471
Michael W. Hudson54241132001-12-07 15:38:26 +00007472# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007473# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007474{ echo "$as_me:$LINENO: checking for int" >&5
7475echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007476if test "${ac_cv_type_int+set}" = set; then
7477 echo $ECHO_N "(cached) $ECHO_C" >&6
7478else
7479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007480/* confdefs.h. */
7481_ACEOF
7482cat confdefs.h >>conftest.$ac_ext
7483cat >>conftest.$ac_ext <<_ACEOF
7484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007485$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007486typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007487int
7488main ()
7489{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007490if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007491 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007492if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007493 return 0;
7494 ;
7495 return 0;
7496}
7497_ACEOF
7498rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007499if { (ac_try="$ac_compile"
7500case "(($ac_try" in
7501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7502 *) ac_try_echo=$ac_try;;
7503esac
7504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007507 grep -v '^ *+' conftest.er1 >conftest.err
7508 rm -f conftest.er1
7509 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007511 (exit $ac_status); } && {
7512 test -z "$ac_c_werror_flag" ||
7513 test ! -s conftest.err
7514 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 ac_cv_type_int=yes
7516else
7517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007518sed 's/^/| /' conftest.$ac_ext >&5
7519
Martin v. Löwiseba40652007-08-30 20:10:57 +00007520 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007521fi
Brett Cannon19fab762007-06-02 03:02:29 +00007522
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7524fi
7525{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7526echo "${ECHO_T}$ac_cv_type_int" >&6; }
7527
7528# The cast to long int works around a bug in the HP C Compiler
7529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7531# This bug is HP SR number 8606223364.
7532{ echo "$as_me:$LINENO: checking size of int" >&5
7533echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007534if test "${ac_cv_sizeof_int+set}" = set; then
7535 echo $ECHO_N "(cached) $ECHO_C" >&6
7536else
Martin v. Löwis11437992002-04-12 09:54:03 +00007537 if test "$cross_compiling" = yes; then
7538 # Depending upon the size, compute the lo and hi bounds.
7539cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007540/* confdefs.h. */
7541_ACEOF
7542cat confdefs.h >>conftest.$ac_ext
7543cat >>conftest.$ac_ext <<_ACEOF
7544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007545$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007546 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007547int
7548main ()
7549{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007550static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007551test_array [0] = 0
7552
7553 ;
7554 return 0;
7555}
7556_ACEOF
7557rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007558if { (ac_try="$ac_compile"
7559case "(($ac_try" in
7560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7561 *) ac_try_echo=$ac_try;;
7562esac
7563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007566 grep -v '^ *+' conftest.er1 >conftest.err
7567 rm -f conftest.er1
7568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007570 (exit $ac_status); } && {
7571 test -z "$ac_c_werror_flag" ||
7572 test ! -s conftest.err
7573 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007574 ac_lo=0 ac_mid=0
7575 while :; do
7576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007577/* confdefs.h. */
7578_ACEOF
7579cat confdefs.h >>conftest.$ac_ext
7580cat >>conftest.$ac_ext <<_ACEOF
7581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007582$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007583 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007584int
7585main ()
7586{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007587static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007588test_array [0] = 0
7589
7590 ;
7591 return 0;
7592}
7593_ACEOF
7594rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595if { (ac_try="$ac_compile"
7596case "(($ac_try" in
7597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7598 *) ac_try_echo=$ac_try;;
7599esac
7600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007603 grep -v '^ *+' conftest.er1 >conftest.err
7604 rm -f conftest.er1
7605 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007607 (exit $ac_status); } && {
7608 test -z "$ac_c_werror_flag" ||
7609 test ! -s conftest.err
7610 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 ac_hi=$ac_mid; break
7612else
7613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007614sed 's/^/| /' conftest.$ac_ext >&5
7615
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616 ac_lo=`expr $ac_mid + 1`
7617 if test $ac_lo -le $ac_mid; then
7618 ac_lo= ac_hi=
7619 break
7620 fi
7621 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007623
7624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007625 done
7626else
7627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007628sed 's/^/| /' conftest.$ac_ext >&5
7629
Martin v. Löwiseba40652007-08-30 20:10:57 +00007630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007631/* confdefs.h. */
7632_ACEOF
7633cat confdefs.h >>conftest.$ac_ext
7634cat >>conftest.$ac_ext <<_ACEOF
7635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007636$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007637 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007638int
7639main ()
7640{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007642test_array [0] = 0
7643
7644 ;
7645 return 0;
7646}
7647_ACEOF
7648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649if { (ac_try="$ac_compile"
7650case "(($ac_try" in
7651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7652 *) ac_try_echo=$ac_try;;
7653esac
7654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007657 grep -v '^ *+' conftest.er1 >conftest.err
7658 rm -f conftest.er1
7659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661 (exit $ac_status); } && {
7662 test -z "$ac_c_werror_flag" ||
7663 test ! -s conftest.err
7664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 ac_hi=-1 ac_mid=-1
7666 while :; do
7667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007668/* confdefs.h. */
7669_ACEOF
7670cat confdefs.h >>conftest.$ac_ext
7671cat >>conftest.$ac_ext <<_ACEOF
7672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007673$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007675int
7676main ()
7677{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007679test_array [0] = 0
7680
7681 ;
7682 return 0;
7683}
7684_ACEOF
7685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686if { (ac_try="$ac_compile"
7687case "(($ac_try" in
7688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7689 *) ac_try_echo=$ac_try;;
7690esac
7691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007694 grep -v '^ *+' conftest.er1 >conftest.err
7695 rm -f conftest.er1
7696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007698 (exit $ac_status); } && {
7699 test -z "$ac_c_werror_flag" ||
7700 test ! -s conftest.err
7701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ac_lo=$ac_mid; break
7703else
7704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007705sed 's/^/| /' conftest.$ac_ext >&5
7706
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707 ac_hi=`expr '(' $ac_mid ')' - 1`
7708 if test $ac_mid -le $ac_hi; then
7709 ac_lo= ac_hi=
7710 break
7711 fi
7712 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714
7715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 done
7717else
7718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007719sed 's/^/| /' conftest.$ac_ext >&5
7720
Martin v. Löwiseba40652007-08-30 20:10:57 +00007721 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723
7724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007726
7727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007728# Binary search between lo and hi bounds.
7729while test "x$ac_lo" != "x$ac_hi"; do
7730 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007732/* confdefs.h. */
7733_ACEOF
7734cat confdefs.h >>conftest.$ac_ext
7735cat >>conftest.$ac_ext <<_ACEOF
7736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007737$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007738 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007739int
7740main ()
7741{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007743test_array [0] = 0
7744
7745 ;
7746 return 0;
7747}
7748_ACEOF
7749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750if { (ac_try="$ac_compile"
7751case "(($ac_try" in
7752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7753 *) ac_try_echo=$ac_try;;
7754esac
7755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007758 grep -v '^ *+' conftest.er1 >conftest.err
7759 rm -f conftest.er1
7760 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762 (exit $ac_status); } && {
7763 test -z "$ac_c_werror_flag" ||
7764 test ! -s conftest.err
7765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 ac_hi=$ac_mid
7767else
7768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007769sed 's/^/| /' conftest.$ac_ext >&5
7770
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773
7774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007775done
7776case $ac_lo in
7777?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778'') if test "$ac_cv_type_int" = yes; then
7779 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007780See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007781echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007782See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783 { (exit 77); exit 77; }; }
7784 else
7785 ac_cv_sizeof_int=0
7786 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007787esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007788else
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* confdefs.h. */
7791_ACEOF
7792cat confdefs.h >>conftest.$ac_ext
7793cat >>conftest.$ac_ext <<_ACEOF
7794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007796 typedef int ac__type_sizeof_;
7797static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7798static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007799#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007800#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007801int
7802main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007803{
Martin v. Löwis11437992002-04-12 09:54:03 +00007804
7805 FILE *f = fopen ("conftest.val", "w");
7806 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007807 return 1;
7808 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007810 long int i = longval ();
7811 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7812 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 fprintf (f, "%ld\n", i);
7814 }
7815 else
7816 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007817 unsigned long int i = ulongval ();
7818 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7819 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 fprintf (f, "%lu\n", i);
7821 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007823
7824 ;
7825 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007826}
Martin v. Löwis11437992002-04-12 09:54:03 +00007827_ACEOF
7828rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007829if { (ac_try="$ac_link"
7830case "(($ac_try" in
7831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7832 *) ac_try_echo=$ac_try;;
7833esac
7834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7835 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007836 ac_status=$?
7837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7838 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007839 { (case "(($ac_try" in
7840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7841 *) ac_try_echo=$ac_try;;
7842esac
7843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7844 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 ac_status=$?
7846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7847 (exit $ac_status); }; }; then
7848 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007849else
Martin v. Löwis11437992002-04-12 09:54:03 +00007850 echo "$as_me: program exited with status $ac_status" >&5
7851echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007852sed 's/^/| /' conftest.$ac_ext >&5
7853
Martin v. Löwis11437992002-04-12 09:54:03 +00007854( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855if test "$ac_cv_type_int" = yes; then
7856 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007857See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007858echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007859See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860 { (exit 77); exit 77; }; }
7861 else
7862 ac_cv_sizeof_int=0
7863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865rm -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 +00007866fi
7867rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7870echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7871
7872
7873
Martin v. Löwis11437992002-04-12 09:54:03 +00007874cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007875#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007876_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007877
7878
Martin v. Löwiseba40652007-08-30 20:10:57 +00007879{ echo "$as_me:$LINENO: checking for long" >&5
7880echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007881if test "${ac_cv_type_long+set}" = set; then
7882 echo $ECHO_N "(cached) $ECHO_C" >&6
7883else
7884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* confdefs.h. */
7886_ACEOF
7887cat confdefs.h >>conftest.$ac_ext
7888cat >>conftest.$ac_ext <<_ACEOF
7889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007891typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007892int
7893main ()
7894{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007895if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007896 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 return 0;
7899 ;
7900 return 0;
7901}
7902_ACEOF
7903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007904if { (ac_try="$ac_compile"
7905case "(($ac_try" in
7906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7907 *) ac_try_echo=$ac_try;;
7908esac
7909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007912 grep -v '^ *+' conftest.er1 >conftest.err
7913 rm -f conftest.er1
7914 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007916 (exit $ac_status); } && {
7917 test -z "$ac_c_werror_flag" ||
7918 test ! -s conftest.err
7919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007920 ac_cv_type_long=yes
7921else
7922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007923sed 's/^/| /' conftest.$ac_ext >&5
7924
Martin v. Löwiseba40652007-08-30 20:10:57 +00007925 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007926fi
Brett Cannon19fab762007-06-02 03:02:29 +00007927
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7929fi
7930{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7931echo "${ECHO_T}$ac_cv_type_long" >&6; }
7932
7933# The cast to long int works around a bug in the HP C Compiler
7934# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7935# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7936# This bug is HP SR number 8606223364.
7937{ echo "$as_me:$LINENO: checking size of long" >&5
7938echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007939if test "${ac_cv_sizeof_long+set}" = set; then
7940 echo $ECHO_N "(cached) $ECHO_C" >&6
7941else
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 if test "$cross_compiling" = yes; then
7943 # Depending upon the size, compute the lo and hi bounds.
7944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007945/* confdefs.h. */
7946_ACEOF
7947cat confdefs.h >>conftest.$ac_ext
7948cat >>conftest.$ac_ext <<_ACEOF
7949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007950$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007951 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007952int
7953main ()
7954{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007955static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007956test_array [0] = 0
7957
7958 ;
7959 return 0;
7960}
7961_ACEOF
7962rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007963if { (ac_try="$ac_compile"
7964case "(($ac_try" in
7965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7966 *) ac_try_echo=$ac_try;;
7967esac
7968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007971 grep -v '^ *+' conftest.er1 >conftest.err
7972 rm -f conftest.er1
7973 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007975 (exit $ac_status); } && {
7976 test -z "$ac_c_werror_flag" ||
7977 test ! -s conftest.err
7978 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ac_lo=0 ac_mid=0
7980 while :; do
7981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007982/* confdefs.h. */
7983_ACEOF
7984cat confdefs.h >>conftest.$ac_ext
7985cat >>conftest.$ac_ext <<_ACEOF
7986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007987$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007988 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007992static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007993test_array [0] = 0
7994
7995 ;
7996 return 0;
7997}
7998_ACEOF
7999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000if { (ac_try="$ac_compile"
8001case "(($ac_try" in
8002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8003 *) ac_try_echo=$ac_try;;
8004esac
8005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008008 grep -v '^ *+' conftest.er1 >conftest.err
8009 rm -f conftest.er1
8010 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012 (exit $ac_status); } && {
8013 test -z "$ac_c_werror_flag" ||
8014 test ! -s conftest.err
8015 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_hi=$ac_mid; break
8017else
8018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008019sed 's/^/| /' conftest.$ac_ext >&5
8020
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021 ac_lo=`expr $ac_mid + 1`
8022 if test $ac_lo -le $ac_mid; then
8023 ac_lo= ac_hi=
8024 break
8025 fi
8026 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008028
8029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 done
8031else
8032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008033sed 's/^/| /' conftest.$ac_ext >&5
8034
Martin v. Löwiseba40652007-08-30 20:10:57 +00008035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008036/* confdefs.h. */
8037_ACEOF
8038cat confdefs.h >>conftest.$ac_ext
8039cat >>conftest.$ac_ext <<_ACEOF
8040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008041$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008042 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008043int
8044main ()
8045{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008046static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008047test_array [0] = 0
8048
8049 ;
8050 return 0;
8051}
8052_ACEOF
8053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054if { (ac_try="$ac_compile"
8055case "(($ac_try" in
8056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8057 *) ac_try_echo=$ac_try;;
8058esac
8059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008062 grep -v '^ *+' conftest.er1 >conftest.err
8063 rm -f conftest.er1
8064 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066 (exit $ac_status); } && {
8067 test -z "$ac_c_werror_flag" ||
8068 test ! -s conftest.err
8069 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 ac_hi=-1 ac_mid=-1
8071 while :; do
8072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008073/* confdefs.h. */
8074_ACEOF
8075cat confdefs.h >>conftest.$ac_ext
8076cat >>conftest.$ac_ext <<_ACEOF
8077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008078$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008079 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008080int
8081main ()
8082{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008083static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008084test_array [0] = 0
8085
8086 ;
8087 return 0;
8088}
8089_ACEOF
8090rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008091if { (ac_try="$ac_compile"
8092case "(($ac_try" in
8093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8094 *) ac_try_echo=$ac_try;;
8095esac
8096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008099 grep -v '^ *+' conftest.er1 >conftest.err
8100 rm -f conftest.er1
8101 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008103 (exit $ac_status); } && {
8104 test -z "$ac_c_werror_flag" ||
8105 test ! -s conftest.err
8106 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 ac_lo=$ac_mid; break
8108else
8109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008110sed 's/^/| /' conftest.$ac_ext >&5
8111
Martin v. Löwiseba40652007-08-30 20:10:57 +00008112 ac_hi=`expr '(' $ac_mid ')' - 1`
8113 if test $ac_mid -le $ac_hi; then
8114 ac_lo= ac_hi=
8115 break
8116 fi
8117 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119
8120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 done
8122else
8123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008124sed 's/^/| /' conftest.$ac_ext >&5
8125
Martin v. Löwiseba40652007-08-30 20:10:57 +00008126 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008128
8129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008131
8132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008133# Binary search between lo and hi bounds.
8134while test "x$ac_lo" != "x$ac_hi"; do
8135 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008137/* confdefs.h. */
8138_ACEOF
8139cat confdefs.h >>conftest.$ac_ext
8140cat >>conftest.$ac_ext <<_ACEOF
8141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008142$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008144int
8145main ()
8146{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008148test_array [0] = 0
8149
8150 ;
8151 return 0;
8152}
8153_ACEOF
8154rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155if { (ac_try="$ac_compile"
8156case "(($ac_try" in
8157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8158 *) ac_try_echo=$ac_try;;
8159esac
8160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008163 grep -v '^ *+' conftest.er1 >conftest.err
8164 rm -f conftest.er1
8165 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167 (exit $ac_status); } && {
8168 test -z "$ac_c_werror_flag" ||
8169 test ! -s conftest.err
8170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 ac_hi=$ac_mid
8172else
8173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008174sed 's/^/| /' conftest.$ac_ext >&5
8175
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178
8179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008180done
8181case $ac_lo in
8182?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008183'') if test "$ac_cv_type_long" = yes; then
8184 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008185See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008186echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008187See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 { (exit 77); exit 77; }; }
8189 else
8190 ac_cv_sizeof_long=0
8191 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008193else
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008195/* confdefs.h. */
8196_ACEOF
8197cat confdefs.h >>conftest.$ac_ext
8198cat >>conftest.$ac_ext <<_ACEOF
8199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008200$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008201 typedef long ac__type_sizeof_;
8202static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8203static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008204#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008205#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
8207main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008208{
Martin v. Löwis11437992002-04-12 09:54:03 +00008209
8210 FILE *f = fopen ("conftest.val", "w");
8211 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008212 return 1;
8213 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215 long int i = longval ();
8216 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8217 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 fprintf (f, "%ld\n", i);
8219 }
8220 else
8221 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008222 unsigned long int i = ulongval ();
8223 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8224 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 fprintf (f, "%lu\n", i);
8226 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008227 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
8229 ;
8230 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008231}
Martin v. Löwis11437992002-04-12 09:54:03 +00008232_ACEOF
8233rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008234if { (ac_try="$ac_link"
8235case "(($ac_try" in
8236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8237 *) ac_try_echo=$ac_try;;
8238esac
8239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8240 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008241 ac_status=$?
8242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008244 { (case "(($ac_try" in
8245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8246 *) ac_try_echo=$ac_try;;
8247esac
8248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8249 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008250 ac_status=$?
8251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8252 (exit $ac_status); }; }; then
8253 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008254else
Martin v. Löwis11437992002-04-12 09:54:03 +00008255 echo "$as_me: program exited with status $ac_status" >&5
8256echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008257sed 's/^/| /' conftest.$ac_ext >&5
8258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008260if test "$ac_cv_type_long" = yes; then
8261 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008262See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008263echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008264See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265 { (exit 77); exit 77; }; }
8266 else
8267 ac_cv_sizeof_long=0
8268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270rm -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 +00008271fi
8272rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8275echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
8276
8277
8278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008280#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008281_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008282
8283
Martin v. Löwiseba40652007-08-30 20:10:57 +00008284{ echo "$as_me:$LINENO: checking for void *" >&5
8285echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008286if test "${ac_cv_type_void_p+set}" = set; then
8287 echo $ECHO_N "(cached) $ECHO_C" >&6
8288else
8289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008290/* confdefs.h. */
8291_ACEOF
8292cat confdefs.h >>conftest.$ac_ext
8293cat >>conftest.$ac_ext <<_ACEOF
8294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008295$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008296typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008297int
8298main ()
8299{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008300if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008301 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 return 0;
8304 ;
8305 return 0;
8306}
8307_ACEOF
8308rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008309if { (ac_try="$ac_compile"
8310case "(($ac_try" in
8311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8312 *) ac_try_echo=$ac_try;;
8313esac
8314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8315 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008317 grep -v '^ *+' conftest.er1 >conftest.err
8318 rm -f conftest.er1
8319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008321 (exit $ac_status); } && {
8322 test -z "$ac_c_werror_flag" ||
8323 test ! -s conftest.err
8324 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 ac_cv_type_void_p=yes
8326else
8327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008328sed 's/^/| /' conftest.$ac_ext >&5
8329
Martin v. Löwiseba40652007-08-30 20:10:57 +00008330 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008331fi
Brett Cannon19fab762007-06-02 03:02:29 +00008332
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8334fi
8335{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8336echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8337
8338# The cast to long int works around a bug in the HP C Compiler
8339# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8340# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8341# This bug is HP SR number 8606223364.
8342{ echo "$as_me:$LINENO: checking size of void *" >&5
8343echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008344if test "${ac_cv_sizeof_void_p+set}" = set; then
8345 echo $ECHO_N "(cached) $ECHO_C" >&6
8346else
Martin v. Löwis11437992002-04-12 09:54:03 +00008347 if test "$cross_compiling" = yes; then
8348 # Depending upon the size, compute the lo and hi bounds.
8349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008350/* confdefs.h. */
8351_ACEOF
8352cat confdefs.h >>conftest.$ac_ext
8353cat >>conftest.$ac_ext <<_ACEOF
8354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008355$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008356 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008357int
8358main ()
8359{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008360static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008361test_array [0] = 0
8362
8363 ;
8364 return 0;
8365}
8366_ACEOF
8367rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008368if { (ac_try="$ac_compile"
8369case "(($ac_try" in
8370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8371 *) ac_try_echo=$ac_try;;
8372esac
8373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008376 grep -v '^ *+' conftest.er1 >conftest.err
8377 rm -f conftest.er1
8378 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008380 (exit $ac_status); } && {
8381 test -z "$ac_c_werror_flag" ||
8382 test ! -s conftest.err
8383 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 ac_lo=0 ac_mid=0
8385 while :; do
8386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008387/* confdefs.h. */
8388_ACEOF
8389cat confdefs.h >>conftest.$ac_ext
8390cat >>conftest.$ac_ext <<_ACEOF
8391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008392$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008393 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008394int
8395main ()
8396{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008397static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008398test_array [0] = 0
8399
8400 ;
8401 return 0;
8402}
8403_ACEOF
8404rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405if { (ac_try="$ac_compile"
8406case "(($ac_try" in
8407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8408 *) ac_try_echo=$ac_try;;
8409esac
8410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008413 grep -v '^ *+' conftest.er1 >conftest.err
8414 rm -f conftest.er1
8415 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008417 (exit $ac_status); } && {
8418 test -z "$ac_c_werror_flag" ||
8419 test ! -s conftest.err
8420 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ac_hi=$ac_mid; break
8422else
8423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008424sed 's/^/| /' conftest.$ac_ext >&5
8425
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426 ac_lo=`expr $ac_mid + 1`
8427 if test $ac_lo -le $ac_mid; then
8428 ac_lo= ac_hi=
8429 break
8430 fi
8431 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008433
8434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 done
8436else
8437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008438sed 's/^/| /' conftest.$ac_ext >&5
8439
Martin v. Löwiseba40652007-08-30 20:10:57 +00008440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* confdefs.h. */
8442_ACEOF
8443cat confdefs.h >>conftest.$ac_ext
8444cat >>conftest.$ac_ext <<_ACEOF
8445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008446$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008448int
8449main ()
8450{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008451static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008452test_array [0] = 0
8453
8454 ;
8455 return 0;
8456}
8457_ACEOF
8458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459if { (ac_try="$ac_compile"
8460case "(($ac_try" in
8461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8462 *) ac_try_echo=$ac_try;;
8463esac
8464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008467 grep -v '^ *+' conftest.er1 >conftest.err
8468 rm -f conftest.er1
8469 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471 (exit $ac_status); } && {
8472 test -z "$ac_c_werror_flag" ||
8473 test ! -s conftest.err
8474 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_hi=-1 ac_mid=-1
8476 while :; do
8477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008478/* confdefs.h. */
8479_ACEOF
8480cat confdefs.h >>conftest.$ac_ext
8481cat >>conftest.$ac_ext <<_ACEOF
8482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008483$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008484 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008485int
8486main ()
8487{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008489test_array [0] = 0
8490
8491 ;
8492 return 0;
8493}
8494_ACEOF
8495rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008496if { (ac_try="$ac_compile"
8497case "(($ac_try" in
8498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8499 *) ac_try_echo=$ac_try;;
8500esac
8501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008504 grep -v '^ *+' conftest.er1 >conftest.err
8505 rm -f conftest.er1
8506 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008508 (exit $ac_status); } && {
8509 test -z "$ac_c_werror_flag" ||
8510 test ! -s conftest.err
8511 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ac_lo=$ac_mid; break
8513else
8514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008515sed 's/^/| /' conftest.$ac_ext >&5
8516
Martin v. Löwiseba40652007-08-30 20:10:57 +00008517 ac_hi=`expr '(' $ac_mid ')' - 1`
8518 if test $ac_mid -le $ac_hi; then
8519 ac_lo= ac_hi=
8520 break
8521 fi
8522 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524
8525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 done
8527else
8528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008529sed 's/^/| /' conftest.$ac_ext >&5
8530
Martin v. Löwiseba40652007-08-30 20:10:57 +00008531 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533
8534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008536
8537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008538# Binary search between lo and hi bounds.
8539while test "x$ac_lo" != "x$ac_hi"; do
8540 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008542/* confdefs.h. */
8543_ACEOF
8544cat confdefs.h >>conftest.$ac_ext
8545cat >>conftest.$ac_ext <<_ACEOF
8546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008547$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008548 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008549int
8550main ()
8551{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008553test_array [0] = 0
8554
8555 ;
8556 return 0;
8557}
8558_ACEOF
8559rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560if { (ac_try="$ac_compile"
8561case "(($ac_try" in
8562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8563 *) ac_try_echo=$ac_try;;
8564esac
8565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008568 grep -v '^ *+' conftest.er1 >conftest.err
8569 rm -f conftest.er1
8570 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572 (exit $ac_status); } && {
8573 test -z "$ac_c_werror_flag" ||
8574 test ! -s conftest.err
8575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 ac_hi=$ac_mid
8577else
8578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008579sed 's/^/| /' conftest.$ac_ext >&5
8580
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583
8584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008585done
8586case $ac_lo in
8587?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008588'') if test "$ac_cv_type_void_p" = yes; then
8589 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008590See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008591echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008592See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593 { (exit 77); exit 77; }; }
8594 else
8595 ac_cv_sizeof_void_p=0
8596 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008597esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008598else
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008600/* confdefs.h. */
8601_ACEOF
8602cat confdefs.h >>conftest.$ac_ext
8603cat >>conftest.$ac_ext <<_ACEOF
8604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008605$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008606 typedef void * ac__type_sizeof_;
8607static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8608static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008609#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008610#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008611int
8612main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008613{
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
8615 FILE *f = fopen ("conftest.val", "w");
8616 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008617 return 1;
8618 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620 long int i = longval ();
8621 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8622 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 fprintf (f, "%ld\n", i);
8624 }
8625 else
8626 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008627 unsigned long int i = ulongval ();
8628 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8629 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 fprintf (f, "%lu\n", i);
8631 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008632 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008633
8634 ;
8635 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008636}
Martin v. Löwis11437992002-04-12 09:54:03 +00008637_ACEOF
8638rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008639if { (ac_try="$ac_link"
8640case "(($ac_try" in
8641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8642 *) ac_try_echo=$ac_try;;
8643esac
8644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8645 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 ac_status=$?
8647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8648 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008649 { (case "(($ac_try" in
8650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8651 *) ac_try_echo=$ac_try;;
8652esac
8653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8654 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 ac_status=$?
8656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657 (exit $ac_status); }; }; then
8658 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008659else
Martin v. Löwis11437992002-04-12 09:54:03 +00008660 echo "$as_me: program exited with status $ac_status" >&5
8661echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008662sed 's/^/| /' conftest.$ac_ext >&5
8663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008665if test "$ac_cv_type_void_p" = yes; then
8666 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008667See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008668echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008669See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670 { (exit 77); exit 77; }; }
8671 else
8672 ac_cv_sizeof_void_p=0
8673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675rm -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 +00008676fi
8677rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8680echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8681
8682
8683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008685#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008686_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008687
8688
Martin v. Löwiseba40652007-08-30 20:10:57 +00008689{ echo "$as_me:$LINENO: checking for short" >&5
8690echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008691if test "${ac_cv_type_short+set}" = set; then
8692 echo $ECHO_N "(cached) $ECHO_C" >&6
8693else
8694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008695/* confdefs.h. */
8696_ACEOF
8697cat confdefs.h >>conftest.$ac_ext
8698cat >>conftest.$ac_ext <<_ACEOF
8699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008700$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008702int
8703main ()
8704{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008705if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008706 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 return 0;
8709 ;
8710 return 0;
8711}
8712_ACEOF
8713rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008714if { (ac_try="$ac_compile"
8715case "(($ac_try" in
8716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8717 *) ac_try_echo=$ac_try;;
8718esac
8719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8720 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008722 grep -v '^ *+' conftest.er1 >conftest.err
8723 rm -f conftest.er1
8724 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008726 (exit $ac_status); } && {
8727 test -z "$ac_c_werror_flag" ||
8728 test ! -s conftest.err
8729 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 ac_cv_type_short=yes
8731else
8732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008733sed 's/^/| /' conftest.$ac_ext >&5
8734
Martin v. Löwiseba40652007-08-30 20:10:57 +00008735 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008736fi
Brett Cannon19fab762007-06-02 03:02:29 +00008737
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8739fi
8740{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8741echo "${ECHO_T}$ac_cv_type_short" >&6; }
8742
8743# The cast to long int works around a bug in the HP C Compiler
8744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8746# This bug is HP SR number 8606223364.
8747{ echo "$as_me:$LINENO: checking size of short" >&5
8748echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008749if test "${ac_cv_sizeof_short+set}" = set; then
8750 echo $ECHO_N "(cached) $ECHO_C" >&6
8751else
Martin v. Löwis11437992002-04-12 09:54:03 +00008752 if test "$cross_compiling" = yes; then
8753 # Depending upon the size, compute the lo and hi bounds.
8754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008755/* confdefs.h. */
8756_ACEOF
8757cat confdefs.h >>conftest.$ac_ext
8758cat >>conftest.$ac_ext <<_ACEOF
8759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008760$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008761 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008762int
8763main ()
8764{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008766test_array [0] = 0
8767
8768 ;
8769 return 0;
8770}
8771_ACEOF
8772rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008773if { (ac_try="$ac_compile"
8774case "(($ac_try" in
8775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8776 *) ac_try_echo=$ac_try;;
8777esac
8778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008781 grep -v '^ *+' conftest.er1 >conftest.err
8782 rm -f conftest.er1
8783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008785 (exit $ac_status); } && {
8786 test -z "$ac_c_werror_flag" ||
8787 test ! -s conftest.err
8788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 ac_lo=0 ac_mid=0
8790 while :; do
8791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008792/* confdefs.h. */
8793_ACEOF
8794cat confdefs.h >>conftest.$ac_ext
8795cat >>conftest.$ac_ext <<_ACEOF
8796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008797$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008798 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008799int
8800main ()
8801{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008803test_array [0] = 0
8804
8805 ;
8806 return 0;
8807}
8808_ACEOF
8809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810if { (ac_try="$ac_compile"
8811case "(($ac_try" in
8812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8813 *) ac_try_echo=$ac_try;;
8814esac
8815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008818 grep -v '^ *+' conftest.er1 >conftest.err
8819 rm -f conftest.er1
8820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008822 (exit $ac_status); } && {
8823 test -z "$ac_c_werror_flag" ||
8824 test ! -s conftest.err
8825 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ac_hi=$ac_mid; break
8827else
8828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008829sed 's/^/| /' conftest.$ac_ext >&5
8830
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831 ac_lo=`expr $ac_mid + 1`
8832 if test $ac_lo -le $ac_mid; then
8833 ac_lo= ac_hi=
8834 break
8835 fi
8836 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838
8839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008840 done
8841else
8842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008843sed 's/^/| /' conftest.$ac_ext >&5
8844
Martin v. Löwiseba40652007-08-30 20:10:57 +00008845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008846/* confdefs.h. */
8847_ACEOF
8848cat confdefs.h >>conftest.$ac_ext
8849cat >>conftest.$ac_ext <<_ACEOF
8850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008851$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008852 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008853int
8854main ()
8855{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008856static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008857test_array [0] = 0
8858
8859 ;
8860 return 0;
8861}
8862_ACEOF
8863rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864if { (ac_try="$ac_compile"
8865case "(($ac_try" in
8866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8867 *) ac_try_echo=$ac_try;;
8868esac
8869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008872 grep -v '^ *+' conftest.er1 >conftest.err
8873 rm -f conftest.er1
8874 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876 (exit $ac_status); } && {
8877 test -z "$ac_c_werror_flag" ||
8878 test ! -s conftest.err
8879 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_hi=-1 ac_mid=-1
8881 while :; do
8882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* confdefs.h. */
8884_ACEOF
8885cat confdefs.h >>conftest.$ac_ext
8886cat >>conftest.$ac_ext <<_ACEOF
8887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008889 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008890int
8891main ()
8892{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008894test_array [0] = 0
8895
8896 ;
8897 return 0;
8898}
8899_ACEOF
8900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008901if { (ac_try="$ac_compile"
8902case "(($ac_try" in
8903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8904 *) ac_try_echo=$ac_try;;
8905esac
8906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008909 grep -v '^ *+' conftest.er1 >conftest.err
8910 rm -f conftest.er1
8911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008913 (exit $ac_status); } && {
8914 test -z "$ac_c_werror_flag" ||
8915 test ! -s conftest.err
8916 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 ac_lo=$ac_mid; break
8918else
8919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008920sed 's/^/| /' conftest.$ac_ext >&5
8921
Martin v. Löwiseba40652007-08-30 20:10:57 +00008922 ac_hi=`expr '(' $ac_mid ')' - 1`
8923 if test $ac_mid -le $ac_hi; then
8924 ac_lo= ac_hi=
8925 break
8926 fi
8927 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929
8930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008931 done
8932else
8933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008934sed 's/^/| /' conftest.$ac_ext >&5
8935
Martin v. Löwiseba40652007-08-30 20:10:57 +00008936 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938
8939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008941
8942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008943# Binary search between lo and hi bounds.
8944while test "x$ac_lo" != "x$ac_hi"; do
8945 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008947/* confdefs.h. */
8948_ACEOF
8949cat confdefs.h >>conftest.$ac_ext
8950cat >>conftest.$ac_ext <<_ACEOF
8951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008952$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008954int
8955main ()
8956{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008958test_array [0] = 0
8959
8960 ;
8961 return 0;
8962}
8963_ACEOF
8964rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965if { (ac_try="$ac_compile"
8966case "(($ac_try" in
8967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8968 *) ac_try_echo=$ac_try;;
8969esac
8970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008973 grep -v '^ *+' conftest.er1 >conftest.err
8974 rm -f conftest.er1
8975 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977 (exit $ac_status); } && {
8978 test -z "$ac_c_werror_flag" ||
8979 test ! -s conftest.err
8980 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ac_hi=$ac_mid
8982else
8983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008984sed 's/^/| /' conftest.$ac_ext >&5
8985
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988
8989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008990done
8991case $ac_lo in
8992?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993'') if test "$ac_cv_type_short" = yes; then
8994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008995See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008996echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008997See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998 { (exit 77); exit 77; }; }
8999 else
9000 ac_cv_sizeof_short=0
9001 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009002esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009003else
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* confdefs.h. */
9006_ACEOF
9007cat confdefs.h >>conftest.$ac_ext
9008cat >>conftest.$ac_ext <<_ACEOF
9009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009010$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009011 typedef short ac__type_sizeof_;
9012static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9013static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009014#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009015#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009016int
9017main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009018{
Martin v. Löwis11437992002-04-12 09:54:03 +00009019
9020 FILE *f = fopen ("conftest.val", "w");
9021 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009022 return 1;
9023 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 long int i = longval ();
9026 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9027 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 fprintf (f, "%ld\n", i);
9029 }
9030 else
9031 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009032 unsigned long int i = ulongval ();
9033 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9034 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 fprintf (f, "%lu\n", i);
9036 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009037 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009038
9039 ;
9040 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009041}
Martin v. Löwis11437992002-04-12 09:54:03 +00009042_ACEOF
9043rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009044if { (ac_try="$ac_link"
9045case "(($ac_try" in
9046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9047 *) ac_try_echo=$ac_try;;
9048esac
9049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9050 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 ac_status=$?
9052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009054 { (case "(($ac_try" in
9055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9056 *) ac_try_echo=$ac_try;;
9057esac
9058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9059 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 ac_status=$?
9061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9062 (exit $ac_status); }; }; then
9063 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009064else
Martin v. Löwis11437992002-04-12 09:54:03 +00009065 echo "$as_me: program exited with status $ac_status" >&5
9066echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009067sed 's/^/| /' conftest.$ac_ext >&5
9068
Martin v. Löwis11437992002-04-12 09:54:03 +00009069( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070if test "$ac_cv_type_short" = yes; then
9071 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009072See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009073echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009074See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075 { (exit 77); exit 77; }; }
9076 else
9077 ac_cv_sizeof_short=0
9078 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080rm -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 +00009081fi
9082rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9085echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
9086
9087
9088
Martin v. Löwis11437992002-04-12 09:54:03 +00009089cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009090#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009091_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009092
9093
Martin v. Löwiseba40652007-08-30 20:10:57 +00009094{ echo "$as_me:$LINENO: checking for float" >&5
9095echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009096if test "${ac_cv_type_float+set}" = set; then
9097 echo $ECHO_N "(cached) $ECHO_C" >&6
9098else
9099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009100/* confdefs.h. */
9101_ACEOF
9102cat confdefs.h >>conftest.$ac_ext
9103cat >>conftest.$ac_ext <<_ACEOF
9104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009105$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009107int
9108main ()
9109{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009110if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009111 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 return 0;
9114 ;
9115 return 0;
9116}
9117_ACEOF
9118rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009119if { (ac_try="$ac_compile"
9120case "(($ac_try" in
9121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9122 *) ac_try_echo=$ac_try;;
9123esac
9124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9125 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009127 grep -v '^ *+' conftest.er1 >conftest.err
9128 rm -f conftest.er1
9129 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009131 (exit $ac_status); } && {
9132 test -z "$ac_c_werror_flag" ||
9133 test ! -s conftest.err
9134 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 ac_cv_type_float=yes
9136else
9137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009138sed 's/^/| /' conftest.$ac_ext >&5
9139
Martin v. Löwiseba40652007-08-30 20:10:57 +00009140 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009141fi
Brett Cannon19fab762007-06-02 03:02:29 +00009142
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9144fi
9145{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9146echo "${ECHO_T}$ac_cv_type_float" >&6; }
9147
9148# The cast to long int works around a bug in the HP C Compiler
9149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9151# This bug is HP SR number 8606223364.
9152{ echo "$as_me:$LINENO: checking size of float" >&5
9153echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009154if test "${ac_cv_sizeof_float+set}" = set; then
9155 echo $ECHO_N "(cached) $ECHO_C" >&6
9156else
Martin v. Löwis11437992002-04-12 09:54:03 +00009157 if test "$cross_compiling" = yes; then
9158 # Depending upon the size, compute the lo and hi bounds.
9159cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009160/* confdefs.h. */
9161_ACEOF
9162cat confdefs.h >>conftest.$ac_ext
9163cat >>conftest.$ac_ext <<_ACEOF
9164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009165$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009166 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009167int
9168main ()
9169{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009170static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009171test_array [0] = 0
9172
9173 ;
9174 return 0;
9175}
9176_ACEOF
9177rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009178if { (ac_try="$ac_compile"
9179case "(($ac_try" in
9180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9181 *) ac_try_echo=$ac_try;;
9182esac
9183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009186 grep -v '^ *+' conftest.er1 >conftest.err
9187 rm -f conftest.er1
9188 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190 (exit $ac_status); } && {
9191 test -z "$ac_c_werror_flag" ||
9192 test ! -s conftest.err
9193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 ac_lo=0 ac_mid=0
9195 while :; do
9196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009197/* confdefs.h. */
9198_ACEOF
9199cat confdefs.h >>conftest.$ac_ext
9200cat >>conftest.$ac_ext <<_ACEOF
9201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009202$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009203 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009204int
9205main ()
9206{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009207static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009208test_array [0] = 0
9209
9210 ;
9211 return 0;
9212}
9213_ACEOF
9214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215if { (ac_try="$ac_compile"
9216case "(($ac_try" in
9217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9218 *) ac_try_echo=$ac_try;;
9219esac
9220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009223 grep -v '^ *+' conftest.er1 >conftest.err
9224 rm -f conftest.er1
9225 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009227 (exit $ac_status); } && {
9228 test -z "$ac_c_werror_flag" ||
9229 test ! -s conftest.err
9230 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ac_hi=$ac_mid; break
9232else
9233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009234sed 's/^/| /' conftest.$ac_ext >&5
9235
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236 ac_lo=`expr $ac_mid + 1`
9237 if test $ac_lo -le $ac_mid; then
9238 ac_lo= ac_hi=
9239 break
9240 fi
9241 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009243
9244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 done
9246else
9247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009248sed 's/^/| /' conftest.$ac_ext >&5
9249
Martin v. Löwiseba40652007-08-30 20:10:57 +00009250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009251/* confdefs.h. */
9252_ACEOF
9253cat confdefs.h >>conftest.$ac_ext
9254cat >>conftest.$ac_ext <<_ACEOF
9255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009256$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009257 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009258int
9259main ()
9260{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009262test_array [0] = 0
9263
9264 ;
9265 return 0;
9266}
9267_ACEOF
9268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269if { (ac_try="$ac_compile"
9270case "(($ac_try" in
9271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9272 *) ac_try_echo=$ac_try;;
9273esac
9274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009277 grep -v '^ *+' conftest.er1 >conftest.err
9278 rm -f conftest.er1
9279 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281 (exit $ac_status); } && {
9282 test -z "$ac_c_werror_flag" ||
9283 test ! -s conftest.err
9284 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 ac_hi=-1 ac_mid=-1
9286 while :; do
9287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009288/* confdefs.h. */
9289_ACEOF
9290cat confdefs.h >>conftest.$ac_ext
9291cat >>conftest.$ac_ext <<_ACEOF
9292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009293$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009294 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009295int
9296main ()
9297{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009299test_array [0] = 0
9300
9301 ;
9302 return 0;
9303}
9304_ACEOF
9305rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306if { (ac_try="$ac_compile"
9307case "(($ac_try" in
9308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9309 *) ac_try_echo=$ac_try;;
9310esac
9311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009314 grep -v '^ *+' conftest.er1 >conftest.err
9315 rm -f conftest.er1
9316 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009318 (exit $ac_status); } && {
9319 test -z "$ac_c_werror_flag" ||
9320 test ! -s conftest.err
9321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 ac_lo=$ac_mid; break
9323else
9324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009325sed 's/^/| /' conftest.$ac_ext >&5
9326
Martin v. Löwiseba40652007-08-30 20:10:57 +00009327 ac_hi=`expr '(' $ac_mid ')' - 1`
9328 if test $ac_mid -le $ac_hi; then
9329 ac_lo= ac_hi=
9330 break
9331 fi
9332 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334
9335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009336 done
9337else
9338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009339sed 's/^/| /' conftest.$ac_ext >&5
9340
Martin v. Löwiseba40652007-08-30 20:10:57 +00009341 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343
9344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009346
9347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009348# Binary search between lo and hi bounds.
9349while test "x$ac_lo" != "x$ac_hi"; do
9350 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009352/* confdefs.h. */
9353_ACEOF
9354cat confdefs.h >>conftest.$ac_ext
9355cat >>conftest.$ac_ext <<_ACEOF
9356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009357$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009358 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009359int
9360main ()
9361{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009363test_array [0] = 0
9364
9365 ;
9366 return 0;
9367}
9368_ACEOF
9369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370if { (ac_try="$ac_compile"
9371case "(($ac_try" in
9372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9373 *) ac_try_echo=$ac_try;;
9374esac
9375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009378 grep -v '^ *+' conftest.er1 >conftest.err
9379 rm -f conftest.er1
9380 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382 (exit $ac_status); } && {
9383 test -z "$ac_c_werror_flag" ||
9384 test ! -s conftest.err
9385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 ac_hi=$ac_mid
9387else
9388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009389sed 's/^/| /' conftest.$ac_ext >&5
9390
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393
9394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009395done
9396case $ac_lo in
9397?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398'') if test "$ac_cv_type_float" = yes; then
9399 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009400See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009401echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009402See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403 { (exit 77); exit 77; }; }
9404 else
9405 ac_cv_sizeof_float=0
9406 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009407esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009408else
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* confdefs.h. */
9411_ACEOF
9412cat confdefs.h >>conftest.$ac_ext
9413cat >>conftest.$ac_ext <<_ACEOF
9414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009415$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009416 typedef float ac__type_sizeof_;
9417static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9418static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009419#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009420#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009421int
9422main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009423{
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
9425 FILE *f = fopen ("conftest.val", "w");
9426 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009427 return 1;
9428 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 long int i = longval ();
9431 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9432 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 fprintf (f, "%ld\n", i);
9434 }
9435 else
9436 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009437 unsigned long int i = ulongval ();
9438 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9439 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 fprintf (f, "%lu\n", i);
9441 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009442 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009443
9444 ;
9445 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009446}
Martin v. Löwis11437992002-04-12 09:54:03 +00009447_ACEOF
9448rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009449if { (ac_try="$ac_link"
9450case "(($ac_try" in
9451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9452 *) ac_try_echo=$ac_try;;
9453esac
9454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9455 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 ac_status=$?
9457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9458 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009459 { (case "(($ac_try" in
9460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9461 *) ac_try_echo=$ac_try;;
9462esac
9463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9464 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 ac_status=$?
9466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9467 (exit $ac_status); }; }; then
9468 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009469else
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 echo "$as_me: program exited with status $ac_status" >&5
9471echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009472sed 's/^/| /' conftest.$ac_ext >&5
9473
Martin v. Löwis11437992002-04-12 09:54:03 +00009474( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475if test "$ac_cv_type_float" = yes; then
9476 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009477See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009478echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009479See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480 { (exit 77); exit 77; }; }
9481 else
9482 ac_cv_sizeof_float=0
9483 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485rm -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 +00009486fi
9487rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9490echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9491
9492
9493
Martin v. Löwis11437992002-04-12 09:54:03 +00009494cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009495#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009496_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009497
9498
Martin v. Löwiseba40652007-08-30 20:10:57 +00009499{ echo "$as_me:$LINENO: checking for double" >&5
9500echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009501if test "${ac_cv_type_double+set}" = set; then
9502 echo $ECHO_N "(cached) $ECHO_C" >&6
9503else
9504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009505/* confdefs.h. */
9506_ACEOF
9507cat confdefs.h >>conftest.$ac_ext
9508cat >>conftest.$ac_ext <<_ACEOF
9509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009510$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009512int
9513main ()
9514{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009515if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 return 0;
9519 ;
9520 return 0;
9521}
9522_ACEOF
9523rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009524if { (ac_try="$ac_compile"
9525case "(($ac_try" in
9526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9527 *) ac_try_echo=$ac_try;;
9528esac
9529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9530 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009532 grep -v '^ *+' conftest.er1 >conftest.err
9533 rm -f conftest.er1
9534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009536 (exit $ac_status); } && {
9537 test -z "$ac_c_werror_flag" ||
9538 test ! -s conftest.err
9539 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 ac_cv_type_double=yes
9541else
9542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009543sed 's/^/| /' conftest.$ac_ext >&5
9544
Martin v. Löwiseba40652007-08-30 20:10:57 +00009545 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009546fi
Brett Cannon19fab762007-06-02 03:02:29 +00009547
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9549fi
9550{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9551echo "${ECHO_T}$ac_cv_type_double" >&6; }
9552
9553# The cast to long int works around a bug in the HP C Compiler
9554# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9555# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9556# This bug is HP SR number 8606223364.
9557{ echo "$as_me:$LINENO: checking size of double" >&5
9558echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009559if test "${ac_cv_sizeof_double+set}" = set; then
9560 echo $ECHO_N "(cached) $ECHO_C" >&6
9561else
Martin v. Löwis11437992002-04-12 09:54:03 +00009562 if test "$cross_compiling" = yes; then
9563 # Depending upon the size, compute the lo and hi bounds.
9564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009565/* confdefs.h. */
9566_ACEOF
9567cat confdefs.h >>conftest.$ac_ext
9568cat >>conftest.$ac_ext <<_ACEOF
9569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009570$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009571 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009572int
9573main ()
9574{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009576test_array [0] = 0
9577
9578 ;
9579 return 0;
9580}
9581_ACEOF
9582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009583if { (ac_try="$ac_compile"
9584case "(($ac_try" in
9585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9586 *) ac_try_echo=$ac_try;;
9587esac
9588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009591 grep -v '^ *+' conftest.er1 >conftest.err
9592 rm -f conftest.er1
9593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009595 (exit $ac_status); } && {
9596 test -z "$ac_c_werror_flag" ||
9597 test ! -s conftest.err
9598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 ac_lo=0 ac_mid=0
9600 while :; do
9601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009602/* confdefs.h. */
9603_ACEOF
9604cat confdefs.h >>conftest.$ac_ext
9605cat >>conftest.$ac_ext <<_ACEOF
9606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009607$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009608 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009609int
9610main ()
9611{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009612static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009613test_array [0] = 0
9614
9615 ;
9616 return 0;
9617}
9618_ACEOF
9619rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620if { (ac_try="$ac_compile"
9621case "(($ac_try" in
9622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9623 *) ac_try_echo=$ac_try;;
9624esac
9625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9626 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009628 grep -v '^ *+' conftest.er1 >conftest.err
9629 rm -f conftest.er1
9630 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009632 (exit $ac_status); } && {
9633 test -z "$ac_c_werror_flag" ||
9634 test ! -s conftest.err
9635 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_hi=$ac_mid; break
9637else
9638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009639sed 's/^/| /' conftest.$ac_ext >&5
9640
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641 ac_lo=`expr $ac_mid + 1`
9642 if test $ac_lo -le $ac_mid; then
9643 ac_lo= ac_hi=
9644 break
9645 fi
9646 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648
9649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 done
9651else
9652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009653sed 's/^/| /' conftest.$ac_ext >&5
9654
Martin v. Löwiseba40652007-08-30 20:10:57 +00009655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009656/* confdefs.h. */
9657_ACEOF
9658cat confdefs.h >>conftest.$ac_ext
9659cat >>conftest.$ac_ext <<_ACEOF
9660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009661$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009662 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009663int
9664main ()
9665{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009666static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009667test_array [0] = 0
9668
9669 ;
9670 return 0;
9671}
9672_ACEOF
9673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674if { (ac_try="$ac_compile"
9675case "(($ac_try" in
9676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9677 *) ac_try_echo=$ac_try;;
9678esac
9679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009682 grep -v '^ *+' conftest.er1 >conftest.err
9683 rm -f conftest.er1
9684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686 (exit $ac_status); } && {
9687 test -z "$ac_c_werror_flag" ||
9688 test ! -s conftest.err
9689 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ac_hi=-1 ac_mid=-1
9691 while :; do
9692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009693/* confdefs.h. */
9694_ACEOF
9695cat confdefs.h >>conftest.$ac_ext
9696cat >>conftest.$ac_ext <<_ACEOF
9697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009698$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009699 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009704test_array [0] = 0
9705
9706 ;
9707 return 0;
9708}
9709_ACEOF
9710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009711if { (ac_try="$ac_compile"
9712case "(($ac_try" in
9713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9714 *) ac_try_echo=$ac_try;;
9715esac
9716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009719 grep -v '^ *+' conftest.er1 >conftest.err
9720 rm -f conftest.er1
9721 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009723 (exit $ac_status); } && {
9724 test -z "$ac_c_werror_flag" ||
9725 test ! -s conftest.err
9726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_lo=$ac_mid; break
9728else
9729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009730sed 's/^/| /' conftest.$ac_ext >&5
9731
Martin v. Löwiseba40652007-08-30 20:10:57 +00009732 ac_hi=`expr '(' $ac_mid ')' - 1`
9733 if test $ac_mid -le $ac_hi; then
9734 ac_lo= ac_hi=
9735 break
9736 fi
9737 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739
9740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 done
9742else
9743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009744sed 's/^/| /' conftest.$ac_ext >&5
9745
Martin v. Löwiseba40652007-08-30 20:10:57 +00009746 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009748
9749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009751
9752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009753# Binary search between lo and hi bounds.
9754while test "x$ac_lo" != "x$ac_hi"; do
9755 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009757/* confdefs.h. */
9758_ACEOF
9759cat confdefs.h >>conftest.$ac_ext
9760cat >>conftest.$ac_ext <<_ACEOF
9761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009762$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009763 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009764int
9765main ()
9766{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009767static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009768test_array [0] = 0
9769
9770 ;
9771 return 0;
9772}
9773_ACEOF
9774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775if { (ac_try="$ac_compile"
9776case "(($ac_try" in
9777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9778 *) ac_try_echo=$ac_try;;
9779esac
9780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009783 grep -v '^ *+' conftest.er1 >conftest.err
9784 rm -f conftest.er1
9785 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009787 (exit $ac_status); } && {
9788 test -z "$ac_c_werror_flag" ||
9789 test ! -s conftest.err
9790 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 ac_hi=$ac_mid
9792else
9793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009794sed 's/^/| /' conftest.$ac_ext >&5
9795
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798
9799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009800done
9801case $ac_lo in
9802?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009803'') if test "$ac_cv_type_double" = yes; then
9804 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009805See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009806echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009807See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808 { (exit 77); exit 77; }; }
9809 else
9810 ac_cv_sizeof_double=0
9811 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009812esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009813else
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009815/* confdefs.h. */
9816_ACEOF
9817cat confdefs.h >>conftest.$ac_ext
9818cat >>conftest.$ac_ext <<_ACEOF
9819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009821 typedef double ac__type_sizeof_;
9822static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9823static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009824#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009825#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009826int
9827main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009828{
Martin v. Löwis11437992002-04-12 09:54:03 +00009829
9830 FILE *f = fopen ("conftest.val", "w");
9831 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009832 return 1;
9833 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835 long int i = longval ();
9836 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9837 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 fprintf (f, "%ld\n", i);
9839 }
9840 else
9841 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009842 unsigned long int i = ulongval ();
9843 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9844 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 fprintf (f, "%lu\n", i);
9846 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009848
9849 ;
9850 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009851}
Martin v. Löwis11437992002-04-12 09:54:03 +00009852_ACEOF
9853rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009854if { (ac_try="$ac_link"
9855case "(($ac_try" in
9856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9857 *) ac_try_echo=$ac_try;;
9858esac
9859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9860 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ac_status=$?
9862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009864 { (case "(($ac_try" in
9865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9866 *) ac_try_echo=$ac_try;;
9867esac
9868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9869 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ac_status=$?
9871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872 (exit $ac_status); }; }; then
9873 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009874else
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 echo "$as_me: program exited with status $ac_status" >&5
9876echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009877sed 's/^/| /' conftest.$ac_ext >&5
9878
Martin v. Löwis11437992002-04-12 09:54:03 +00009879( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880if test "$ac_cv_type_double" = yes; then
9881 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009882See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009884See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885 { (exit 77); exit 77; }; }
9886 else
9887 ac_cv_sizeof_double=0
9888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890rm -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 +00009891fi
9892rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9895echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9896
9897
9898
Martin v. Löwis11437992002-04-12 09:54:03 +00009899cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009900#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009901_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009902
9903
Martin v. Löwiseba40652007-08-30 20:10:57 +00009904{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9905echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009906if test "${ac_cv_type_fpos_t+set}" = set; then
9907 echo $ECHO_N "(cached) $ECHO_C" >&6
9908else
9909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009910/* confdefs.h. */
9911_ACEOF
9912cat confdefs.h >>conftest.$ac_ext
9913cat >>conftest.$ac_ext <<_ACEOF
9914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009915$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009916typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009917int
9918main ()
9919{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009920if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 return 0;
9924 ;
9925 return 0;
9926}
9927_ACEOF
9928rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009929if { (ac_try="$ac_compile"
9930case "(($ac_try" in
9931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9932 *) ac_try_echo=$ac_try;;
9933esac
9934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009937 grep -v '^ *+' conftest.er1 >conftest.err
9938 rm -f conftest.er1
9939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009941 (exit $ac_status); } && {
9942 test -z "$ac_c_werror_flag" ||
9943 test ! -s conftest.err
9944 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 ac_cv_type_fpos_t=yes
9946else
9947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009948sed 's/^/| /' conftest.$ac_ext >&5
9949
Martin v. Löwiseba40652007-08-30 20:10:57 +00009950 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009951fi
Brett Cannon19fab762007-06-02 03:02:29 +00009952
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9954fi
9955{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9956echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9957
9958# The cast to long int works around a bug in the HP C Compiler
9959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9961# This bug is HP SR number 8606223364.
9962{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9963echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009964if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9965 echo $ECHO_N "(cached) $ECHO_C" >&6
9966else
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 if test "$cross_compiling" = yes; then
9968 # Depending upon the size, compute the lo and hi bounds.
9969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009970/* confdefs.h. */
9971_ACEOF
9972cat confdefs.h >>conftest.$ac_ext
9973cat >>conftest.$ac_ext <<_ACEOF
9974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009975$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009977int
9978main ()
9979{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009980static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009981test_array [0] = 0
9982
9983 ;
9984 return 0;
9985}
9986_ACEOF
9987rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009988if { (ac_try="$ac_compile"
9989case "(($ac_try" in
9990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9991 *) ac_try_echo=$ac_try;;
9992esac
9993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009996 grep -v '^ *+' conftest.er1 >conftest.err
9997 rm -f conftest.er1
9998 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010000 (exit $ac_status); } && {
10001 test -z "$ac_c_werror_flag" ||
10002 test ! -s conftest.err
10003 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 ac_lo=0 ac_mid=0
10005 while :; do
10006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010007/* confdefs.h. */
10008_ACEOF
10009cat confdefs.h >>conftest.$ac_ext
10010cat >>conftest.$ac_ext <<_ACEOF
10011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010012$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010013 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010014int
10015main ()
10016{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010017static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010018test_array [0] = 0
10019
10020 ;
10021 return 0;
10022}
10023_ACEOF
10024rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025if { (ac_try="$ac_compile"
10026case "(($ac_try" in
10027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10028 *) ac_try_echo=$ac_try;;
10029esac
10030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010033 grep -v '^ *+' conftest.er1 >conftest.err
10034 rm -f conftest.er1
10035 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010037 (exit $ac_status); } && {
10038 test -z "$ac_c_werror_flag" ||
10039 test ! -s conftest.err
10040 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 ac_hi=$ac_mid; break
10042else
10043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010044sed 's/^/| /' conftest.$ac_ext >&5
10045
Martin v. Löwiseba40652007-08-30 20:10:57 +000010046 ac_lo=`expr $ac_mid + 1`
10047 if test $ac_lo -le $ac_mid; then
10048 ac_lo= ac_hi=
10049 break
10050 fi
10051 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010053
10054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 done
10056else
10057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010058sed 's/^/| /' conftest.$ac_ext >&5
10059
Martin v. Löwiseba40652007-08-30 20:10:57 +000010060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010061/* confdefs.h. */
10062_ACEOF
10063cat confdefs.h >>conftest.$ac_ext
10064cat >>conftest.$ac_ext <<_ACEOF
10065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010066$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010067 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010068int
10069main ()
10070{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010071static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010072test_array [0] = 0
10073
10074 ;
10075 return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079if { (ac_try="$ac_compile"
10080case "(($ac_try" in
10081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10082 *) ac_try_echo=$ac_try;;
10083esac
10084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010087 grep -v '^ *+' conftest.er1 >conftest.err
10088 rm -f conftest.er1
10089 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091 (exit $ac_status); } && {
10092 test -z "$ac_c_werror_flag" ||
10093 test ! -s conftest.err
10094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_hi=-1 ac_mid=-1
10096 while :; do
10097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010098/* confdefs.h. */
10099_ACEOF
10100cat confdefs.h >>conftest.$ac_ext
10101cat >>conftest.$ac_ext <<_ACEOF
10102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010103$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010104 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010105int
10106main ()
10107{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010108static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010109test_array [0] = 0
10110
10111 ;
10112 return 0;
10113}
10114_ACEOF
10115rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010116if { (ac_try="$ac_compile"
10117case "(($ac_try" in
10118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10119 *) ac_try_echo=$ac_try;;
10120esac
10121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010124 grep -v '^ *+' conftest.er1 >conftest.err
10125 rm -f conftest.er1
10126 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010128 (exit $ac_status); } && {
10129 test -z "$ac_c_werror_flag" ||
10130 test ! -s conftest.err
10131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ac_lo=$ac_mid; break
10133else
10134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010135sed 's/^/| /' conftest.$ac_ext >&5
10136
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137 ac_hi=`expr '(' $ac_mid ')' - 1`
10138 if test $ac_mid -le $ac_hi; then
10139 ac_lo= ac_hi=
10140 break
10141 fi
10142 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144
10145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 done
10147else
10148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010149sed 's/^/| /' conftest.$ac_ext >&5
10150
Martin v. Löwiseba40652007-08-30 20:10:57 +000010151 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010153
10154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010156
10157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010158# Binary search between lo and hi bounds.
10159while test "x$ac_lo" != "x$ac_hi"; do
10160 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010162/* confdefs.h. */
10163_ACEOF
10164cat confdefs.h >>conftest.$ac_ext
10165cat >>conftest.$ac_ext <<_ACEOF
10166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010167$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010168 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010169int
10170main ()
10171{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010172static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010173test_array [0] = 0
10174
10175 ;
10176 return 0;
10177}
10178_ACEOF
10179rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010180if { (ac_try="$ac_compile"
10181case "(($ac_try" in
10182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10183 *) ac_try_echo=$ac_try;;
10184esac
10185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010188 grep -v '^ *+' conftest.er1 >conftest.err
10189 rm -f conftest.er1
10190 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192 (exit $ac_status); } && {
10193 test -z "$ac_c_werror_flag" ||
10194 test ! -s conftest.err
10195 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 ac_hi=$ac_mid
10197else
10198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010199sed 's/^/| /' conftest.$ac_ext >&5
10200
Martin v. Löwiseba40652007-08-30 20:10:57 +000010201 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203
10204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010205done
10206case $ac_lo in
10207?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010208'') if test "$ac_cv_type_fpos_t" = yes; then
10209 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010210See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010211echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010212See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 { (exit 77); exit 77; }; }
10214 else
10215 ac_cv_sizeof_fpos_t=0
10216 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010217esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010218else
Martin v. Löwis11437992002-04-12 09:54:03 +000010219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* confdefs.h. */
10221_ACEOF
10222cat confdefs.h >>conftest.$ac_ext
10223cat >>conftest.$ac_ext <<_ACEOF
10224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010225$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010226 typedef fpos_t ac__type_sizeof_;
10227static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10228static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010229#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010230#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010231int
10232main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010233{
Martin v. Löwis11437992002-04-12 09:54:03 +000010234
10235 FILE *f = fopen ("conftest.val", "w");
10236 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010237 return 1;
10238 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010240 long int i = longval ();
10241 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10242 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 fprintf (f, "%ld\n", i);
10244 }
10245 else
10246 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010247 unsigned long int i = ulongval ();
10248 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10249 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 fprintf (f, "%lu\n", i);
10251 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010252 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010253
10254 ;
10255 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010256}
Martin v. Löwis11437992002-04-12 09:54:03 +000010257_ACEOF
10258rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010259if { (ac_try="$ac_link"
10260case "(($ac_try" in
10261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10262 *) ac_try_echo=$ac_try;;
10263esac
10264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10265 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_status=$?
10267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010269 { (case "(($ac_try" in
10270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10271 *) ac_try_echo=$ac_try;;
10272esac
10273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10274 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 ac_status=$?
10276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10277 (exit $ac_status); }; }; then
10278 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010279else
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 echo "$as_me: program exited with status $ac_status" >&5
10281echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010282sed 's/^/| /' conftest.$ac_ext >&5
10283
Martin v. Löwis11437992002-04-12 09:54:03 +000010284( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010285if test "$ac_cv_type_fpos_t" = yes; then
10286 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010287See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010288echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010289See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290 { (exit 77); exit 77; }; }
10291 else
10292 ac_cv_sizeof_fpos_t=0
10293 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295rm -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 +000010296fi
10297rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010299{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10300echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
10301
10302
10303
Martin v. Löwis11437992002-04-12 09:54:03 +000010304cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010305#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010306_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010307
Michael W. Hudson54241132001-12-07 15:38:26 +000010308
Martin v. Löwiseba40652007-08-30 20:10:57 +000010309{ echo "$as_me:$LINENO: checking for size_t" >&5
10310echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010311if test "${ac_cv_type_size_t+set}" = set; then
10312 echo $ECHO_N "(cached) $ECHO_C" >&6
10313else
10314 cat >conftest.$ac_ext <<_ACEOF
10315/* confdefs.h. */
10316_ACEOF
10317cat confdefs.h >>conftest.$ac_ext
10318cat >>conftest.$ac_ext <<_ACEOF
10319/* end confdefs.h. */
10320$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010321typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010322int
10323main ()
10324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010325if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010326 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010327if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +000010328 return 0;
10329 ;
10330 return 0;
10331}
10332_ACEOF
10333rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010334if { (ac_try="$ac_compile"
10335case "(($ac_try" in
10336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10337 *) ac_try_echo=$ac_try;;
10338esac
10339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010341 ac_status=$?
10342 grep -v '^ *+' conftest.er1 >conftest.err
10343 rm -f conftest.er1
10344 cat conftest.err >&5
10345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010346 (exit $ac_status); } && {
10347 test -z "$ac_c_werror_flag" ||
10348 test ! -s conftest.err
10349 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010350 ac_cv_type_size_t=yes
10351else
10352 echo "$as_me: failed program was:" >&5
10353sed 's/^/| /' conftest.$ac_ext >&5
10354
Martin v. Löwiseba40652007-08-30 20:10:57 +000010355 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +000010356fi
Brett Cannon19fab762007-06-02 03:02:29 +000010357
Martin v. Löwiseba40652007-08-30 20:10:57 +000010358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10359fi
10360{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10361echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10362
10363# The cast to long int works around a bug in the HP C Compiler
10364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10366# This bug is HP SR number 8606223364.
10367{ echo "$as_me:$LINENO: checking size of size_t" >&5
10368echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010369if test "${ac_cv_sizeof_size_t+set}" = set; then
10370 echo $ECHO_N "(cached) $ECHO_C" >&6
10371else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010372 if test "$cross_compiling" = yes; then
10373 # Depending upon the size, compute the lo and hi bounds.
10374cat >conftest.$ac_ext <<_ACEOF
10375/* confdefs.h. */
10376_ACEOF
10377cat confdefs.h >>conftest.$ac_ext
10378cat >>conftest.$ac_ext <<_ACEOF
10379/* end confdefs.h. */
10380$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010381 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010382int
10383main ()
10384{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010385static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010386test_array [0] = 0
10387
10388 ;
10389 return 0;
10390}
10391_ACEOF
10392rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010393if { (ac_try="$ac_compile"
10394case "(($ac_try" in
10395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10396 *) ac_try_echo=$ac_try;;
10397esac
10398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010400 ac_status=$?
10401 grep -v '^ *+' conftest.er1 >conftest.err
10402 rm -f conftest.er1
10403 cat conftest.err >&5
10404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010405 (exit $ac_status); } && {
10406 test -z "$ac_c_werror_flag" ||
10407 test ! -s conftest.err
10408 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010409 ac_lo=0 ac_mid=0
10410 while :; do
10411 cat >conftest.$ac_ext <<_ACEOF
10412/* confdefs.h. */
10413_ACEOF
10414cat confdefs.h >>conftest.$ac_ext
10415cat >>conftest.$ac_ext <<_ACEOF
10416/* end confdefs.h. */
10417$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010418 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419int
10420main ()
10421{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423test_array [0] = 0
10424
10425 ;
10426 return 0;
10427}
10428_ACEOF
10429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010430if { (ac_try="$ac_compile"
10431case "(($ac_try" in
10432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10433 *) ac_try_echo=$ac_try;;
10434esac
10435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010437 ac_status=$?
10438 grep -v '^ *+' conftest.er1 >conftest.err
10439 rm -f conftest.er1
10440 cat conftest.err >&5
10441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010442 (exit $ac_status); } && {
10443 test -z "$ac_c_werror_flag" ||
10444 test ! -s conftest.err
10445 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010446 ac_hi=$ac_mid; break
10447else
10448 echo "$as_me: failed program was:" >&5
10449sed 's/^/| /' conftest.$ac_ext >&5
10450
Martin v. Löwiseba40652007-08-30 20:10:57 +000010451 ac_lo=`expr $ac_mid + 1`
10452 if test $ac_lo -le $ac_mid; then
10453 ac_lo= ac_hi=
10454 break
10455 fi
10456 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010458
10459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010460 done
10461else
10462 echo "$as_me: failed program was:" >&5
10463sed 's/^/| /' conftest.$ac_ext >&5
10464
Martin v. Löwiseba40652007-08-30 20:10:57 +000010465 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010466/* confdefs.h. */
10467_ACEOF
10468cat confdefs.h >>conftest.$ac_ext
10469cat >>conftest.$ac_ext <<_ACEOF
10470/* end confdefs.h. */
10471$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010472 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010473int
10474main ()
10475{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010476static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477test_array [0] = 0
10478
10479 ;
10480 return 0;
10481}
10482_ACEOF
10483rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010484if { (ac_try="$ac_compile"
10485case "(($ac_try" in
10486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10487 *) ac_try_echo=$ac_try;;
10488esac
10489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491 ac_status=$?
10492 grep -v '^ *+' conftest.er1 >conftest.err
10493 rm -f conftest.er1
10494 cat conftest.err >&5
10495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010496 (exit $ac_status); } && {
10497 test -z "$ac_c_werror_flag" ||
10498 test ! -s conftest.err
10499 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500 ac_hi=-1 ac_mid=-1
10501 while :; do
10502 cat >conftest.$ac_ext <<_ACEOF
10503/* confdefs.h. */
10504_ACEOF
10505cat confdefs.h >>conftest.$ac_ext
10506cat >>conftest.$ac_ext <<_ACEOF
10507/* end confdefs.h. */
10508$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010509 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510int
10511main ()
10512{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010513static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514test_array [0] = 0
10515
10516 ;
10517 return 0;
10518}
10519_ACEOF
10520rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010521if { (ac_try="$ac_compile"
10522case "(($ac_try" in
10523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10524 *) ac_try_echo=$ac_try;;
10525esac
10526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528 ac_status=$?
10529 grep -v '^ *+' conftest.er1 >conftest.err
10530 rm -f conftest.er1
10531 cat conftest.err >&5
10532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010533 (exit $ac_status); } && {
10534 test -z "$ac_c_werror_flag" ||
10535 test ! -s conftest.err
10536 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010537 ac_lo=$ac_mid; break
10538else
10539 echo "$as_me: failed program was:" >&5
10540sed 's/^/| /' conftest.$ac_ext >&5
10541
Martin v. Löwiseba40652007-08-30 20:10:57 +000010542 ac_hi=`expr '(' $ac_mid ')' - 1`
10543 if test $ac_mid -le $ac_hi; then
10544 ac_lo= ac_hi=
10545 break
10546 fi
10547 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010549
10550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010551 done
10552else
10553 echo "$as_me: failed program was:" >&5
10554sed 's/^/| /' conftest.$ac_ext >&5
10555
Martin v. Löwiseba40652007-08-30 20:10:57 +000010556 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010558
10559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010561
10562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563# Binary search between lo and hi bounds.
10564while test "x$ac_lo" != "x$ac_hi"; do
10565 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10566 cat >conftest.$ac_ext <<_ACEOF
10567/* confdefs.h. */
10568_ACEOF
10569cat confdefs.h >>conftest.$ac_ext
10570cat >>conftest.$ac_ext <<_ACEOF
10571/* end confdefs.h. */
10572$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010573 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010574int
10575main ()
10576{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578test_array [0] = 0
10579
10580 ;
10581 return 0;
10582}
10583_ACEOF
10584rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010585if { (ac_try="$ac_compile"
10586case "(($ac_try" in
10587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10588 *) ac_try_echo=$ac_try;;
10589esac
10590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592 ac_status=$?
10593 grep -v '^ *+' conftest.er1 >conftest.err
10594 rm -f conftest.er1
10595 cat conftest.err >&5
10596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010597 (exit $ac_status); } && {
10598 test -z "$ac_c_werror_flag" ||
10599 test ! -s conftest.err
10600 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601 ac_hi=$ac_mid
10602else
10603 echo "$as_me: failed program was:" >&5
10604sed 's/^/| /' conftest.$ac_ext >&5
10605
Martin v. Löwiseba40652007-08-30 20:10:57 +000010606 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608
10609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610done
10611case $ac_lo in
10612?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010613'') if test "$ac_cv_type_size_t" = yes; then
10614 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010616echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010618 { (exit 77); exit 77; }; }
10619 else
10620 ac_cv_sizeof_size_t=0
10621 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622esac
10623else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624 cat >conftest.$ac_ext <<_ACEOF
10625/* confdefs.h. */
10626_ACEOF
10627cat confdefs.h >>conftest.$ac_ext
10628cat >>conftest.$ac_ext <<_ACEOF
10629/* end confdefs.h. */
10630$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010631 typedef size_t ac__type_sizeof_;
10632static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10633static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634#include <stdio.h>
10635#include <stdlib.h>
10636int
10637main ()
10638{
10639
10640 FILE *f = fopen ("conftest.val", "w");
10641 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010642 return 1;
10643 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645 long int i = longval ();
10646 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10647 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648 fprintf (f, "%ld\n", i);
10649 }
10650 else
10651 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010652 unsigned long int i = ulongval ();
10653 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10654 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655 fprintf (f, "%lu\n", i);
10656 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010657 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658
10659 ;
10660 return 0;
10661}
10662_ACEOF
10663rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010664if { (ac_try="$ac_link"
10665case "(($ac_try" in
10666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10667 *) ac_try_echo=$ac_try;;
10668esac
10669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10670 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671 ac_status=$?
10672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010674 { (case "(($ac_try" in
10675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10676 *) ac_try_echo=$ac_try;;
10677esac
10678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10679 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680 ac_status=$?
10681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10682 (exit $ac_status); }; }; then
10683 ac_cv_sizeof_size_t=`cat conftest.val`
10684else
10685 echo "$as_me: program exited with status $ac_status" >&5
10686echo "$as_me: failed program was:" >&5
10687sed 's/^/| /' conftest.$ac_ext >&5
10688
10689( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010690if test "$ac_cv_type_size_t" = yes; then
10691 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695 { (exit 77); exit 77; }; }
10696 else
10697 ac_cv_sizeof_size_t=0
10698 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700rm -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 +000010701fi
10702rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010704{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10705echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10706
10707
10708
Martin v. Löwis18e16552006-02-15 17:27:45 +000010709cat >>confdefs.h <<_ACEOF
10710#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10711_ACEOF
10712
10713
Christian Heimes951cc0f2008-01-31 23:08:23 +000010714{ echo "$as_me:$LINENO: checking for pid_t" >&5
10715echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10716if test "${ac_cv_type_pid_t+set}" = set; then
10717 echo $ECHO_N "(cached) $ECHO_C" >&6
10718else
10719 cat >conftest.$ac_ext <<_ACEOF
10720/* confdefs.h. */
10721_ACEOF
10722cat confdefs.h >>conftest.$ac_ext
10723cat >>conftest.$ac_ext <<_ACEOF
10724/* end confdefs.h. */
10725$ac_includes_default
10726typedef pid_t ac__type_new_;
10727int
10728main ()
10729{
10730if ((ac__type_new_ *) 0)
10731 return 0;
10732if (sizeof (ac__type_new_))
10733 return 0;
10734 ;
10735 return 0;
10736}
10737_ACEOF
10738rm -f conftest.$ac_objext
10739if { (ac_try="$ac_compile"
10740case "(($ac_try" in
10741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10742 *) ac_try_echo=$ac_try;;
10743esac
10744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10745 (eval "$ac_compile") 2>conftest.er1
10746 ac_status=$?
10747 grep -v '^ *+' conftest.er1 >conftest.err
10748 rm -f conftest.er1
10749 cat conftest.err >&5
10750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10751 (exit $ac_status); } && {
10752 test -z "$ac_c_werror_flag" ||
10753 test ! -s conftest.err
10754 } && test -s conftest.$ac_objext; then
10755 ac_cv_type_pid_t=yes
10756else
10757 echo "$as_me: failed program was:" >&5
10758sed 's/^/| /' conftest.$ac_ext >&5
10759
10760 ac_cv_type_pid_t=no
10761fi
10762
10763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10764fi
10765{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10766echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10767
10768# The cast to long int works around a bug in the HP C Compiler
10769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10771# This bug is HP SR number 8606223364.
10772{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10773echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10774if test "${ac_cv_sizeof_pid_t+set}" = set; then
10775 echo $ECHO_N "(cached) $ECHO_C" >&6
10776else
10777 if test "$cross_compiling" = yes; then
10778 # Depending upon the size, compute the lo and hi bounds.
10779cat >conftest.$ac_ext <<_ACEOF
10780/* confdefs.h. */
10781_ACEOF
10782cat confdefs.h >>conftest.$ac_ext
10783cat >>conftest.$ac_ext <<_ACEOF
10784/* end confdefs.h. */
10785$ac_includes_default
10786 typedef pid_t ac__type_sizeof_;
10787int
10788main ()
10789{
10790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10791test_array [0] = 0
10792
10793 ;
10794 return 0;
10795}
10796_ACEOF
10797rm -f conftest.$ac_objext
10798if { (ac_try="$ac_compile"
10799case "(($ac_try" in
10800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10801 *) ac_try_echo=$ac_try;;
10802esac
10803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10804 (eval "$ac_compile") 2>conftest.er1
10805 ac_status=$?
10806 grep -v '^ *+' conftest.er1 >conftest.err
10807 rm -f conftest.er1
10808 cat conftest.err >&5
10809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10810 (exit $ac_status); } && {
10811 test -z "$ac_c_werror_flag" ||
10812 test ! -s conftest.err
10813 } && test -s conftest.$ac_objext; then
10814 ac_lo=0 ac_mid=0
10815 while :; do
10816 cat >conftest.$ac_ext <<_ACEOF
10817/* confdefs.h. */
10818_ACEOF
10819cat confdefs.h >>conftest.$ac_ext
10820cat >>conftest.$ac_ext <<_ACEOF
10821/* end confdefs.h. */
10822$ac_includes_default
10823 typedef pid_t ac__type_sizeof_;
10824int
10825main ()
10826{
10827static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10828test_array [0] = 0
10829
10830 ;
10831 return 0;
10832}
10833_ACEOF
10834rm -f conftest.$ac_objext
10835if { (ac_try="$ac_compile"
10836case "(($ac_try" in
10837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10838 *) ac_try_echo=$ac_try;;
10839esac
10840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10841 (eval "$ac_compile") 2>conftest.er1
10842 ac_status=$?
10843 grep -v '^ *+' conftest.er1 >conftest.err
10844 rm -f conftest.er1
10845 cat conftest.err >&5
10846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10847 (exit $ac_status); } && {
10848 test -z "$ac_c_werror_flag" ||
10849 test ! -s conftest.err
10850 } && test -s conftest.$ac_objext; then
10851 ac_hi=$ac_mid; break
10852else
10853 echo "$as_me: failed program was:" >&5
10854sed 's/^/| /' conftest.$ac_ext >&5
10855
10856 ac_lo=`expr $ac_mid + 1`
10857 if test $ac_lo -le $ac_mid; then
10858 ac_lo= ac_hi=
10859 break
10860 fi
10861 ac_mid=`expr 2 '*' $ac_mid + 1`
10862fi
10863
10864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10865 done
10866else
10867 echo "$as_me: failed program was:" >&5
10868sed 's/^/| /' conftest.$ac_ext >&5
10869
10870 cat >conftest.$ac_ext <<_ACEOF
10871/* confdefs.h. */
10872_ACEOF
10873cat confdefs.h >>conftest.$ac_ext
10874cat >>conftest.$ac_ext <<_ACEOF
10875/* end confdefs.h. */
10876$ac_includes_default
10877 typedef pid_t ac__type_sizeof_;
10878int
10879main ()
10880{
10881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10882test_array [0] = 0
10883
10884 ;
10885 return 0;
10886}
10887_ACEOF
10888rm -f conftest.$ac_objext
10889if { (ac_try="$ac_compile"
10890case "(($ac_try" in
10891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10892 *) ac_try_echo=$ac_try;;
10893esac
10894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10895 (eval "$ac_compile") 2>conftest.er1
10896 ac_status=$?
10897 grep -v '^ *+' conftest.er1 >conftest.err
10898 rm -f conftest.er1
10899 cat conftest.err >&5
10900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10901 (exit $ac_status); } && {
10902 test -z "$ac_c_werror_flag" ||
10903 test ! -s conftest.err
10904 } && test -s conftest.$ac_objext; then
10905 ac_hi=-1 ac_mid=-1
10906 while :; do
10907 cat >conftest.$ac_ext <<_ACEOF
10908/* confdefs.h. */
10909_ACEOF
10910cat confdefs.h >>conftest.$ac_ext
10911cat >>conftest.$ac_ext <<_ACEOF
10912/* end confdefs.h. */
10913$ac_includes_default
10914 typedef pid_t ac__type_sizeof_;
10915int
10916main ()
10917{
10918static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10919test_array [0] = 0
10920
10921 ;
10922 return 0;
10923}
10924_ACEOF
10925rm -f conftest.$ac_objext
10926if { (ac_try="$ac_compile"
10927case "(($ac_try" in
10928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10929 *) ac_try_echo=$ac_try;;
10930esac
10931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10932 (eval "$ac_compile") 2>conftest.er1
10933 ac_status=$?
10934 grep -v '^ *+' conftest.er1 >conftest.err
10935 rm -f conftest.er1
10936 cat conftest.err >&5
10937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10938 (exit $ac_status); } && {
10939 test -z "$ac_c_werror_flag" ||
10940 test ! -s conftest.err
10941 } && test -s conftest.$ac_objext; then
10942 ac_lo=$ac_mid; break
10943else
10944 echo "$as_me: failed program was:" >&5
10945sed 's/^/| /' conftest.$ac_ext >&5
10946
10947 ac_hi=`expr '(' $ac_mid ')' - 1`
10948 if test $ac_mid -le $ac_hi; then
10949 ac_lo= ac_hi=
10950 break
10951 fi
10952 ac_mid=`expr 2 '*' $ac_mid`
10953fi
10954
10955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10956 done
10957else
10958 echo "$as_me: failed program was:" >&5
10959sed 's/^/| /' conftest.$ac_ext >&5
10960
10961 ac_lo= ac_hi=
10962fi
10963
10964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10965fi
10966
10967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10968# Binary search between lo and hi bounds.
10969while test "x$ac_lo" != "x$ac_hi"; do
10970 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10971 cat >conftest.$ac_ext <<_ACEOF
10972/* confdefs.h. */
10973_ACEOF
10974cat confdefs.h >>conftest.$ac_ext
10975cat >>conftest.$ac_ext <<_ACEOF
10976/* end confdefs.h. */
10977$ac_includes_default
10978 typedef pid_t ac__type_sizeof_;
10979int
10980main ()
10981{
10982static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10983test_array [0] = 0
10984
10985 ;
10986 return 0;
10987}
10988_ACEOF
10989rm -f conftest.$ac_objext
10990if { (ac_try="$ac_compile"
10991case "(($ac_try" in
10992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10993 *) ac_try_echo=$ac_try;;
10994esac
10995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10996 (eval "$ac_compile") 2>conftest.er1
10997 ac_status=$?
10998 grep -v '^ *+' conftest.er1 >conftest.err
10999 rm -f conftest.er1
11000 cat conftest.err >&5
11001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11002 (exit $ac_status); } && {
11003 test -z "$ac_c_werror_flag" ||
11004 test ! -s conftest.err
11005 } && test -s conftest.$ac_objext; then
11006 ac_hi=$ac_mid
11007else
11008 echo "$as_me: failed program was:" >&5
11009sed 's/^/| /' conftest.$ac_ext >&5
11010
11011 ac_lo=`expr '(' $ac_mid ')' + 1`
11012fi
11013
11014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11015done
11016case $ac_lo in
11017?*) ac_cv_sizeof_pid_t=$ac_lo;;
11018'') if test "$ac_cv_type_pid_t" = yes; then
11019 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11020See \`config.log' for more details." >&5
11021echo "$as_me: error: cannot compute sizeof (pid_t)
11022See \`config.log' for more details." >&2;}
11023 { (exit 77); exit 77; }; }
11024 else
11025 ac_cv_sizeof_pid_t=0
11026 fi ;;
11027esac
11028else
11029 cat >conftest.$ac_ext <<_ACEOF
11030/* confdefs.h. */
11031_ACEOF
11032cat confdefs.h >>conftest.$ac_ext
11033cat >>conftest.$ac_ext <<_ACEOF
11034/* end confdefs.h. */
11035$ac_includes_default
11036 typedef pid_t ac__type_sizeof_;
11037static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11038static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11039#include <stdio.h>
11040#include <stdlib.h>
11041int
11042main ()
11043{
11044
11045 FILE *f = fopen ("conftest.val", "w");
11046 if (! f)
11047 return 1;
11048 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11049 {
11050 long int i = longval ();
11051 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11052 return 1;
11053 fprintf (f, "%ld\n", i);
11054 }
11055 else
11056 {
11057 unsigned long int i = ulongval ();
11058 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11059 return 1;
11060 fprintf (f, "%lu\n", i);
11061 }
11062 return ferror (f) || fclose (f) != 0;
11063
11064 ;
11065 return 0;
11066}
11067_ACEOF
11068rm -f conftest$ac_exeext
11069if { (ac_try="$ac_link"
11070case "(($ac_try" in
11071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11072 *) ac_try_echo=$ac_try;;
11073esac
11074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11075 (eval "$ac_link") 2>&5
11076 ac_status=$?
11077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11078 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11079 { (case "(($ac_try" in
11080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11081 *) ac_try_echo=$ac_try;;
11082esac
11083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11084 (eval "$ac_try") 2>&5
11085 ac_status=$?
11086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11087 (exit $ac_status); }; }; then
11088 ac_cv_sizeof_pid_t=`cat conftest.val`
11089else
11090 echo "$as_me: program exited with status $ac_status" >&5
11091echo "$as_me: failed program was:" >&5
11092sed 's/^/| /' conftest.$ac_ext >&5
11093
11094( exit $ac_status )
11095if test "$ac_cv_type_pid_t" = yes; then
11096 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11097See \`config.log' for more details." >&5
11098echo "$as_me: error: cannot compute sizeof (pid_t)
11099See \`config.log' for more details." >&2;}
11100 { (exit 77); exit 77; }; }
11101 else
11102 ac_cv_sizeof_pid_t=0
11103 fi
11104fi
11105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11106fi
11107rm -f conftest.val
11108fi
11109{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11110echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
11111
11112
11113
11114cat >>confdefs.h <<_ACEOF
11115#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11116_ACEOF
11117
11118
Michael W. Hudson54241132001-12-07 15:38:26 +000011119
Martin v. Löwiseba40652007-08-30 20:10:57 +000011120{ echo "$as_me:$LINENO: checking for long long support" >&5
11121echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011122have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* confdefs.h. */
11125_ACEOF
11126cat confdefs.h >>conftest.$ac_ext
11127cat >>conftest.$ac_ext <<_ACEOF
11128/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011129
Martin v. Löwis11437992002-04-12 09:54:03 +000011130int
11131main ()
11132{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011133long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 ;
11135 return 0;
11136}
11137_ACEOF
11138rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011139if { (ac_try="$ac_compile"
11140case "(($ac_try" in
11141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11142 *) ac_try_echo=$ac_try;;
11143esac
11144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011147 grep -v '^ *+' conftest.er1 >conftest.err
11148 rm -f conftest.er1
11149 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011151 (exit $ac_status); } && {
11152 test -z "$ac_c_werror_flag" ||
11153 test ! -s conftest.err
11154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011155
11156
11157cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011158#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011159_ACEOF
11160
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011161 have_long_long=yes
11162
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011163else
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011165sed 's/^/| /' conftest.$ac_ext >&5
11166
Martin v. Löwiseba40652007-08-30 20:10:57 +000011167
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011169
11170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11171{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11172echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011173if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011174{ echo "$as_me:$LINENO: checking for long long" >&5
11175echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011176if test "${ac_cv_type_long_long+set}" = set; then
11177 echo $ECHO_N "(cached) $ECHO_C" >&6
11178else
11179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011180/* confdefs.h. */
11181_ACEOF
11182cat confdefs.h >>conftest.$ac_ext
11183cat >>conftest.$ac_ext <<_ACEOF
11184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011185$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011186typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011187int
11188main ()
11189{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011190if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011192if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011193 return 0;
11194 ;
11195 return 0;
11196}
11197_ACEOF
11198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199if { (ac_try="$ac_compile"
11200case "(($ac_try" in
11201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11202 *) ac_try_echo=$ac_try;;
11203esac
11204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011207 grep -v '^ *+' conftest.er1 >conftest.err
11208 rm -f conftest.er1
11209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011211 (exit $ac_status); } && {
11212 test -z "$ac_c_werror_flag" ||
11213 test ! -s conftest.err
11214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 ac_cv_type_long_long=yes
11216else
11217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011218sed 's/^/| /' conftest.$ac_ext >&5
11219
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011221fi
Brett Cannon19fab762007-06-02 03:02:29 +000011222
Martin v. Löwiseba40652007-08-30 20:10:57 +000011223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11224fi
11225{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11226echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11227
11228# The cast to long int works around a bug in the HP C Compiler
11229# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11230# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11231# This bug is HP SR number 8606223364.
11232{ echo "$as_me:$LINENO: checking size of long long" >&5
11233echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011234if test "${ac_cv_sizeof_long_long+set}" = set; then
11235 echo $ECHO_N "(cached) $ECHO_C" >&6
11236else
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 if test "$cross_compiling" = yes; then
11238 # Depending upon the size, compute the lo and hi bounds.
11239cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* confdefs.h. */
11241_ACEOF
11242cat confdefs.h >>conftest.$ac_ext
11243cat >>conftest.$ac_ext <<_ACEOF
11244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011245$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011246 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011247int
11248main ()
11249{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011251test_array [0] = 0
11252
11253 ;
11254 return 0;
11255}
11256_ACEOF
11257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011258if { (ac_try="$ac_compile"
11259case "(($ac_try" in
11260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11261 *) ac_try_echo=$ac_try;;
11262esac
11263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011266 grep -v '^ *+' conftest.er1 >conftest.err
11267 rm -f conftest.er1
11268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011270 (exit $ac_status); } && {
11271 test -z "$ac_c_werror_flag" ||
11272 test ! -s conftest.err
11273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 ac_lo=0 ac_mid=0
11275 while :; do
11276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* confdefs.h. */
11278_ACEOF
11279cat confdefs.h >>conftest.$ac_ext
11280cat >>conftest.$ac_ext <<_ACEOF
11281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011282$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011283 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011284int
11285main ()
11286{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011288test_array [0] = 0
11289
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011295if { (ac_try="$ac_compile"
11296case "(($ac_try" in
11297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11298 *) ac_try_echo=$ac_try;;
11299esac
11300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011303 grep -v '^ *+' conftest.er1 >conftest.err
11304 rm -f conftest.er1
11305 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011307 (exit $ac_status); } && {
11308 test -z "$ac_c_werror_flag" ||
11309 test ! -s conftest.err
11310 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 ac_hi=$ac_mid; break
11312else
11313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011314sed 's/^/| /' conftest.$ac_ext >&5
11315
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316 ac_lo=`expr $ac_mid + 1`
11317 if test $ac_lo -le $ac_mid; then
11318 ac_lo= ac_hi=
11319 break
11320 fi
11321 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011323
11324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 done
11326else
11327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011328sed 's/^/| /' conftest.$ac_ext >&5
11329
Martin v. Löwiseba40652007-08-30 20:10:57 +000011330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011331/* confdefs.h. */
11332_ACEOF
11333cat confdefs.h >>conftest.$ac_ext
11334cat >>conftest.$ac_ext <<_ACEOF
11335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011336$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011338int
11339main ()
11340{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011342test_array [0] = 0
11343
11344 ;
11345 return 0;
11346}
11347_ACEOF
11348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349if { (ac_try="$ac_compile"
11350case "(($ac_try" in
11351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11352 *) ac_try_echo=$ac_try;;
11353esac
11354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011357 grep -v '^ *+' conftest.er1 >conftest.err
11358 rm -f conftest.er1
11359 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011361 (exit $ac_status); } && {
11362 test -z "$ac_c_werror_flag" ||
11363 test ! -s conftest.err
11364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ac_hi=-1 ac_mid=-1
11366 while :; do
11367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* confdefs.h. */
11369_ACEOF
11370cat confdefs.h >>conftest.$ac_ext
11371cat >>conftest.$ac_ext <<_ACEOF
11372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011373$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011374 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011375int
11376main ()
11377{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011378static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011379test_array [0] = 0
11380
11381 ;
11382 return 0;
11383}
11384_ACEOF
11385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011386if { (ac_try="$ac_compile"
11387case "(($ac_try" in
11388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11389 *) ac_try_echo=$ac_try;;
11390esac
11391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011394 grep -v '^ *+' conftest.er1 >conftest.err
11395 rm -f conftest.er1
11396 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011398 (exit $ac_status); } && {
11399 test -z "$ac_c_werror_flag" ||
11400 test ! -s conftest.err
11401 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 ac_lo=$ac_mid; break
11403else
11404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011405sed 's/^/| /' conftest.$ac_ext >&5
11406
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407 ac_hi=`expr '(' $ac_mid ')' - 1`
11408 if test $ac_mid -le $ac_hi; then
11409 ac_lo= ac_hi=
11410 break
11411 fi
11412 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414
11415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 done
11417else
11418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011419sed 's/^/| /' conftest.$ac_ext >&5
11420
Martin v. Löwiseba40652007-08-30 20:10:57 +000011421 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011423
11424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011426
11427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011428# Binary search between lo and hi bounds.
11429while test "x$ac_lo" != "x$ac_hi"; do
11430 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011432/* confdefs.h. */
11433_ACEOF
11434cat confdefs.h >>conftest.$ac_ext
11435cat >>conftest.$ac_ext <<_ACEOF
11436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011437$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011438 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011439int
11440main ()
11441{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011442static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011443test_array [0] = 0
11444
11445 ;
11446 return 0;
11447}
11448_ACEOF
11449rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011450if { (ac_try="$ac_compile"
11451case "(($ac_try" in
11452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11453 *) ac_try_echo=$ac_try;;
11454esac
11455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011458 grep -v '^ *+' conftest.er1 >conftest.err
11459 rm -f conftest.er1
11460 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011462 (exit $ac_status); } && {
11463 test -z "$ac_c_werror_flag" ||
11464 test ! -s conftest.err
11465 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 ac_hi=$ac_mid
11467else
11468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011469sed 's/^/| /' conftest.$ac_ext >&5
11470
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473
11474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011475done
11476case $ac_lo in
11477?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011478'') if test "$ac_cv_type_long_long" = yes; then
11479 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011480See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011481echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011482See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011483 { (exit 77); exit 77; }; }
11484 else
11485 ac_cv_sizeof_long_long=0
11486 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011487esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011488else
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011490/* confdefs.h. */
11491_ACEOF
11492cat confdefs.h >>conftest.$ac_ext
11493cat >>conftest.$ac_ext <<_ACEOF
11494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011495$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011496 typedef long long ac__type_sizeof_;
11497static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11498static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011499#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011500#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011501int
11502main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011503{
Martin v. Löwis11437992002-04-12 09:54:03 +000011504
11505 FILE *f = fopen ("conftest.val", "w");
11506 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011507 return 1;
11508 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510 long int i = longval ();
11511 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11512 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 fprintf (f, "%ld\n", i);
11514 }
11515 else
11516 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011517 unsigned long int i = ulongval ();
11518 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11519 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 fprintf (f, "%lu\n", i);
11521 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011523
11524 ;
11525 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011526}
Martin v. Löwis11437992002-04-12 09:54:03 +000011527_ACEOF
11528rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011529if { (ac_try="$ac_link"
11530case "(($ac_try" in
11531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11532 *) ac_try_echo=$ac_try;;
11533esac
11534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11535 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 ac_status=$?
11537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11538 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011539 { (case "(($ac_try" in
11540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11541 *) ac_try_echo=$ac_try;;
11542esac
11543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11544 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 ac_status=$?
11546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11547 (exit $ac_status); }; }; then
11548 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011549else
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 echo "$as_me: program exited with status $ac_status" >&5
11551echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011552sed 's/^/| /' conftest.$ac_ext >&5
11553
Martin v. Löwis11437992002-04-12 09:54:03 +000011554( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011555if test "$ac_cv_type_long_long" = yes; then
11556 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011557See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011558echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011559See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560 { (exit 77); exit 77; }; }
11561 else
11562 ac_cv_sizeof_long_long=0
11563 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565rm -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 +000011566fi
11567rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11570echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11571
11572
11573
Martin v. Löwis11437992002-04-12 09:54:03 +000011574cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011575#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011576_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011577
Michael W. Hudson54241132001-12-07 15:38:26 +000011578
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011579fi
11580
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011581{ echo "$as_me:$LINENO: checking for long double support" >&5
11582echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11583have_long_double=no
11584cat >conftest.$ac_ext <<_ACEOF
11585/* confdefs.h. */
11586_ACEOF
11587cat confdefs.h >>conftest.$ac_ext
11588cat >>conftest.$ac_ext <<_ACEOF
11589/* end confdefs.h. */
11590
11591int
11592main ()
11593{
11594long double x; x = (long double)0.;
11595 ;
11596 return 0;
11597}
11598_ACEOF
11599rm -f conftest.$ac_objext
11600if { (ac_try="$ac_compile"
11601case "(($ac_try" in
11602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11603 *) ac_try_echo=$ac_try;;
11604esac
11605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11606 (eval "$ac_compile") 2>conftest.er1
11607 ac_status=$?
11608 grep -v '^ *+' conftest.er1 >conftest.err
11609 rm -f conftest.er1
11610 cat conftest.err >&5
11611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612 (exit $ac_status); } && {
11613 test -z "$ac_c_werror_flag" ||
11614 test ! -s conftest.err
11615 } && test -s conftest.$ac_objext; then
11616
11617
11618cat >>confdefs.h <<\_ACEOF
11619#define HAVE_LONG_DOUBLE 1
11620_ACEOF
11621
11622 have_long_double=yes
11623
11624else
11625 echo "$as_me: failed program was:" >&5
11626sed 's/^/| /' conftest.$ac_ext >&5
11627
11628
11629fi
11630
11631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11632{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11633echo "${ECHO_T}$have_long_double" >&6; }
11634if test "$have_long_double" = yes ; then
11635{ echo "$as_me:$LINENO: checking for long double" >&5
11636echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11637if test "${ac_cv_type_long_double+set}" = set; then
11638 echo $ECHO_N "(cached) $ECHO_C" >&6
11639else
11640 cat >conftest.$ac_ext <<_ACEOF
11641/* confdefs.h. */
11642_ACEOF
11643cat confdefs.h >>conftest.$ac_ext
11644cat >>conftest.$ac_ext <<_ACEOF
11645/* end confdefs.h. */
11646$ac_includes_default
11647typedef long double ac__type_new_;
11648int
11649main ()
11650{
11651if ((ac__type_new_ *) 0)
11652 return 0;
11653if (sizeof (ac__type_new_))
11654 return 0;
11655 ;
11656 return 0;
11657}
11658_ACEOF
11659rm -f conftest.$ac_objext
11660if { (ac_try="$ac_compile"
11661case "(($ac_try" in
11662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11663 *) ac_try_echo=$ac_try;;
11664esac
11665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11666 (eval "$ac_compile") 2>conftest.er1
11667 ac_status=$?
11668 grep -v '^ *+' conftest.er1 >conftest.err
11669 rm -f conftest.er1
11670 cat conftest.err >&5
11671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672 (exit $ac_status); } && {
11673 test -z "$ac_c_werror_flag" ||
11674 test ! -s conftest.err
11675 } && test -s conftest.$ac_objext; then
11676 ac_cv_type_long_double=yes
11677else
11678 echo "$as_me: failed program was:" >&5
11679sed 's/^/| /' conftest.$ac_ext >&5
11680
11681 ac_cv_type_long_double=no
11682fi
11683
11684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11685fi
11686{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11687echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11688
11689# The cast to long int works around a bug in the HP C Compiler
11690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11692# This bug is HP SR number 8606223364.
11693{ echo "$as_me:$LINENO: checking size of long double" >&5
11694echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11695if test "${ac_cv_sizeof_long_double+set}" = set; then
11696 echo $ECHO_N "(cached) $ECHO_C" >&6
11697else
11698 if test "$cross_compiling" = yes; then
11699 # Depending upon the size, compute the lo and hi bounds.
11700cat >conftest.$ac_ext <<_ACEOF
11701/* confdefs.h. */
11702_ACEOF
11703cat confdefs.h >>conftest.$ac_ext
11704cat >>conftest.$ac_ext <<_ACEOF
11705/* end confdefs.h. */
11706$ac_includes_default
11707 typedef long double ac__type_sizeof_;
11708int
11709main ()
11710{
11711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11712test_array [0] = 0
11713
11714 ;
11715 return 0;
11716}
11717_ACEOF
11718rm -f conftest.$ac_objext
11719if { (ac_try="$ac_compile"
11720case "(($ac_try" in
11721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11722 *) ac_try_echo=$ac_try;;
11723esac
11724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11725 (eval "$ac_compile") 2>conftest.er1
11726 ac_status=$?
11727 grep -v '^ *+' conftest.er1 >conftest.err
11728 rm -f conftest.er1
11729 cat conftest.err >&5
11730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11731 (exit $ac_status); } && {
11732 test -z "$ac_c_werror_flag" ||
11733 test ! -s conftest.err
11734 } && test -s conftest.$ac_objext; then
11735 ac_lo=0 ac_mid=0
11736 while :; do
11737 cat >conftest.$ac_ext <<_ACEOF
11738/* confdefs.h. */
11739_ACEOF
11740cat confdefs.h >>conftest.$ac_ext
11741cat >>conftest.$ac_ext <<_ACEOF
11742/* end confdefs.h. */
11743$ac_includes_default
11744 typedef long double ac__type_sizeof_;
11745int
11746main ()
11747{
11748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11749test_array [0] = 0
11750
11751 ;
11752 return 0;
11753}
11754_ACEOF
11755rm -f conftest.$ac_objext
11756if { (ac_try="$ac_compile"
11757case "(($ac_try" in
11758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11759 *) ac_try_echo=$ac_try;;
11760esac
11761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11762 (eval "$ac_compile") 2>conftest.er1
11763 ac_status=$?
11764 grep -v '^ *+' conftest.er1 >conftest.err
11765 rm -f conftest.er1
11766 cat conftest.err >&5
11767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768 (exit $ac_status); } && {
11769 test -z "$ac_c_werror_flag" ||
11770 test ! -s conftest.err
11771 } && test -s conftest.$ac_objext; then
11772 ac_hi=$ac_mid; break
11773else
11774 echo "$as_me: failed program was:" >&5
11775sed 's/^/| /' conftest.$ac_ext >&5
11776
11777 ac_lo=`expr $ac_mid + 1`
11778 if test $ac_lo -le $ac_mid; then
11779 ac_lo= ac_hi=
11780 break
11781 fi
11782 ac_mid=`expr 2 '*' $ac_mid + 1`
11783fi
11784
11785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11786 done
11787else
11788 echo "$as_me: failed program was:" >&5
11789sed 's/^/| /' conftest.$ac_ext >&5
11790
11791 cat >conftest.$ac_ext <<_ACEOF
11792/* confdefs.h. */
11793_ACEOF
11794cat confdefs.h >>conftest.$ac_ext
11795cat >>conftest.$ac_ext <<_ACEOF
11796/* end confdefs.h. */
11797$ac_includes_default
11798 typedef long double ac__type_sizeof_;
11799int
11800main ()
11801{
11802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11803test_array [0] = 0
11804
11805 ;
11806 return 0;
11807}
11808_ACEOF
11809rm -f conftest.$ac_objext
11810if { (ac_try="$ac_compile"
11811case "(($ac_try" in
11812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11813 *) ac_try_echo=$ac_try;;
11814esac
11815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11816 (eval "$ac_compile") 2>conftest.er1
11817 ac_status=$?
11818 grep -v '^ *+' conftest.er1 >conftest.err
11819 rm -f conftest.er1
11820 cat conftest.err >&5
11821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11822 (exit $ac_status); } && {
11823 test -z "$ac_c_werror_flag" ||
11824 test ! -s conftest.err
11825 } && test -s conftest.$ac_objext; then
11826 ac_hi=-1 ac_mid=-1
11827 while :; do
11828 cat >conftest.$ac_ext <<_ACEOF
11829/* confdefs.h. */
11830_ACEOF
11831cat confdefs.h >>conftest.$ac_ext
11832cat >>conftest.$ac_ext <<_ACEOF
11833/* end confdefs.h. */
11834$ac_includes_default
11835 typedef long double ac__type_sizeof_;
11836int
11837main ()
11838{
11839static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11840test_array [0] = 0
11841
11842 ;
11843 return 0;
11844}
11845_ACEOF
11846rm -f conftest.$ac_objext
11847if { (ac_try="$ac_compile"
11848case "(($ac_try" in
11849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11850 *) ac_try_echo=$ac_try;;
11851esac
11852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11853 (eval "$ac_compile") 2>conftest.er1
11854 ac_status=$?
11855 grep -v '^ *+' conftest.er1 >conftest.err
11856 rm -f conftest.er1
11857 cat conftest.err >&5
11858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11859 (exit $ac_status); } && {
11860 test -z "$ac_c_werror_flag" ||
11861 test ! -s conftest.err
11862 } && test -s conftest.$ac_objext; then
11863 ac_lo=$ac_mid; break
11864else
11865 echo "$as_me: failed program was:" >&5
11866sed 's/^/| /' conftest.$ac_ext >&5
11867
11868 ac_hi=`expr '(' $ac_mid ')' - 1`
11869 if test $ac_mid -le $ac_hi; then
11870 ac_lo= ac_hi=
11871 break
11872 fi
11873 ac_mid=`expr 2 '*' $ac_mid`
11874fi
11875
11876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877 done
11878else
11879 echo "$as_me: failed program was:" >&5
11880sed 's/^/| /' conftest.$ac_ext >&5
11881
11882 ac_lo= ac_hi=
11883fi
11884
11885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11886fi
11887
11888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11889# Binary search between lo and hi bounds.
11890while test "x$ac_lo" != "x$ac_hi"; do
11891 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11892 cat >conftest.$ac_ext <<_ACEOF
11893/* confdefs.h. */
11894_ACEOF
11895cat confdefs.h >>conftest.$ac_ext
11896cat >>conftest.$ac_ext <<_ACEOF
11897/* end confdefs.h. */
11898$ac_includes_default
11899 typedef long double ac__type_sizeof_;
11900int
11901main ()
11902{
11903static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11904test_array [0] = 0
11905
11906 ;
11907 return 0;
11908}
11909_ACEOF
11910rm -f conftest.$ac_objext
11911if { (ac_try="$ac_compile"
11912case "(($ac_try" in
11913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11914 *) ac_try_echo=$ac_try;;
11915esac
11916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11917 (eval "$ac_compile") 2>conftest.er1
11918 ac_status=$?
11919 grep -v '^ *+' conftest.er1 >conftest.err
11920 rm -f conftest.er1
11921 cat conftest.err >&5
11922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11923 (exit $ac_status); } && {
11924 test -z "$ac_c_werror_flag" ||
11925 test ! -s conftest.err
11926 } && test -s conftest.$ac_objext; then
11927 ac_hi=$ac_mid
11928else
11929 echo "$as_me: failed program was:" >&5
11930sed 's/^/| /' conftest.$ac_ext >&5
11931
11932 ac_lo=`expr '(' $ac_mid ')' + 1`
11933fi
11934
11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11936done
11937case $ac_lo in
11938?*) ac_cv_sizeof_long_double=$ac_lo;;
11939'') if test "$ac_cv_type_long_double" = yes; then
11940 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11941See \`config.log' for more details." >&5
11942echo "$as_me: error: cannot compute sizeof (long double)
11943See \`config.log' for more details." >&2;}
11944 { (exit 77); exit 77; }; }
11945 else
11946 ac_cv_sizeof_long_double=0
11947 fi ;;
11948esac
11949else
11950 cat >conftest.$ac_ext <<_ACEOF
11951/* confdefs.h. */
11952_ACEOF
11953cat confdefs.h >>conftest.$ac_ext
11954cat >>conftest.$ac_ext <<_ACEOF
11955/* end confdefs.h. */
11956$ac_includes_default
11957 typedef long double ac__type_sizeof_;
11958static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11959static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11960#include <stdio.h>
11961#include <stdlib.h>
11962int
11963main ()
11964{
11965
11966 FILE *f = fopen ("conftest.val", "w");
11967 if (! f)
11968 return 1;
11969 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11970 {
11971 long int i = longval ();
11972 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11973 return 1;
11974 fprintf (f, "%ld\n", i);
11975 }
11976 else
11977 {
11978 unsigned long int i = ulongval ();
11979 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11980 return 1;
11981 fprintf (f, "%lu\n", i);
11982 }
11983 return ferror (f) || fclose (f) != 0;
11984
11985 ;
11986 return 0;
11987}
11988_ACEOF
11989rm -f conftest$ac_exeext
11990if { (ac_try="$ac_link"
11991case "(($ac_try" in
11992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11993 *) ac_try_echo=$ac_try;;
11994esac
11995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11996 (eval "$ac_link") 2>&5
11997 ac_status=$?
11998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11999 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12000 { (case "(($ac_try" in
12001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12002 *) ac_try_echo=$ac_try;;
12003esac
12004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12005 (eval "$ac_try") 2>&5
12006 ac_status=$?
12007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12008 (exit $ac_status); }; }; then
12009 ac_cv_sizeof_long_double=`cat conftest.val`
12010else
12011 echo "$as_me: program exited with status $ac_status" >&5
12012echo "$as_me: failed program was:" >&5
12013sed 's/^/| /' conftest.$ac_ext >&5
12014
12015( exit $ac_status )
12016if test "$ac_cv_type_long_double" = yes; then
12017 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
12018See \`config.log' for more details." >&5
12019echo "$as_me: error: cannot compute sizeof (long double)
12020See \`config.log' for more details." >&2;}
12021 { (exit 77); exit 77; }; }
12022 else
12023 ac_cv_sizeof_long_double=0
12024 fi
12025fi
12026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12027fi
12028rm -f conftest.val
12029fi
12030{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12031echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
12032
12033
12034
12035cat >>confdefs.h <<_ACEOF
12036#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12037_ACEOF
12038
12039
12040fi
12041
Martin v. Löwiseba40652007-08-30 20:10:57 +000012042{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12043echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012044have_c99_bool=no
12045cat >conftest.$ac_ext <<_ACEOF
12046/* confdefs.h. */
12047_ACEOF
12048cat confdefs.h >>conftest.$ac_ext
12049cat >>conftest.$ac_ext <<_ACEOF
12050/* end confdefs.h. */
12051
12052int
12053main ()
12054{
12055_Bool x; x = (_Bool)0;
12056 ;
12057 return 0;
12058}
12059_ACEOF
12060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012061if { (ac_try="$ac_compile"
12062case "(($ac_try" in
12063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12064 *) ac_try_echo=$ac_try;;
12065esac
12066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012068 ac_status=$?
12069 grep -v '^ *+' conftest.er1 >conftest.err
12070 rm -f conftest.er1
12071 cat conftest.err >&5
12072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012073 (exit $ac_status); } && {
12074 test -z "$ac_c_werror_flag" ||
12075 test ! -s conftest.err
12076 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012077
12078
12079cat >>confdefs.h <<\_ACEOF
12080#define HAVE_C99_BOOL 1
12081_ACEOF
12082
12083 have_c99_bool=yes
12084
12085else
12086 echo "$as_me: failed program was:" >&5
12087sed 's/^/| /' conftest.$ac_ext >&5
12088
Martin v. Löwiseba40652007-08-30 20:10:57 +000012089
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012091
12092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12093{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12094echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012095if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012096{ echo "$as_me:$LINENO: checking for _Bool" >&5
12097echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012098if test "${ac_cv_type__Bool+set}" = set; then
12099 echo $ECHO_N "(cached) $ECHO_C" >&6
12100else
12101 cat >conftest.$ac_ext <<_ACEOF
12102/* confdefs.h. */
12103_ACEOF
12104cat confdefs.h >>conftest.$ac_ext
12105cat >>conftest.$ac_ext <<_ACEOF
12106/* end confdefs.h. */
12107$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012108typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012109int
12110main ()
12111{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012112if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012113 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012114if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012115 return 0;
12116 ;
12117 return 0;
12118}
12119_ACEOF
12120rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121if { (ac_try="$ac_compile"
12122case "(($ac_try" in
12123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12124 *) ac_try_echo=$ac_try;;
12125esac
12126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12127 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012128 ac_status=$?
12129 grep -v '^ *+' conftest.er1 >conftest.err
12130 rm -f conftest.er1
12131 cat conftest.err >&5
12132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012133 (exit $ac_status); } && {
12134 test -z "$ac_c_werror_flag" ||
12135 test ! -s conftest.err
12136 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012137 ac_cv_type__Bool=yes
12138else
12139 echo "$as_me: failed program was:" >&5
12140sed 's/^/| /' conftest.$ac_ext >&5
12141
Martin v. Löwiseba40652007-08-30 20:10:57 +000012142 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012143fi
Brett Cannon19fab762007-06-02 03:02:29 +000012144
Martin v. Löwiseba40652007-08-30 20:10:57 +000012145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12146fi
12147{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12148echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12149
12150# The cast to long int works around a bug in the HP C Compiler
12151# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12152# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12153# This bug is HP SR number 8606223364.
12154{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12155echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012156if test "${ac_cv_sizeof__Bool+set}" = set; then
12157 echo $ECHO_N "(cached) $ECHO_C" >&6
12158else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012159 if test "$cross_compiling" = yes; then
12160 # Depending upon the size, compute the lo and hi bounds.
12161cat >conftest.$ac_ext <<_ACEOF
12162/* confdefs.h. */
12163_ACEOF
12164cat confdefs.h >>conftest.$ac_ext
12165cat >>conftest.$ac_ext <<_ACEOF
12166/* end confdefs.h. */
12167$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012168 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012169int
12170main ()
12171{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012173test_array [0] = 0
12174
12175 ;
12176 return 0;
12177}
12178_ACEOF
12179rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012180if { (ac_try="$ac_compile"
12181case "(($ac_try" in
12182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12183 *) ac_try_echo=$ac_try;;
12184esac
12185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012187 ac_status=$?
12188 grep -v '^ *+' conftest.er1 >conftest.err
12189 rm -f conftest.er1
12190 cat conftest.err >&5
12191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012192 (exit $ac_status); } && {
12193 test -z "$ac_c_werror_flag" ||
12194 test ! -s conftest.err
12195 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012196 ac_lo=0 ac_mid=0
12197 while :; do
12198 cat >conftest.$ac_ext <<_ACEOF
12199/* confdefs.h. */
12200_ACEOF
12201cat confdefs.h >>conftest.$ac_ext
12202cat >>conftest.$ac_ext <<_ACEOF
12203/* end confdefs.h. */
12204$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012205 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012206int
12207main ()
12208{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012209static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012210test_array [0] = 0
12211
12212 ;
12213 return 0;
12214}
12215_ACEOF
12216rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217if { (ac_try="$ac_compile"
12218case "(($ac_try" in
12219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12220 *) ac_try_echo=$ac_try;;
12221esac
12222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012224 ac_status=$?
12225 grep -v '^ *+' conftest.er1 >conftest.err
12226 rm -f conftest.er1
12227 cat conftest.err >&5
12228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012229 (exit $ac_status); } && {
12230 test -z "$ac_c_werror_flag" ||
12231 test ! -s conftest.err
12232 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012233 ac_hi=$ac_mid; break
12234else
12235 echo "$as_me: failed program was:" >&5
12236sed 's/^/| /' conftest.$ac_ext >&5
12237
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238 ac_lo=`expr $ac_mid + 1`
12239 if test $ac_lo -le $ac_mid; then
12240 ac_lo= ac_hi=
12241 break
12242 fi
12243 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012245
12246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012247 done
12248else
12249 echo "$as_me: failed program was:" >&5
12250sed 's/^/| /' conftest.$ac_ext >&5
12251
Martin v. Löwiseba40652007-08-30 20:10:57 +000012252 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012253/* confdefs.h. */
12254_ACEOF
12255cat confdefs.h >>conftest.$ac_ext
12256cat >>conftest.$ac_ext <<_ACEOF
12257/* end confdefs.h. */
12258$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012259 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012260int
12261main ()
12262{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012263static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012264test_array [0] = 0
12265
12266 ;
12267 return 0;
12268}
12269_ACEOF
12270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012271if { (ac_try="$ac_compile"
12272case "(($ac_try" in
12273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12274 *) ac_try_echo=$ac_try;;
12275esac
12276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012278 ac_status=$?
12279 grep -v '^ *+' conftest.er1 >conftest.err
12280 rm -f conftest.er1
12281 cat conftest.err >&5
12282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012283 (exit $ac_status); } && {
12284 test -z "$ac_c_werror_flag" ||
12285 test ! -s conftest.err
12286 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012287 ac_hi=-1 ac_mid=-1
12288 while :; do
12289 cat >conftest.$ac_ext <<_ACEOF
12290/* confdefs.h. */
12291_ACEOF
12292cat confdefs.h >>conftest.$ac_ext
12293cat >>conftest.$ac_ext <<_ACEOF
12294/* end confdefs.h. */
12295$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012296 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012297int
12298main ()
12299{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012301test_array [0] = 0
12302
12303 ;
12304 return 0;
12305}
12306_ACEOF
12307rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012308if { (ac_try="$ac_compile"
12309case "(($ac_try" in
12310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12311 *) ac_try_echo=$ac_try;;
12312esac
12313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12314 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012315 ac_status=$?
12316 grep -v '^ *+' conftest.er1 >conftest.err
12317 rm -f conftest.er1
12318 cat conftest.err >&5
12319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012320 (exit $ac_status); } && {
12321 test -z "$ac_c_werror_flag" ||
12322 test ! -s conftest.err
12323 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012324 ac_lo=$ac_mid; break
12325else
12326 echo "$as_me: failed program was:" >&5
12327sed 's/^/| /' conftest.$ac_ext >&5
12328
Martin v. Löwiseba40652007-08-30 20:10:57 +000012329 ac_hi=`expr '(' $ac_mid ')' - 1`
12330 if test $ac_mid -le $ac_hi; then
12331 ac_lo= ac_hi=
12332 break
12333 fi
12334 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336
12337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012338 done
12339else
12340 echo "$as_me: failed program was:" >&5
12341sed 's/^/| /' conftest.$ac_ext >&5
12342
Martin v. Löwiseba40652007-08-30 20:10:57 +000012343 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345
12346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012348
12349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012350# Binary search between lo and hi bounds.
12351while test "x$ac_lo" != "x$ac_hi"; do
12352 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12353 cat >conftest.$ac_ext <<_ACEOF
12354/* confdefs.h. */
12355_ACEOF
12356cat confdefs.h >>conftest.$ac_ext
12357cat >>conftest.$ac_ext <<_ACEOF
12358/* end confdefs.h. */
12359$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012360 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012361int
12362main ()
12363{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012365test_array [0] = 0
12366
12367 ;
12368 return 0;
12369}
12370_ACEOF
12371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372if { (ac_try="$ac_compile"
12373case "(($ac_try" in
12374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12375 *) ac_try_echo=$ac_try;;
12376esac
12377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012379 ac_status=$?
12380 grep -v '^ *+' conftest.er1 >conftest.err
12381 rm -f conftest.er1
12382 cat conftest.err >&5
12383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384 (exit $ac_status); } && {
12385 test -z "$ac_c_werror_flag" ||
12386 test ! -s conftest.err
12387 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012388 ac_hi=$ac_mid
12389else
12390 echo "$as_me: failed program was:" >&5
12391sed 's/^/| /' conftest.$ac_ext >&5
12392
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012395
12396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012397done
12398case $ac_lo in
12399?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012400'') if test "$ac_cv_type__Bool" = yes; then
12401 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012402See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012404See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405 { (exit 77); exit 77; }; }
12406 else
12407 ac_cv_sizeof__Bool=0
12408 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012409esac
12410else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012411 cat >conftest.$ac_ext <<_ACEOF
12412/* confdefs.h. */
12413_ACEOF
12414cat confdefs.h >>conftest.$ac_ext
12415cat >>conftest.$ac_ext <<_ACEOF
12416/* end confdefs.h. */
12417$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012418 typedef _Bool ac__type_sizeof_;
12419static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12420static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012421#include <stdio.h>
12422#include <stdlib.h>
12423int
12424main ()
12425{
12426
12427 FILE *f = fopen ("conftest.val", "w");
12428 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012429 return 1;
12430 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012431 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432 long int i = longval ();
12433 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12434 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012435 fprintf (f, "%ld\n", i);
12436 }
12437 else
12438 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012439 unsigned long int i = ulongval ();
12440 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12441 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012442 fprintf (f, "%lu\n", i);
12443 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012444 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012445
12446 ;
12447 return 0;
12448}
12449_ACEOF
12450rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012451if { (ac_try="$ac_link"
12452case "(($ac_try" in
12453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12454 *) ac_try_echo=$ac_try;;
12455esac
12456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12457 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012458 ac_status=$?
12459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12460 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012461 { (case "(($ac_try" in
12462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12463 *) ac_try_echo=$ac_try;;
12464esac
12465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12466 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012467 ac_status=$?
12468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12469 (exit $ac_status); }; }; then
12470 ac_cv_sizeof__Bool=`cat conftest.val`
12471else
12472 echo "$as_me: program exited with status $ac_status" >&5
12473echo "$as_me: failed program was:" >&5
12474sed 's/^/| /' conftest.$ac_ext >&5
12475
12476( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012477if test "$ac_cv_type__Bool" = yes; then
12478 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012479See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012480echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012481See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482 { (exit 77); exit 77; }; }
12483 else
12484 ac_cv_sizeof__Bool=0
12485 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012488fi
12489rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012491{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12492echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12493
12494
12495
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012496cat >>confdefs.h <<_ACEOF
12497#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12498_ACEOF
12499
12500
12501fi
12502
Martin v. Löwiseba40652007-08-30 20:10:57 +000012503{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12504echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012505if test "${ac_cv_type_uintptr_t+set}" = set; then
12506 echo $ECHO_N "(cached) $ECHO_C" >&6
12507else
12508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012509/* confdefs.h. */
12510_ACEOF
12511cat confdefs.h >>conftest.$ac_ext
12512cat >>conftest.$ac_ext <<_ACEOF
12513/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012514#ifdef HAVE_STDINT_H
12515 #include <stdint.h>
12516 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012517
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012519int
12520main ()
12521{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012522if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012523 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012524if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012525 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 ;
12527 return 0;
12528}
12529_ACEOF
12530rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012531if { (ac_try="$ac_compile"
12532case "(($ac_try" in
12533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12534 *) ac_try_echo=$ac_try;;
12535esac
12536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012539 grep -v '^ *+' conftest.er1 >conftest.err
12540 rm -f conftest.er1
12541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012543 (exit $ac_status); } && {
12544 test -z "$ac_c_werror_flag" ||
12545 test ! -s conftest.err
12546 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012547 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012548else
Martin v. Löwis11437992002-04-12 09:54:03 +000012549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012550sed 's/^/| /' conftest.$ac_ext >&5
12551
Martin v. Löwiseba40652007-08-30 20:10:57 +000012552 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012554
12555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012557{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12558echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012559if test $ac_cv_type_uintptr_t = yes; then
12560
12561cat >>confdefs.h <<_ACEOF
12562#define HAVE_UINTPTR_T 1
12563_ACEOF
12564
Martin v. Löwiseba40652007-08-30 20:10:57 +000012565{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12566echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012567if test "${ac_cv_type_uintptr_t+set}" = set; then
12568 echo $ECHO_N "(cached) $ECHO_C" >&6
12569else
12570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012571/* confdefs.h. */
12572_ACEOF
12573cat confdefs.h >>conftest.$ac_ext
12574cat >>conftest.$ac_ext <<_ACEOF
12575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012576$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012577typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012578int
12579main ()
12580{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012581if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012582 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012583if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 return 0;
12585 ;
12586 return 0;
12587}
12588_ACEOF
12589rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012590if { (ac_try="$ac_compile"
12591case "(($ac_try" in
12592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12593 *) ac_try_echo=$ac_try;;
12594esac
12595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12596 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012598 grep -v '^ *+' conftest.er1 >conftest.err
12599 rm -f conftest.er1
12600 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012602 (exit $ac_status); } && {
12603 test -z "$ac_c_werror_flag" ||
12604 test ! -s conftest.err
12605 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 ac_cv_type_uintptr_t=yes
12607else
12608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012609sed 's/^/| /' conftest.$ac_ext >&5
12610
Martin v. Löwiseba40652007-08-30 20:10:57 +000012611 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012612fi
Brett Cannon19fab762007-06-02 03:02:29 +000012613
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12615fi
12616{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12617echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12618
12619# The cast to long int works around a bug in the HP C Compiler
12620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12622# This bug is HP SR number 8606223364.
12623{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12624echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012625if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12626 echo $ECHO_N "(cached) $ECHO_C" >&6
12627else
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 if test "$cross_compiling" = yes; then
12629 # Depending upon the size, compute the lo and hi bounds.
12630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012631/* confdefs.h. */
12632_ACEOF
12633cat confdefs.h >>conftest.$ac_ext
12634cat >>conftest.$ac_ext <<_ACEOF
12635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012636$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012637 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012638int
12639main ()
12640{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012641static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012642test_array [0] = 0
12643
12644 ;
12645 return 0;
12646}
12647_ACEOF
12648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012649if { (ac_try="$ac_compile"
12650case "(($ac_try" in
12651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12652 *) ac_try_echo=$ac_try;;
12653esac
12654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012657 grep -v '^ *+' conftest.er1 >conftest.err
12658 rm -f conftest.er1
12659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012661 (exit $ac_status); } && {
12662 test -z "$ac_c_werror_flag" ||
12663 test ! -s conftest.err
12664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 ac_lo=0 ac_mid=0
12666 while :; do
12667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012668/* confdefs.h. */
12669_ACEOF
12670cat confdefs.h >>conftest.$ac_ext
12671cat >>conftest.$ac_ext <<_ACEOF
12672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012673$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012674 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012675int
12676main ()
12677{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012679test_array [0] = 0
12680
12681 ;
12682 return 0;
12683}
12684_ACEOF
12685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012686if { (ac_try="$ac_compile"
12687case "(($ac_try" in
12688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12689 *) ac_try_echo=$ac_try;;
12690esac
12691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012694 grep -v '^ *+' conftest.er1 >conftest.err
12695 rm -f conftest.er1
12696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012698 (exit $ac_status); } && {
12699 test -z "$ac_c_werror_flag" ||
12700 test ! -s conftest.err
12701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 ac_hi=$ac_mid; break
12703else
12704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012705sed 's/^/| /' conftest.$ac_ext >&5
12706
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707 ac_lo=`expr $ac_mid + 1`
12708 if test $ac_lo -le $ac_mid; then
12709 ac_lo= ac_hi=
12710 break
12711 fi
12712 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012714
12715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012716 done
12717else
12718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012719sed 's/^/| /' conftest.$ac_ext >&5
12720
Martin v. Löwiseba40652007-08-30 20:10:57 +000012721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012722/* confdefs.h. */
12723_ACEOF
12724cat confdefs.h >>conftest.$ac_ext
12725cat >>conftest.$ac_ext <<_ACEOF
12726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012727$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012728 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012729int
12730main ()
12731{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012733test_array [0] = 0
12734
12735 ;
12736 return 0;
12737}
12738_ACEOF
12739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012740if { (ac_try="$ac_compile"
12741case "(($ac_try" in
12742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12743 *) ac_try_echo=$ac_try;;
12744esac
12745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012748 grep -v '^ *+' conftest.er1 >conftest.err
12749 rm -f conftest.er1
12750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752 (exit $ac_status); } && {
12753 test -z "$ac_c_werror_flag" ||
12754 test ! -s conftest.err
12755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ac_hi=-1 ac_mid=-1
12757 while :; do
12758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012759/* confdefs.h. */
12760_ACEOF
12761cat confdefs.h >>conftest.$ac_ext
12762cat >>conftest.$ac_ext <<_ACEOF
12763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012764$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012766int
12767main ()
12768{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012769static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012770test_array [0] = 0
12771
12772 ;
12773 return 0;
12774}
12775_ACEOF
12776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012777if { (ac_try="$ac_compile"
12778case "(($ac_try" in
12779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12780 *) ac_try_echo=$ac_try;;
12781esac
12782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012785 grep -v '^ *+' conftest.er1 >conftest.err
12786 rm -f conftest.er1
12787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012789 (exit $ac_status); } && {
12790 test -z "$ac_c_werror_flag" ||
12791 test ! -s conftest.err
12792 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 ac_lo=$ac_mid; break
12794else
12795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012796sed 's/^/| /' conftest.$ac_ext >&5
12797
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798 ac_hi=`expr '(' $ac_mid ')' - 1`
12799 if test $ac_mid -le $ac_hi; then
12800 ac_lo= ac_hi=
12801 break
12802 fi
12803 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805
12806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 done
12808else
12809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012810sed 's/^/| /' conftest.$ac_ext >&5
12811
Martin v. Löwiseba40652007-08-30 20:10:57 +000012812 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012814
12815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817
12818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012819# Binary search between lo and hi bounds.
12820while test "x$ac_lo" != "x$ac_hi"; do
12821 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012823/* confdefs.h. */
12824_ACEOF
12825cat confdefs.h >>conftest.$ac_ext
12826cat >>conftest.$ac_ext <<_ACEOF
12827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012828$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012830int
12831main ()
12832{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012834test_array [0] = 0
12835
12836 ;
12837 return 0;
12838}
12839_ACEOF
12840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012841if { (ac_try="$ac_compile"
12842case "(($ac_try" in
12843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12844 *) ac_try_echo=$ac_try;;
12845esac
12846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012849 grep -v '^ *+' conftest.er1 >conftest.err
12850 rm -f conftest.er1
12851 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012853 (exit $ac_status); } && {
12854 test -z "$ac_c_werror_flag" ||
12855 test ! -s conftest.err
12856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 ac_hi=$ac_mid
12858else
12859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012860sed 's/^/| /' conftest.$ac_ext >&5
12861
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864
12865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012866done
12867case $ac_lo in
12868?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012869'') if test "$ac_cv_type_uintptr_t" = yes; then
12870 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012871See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012872echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012873See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874 { (exit 77); exit 77; }; }
12875 else
12876 ac_cv_sizeof_uintptr_t=0
12877 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012878esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012879else
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012881/* confdefs.h. */
12882_ACEOF
12883cat confdefs.h >>conftest.$ac_ext
12884cat >>conftest.$ac_ext <<_ACEOF
12885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012886$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012887 typedef uintptr_t ac__type_sizeof_;
12888static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12889static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012890#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012891#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012892int
12893main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012894{
Martin v. Löwis11437992002-04-12 09:54:03 +000012895
12896 FILE *f = fopen ("conftest.val", "w");
12897 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012898 return 1;
12899 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 long int i = longval ();
12902 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12903 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 fprintf (f, "%ld\n", i);
12905 }
12906 else
12907 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012908 unsigned long int i = ulongval ();
12909 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12910 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 fprintf (f, "%lu\n", i);
12912 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012913 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012914
12915 ;
12916 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012917}
Martin v. Löwis11437992002-04-12 09:54:03 +000012918_ACEOF
12919rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012920if { (ac_try="$ac_link"
12921case "(($ac_try" in
12922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12923 *) ac_try_echo=$ac_try;;
12924esac
12925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12926 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 ac_status=$?
12928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12929 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012930 { (case "(($ac_try" in
12931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12932 *) ac_try_echo=$ac_try;;
12933esac
12934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12935 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 ac_status=$?
12937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12938 (exit $ac_status); }; }; then
12939 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012940else
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 echo "$as_me: program exited with status $ac_status" >&5
12942echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012943sed 's/^/| /' conftest.$ac_ext >&5
12944
Martin v. Löwis11437992002-04-12 09:54:03 +000012945( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012946if test "$ac_cv_type_uintptr_t" = yes; then
12947 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012948See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012949echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012950See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951 { (exit 77); exit 77; }; }
12952 else
12953 ac_cv_sizeof_uintptr_t=0
12954 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956rm -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 +000012957fi
12958rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012960{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12961echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12962
12963
12964
Martin v. Löwis11437992002-04-12 09:54:03 +000012965cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012966#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012967_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012968
Michael W. Hudson54241132001-12-07 15:38:26 +000012969
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012970fi
12971
Martin v. Löwisebe26702006-10-02 14:55:51 +000012972
12973
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012974# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012975{ echo "$as_me:$LINENO: checking size of off_t" >&5
12976echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012977if test "${ac_cv_sizeof_off_t+set}" = set; then
12978 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012979else
12980 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012981 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012982else
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012984/* confdefs.h. */
12985_ACEOF
12986cat confdefs.h >>conftest.$ac_ext
12987cat >>conftest.$ac_ext <<_ACEOF
12988/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012989#include <stdio.h>
12990#include <sys/types.h>
12991main()
12992{
12993 FILE *f=fopen("conftestval", "w");
12994 if (!f) exit(1);
12995 fprintf(f, "%d\n", sizeof(off_t));
12996 exit(0);
12997}
Martin v. Löwis11437992002-04-12 09:54:03 +000012998_ACEOF
12999rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013000if { (ac_try="$ac_link"
13001case "(($ac_try" in
13002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13003 *) ac_try_echo=$ac_try;;
13004esac
13005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13006 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 ac_status=$?
13008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010 { (case "(($ac_try" in
13011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13012 *) ac_try_echo=$ac_try;;
13013esac
13014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13015 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 ac_status=$?
13017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13018 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013019 ac_cv_sizeof_off_t=`cat conftestval`
13020else
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 echo "$as_me: program exited with status $ac_status" >&5
13022echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013023sed 's/^/| /' conftest.$ac_ext >&5
13024
Martin v. Löwis11437992002-04-12 09:54:03 +000013025( exit $ac_status )
13026ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013028rm -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 +000013029fi
13030
Martin v. Löwiseba40652007-08-30 20:10:57 +000013031
13032
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013033fi
13034
Martin v. Löwiseba40652007-08-30 20:10:57 +000013035{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13036echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013037
13038cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013039#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013040_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013041
Michael W. Hudson54241132001-12-07 15:38:26 +000013042
Martin v. Löwiseba40652007-08-30 20:10:57 +000013043{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13044echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013045if test "$have_long_long" = yes -a \
13046 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13047 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013048
Martin v. Löwis11437992002-04-12 09:54:03 +000013049cat >>confdefs.h <<\_ACEOF
13050#define HAVE_LARGEFILE_SUPPORT 1
13051_ACEOF
13052
Martin v. Löwiseba40652007-08-30 20:10:57 +000013053 { echo "$as_me:$LINENO: result: yes" >&5
13054echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013055else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013056 { echo "$as_me:$LINENO: result: no" >&5
13057echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013058fi
13059
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013060# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013061{ echo "$as_me:$LINENO: checking size of time_t" >&5
13062echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013063if test "${ac_cv_sizeof_time_t+set}" = set; then
13064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013065else
13066 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013067 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013068else
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013070/* confdefs.h. */
13071_ACEOF
13072cat confdefs.h >>conftest.$ac_ext
13073cat >>conftest.$ac_ext <<_ACEOF
13074/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013075#include <stdio.h>
13076#include <time.h>
13077main()
13078{
13079 FILE *f=fopen("conftestval", "w");
13080 if (!f) exit(1);
13081 fprintf(f, "%d\n", sizeof(time_t));
13082 exit(0);
13083}
Martin v. Löwis11437992002-04-12 09:54:03 +000013084_ACEOF
13085rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013086if { (ac_try="$ac_link"
13087case "(($ac_try" in
13088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13089 *) ac_try_echo=$ac_try;;
13090esac
13091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13092 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 ac_status=$?
13094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013096 { (case "(($ac_try" in
13097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13098 *) ac_try_echo=$ac_try;;
13099esac
13100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13101 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ac_status=$?
13103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13104 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013105 ac_cv_sizeof_time_t=`cat conftestval`
13106else
Martin v. Löwis11437992002-04-12 09:54:03 +000013107 echo "$as_me: program exited with status $ac_status" >&5
13108echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013109sed 's/^/| /' conftest.$ac_ext >&5
13110
Martin v. Löwis11437992002-04-12 09:54:03 +000013111( exit $ac_status )
13112ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013114rm -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 +000013115fi
13116
Martin v. Löwiseba40652007-08-30 20:10:57 +000013117
13118
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013119fi
13120
Martin v. Löwiseba40652007-08-30 20:10:57 +000013121{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13122echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013123
13124cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013125#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013126_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013127
Michael W. Hudson54241132001-12-07 15:38:26 +000013128
13129
Trent Mick635f6fb2000-08-23 21:33:05 +000013130# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013131ac_save_cc="$CC"
13132if test "$ac_cv_kpthread" = "yes"
13133then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013134elif test "$ac_cv_kthread" = "yes"
13135then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013136elif test "$ac_cv_pthread" = "yes"
13137then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013139{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13140echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013141have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013143/* confdefs.h. */
13144_ACEOF
13145cat confdefs.h >>conftest.$ac_ext
13146cat >>conftest.$ac_ext <<_ACEOF
13147/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013148#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013149int
13150main ()
13151{
Guido van Rossum12580492000-09-24 16:47:19 +000013152pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 ;
13154 return 0;
13155}
13156_ACEOF
13157rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013158if { (ac_try="$ac_compile"
13159case "(($ac_try" in
13160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13161 *) ac_try_echo=$ac_try;;
13162esac
13163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013166 grep -v '^ *+' conftest.er1 >conftest.err
13167 rm -f conftest.er1
13168 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013170 (exit $ac_status); } && {
13171 test -z "$ac_c_werror_flag" ||
13172 test ! -s conftest.err
13173 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013174 have_pthread_t=yes
13175else
Martin v. Löwis11437992002-04-12 09:54:03 +000013176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013177sed 's/^/| /' conftest.$ac_ext >&5
13178
Martin v. Löwiseba40652007-08-30 20:10:57 +000013179
Trent Mick635f6fb2000-08-23 21:33:05 +000013180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013181
13182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13183{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13184echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013185if test "$have_pthread_t" = yes ; then
13186 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013187 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13188echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013189 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
13190 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013191else
13192 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013193 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013194else
Martin v. Löwis11437992002-04-12 09:54:03 +000013195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013196/* confdefs.h. */
13197_ACEOF
13198cat confdefs.h >>conftest.$ac_ext
13199cat >>conftest.$ac_ext <<_ACEOF
13200/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013201#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013202#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013203 main()
13204 {
13205 FILE *f=fopen("conftestval", "w");
13206 if (!f) exit(1);
13207 fprintf(f, "%d\n", sizeof(pthread_t));
13208 exit(0);
13209 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013210_ACEOF
13211rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013212if { (ac_try="$ac_link"
13213case "(($ac_try" in
13214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13215 *) ac_try_echo=$ac_try;;
13216esac
13217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13218 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 ac_status=$?
13220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013222 { (case "(($ac_try" in
13223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13224 *) ac_try_echo=$ac_try;;
13225esac
13226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13227 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 ac_status=$?
13229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13230 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013231 ac_cv_sizeof_pthread_t=`cat conftestval`
13232else
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 echo "$as_me: program exited with status $ac_status" >&5
13234echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013235sed 's/^/| /' conftest.$ac_ext >&5
13236
Martin v. Löwis11437992002-04-12 09:54:03 +000013237( exit $ac_status )
13238ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013240rm -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 +000013241fi
13242
Martin v. Löwiseba40652007-08-30 20:10:57 +000013243
13244
Trent Mick635f6fb2000-08-23 21:33:05 +000013245fi
13246
Martin v. Löwiseba40652007-08-30 20:10:57 +000013247 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13248echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013249
13250cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013251#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013252_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013253
13254fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013255CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013256
Martin v. Löwiseba40652007-08-30 20:10:57 +000013257{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
13258echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
13259# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000013260if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013261 enableval=$enable_toolbox_glue;
13262fi
Jack Jansene578a632001-08-15 01:27:14 +000013263
13264
13265if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000013266then
Jack Jansene578a632001-08-15 01:27:14 +000013267 case $ac_sys_system/$ac_sys_release in
13268 Darwin/*)
13269 enable_toolbox_glue="yes";;
13270 *)
13271 enable_toolbox_glue="no";;
13272 esac
13273fi
13274case "$enable_toolbox_glue" in
13275yes)
Jack Jansene578a632001-08-15 01:27:14 +000013276 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013277 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
13279cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013280#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013281_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013282
13283 ;;
13284*)
Jack Jansene578a632001-08-15 01:27:14 +000013285 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000013286 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000013287 ;;
13288esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013289{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
13290echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013291
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013292
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013293
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013294case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013295 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013296 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13297 ;;
13298 Darwin/*)
13299 OTHER_LIBTOOL_OPT=""
13300 ;;
13301esac
13302
13303
13304case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013305 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000013306 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13307 if test "${enable_universalsdk}"; then
13308 :
13309 else
13310 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
13311 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013312 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013313 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013314 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013315 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13316 if test ${gcc_version} '<' 4.0
13317 then
13318 LIBTOOL_CRUFT="-lcc_dynamic"
13319 else
13320 LIBTOOL_CRUFT=""
13321 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000013322 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000013323 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013324 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013325esac
13326
Martin v. Löwiseba40652007-08-30 20:10:57 +000013327{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13328echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013329if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013330then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013331 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013332 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013333 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335cat >>confdefs.h <<\_ACEOF
13336#define WITH_NEXT_FRAMEWORK 1
13337_ACEOF
13338
Martin v. Löwiseba40652007-08-30 20:10:57 +000013339 { echo "$as_me:$LINENO: result: yes" >&5
13340echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013341else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013342 { echo "$as_me:$LINENO: result: no" >&5
13343echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013344fi
13345
Martin v. Löwiseba40652007-08-30 20:10:57 +000013346{ echo "$as_me:$LINENO: checking for dyld" >&5
13347echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013348case $ac_sys_system/$ac_sys_release in
13349 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351cat >>confdefs.h <<\_ACEOF
13352#define WITH_DYLD 1
13353_ACEOF
13354
Martin v. Löwiseba40652007-08-30 20:10:57 +000013355 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13356echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013357 ;;
13358 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013359 { echo "$as_me:$LINENO: result: no" >&5
13360echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013361 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013362esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013363
Guido van Rossum0a516c91994-09-12 10:58:40 +000013364# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013365
Michael W. Hudson54241132001-12-07 15:38:26 +000013366
13367
13368
13369
Guido van Rossum0a516c91994-09-12 10:58:40 +000013370# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013371# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000013372{ echo "$as_me:$LINENO: checking SO" >&5
13373echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013374if test -z "$SO"
13375then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013376 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000013377 hp*|HP*)
13378 case `uname -m` in
13379 ia64) SO=.so;;
13380 *) SO=.sl;;
13381 esac
13382 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013383 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013384 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013385 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013386else
13387 # this might also be a termcap variable, see #610332
13388 echo
13389 echo '====================================================================='
13390 echo '+ +'
13391 echo '+ WARNING: You have set SO in your environment. +'
13392 echo '+ Do you really mean to change the extension for shared libraries? +'
13393 echo '+ Continuing in 10 seconds to let you to ponder. +'
13394 echo '+ +'
13395 echo '====================================================================='
13396 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013398{ echo "$as_me:$LINENO: result: $SO" >&5
13399echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013400
Ronald Oussoren79f90492009-01-02 10:44:46 +000013401
Neal Norwitz58e28882006-05-19 07:00:58 +000013402cat >>confdefs.h <<_ACEOF
13403#define SHLIB_EXT "$SO"
13404_ACEOF
13405
Guido van Rossum0a516c91994-09-12 10:58:40 +000013406# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013407# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013408# (Shared libraries in this instance are shared modules to be loaded into
13409# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013410{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13411echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013412if test -z "$LDSHARED"
13413then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013414 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013415 AIX*)
13416 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013417 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013418 ;;
13419 BeOS*)
13420 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013421 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013422 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013423 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013424 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013426 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013427 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013428 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013429 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013430 hp*|HP*)
13431 if test "$GCC" = "yes"
13432 then LDSHARED='$(CC) -shared'
13433 else LDSHARED='ld -b';
13434 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013435 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013436 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013437 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13438 if test "$enable_framework" ; then
13439 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013440 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13441 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013442 else
13443 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013444 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013445 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013446 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013447 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13448 if test "$enable_framework" ; then
13449 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013450 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13451 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013452 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013453 # No framework, use the Python app as bundle-loader
13454 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013455 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013456 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013457 Darwin/*)
13458 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13459 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013460
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013461 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013462 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013463 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013464 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013465 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013466 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13467 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013468 else
13469 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13470 if test "$enable_framework" ; then
13471 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013472 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13473 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013474 else
13475 # No framework, use the Python app as bundle-loader
13476 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13477 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13478 fi
13479 fi
13480 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013481 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013482 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013483 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013484 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013485 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013486 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013487 else
13488 LDSHARED="ld -Bshareable ${LDFLAGS}"
13489 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013490 OpenBSD*)
13491 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13492 then
13493 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13494 else
13495 case `uname -r` in
13496 [01].* | 2.[0-7] | 2.[0-7].*)
13497 LDSHARED="ld -Bshareable ${LDFLAGS}"
13498 ;;
13499 *)
13500 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13501 ;;
13502 esac
13503 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013504 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013505 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013506 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013507 then LDSHARED='$(CC) -shared'
13508 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013509 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013510 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013511 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013512 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013513 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013514 *) LDSHARED="ld";;
13515 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013517{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13518echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013519BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013520# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013521# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13523echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013524if test -z "$CCSHARED"
13525then
Guido van Rossum07397971997-04-29 21:49:50 +000013526 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013527 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013528 then CCSHARED="-fPIC";
13529 elif test `uname -p` = sparc;
13530 then CCSHARED="-xcode=pic32";
13531 else CCSHARED="-Kpic";
13532 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013533 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013534 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013535 else CCSHARED="+z";
13536 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013537 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013538 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013539 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013540 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013541 if test "$GCC" = "yes"
13542 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013543 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013544 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013545 SCO_SV*)
13546 if test "$GCC" = "yes"
13547 then CCSHARED="-fPIC"
13548 else CCSHARED="-Kpic -belf"
13549 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013550 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013551 IRIX*/6*) case $CC in
13552 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013553 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013554 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013555 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013556 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013558{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13559echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013560# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013561# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013562{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13563echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013564if test -z "$LINKFORSHARED"
13565then
Guido van Rossum07397971997-04-29 21:49:50 +000013566 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013567 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013568 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013569 LINKFORSHARED="-Wl,-E -Wl,+s";;
13570# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013571 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013572 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013573 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013574 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013575 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13576 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013577 # not used by the core itself but which needs to be in the core so
13578 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013579 # -prebind is no longer used, because it actually seems to give a
13580 # slowdown in stead of a speedup, maybe due to the large number of
13581 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013582
13583 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013584 if test "$enable_framework"
13585 then
Jack Jansenda49e192005-01-07 13:08:22 +000013586 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013587 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013588 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013589 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013590 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013591 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013592 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013593 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13594 then
13595 LINKFORSHARED="-Wl,--export-dynamic"
13596 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013597 SunOS/5*) case $CC in
13598 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013599 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013600 then
13601 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013602 fi;;
13603 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013604 CYGWIN*)
13605 if test $enable_shared = "no"
13606 then
13607 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13608 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013609 QNX*)
13610 # -Wl,-E causes the symbols to be added to the dynamic
13611 # symbol table so that they can be found when a module
13612 # is loaded. -N 2048K causes the stack size to be set
13613 # to 2048 kilobytes so that the stack doesn't overflow
13614 # when running test_compile.py.
13615 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013616 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013618{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13619echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013620
Michael W. Hudson54241132001-12-07 15:38:26 +000013621
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013622
Martin v. Löwiseba40652007-08-30 20:10:57 +000013623{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13624echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013625if test ! "$LIBRARY" = "$LDLIBRARY"
13626then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013627 case $ac_sys_system in
13628 CYGWIN*)
13629 # Cygwin needs CCSHARED when building extension DLLs
13630 # but not when building the interpreter DLL.
13631 CFLAGSFORSHARED='';;
13632 *)
13633 CFLAGSFORSHARED='$(CCSHARED)'
13634 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013636{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13637echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013638
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013639# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13640# library (with --enable-shared).
13641# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013642# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13643# if it is not required, since it creates a dependency of the shared library
13644# to LIBS. This, in turn, means that applications linking the shared libpython
13645# don't need to link LIBS explicitly. The default should be only changed
13646# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013647
Martin v. Löwiseba40652007-08-30 20:10:57 +000013648{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13649echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013650case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013651 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013652 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013653esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013654{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13655echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013656
13657
Guido van Rossum627b2d71993-12-24 10:39:16 +000013658# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Martin v. Löwiseba40652007-08-30 20:10:57 +000013660{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13661echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013662if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013664else
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013666LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013668/* confdefs.h. */
13669_ACEOF
13670cat confdefs.h >>conftest.$ac_ext
13671cat >>conftest.$ac_ext <<_ACEOF
13672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013673
Martin v. Löwiseba40652007-08-30 20:10:57 +000013674/* Override any GCC internal prototype to avoid an error.
13675 Use char because int might match the return type of a GCC
13676 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013677#ifdef __cplusplus
13678extern "C"
13679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013680char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013681int
13682main ()
13683{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013684return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013685 ;
13686 return 0;
13687}
13688_ACEOF
13689rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013690if { (ac_try="$ac_link"
13691case "(($ac_try" in
13692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13693 *) ac_try_echo=$ac_try;;
13694esac
13695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13696 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013698 grep -v '^ *+' conftest.er1 >conftest.err
13699 rm -f conftest.er1
13700 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013702 (exit $ac_status); } && {
13703 test -z "$ac_c_werror_flag" ||
13704 test ! -s conftest.err
13705 } && test -s conftest$ac_exeext &&
13706 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013708else
Martin v. Löwis11437992002-04-12 09:54:03 +000013709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013710sed 's/^/| /' conftest.$ac_ext >&5
13711
Martin v. Löwiseba40652007-08-30 20:10:57 +000013712 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013714
13715rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013716 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013717LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013719{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13720echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013721if test $ac_cv_lib_dl_dlopen = yes; then
13722 cat >>confdefs.h <<_ACEOF
13723#define HAVE_LIBDL 1
13724_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013725
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013726 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728fi
13729 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013730
Martin v. Löwiseba40652007-08-30 20:10:57 +000013731{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13732echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013733if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735else
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013737LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013739/* confdefs.h. */
13740_ACEOF
13741cat confdefs.h >>conftest.$ac_ext
13742cat >>conftest.$ac_ext <<_ACEOF
13743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013744
Martin v. Löwiseba40652007-08-30 20:10:57 +000013745/* Override any GCC internal prototype to avoid an error.
13746 Use char because int might match the return type of a GCC
13747 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013748#ifdef __cplusplus
13749extern "C"
13750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013751char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013752int
13753main ()
13754{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013755return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 ;
13757 return 0;
13758}
13759_ACEOF
13760rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013761if { (ac_try="$ac_link"
13762case "(($ac_try" in
13763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13764 *) ac_try_echo=$ac_try;;
13765esac
13766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13767 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013769 grep -v '^ *+' conftest.er1 >conftest.err
13770 rm -f conftest.er1
13771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013773 (exit $ac_status); } && {
13774 test -z "$ac_c_werror_flag" ||
13775 test ! -s conftest.err
13776 } && test -s conftest$ac_exeext &&
13777 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779else
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013781sed 's/^/| /' conftest.$ac_ext >&5
13782
Martin v. Löwiseba40652007-08-30 20:10:57 +000013783 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013785
13786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013788LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013790{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13791echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013792if test $ac_cv_lib_dld_shl_load = yes; then
13793 cat >>confdefs.h <<_ACEOF
13794#define HAVE_LIBDLD 1
13795_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013797 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013798
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799fi
13800 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013801
Ronald Oussoren79f90492009-01-02 10:44:46 +000013802# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013803if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013804 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13805echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013806if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013808else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013809 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013811/* confdefs.h. */
13812_ACEOF
13813cat confdefs.h >>conftest.$ac_ext
13814cat >>conftest.$ac_ext <<_ACEOF
13815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
Martin v. Löwiseba40652007-08-30 20:10:57 +000013817/* Override any GCC internal prototype to avoid an error.
13818 Use char because int might match the return type of a GCC
13819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013820#ifdef __cplusplus
13821extern "C"
13822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013823char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013824int
13825main ()
13826{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013827return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ;
13829 return 0;
13830}
13831_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013832for ac_lib in '' pthread rt posix4; do
13833 if test -z "$ac_lib"; then
13834 ac_res="none required"
13835 else
13836 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013837 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013838 fi
13839 rm -f conftest.$ac_objext conftest$ac_exeext
13840if { (ac_try="$ac_link"
13841case "(($ac_try" in
13842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13843 *) ac_try_echo=$ac_try;;
13844esac
13845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13846 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013847 ac_status=$?
13848 grep -v '^ *+' conftest.er1 >conftest.err
13849 rm -f conftest.er1
13850 cat conftest.err >&5
13851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852 (exit $ac_status); } && {
13853 test -z "$ac_c_werror_flag" ||
13854 test ! -s conftest.err
13855 } && test -s conftest$ac_exeext &&
13856 $as_test_x conftest$ac_exeext; then
13857 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013858else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013859 echo "$as_me: failed program was:" >&5
13860sed 's/^/| /' conftest.$ac_ext >&5
13861
Martin v. Löwiseba40652007-08-30 20:10:57 +000013862
Brett Cannon19fab762007-06-02 03:02:29 +000013863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013864
13865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13866 conftest$ac_exeext
13867 if test "${ac_cv_search_sem_init+set}" = set; then
13868 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870done
13871if test "${ac_cv_search_sem_init+set}" = set; then
13872 :
13873else
13874 ac_cv_search_sem_init=no
13875fi
13876rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013877LIBS=$ac_func_search_save_LIBS
13878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013879{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13880echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13881ac_res=$ac_cv_search_sem_init
13882if test "$ac_res" != no; then
13883 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013884
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013885fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013886 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013887 # posix4 on Solaris 2.6
13888 # pthread (first!) on Linux
13889fi
13890
Martin v. Löwis19d17342003-06-14 21:03:05 +000013891# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013892{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13893echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013894if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13895 echo $ECHO_N "(cached) $ECHO_C" >&6
13896else
13897 ac_check_lib_save_LIBS=$LIBS
13898LIBS="-lintl $LIBS"
13899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013900/* confdefs.h. */
13901_ACEOF
13902cat confdefs.h >>conftest.$ac_ext
13903cat >>conftest.$ac_ext <<_ACEOF
13904/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013905
Martin v. Löwiseba40652007-08-30 20:10:57 +000013906/* Override any GCC internal prototype to avoid an error.
13907 Use char because int might match the return type of a GCC
13908 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013909#ifdef __cplusplus
13910extern "C"
13911#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013912char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013913int
13914main ()
13915{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013916return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013917 ;
13918 return 0;
13919}
13920_ACEOF
13921rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013922if { (ac_try="$ac_link"
13923case "(($ac_try" in
13924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13925 *) ac_try_echo=$ac_try;;
13926esac
13927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13928 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013930 grep -v '^ *+' conftest.er1 >conftest.err
13931 rm -f conftest.er1
13932 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013934 (exit $ac_status); } && {
13935 test -z "$ac_c_werror_flag" ||
13936 test ! -s conftest.err
13937 } && test -s conftest$ac_exeext &&
13938 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013939 ac_cv_lib_intl_textdomain=yes
13940else
13941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013942sed 's/^/| /' conftest.$ac_ext >&5
13943
Martin v. Löwiseba40652007-08-30 20:10:57 +000013944 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013946
13947rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013948 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013949LIBS=$ac_check_lib_save_LIBS
13950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013951{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13952echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013953if test $ac_cv_lib_intl_textdomain = yes; then
13954
13955cat >>confdefs.h <<\_ACEOF
13956#define WITH_LIBINTL 1
13957_ACEOF
13958
13959fi
13960
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013961
13962# checks for system dependent C++ extensions support
13963case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013964 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13965echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013967/* confdefs.h. */
13968_ACEOF
13969cat confdefs.h >>conftest.$ac_ext
13970cat >>conftest.$ac_ext <<_ACEOF
13971/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013972#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013973int
13974main ()
13975{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013976loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013977 ;
13978 return 0;
13979}
13980_ACEOF
13981rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013982if { (ac_try="$ac_link"
13983case "(($ac_try" in
13984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13985 *) ac_try_echo=$ac_try;;
13986esac
13987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13988 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013990 grep -v '^ *+' conftest.er1 >conftest.err
13991 rm -f conftest.er1
13992 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013994 (exit $ac_status); } && {
13995 test -z "$ac_c_werror_flag" ||
13996 test ! -s conftest.err
13997 } && test -s conftest$ac_exeext &&
13998 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013999
Martin v. Löwis11437992002-04-12 09:54:03 +000014000cat >>confdefs.h <<\_ACEOF
14001#define AIX_GENUINE_CPLUSPLUS 1
14002_ACEOF
14003
Martin v. Löwiseba40652007-08-30 20:10:57 +000014004 { echo "$as_me:$LINENO: result: yes" >&5
14005echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014006else
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014008sed 's/^/| /' conftest.$ac_ext >&5
14009
Martin v. Löwiseba40652007-08-30 20:10:57 +000014010 { echo "$as_me:$LINENO: result: no" >&5
14011echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014013
14014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014015 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014016 *) ;;
14017esac
14018
Guido van Rossum70c7f481998-03-26 18:44:10 +000014019# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014020# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014021{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14022echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014023if test "${ac_cv_lib_nsl_t_open+set}" = set; then
14024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014025else
Martin v. Löwis11437992002-04-12 09:54:03 +000014026 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014027LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014028cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014029/* confdefs.h. */
14030_ACEOF
14031cat confdefs.h >>conftest.$ac_ext
14032cat >>conftest.$ac_ext <<_ACEOF
14033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014034
Martin v. Löwiseba40652007-08-30 20:10:57 +000014035/* Override any GCC internal prototype to avoid an error.
14036 Use char because int might match the return type of a GCC
14037 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014038#ifdef __cplusplus
14039extern "C"
14040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014041char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014042int
14043main ()
14044{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014045return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014046 ;
14047 return 0;
14048}
14049_ACEOF
14050rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014051if { (ac_try="$ac_link"
14052case "(($ac_try" in
14053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14054 *) ac_try_echo=$ac_try;;
14055esac
14056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14057 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014059 grep -v '^ *+' conftest.er1 >conftest.err
14060 rm -f conftest.er1
14061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014063 (exit $ac_status); } && {
14064 test -z "$ac_c_werror_flag" ||
14065 test ! -s conftest.err
14066 } && test -s conftest$ac_exeext &&
14067 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014069else
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014071sed 's/^/| /' conftest.$ac_ext >&5
14072
Martin v. Löwiseba40652007-08-30 20:10:57 +000014073 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075
14076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014078LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014080{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14081echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014082if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014083 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014084fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014085 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000014086{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14087echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014088if test "${ac_cv_lib_socket_socket+set}" = set; then
14089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014090else
Martin v. Löwis11437992002-04-12 09:54:03 +000014091 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014092LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014094/* confdefs.h. */
14095_ACEOF
14096cat confdefs.h >>conftest.$ac_ext
14097cat >>conftest.$ac_ext <<_ACEOF
14098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
Martin v. Löwiseba40652007-08-30 20:10:57 +000014100/* Override any GCC internal prototype to avoid an error.
14101 Use char because int might match the return type of a GCC
14102 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014103#ifdef __cplusplus
14104extern "C"
14105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014106char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014107int
14108main ()
14109{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014110return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 ;
14112 return 0;
14113}
14114_ACEOF
14115rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014116if { (ac_try="$ac_link"
14117case "(($ac_try" in
14118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14119 *) ac_try_echo=$ac_try;;
14120esac
14121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14122 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014124 grep -v '^ *+' conftest.er1 >conftest.err
14125 rm -f conftest.er1
14126 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014128 (exit $ac_status); } && {
14129 test -z "$ac_c_werror_flag" ||
14130 test ! -s conftest.err
14131 } && test -s conftest$ac_exeext &&
14132 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014134else
Martin v. Löwis11437992002-04-12 09:54:03 +000014135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014136sed 's/^/| /' conftest.$ac_ext >&5
14137
Martin v. Löwiseba40652007-08-30 20:10:57 +000014138 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014140
14141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014143LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014145{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14146echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014147if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014148 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014149fi
14150 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014151
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000014152case "$ac_sys_system" in
14153BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014154{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
14155echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014156if test "${ac_cv_lib_net_socket+set}" = set; then
14157 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014158else
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014160LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014161cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014162/* confdefs.h. */
14163_ACEOF
14164cat confdefs.h >>conftest.$ac_ext
14165cat >>conftest.$ac_ext <<_ACEOF
14166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
Martin v. Löwiseba40652007-08-30 20:10:57 +000014168/* Override any GCC internal prototype to avoid an error.
14169 Use char because int might match the return type of a GCC
14170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014171#ifdef __cplusplus
14172extern "C"
14173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014174char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014175int
14176main ()
14177{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014178return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014179 ;
14180 return 0;
14181}
14182_ACEOF
14183rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014184if { (ac_try="$ac_link"
14185case "(($ac_try" in
14186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14187 *) ac_try_echo=$ac_try;;
14188esac
14189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14190 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014192 grep -v '^ *+' conftest.er1 >conftest.err
14193 rm -f conftest.er1
14194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014196 (exit $ac_status); } && {
14197 test -z "$ac_c_werror_flag" ||
14198 test ! -s conftest.err
14199 } && test -s conftest$ac_exeext &&
14200 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014201 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014202else
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014204sed 's/^/| /' conftest.$ac_ext >&5
14205
Martin v. Löwiseba40652007-08-30 20:10:57 +000014206 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014208
14209rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014210 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014211LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014213{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
14214echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014215if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014216 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014217fi
14218 # BeOS
14219;;
14220esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000014221
Martin v. Löwiseba40652007-08-30 20:10:57 +000014222{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14223echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Martin v. Löwiseba40652007-08-30 20:10:57 +000014225# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014226if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014227 withval=$with_libs;
14228{ echo "$as_me:$LINENO: result: $withval" >&5
14229echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014230LIBS="$withval $LIBS"
14231
14232else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014233 { echo "$as_me:$LINENO: result: no" >&5
14234echo "${ECHO_T}no" >&6; }
14235fi
14236
Guido van Rossum7f43da71994-08-01 12:15:30 +000014237
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014238# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14240echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014241
Martin v. Löwiseba40652007-08-30 20:10:57 +000014242# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014243if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014244 withval=$with_system_ffi;
14245fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014246
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014247
Martin v. Löwiseba40652007-08-30 20:10:57 +000014248{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14249echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014257# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014258if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Warsawc0d24d82000-06-29 16:12:00 +000014279USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014280
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014285# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014286if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014287 withval=$with_dec_threads;
14288{ 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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014295 { echo "$as_me:$LINENO: result: no" >&5
14296echo "${ECHO_T}no" >&6; }
14297fi
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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014312# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014313if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014314 withval=$with_threads;
14315fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014316
14317
Barry Warsawc0d24d82000-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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014320# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014321if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014322 withval=$with_thread; with_threads=$with_thread
14323fi
14324
Barry Warsawc0d24d82000-06-29 16:12:00 +000014325
14326if test -z "$with_threads"
14327then with_threads="yes"
14328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329{ echo "$as_me:$LINENO: result: $with_threads" >&5
14330echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014331
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014332
Barry Warsawc0d24d82000-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)
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14417rm -f conftest*
14418
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14430 echo $ECHO_N "(cached) $ECHO_C" >&6
14431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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?
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448if { (ac_try="$ac_compile"
14449case "(($ac_try" in
14450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14451 *) ac_try_echo=$ac_try;;
14452esac
14453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14454 (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
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014467sed 's/^/| /' conftest.$ac_ext >&5
14468
Martin v. Löwiseba40652007-08-30 20:10:57 +000014469 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471
14472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14473{ 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?
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14493 (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
14498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14505 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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510
Martin v. Löwis11437992002-04-12 09:54:03 +000014511rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +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: )
Martin v. Löwis11437992002-04-12 09:54:03 +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;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014520 { 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;}
14522 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014523 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014524 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +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;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014527 { 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;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014533 { 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;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014535 { 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;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014537 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014538## ------------------------------------------------ ##
14539## Report this to http://www.python.org/python-bugs ##
14540## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014541_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14548 echo $ECHO_N "(cached) $ECHO_C" >&6
14549else
14550 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14556if test $ac_cv_header_cthreads_h = yes; then
14557 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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14578 echo $ECHO_N "(cached) $ECHO_C" >&6
14579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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?
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014596if { (ac_try="$ac_compile"
14597case "(($ac_try" in
14598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14599 *) ac_try_echo=$ac_try;;
14600esac
14601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14602 (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
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014615sed 's/^/| /' conftest.$ac_ext >&5
14616
Martin v. Löwiseba40652007-08-30 20:10:57 +000014617 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014619
14620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14621{ 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?
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14641 (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
14646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14653 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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014658
Martin v. Löwis11437992002-04-12 09:54:03 +000014659rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +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: )
Martin v. Löwis11437992002-04-12 09:54:03 +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;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014668 { 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;}
14670 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014671 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014672 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +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;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014675 { 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;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014681 { 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;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014683 { 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;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014685 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014686## ------------------------------------------------ ##
14687## Report this to http://www.python.org/python-bugs ##
14688## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014689_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14696 echo $ECHO_N "(cached) $ECHO_C" >&6
14697else
14698 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14704if test $ac_cv_header_mach_cthreads_h = yes; then
14705 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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014725if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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"
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014769if { (ac_try="$ac_link"
14770case "(($ac_try" in
14771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14772 *) ac_try_echo=$ac_try;;
14773esac
14774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14775 (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
Martin v. Löwis11437992002-04-12 09:54:03 +000014780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014781 (exit $ac_status); } && {
14782 test -z "$ac_c_werror_flag" ||
14783 test ! -s conftest.err
14784 } && test -s conftest$ac_exeext &&
14785 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwis11437992002-04-12 09:54:03 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14804 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
Martin v. Löwiseba40652007-08-30 20:10:57 +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. */
Martin v. Löwiseba40652007-08-30 20:10:57 +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{
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014852if { (ac_try="$ac_link"
14853case "(($ac_try" in
14854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14855 *) ac_try_echo=$ac_try;;
14856esac
14857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14858 (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
Martin v. Löwis11437992002-04-12 09:54:03 +000014863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014864 (exit $ac_status); } && {
14865 test -z "$ac_c_werror_flag" ||
14866 test ! -s conftest.err
14867 } && 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
Martin v. Löwis11437992002-04-12 09:54:03 +000014871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014872sed 's/^/| /' conftest.$ac_ext >&5
14873
Martin v. Löwiseba40652007-08-30 20:10:57 +000014874 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014880{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14881echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014882if test $ac_cv_func_pthread_detach = yes; then
14883 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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14895 echo $ECHO_N "(cached) $ECHO_C" >&6
14896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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?
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014913if { (ac_try="$ac_compile"
14914case "(($ac_try" in
14915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14916 *) ac_try_echo=$ac_try;;
14917esac
14918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14919 (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
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014932sed 's/^/| /' conftest.$ac_ext >&5
14933
Martin v. Löwiseba40652007-08-30 20:10:57 +000014934 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014936
14937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14938{ 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?
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14958 (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
14963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +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
14970 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
Martin v. Löwiseba40652007-08-30 20:10:57 +000014975
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014976rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +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: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +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;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014985 { 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;}
14987 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014988 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014989 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +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;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014992 { 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;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014998 { 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;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015000 { 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;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015002 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015003## ------------------------------------------------ ##
15004## Report this to http://www.python.org/python-bugs ##
15005## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015006_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
15013 echo $ECHO_N "(cached) $ECHO_C" >&6
15014else
15015 ac_cv_header_atheos_threads_h=$ac_header_preproc
15016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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
15021if test $ac_cv_header_atheos_threads_h = yes; then
15022 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
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15036echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015037if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15038 echo $ECHO_N "(cached) $ECHO_C" >&6
15039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015040{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15041echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015042else
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
15045echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015046cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015047/* confdefs.h. */
15048_ACEOF
15049cat confdefs.h >>conftest.$ac_ext
15050cat >>conftest.$ac_ext <<_ACEOF
15051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015052$ac_includes_default
15053#include <kernel/OS.h>
15054_ACEOF
15055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056if { (ac_try="$ac_compile"
15057case "(($ac_try" in
15058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15059 *) ac_try_echo=$ac_try;;
15060esac
15061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015064 grep -v '^ *+' conftest.er1 >conftest.err
15065 rm -f conftest.er1
15066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068 (exit $ac_status); } && {
15069 test -z "$ac_c_werror_flag" ||
15070 test ! -s conftest.err
15071 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015072 ac_header_compiler=yes
15073else
15074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015075sed 's/^/| /' conftest.$ac_ext >&5
15076
Martin v. Löwiseba40652007-08-30 20:10:57 +000015077 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015079
15080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15081{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15082echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015083
15084# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015085{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
15086echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015087cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015088/* confdefs.h. */
15089_ACEOF
15090cat confdefs.h >>conftest.$ac_ext
15091cat >>conftest.$ac_ext <<_ACEOF
15092/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015093#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015094_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015095if { (ac_try="$ac_cpp conftest.$ac_ext"
15096case "(($ac_try" in
15097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15098 *) ac_try_echo=$ac_try;;
15099esac
15100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15101 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015103 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 rm -f conftest.er1
15105 cat conftest.err >&5
15106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107 (exit $ac_status); } >/dev/null && {
15108 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15109 test ! -s conftest.err
15110 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 ac_header_preproc=yes
15112else
15113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015114sed 's/^/| /' conftest.$ac_ext >&5
15115
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118
Martin v. Löwis11437992002-04-12 09:54:03 +000015119rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015120{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15121echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015122
Martin v. Löwis11437992002-04-12 09:54:03 +000015123# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015124case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15125 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
15127echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015128 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
15129echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
15130 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015131 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015132 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015133 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
15134echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015135 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
15136echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
15137 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
15138echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
15139 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
15140echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015141 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
15142echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015143 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
15144echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015145 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015146## ------------------------------------------------ ##
15147## Report this to http://www.python.org/python-bugs ##
15148## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015149_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015150 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015151 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015152esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015153{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15154echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015155if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15156 echo $ECHO_N "(cached) $ECHO_C" >&6
15157else
15158 ac_cv_header_kernel_OS_h=$ac_header_preproc
15159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015160{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15161echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015162
15163fi
15164if test $ac_cv_header_kernel_OS_h = yes; then
15165 cat >>confdefs.h <<\_ACEOF
15166#define WITH_THREAD 1
15167_ACEOF
15168
15169
15170cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015171#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015172_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015173
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015174 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015175else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015176
Martin v. Löwiseba40652007-08-30 20:10:57 +000015177 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15178echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015179if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
15180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015181else
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015183LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015185/* confdefs.h. */
15186_ACEOF
15187cat confdefs.h >>conftest.$ac_ext
15188cat >>conftest.$ac_ext <<_ACEOF
15189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015190
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191/* Override any GCC internal prototype to avoid an error.
15192 Use char because int might match the return type of a GCC
15193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015194#ifdef __cplusplus
15195extern "C"
15196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015197char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015198int
15199main ()
15200{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 ;
15203 return 0;
15204}
15205_ACEOF
15206rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207if { (ac_try="$ac_link"
15208case "(($ac_try" in
15209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15210 *) ac_try_echo=$ac_try;;
15211esac
15212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15213 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015215 grep -v '^ *+' conftest.er1 >conftest.err
15216 rm -f conftest.er1
15217 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219 (exit $ac_status); } && {
15220 test -z "$ac_c_werror_flag" ||
15221 test ! -s conftest.err
15222 } && test -s conftest$ac_exeext &&
15223 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015225else
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015227sed 's/^/| /' conftest.$ac_ext >&5
15228
Martin v. Löwiseba40652007-08-30 20:10:57 +000015229 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015231
15232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015234LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015236{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15237echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015238if test $ac_cv_lib_pthreads_pthread_create = yes; then
15239 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015240#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015241_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015242
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015243 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015244 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015245 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015246else
Greg Steinadf63d62000-07-05 10:38:09 +000015247
Martin v. Löwiseba40652007-08-30 20:10:57 +000015248 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15249echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015250if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
15251 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015254LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015255cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015256/* confdefs.h. */
15257_ACEOF
15258cat confdefs.h >>conftest.$ac_ext
15259cat >>conftest.$ac_ext <<_ACEOF
15260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
Martin v. Löwiseba40652007-08-30 20:10:57 +000015262/* Override any GCC internal prototype to avoid an error.
15263 Use char because int might match the return type of a GCC
15264 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015265#ifdef __cplusplus
15266extern "C"
15267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015268char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015269int
15270main ()
15271{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015272return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 ;
15274 return 0;
15275}
15276_ACEOF
15277rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278if { (ac_try="$ac_link"
15279case "(($ac_try" in
15280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15281 *) ac_try_echo=$ac_try;;
15282esac
15283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15284 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015286 grep -v '^ *+' conftest.er1 >conftest.err
15287 rm -f conftest.er1
15288 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015290 (exit $ac_status); } && {
15291 test -z "$ac_c_werror_flag" ||
15292 test ! -s conftest.err
15293 } && test -s conftest$ac_exeext &&
15294 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015296else
Martin v. Löwis11437992002-04-12 09:54:03 +000015297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015298sed 's/^/| /' conftest.$ac_ext >&5
15299
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015302
15303rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015304 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015305LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15308echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015309if test $ac_cv_lib_c_r_pthread_create = yes; then
15310 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015311#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015312_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015313
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015314 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015315 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015316 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015317else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015318
Martin v. Löwiseba40652007-08-30 20:10:57 +000015319 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15320echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015321if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015323else
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015325LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015327/* confdefs.h. */
15328_ACEOF
15329cat confdefs.h >>conftest.$ac_ext
15330cat >>conftest.$ac_ext <<_ACEOF
15331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015332
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333/* Override any GCC internal prototype to avoid an error.
15334 Use char because int might match the return type of a GCC
15335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015336#ifdef __cplusplus
15337extern "C"
15338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015339char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015340int
15341main ()
15342{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015343return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 ;
15345 return 0;
15346}
15347_ACEOF
15348rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015349if { (ac_try="$ac_link"
15350case "(($ac_try" in
15351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15352 *) ac_try_echo=$ac_try;;
15353esac
15354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357 grep -v '^ *+' conftest.er1 >conftest.err
15358 rm -f conftest.er1
15359 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015361 (exit $ac_status); } && {
15362 test -z "$ac_c_werror_flag" ||
15363 test ! -s conftest.err
15364 } && test -s conftest$ac_exeext &&
15365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015367else
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015369sed 's/^/| /' conftest.$ac_ext >&5
15370
Martin v. Löwiseba40652007-08-30 20:10:57 +000015371 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373
15374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015376LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15379echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015380if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15381 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015382#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015383_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015384
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015385 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015386 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015387 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015388else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015389
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15391echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015392if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015394else
Martin v. Löwis11437992002-04-12 09:54:03 +000015395 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015396LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015398/* confdefs.h. */
15399_ACEOF
15400cat confdefs.h >>conftest.$ac_ext
15401cat >>conftest.$ac_ext <<_ACEOF
15402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015403
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404/* Override any GCC internal prototype to avoid an error.
15405 Use char because int might match the return type of a GCC
15406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015407#ifdef __cplusplus
15408extern "C"
15409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015410char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015411int
15412main ()
15413{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015414return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015415 ;
15416 return 0;
15417}
15418_ACEOF
15419rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420if { (ac_try="$ac_link"
15421case "(($ac_try" in
15422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15423 *) ac_try_echo=$ac_try;;
15424esac
15425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15426 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015428 grep -v '^ *+' conftest.er1 >conftest.err
15429 rm -f conftest.er1
15430 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432 (exit $ac_status); } && {
15433 test -z "$ac_c_werror_flag" ||
15434 test ! -s conftest.err
15435 } && test -s conftest$ac_exeext &&
15436 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015438else
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015440sed 's/^/| /' conftest.$ac_ext >&5
15441
Martin v. Löwiseba40652007-08-30 20:10:57 +000015442 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015444
15445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015447LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015449{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15450echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015451if test $ac_cv_lib_cma_pthread_create = yes; then
15452 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015453#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015454_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015455
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015456 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015457 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015458 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015459else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015460
Martin v. Löwis130fb172001-07-19 11:00:41 +000015461 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015462fi
15463
Guido van Rossum627b2d71993-12-24 10:39:16 +000015464
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015465fi
15466
Guido van Rossum0be3e491997-05-22 20:33:33 +000015467fi
15468
Guido van Rossum49545951997-12-02 19:28:29 +000015469fi
15470
Guido van Rossumb93a8621998-05-07 13:27:32 +000015471fi
15472
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015473
Michael W. Hudson54241132001-12-07 15:38:26 +000015474fi
15475
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015476
15477fi
15478
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015480
15481rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483fi
15484
Martin v. Löwis11437992002-04-12 09:54:03 +000015485fi
15486
15487
15488fi
15489
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015490
Michael W. Hudson54241132001-12-07 15:38:26 +000015491
Martin v. Löwiseba40652007-08-30 20:10:57 +000015492 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15493echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015494if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15495 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015496else
Martin v. Löwis11437992002-04-12 09:54:03 +000015497 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015498LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015500/* confdefs.h. */
15501_ACEOF
15502cat confdefs.h >>conftest.$ac_ext
15503cat >>conftest.$ac_ext <<_ACEOF
15504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015505
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506/* Override any GCC internal prototype to avoid an error.
15507 Use char because int might match the return type of a GCC
15508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015509#ifdef __cplusplus
15510extern "C"
15511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015512char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015513int
15514main ()
15515{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015516return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015517 ;
15518 return 0;
15519}
15520_ACEOF
15521rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015522if { (ac_try="$ac_link"
15523case "(($ac_try" in
15524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15525 *) ac_try_echo=$ac_try;;
15526esac
15527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015530 grep -v '^ *+' conftest.er1 >conftest.err
15531 rm -f conftest.er1
15532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534 (exit $ac_status); } && {
15535 test -z "$ac_c_werror_flag" ||
15536 test ! -s conftest.err
15537 } && test -s conftest$ac_exeext &&
15538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015539 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015540else
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015542sed 's/^/| /' conftest.$ac_ext >&5
15543
Martin v. Löwiseba40652007-08-30 20:10:57 +000015544 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015546
15547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015549LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015551{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15552echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015553if test $ac_cv_lib_mpc_usconfig = yes; then
15554 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015555#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015556_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015557
Martin v. Löwis130fb172001-07-19 11:00:41 +000015558 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015559 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015560 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015561fi
15562
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015563
Neal Norwitza978ab02002-11-02 16:58:05 +000015564 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15566echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015567if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15568 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015569else
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015571LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015573/* confdefs.h. */
15574_ACEOF
15575cat confdefs.h >>conftest.$ac_ext
15576cat >>conftest.$ac_ext <<_ACEOF
15577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015578
Martin v. Löwiseba40652007-08-30 20:10:57 +000015579/* Override any GCC internal prototype to avoid an error.
15580 Use char because int might match the return type of a GCC
15581 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015582#ifdef __cplusplus
15583extern "C"
15584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015585char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015586int
15587main ()
15588{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015589return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015590 ;
15591 return 0;
15592}
15593_ACEOF
15594rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595if { (ac_try="$ac_link"
15596case "(($ac_try" in
15597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15598 *) ac_try_echo=$ac_try;;
15599esac
15600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15601 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015603 grep -v '^ *+' conftest.er1 >conftest.err
15604 rm -f conftest.er1
15605 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015607 (exit $ac_status); } && {
15608 test -z "$ac_c_werror_flag" ||
15609 test ! -s conftest.err
15610 } && test -s conftest$ac_exeext &&
15611 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015613else
Martin v. Löwis11437992002-04-12 09:54:03 +000015614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015615sed 's/^/| /' conftest.$ac_ext >&5
15616
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015619
15620rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015622LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015624{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15625echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015626if test $ac_cv_lib_thread_thr_create = yes; then
15627 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015628#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015629_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015630
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015631 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015632 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015633 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015634fi
15635
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015636 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015637
Martin v. Löwis130fb172001-07-19 11:00:41 +000015638 if test "$USE_THREAD_MODULE" != "#"
15639 then
15640 # If the above checks didn't disable threads, (at least) OSF1
15641 # needs this '-threads' argument during linking.
15642 case $ac_sys_system in
15643 OSF1) LDLAST=-threads;;
15644 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015645 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015646fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015647
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015648if test "$posix_threads" = "yes"; then
15649 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015650
15651cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015652#define _POSIX_THREADS 1
15653_ACEOF
15654
15655 fi
15656
15657 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15658 case $ac_sys_system/$ac_sys_release in
15659 SunOS/5.6)
15660cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015661#define HAVE_PTHREAD_DESTRUCTOR 1
15662_ACEOF
15663
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015664 ;;
15665 SunOS/5.8)
15666cat >>confdefs.h <<\_ACEOF
15667#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15668_ACEOF
15669
15670 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015671 AIX/5)
15672cat >>confdefs.h <<\_ACEOF
15673#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15674_ACEOF
15675
15676 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015677 esac
15678
Martin v. Löwiseba40652007-08-30 20:10:57 +000015679 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15680echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015681 if test "${ac_cv_pthread_system_supported+set}" = set; then
15682 echo $ECHO_N "(cached) $ECHO_C" >&6
15683else
15684 if test "$cross_compiling" = yes; then
15685 ac_cv_pthread_system_supported=no
15686else
15687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015688/* confdefs.h. */
15689_ACEOF
15690cat confdefs.h >>conftest.$ac_ext
15691cat >>conftest.$ac_ext <<_ACEOF
15692/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015693#include <pthread.h>
15694 void *foo(void *parm) {
15695 return NULL;
15696 }
15697 main() {
15698 pthread_attr_t attr;
15699 pthread_t id;
15700 if (pthread_attr_init(&attr)) exit(-1);
15701 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15702 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15703 exit(0);
15704 }
15705_ACEOF
15706rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015707if { (ac_try="$ac_link"
15708case "(($ac_try" in
15709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15710 *) ac_try_echo=$ac_try;;
15711esac
15712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15713 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015714 ac_status=$?
15715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15716 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015717 { (case "(($ac_try" in
15718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15719 *) ac_try_echo=$ac_try;;
15720esac
15721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15722 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015723 ac_status=$?
15724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15725 (exit $ac_status); }; }; then
15726 ac_cv_pthread_system_supported=yes
15727else
15728 echo "$as_me: program exited with status $ac_status" >&5
15729echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015730sed 's/^/| /' conftest.$ac_ext >&5
15731
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015732( exit $ac_status )
15733ac_cv_pthread_system_supported=no
15734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735rm -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 +000015736fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015737
Martin v. Löwiseba40652007-08-30 20:10:57 +000015738
15739
Guido van Rossum627b2d71993-12-24 10:39:16 +000015740fi
15741
Martin v. Löwiseba40652007-08-30 20:10:57 +000015742 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15743echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015744 if test "$ac_cv_pthread_system_supported" = "yes"; then
15745
15746cat >>confdefs.h <<\_ACEOF
15747#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15748_ACEOF
15749
15750 fi
15751
15752for ac_func in pthread_sigmask
15753do
15754as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015755{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15756echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15757if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015758 echo $ECHO_N "(cached) $ECHO_C" >&6
15759else
15760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015761/* confdefs.h. */
15762_ACEOF
15763cat confdefs.h >>conftest.$ac_ext
15764cat >>conftest.$ac_ext <<_ACEOF
15765/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015766/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15767 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15768#define $ac_func innocuous_$ac_func
15769
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015770/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015771 which can conflict with char $ac_func (); below.
15772 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015773 <limits.h> exists even on freestanding compilers. */
15774
15775#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015776# include <limits.h>
15777#else
15778# include <assert.h>
15779#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015780
15781#undef $ac_func
15782
Martin v. Löwiseba40652007-08-30 20:10:57 +000015783/* Override any GCC internal prototype to avoid an error.
15784 Use char because int might match the return type of a GCC
15785 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015786#ifdef __cplusplus
15787extern "C"
15788#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015789char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015790/* The GNU C library defines this for functions which it implements
15791 to always fail with ENOSYS. Some functions are actually named
15792 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015794choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015795#endif
15796
Skip Montanaro6dead952003-09-25 14:50:04 +000015797int
15798main ()
15799{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015800return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015801 ;
15802 return 0;
15803}
15804_ACEOF
15805rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015806if { (ac_try="$ac_link"
15807case "(($ac_try" in
15808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15809 *) ac_try_echo=$ac_try;;
15810esac
15811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15812 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015814 grep -v '^ *+' conftest.er1 >conftest.err
15815 rm -f conftest.er1
15816 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818 (exit $ac_status); } && {
15819 test -z "$ac_c_werror_flag" ||
15820 test ! -s conftest.err
15821 } && test -s conftest$ac_exeext &&
15822 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015823 eval "$as_ac_var=yes"
15824else
15825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015826sed 's/^/| /' conftest.$ac_ext >&5
15827
Martin v. Löwiseba40652007-08-30 20:10:57 +000015828 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015830
15831rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015834ac_res=`eval echo '${'$as_ac_var'}'`
15835 { echo "$as_me:$LINENO: result: $ac_res" >&5
15836echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015837if test `eval echo '${'$as_ac_var'}'` = yes; then
15838 cat >>confdefs.h <<_ACEOF
15839#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15840_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015841 case $ac_sys_system in
15842 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015843
Jason Tishlerfac083d2003-07-22 15:20:49 +000015844cat >>confdefs.h <<\_ACEOF
15845#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15846_ACEOF
15847
15848 ;;
15849 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015850fi
15851done
15852
15853fi
15854
15855
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015856# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015857
15858
Martin v. Löwiseba40652007-08-30 20:10:57 +000015859{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15860echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15861# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015862if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015863 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015864 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865 { echo "$as_me:$LINENO: result: no" >&5
15866echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015867 ipv6=no
15868 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015869 *) { echo "$as_me:$LINENO: result: yes" >&5
15870echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015872#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015873_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015874
15875 ipv6=yes
15876 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015877 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015878else
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015880 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015881 { echo "$as_me:$LINENO: result: no" >&5
15882echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015883 ipv6=no
15884
15885else
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015887/* confdefs.h. */
15888_ACEOF
15889cat confdefs.h >>conftest.$ac_ext
15890cat >>conftest.$ac_ext <<_ACEOF
15891/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015892 /* AF_INET6 available check */
15893#include <sys/types.h>
15894#include <sys/socket.h>
15895main()
15896{
15897 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15898 exit(1);
15899 else
15900 exit(0);
15901}
15902
Martin v. Löwis11437992002-04-12 09:54:03 +000015903_ACEOF
15904rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905if { (ac_try="$ac_link"
15906case "(($ac_try" in
15907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15908 *) ac_try_echo=$ac_try;;
15909esac
15910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15911 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 ac_status=$?
15913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15914 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015915 { (case "(($ac_try" in
15916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15917 *) ac_try_echo=$ac_try;;
15918esac
15919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15920 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 ac_status=$?
15922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15923 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015924 { echo "$as_me:$LINENO: result: yes" >&5
15925echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015926 ipv6=yes
15927else
Martin v. Löwis11437992002-04-12 09:54:03 +000015928 echo "$as_me: program exited with status $ac_status" >&5
15929echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015930sed 's/^/| /' conftest.$ac_ext >&5
15931
Martin v. Löwis11437992002-04-12 09:54:03 +000015932( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015933{ echo "$as_me:$LINENO: result: no" >&5
15934echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015935 ipv6=no
15936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015937rm -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 +000015938fi
15939
Martin v. Löwiseba40652007-08-30 20:10:57 +000015940
15941
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015942if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15944echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015946/* confdefs.h. */
15947_ACEOF
15948cat confdefs.h >>conftest.$ac_ext
15949cat >>conftest.$ac_ext <<_ACEOF
15950/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015951#include <sys/types.h>
15952#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015953int
15954main ()
15955{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015956struct sockaddr_in6 x;
15957x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015958 ;
15959 return 0;
15960}
15961_ACEOF
15962rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015963if { (ac_try="$ac_compile"
15964case "(($ac_try" in
15965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15966 *) ac_try_echo=$ac_try;;
15967esac
15968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015971 grep -v '^ *+' conftest.er1 >conftest.err
15972 rm -f conftest.er1
15973 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015975 (exit $ac_status); } && {
15976 test -z "$ac_c_werror_flag" ||
15977 test ! -s conftest.err
15978 } && test -s conftest.$ac_objext; then
15979 { echo "$as_me:$LINENO: result: yes" >&5
15980echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015981 ipv6=yes
15982else
Martin v. Löwis11437992002-04-12 09:54:03 +000015983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015984sed 's/^/| /' conftest.$ac_ext >&5
15985
Martin v. Löwiseba40652007-08-30 20:10:57 +000015986 { echo "$as_me:$LINENO: result: no" >&5
15987echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015988 ipv6=no
15989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015990
15991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015992fi
15993
15994if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015995 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015996#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015997_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015998
15999fi
16000
Martin v. Löwiseba40652007-08-30 20:10:57 +000016001fi
16002
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016003
16004ipv6type=unknown
16005ipv6lib=none
16006ipv6trylibc=no
16007
16008if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016009 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16010echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016011 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16012 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016013 case $i in
16014 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016021
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016022#include <netinet/in.h>
16023#ifdef IPV6_INRIA_VERSION
16024yes
16025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016026_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016028 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016029 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016030fi
16031rm -f conftest*
16032
16033 ;;
16034 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016036/* confdefs.h. */
16037_ACEOF
16038cat confdefs.h >>conftest.$ac_ext
16039cat >>conftest.$ac_ext <<_ACEOF
16040/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016041
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016042#include <netinet/in.h>
16043#ifdef __KAME__
16044yes
16045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016046_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016048 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016049 ipv6type=$i;
16050 ipv6lib=inet6
16051 ipv6libdir=/usr/local/v6/lib
16052 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016053fi
16054rm -f conftest*
16055
16056 ;;
16057 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016059/* confdefs.h. */
16060_ACEOF
16061cat confdefs.h >>conftest.$ac_ext
16062cat >>conftest.$ac_ext <<_ACEOF
16063/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016064
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016065#include <features.h>
16066#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16067yes
16068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016069_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016071 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016072 ipv6type=$i;
16073 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016074fi
16075rm -f conftest*
16076
16077 ;;
16078 linux-inet6)
16079 if test -d /usr/inet6; then
16080 ipv6type=$i
16081 ipv6lib=inet6
16082 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016083 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016084 fi
16085 ;;
16086 solaris)
16087 if test -f /etc/netconfig; then
16088 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16089 ipv6type=$i
16090 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016091 fi
16092 fi
16093 ;;
16094 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016096/* confdefs.h. */
16097_ACEOF
16098cat confdefs.h >>conftest.$ac_ext
16099cat >>conftest.$ac_ext <<_ACEOF
16100/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016101
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016102#include <sys/param.h>
16103#ifdef _TOSHIBA_INET6
16104yes
16105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016106_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016108 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016109 ipv6type=$i;
16110 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016111 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016112fi
16113rm -f conftest*
16114
16115 ;;
16116 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016118/* confdefs.h. */
16119_ACEOF
16120cat confdefs.h >>conftest.$ac_ext
16121cat >>conftest.$ac_ext <<_ACEOF
16122/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016123
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016124#include </usr/local/v6/include/sys/v6config.h>
16125#ifdef __V6D__
16126yes
16127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016128_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016130 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016131 ipv6type=$i;
16132 ipv6lib=v6;
16133 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016134 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016135fi
16136rm -f conftest*
16137
16138 ;;
16139 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016141/* confdefs.h. */
16142_ACEOF
16143cat confdefs.h >>conftest.$ac_ext
16144cat >>conftest.$ac_ext <<_ACEOF
16145/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016146
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016147#include <sys/param.h>
16148#ifdef _ZETA_MINAMI_INET6
16149yes
16150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016151_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016153 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016154 ipv6type=$i;
16155 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016156 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016157fi
16158rm -f conftest*
16159
16160 ;;
16161 esac
16162 if test "$ipv6type" != "unknown"; then
16163 break
16164 fi
16165 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16167echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016168fi
16169
16170if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16171 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16172 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16173 echo "using lib$ipv6lib"
16174 else
16175 if test $ipv6trylibc = "yes"; then
16176 echo "using libc"
16177 else
16178 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16179 echo "You need to fetch lib$ipv6lib.a from appropriate"
16180 echo 'ipv6 kit and compile beforehand.'
16181 exit 1
16182 fi
16183 fi
16184fi
16185
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016186{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16187echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
16188cat >conftest.$ac_ext <<_ACEOF
16189/* confdefs.h. */
16190_ACEOF
16191cat confdefs.h >>conftest.$ac_ext
16192cat >>conftest.$ac_ext <<_ACEOF
16193/* end confdefs.h. */
16194#include <Carbon/Carbon.h>
16195int
16196main ()
16197{
16198FSIORefNum fRef = 0
16199 ;
16200 return 0;
16201}
16202_ACEOF
16203rm -f conftest.$ac_objext
16204if { (ac_try="$ac_compile"
16205case "(($ac_try" in
16206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16207 *) ac_try_echo=$ac_try;;
16208esac
16209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16210 (eval "$ac_compile") 2>conftest.er1
16211 ac_status=$?
16212 grep -v '^ *+' conftest.er1 >conftest.err
16213 rm -f conftest.er1
16214 cat conftest.err >&5
16215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216 (exit $ac_status); } && {
16217 test -z "$ac_c_werror_flag" ||
16218 test ! -s conftest.err
16219 } && test -s conftest.$ac_objext; then
16220
16221cat >>confdefs.h <<\_ACEOF
16222#define HAVE_OSX105_SDK 1
16223_ACEOF
16224
16225 { echo "$as_me:$LINENO: result: yes" >&5
16226echo "${ECHO_T}yes" >&6; }
16227else
16228 echo "$as_me: failed program was:" >&5
16229sed 's/^/| /' conftest.$ac_ext >&5
16230
16231 { echo "$as_me:$LINENO: result: no" >&5
16232echo "${ECHO_T}no" >&6; }
16233
16234fi
16235
16236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16237
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016238# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16240echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016241
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016243if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244 withval=$with_doc_strings;
16245fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016246
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016247
16248if test -z "$with_doc_strings"
16249then with_doc_strings="yes"
16250fi
16251if test "$with_doc_strings" != "no"
16252then
16253
16254cat >>confdefs.h <<\_ACEOF
16255#define WITH_DOC_STRINGS 1
16256_ACEOF
16257
16258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16260echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016261
Neil Schemenauera35c6882001-02-27 04:45:05 +000016262# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16264echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016265
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016267if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016268 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016269if test "$withval" != no
16270then
16271
16272cat >>confdefs.h <<\_ACEOF
16273#define WITH_TSC 1
16274_ACEOF
16275
Martin v. Löwiseba40652007-08-30 20:10:57 +000016276 { echo "$as_me:$LINENO: result: yes" >&5
16277echo "${ECHO_T}yes" >&6; }
16278else { echo "$as_me:$LINENO: result: no" >&5
16279echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016280fi
16281else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016282 { echo "$as_me:$LINENO: result: no" >&5
16283echo "${ECHO_T}no" >&6; }
16284fi
16285
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016286
16287# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016288{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16289echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016290
Martin v. Löwiseba40652007-08-30 20:10:57 +000016291# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016292if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016293 withval=$with_pymalloc;
16294fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016295
Neil Schemenauera35c6882001-02-27 04:45:05 +000016296
Neil Schemenauer16c22972002-03-22 15:34:49 +000016297if test -z "$with_pymalloc"
16298then with_pymalloc="yes"
16299fi
16300if test "$with_pymalloc" != "no"
16301then
Martin v. Löwis11437992002-04-12 09:54:03 +000016302
16303cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016304#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016305_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016306
16307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16309echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016310
Barry Warsawef82cd72000-06-30 16:21:01 +000016311# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000016312{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16313echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016314
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016316if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016317 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016318if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016319then
16320
16321cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016322#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016323_ACEOF
16324
Martin v. Löwiseba40652007-08-30 20:10:57 +000016325 { echo "$as_me:$LINENO: result: yes" >&5
16326echo "${ECHO_T}yes" >&6; }
16327else { echo "$as_me:$LINENO: result: no" >&5
16328echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016329fi
16330else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016331 { echo "$as_me:$LINENO: result: no" >&5
16332echo "${ECHO_T}no" >&6; }
16333fi
16334
Barry Warsawef82cd72000-06-30 16:21:01 +000016335
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016336# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016337
Guido van Rossum98935bf2001-09-05 19:13:16 +000016338DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016339
Guido van Rossume97ee181999-12-20 21:27:22 +000016340# the dlopen() function means we might want to use dynload_shlib.o. some
16341# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016342
Thomas Wouters3a584202000-08-05 23:28:51 +000016343for ac_func in dlopen
16344do
Martin v. Löwis11437992002-04-12 09:54:03 +000016345as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016346{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16347echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16348if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016350else
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016352/* confdefs.h. */
16353_ACEOF
16354cat confdefs.h >>conftest.$ac_ext
16355cat >>conftest.$ac_ext <<_ACEOF
16356/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016357/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16358 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16359#define $ac_func innocuous_$ac_func
16360
Guido van Rossume97ee181999-12-20 21:27:22 +000016361/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016362 which can conflict with char $ac_func (); below.
16363 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016364 <limits.h> exists even on freestanding compilers. */
16365
16366#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016367# include <limits.h>
16368#else
16369# include <assert.h>
16370#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016371
16372#undef $ac_func
16373
Martin v. Löwiseba40652007-08-30 20:10:57 +000016374/* Override any GCC internal prototype to avoid an error.
16375 Use char because int might match the return type of a GCC
16376 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016377#ifdef __cplusplus
16378extern "C"
16379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016380char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016381/* The GNU C library defines this for functions which it implements
16382 to always fail with ENOSYS. Some functions are actually named
16383 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016384#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016385choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016386#endif
16387
Skip Montanaro6dead952003-09-25 14:50:04 +000016388int
16389main ()
16390{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016391return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016392 ;
16393 return 0;
16394}
16395_ACEOF
16396rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016397if { (ac_try="$ac_link"
16398case "(($ac_try" in
16399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16400 *) ac_try_echo=$ac_try;;
16401esac
16402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16403 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016405 grep -v '^ *+' conftest.er1 >conftest.err
16406 rm -f conftest.er1
16407 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016409 (exit $ac_status); } && {
16410 test -z "$ac_c_werror_flag" ||
16411 test ! -s conftest.err
16412 } && test -s conftest$ac_exeext &&
16413 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016414 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016415else
Martin v. Löwis11437992002-04-12 09:54:03 +000016416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016417sed 's/^/| /' conftest.$ac_ext >&5
16418
Martin v. Löwiseba40652007-08-30 20:10:57 +000016419 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016421
16422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016423 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016425ac_res=`eval echo '${'$as_ac_var'}'`
16426 { echo "$as_me:$LINENO: result: $ac_res" >&5
16427echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016428if test `eval echo '${'$as_ac_var'}'` = yes; then
16429 cat >>confdefs.h <<_ACEOF
16430#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16431_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016432
Guido van Rossume97ee181999-12-20 21:27:22 +000016433fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016434done
Guido van Rossume97ee181999-12-20 21:27:22 +000016435
Michael W. Hudson54241132001-12-07 15:38:26 +000016436
Guido van Rossume97ee181999-12-20 21:27:22 +000016437# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16438# loading of modules.
16439
Martin v. Löwiseba40652007-08-30 20:10:57 +000016440{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16441echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016442if test -z "$DYNLOADFILE"
16443then
16444 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016445 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16446 if test "$ac_cv_func_dlopen" = yes
16447 then DYNLOADFILE="dynload_shlib.o"
16448 else DYNLOADFILE="dynload_aix.o"
16449 fi
16450 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016451 BeOS*) DYNLOADFILE="dynload_beos.o";;
16452 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016453 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16454 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016455 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016456 *)
16457 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16458 # out any dynamic loading
16459 if test "$ac_cv_func_dlopen" = yes
16460 then DYNLOADFILE="dynload_shlib.o"
16461 else DYNLOADFILE="dynload_stub.o"
16462 fi
16463 ;;
16464 esac
16465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016466{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16467echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016468if test "$DYNLOADFILE" != "dynload_stub.o"
16469then
Martin v. Löwis11437992002-04-12 09:54:03 +000016470
16471cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016472#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016473_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016474
16475fi
16476
Neil Schemenauer4e425612001-06-19 15:44:15 +000016477# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16478
Michael W. Hudson54241132001-12-07 15:38:26 +000016479
Martin v. Löwiseba40652007-08-30 20:10:57 +000016480{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16481echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016482if test -z "$MACHDEP_OBJS"
16483then
Jack Jansene578a632001-08-15 01:27:14 +000016484 MACHDEP_OBJS=$extra_machdep_objs
16485else
16486 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016488{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16489echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016490
Guido van Rossum627b2d71993-12-24 10:39:16 +000016491# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
Martin v. Löwisd6320502004-08-12 13:45:08 +000016563
Martin v. Löwisc3001752005-01-23 09:27:24 +000016564
16565
Neal Norwitz05a45592006-03-20 06:30:08 +000016566
16567
Martin v. Löwis382abef2007-02-19 10:55:19 +000016568
16569
Christian Heimes36281872007-11-30 21:11:28 +000016570
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016571
16572
16573for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16574 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016575 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016576 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016577 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016578 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016579 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016580 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016581 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016582 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016583 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016584 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016585do
Martin v. Löwis11437992002-04-12 09:54:03 +000016586as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16588echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16589if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016591else
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016593/* confdefs.h. */
16594_ACEOF
16595cat confdefs.h >>conftest.$ac_ext
16596cat >>conftest.$ac_ext <<_ACEOF
16597/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016598/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16599 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16600#define $ac_func innocuous_$ac_func
16601
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016602/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016603 which can conflict with char $ac_func (); below.
16604 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016605 <limits.h> exists even on freestanding compilers. */
16606
16607#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016608# include <limits.h>
16609#else
16610# include <assert.h>
16611#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016612
16613#undef $ac_func
16614
Martin v. Löwiseba40652007-08-30 20:10:57 +000016615/* Override any GCC internal prototype to avoid an error.
16616 Use char because int might match the return type of a GCC
16617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016618#ifdef __cplusplus
16619extern "C"
16620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016621char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016622/* The GNU C library defines this for functions which it implements
16623 to always fail with ENOSYS. Some functions are actually named
16624 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016625#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016626choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016627#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016628
Skip Montanaro6dead952003-09-25 14:50:04 +000016629int
16630main ()
16631{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016632return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 ;
16634 return 0;
16635}
16636_ACEOF
16637rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016638if { (ac_try="$ac_link"
16639case "(($ac_try" in
16640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16641 *) ac_try_echo=$ac_try;;
16642esac
16643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16644 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016646 grep -v '^ *+' conftest.er1 >conftest.err
16647 rm -f conftest.er1
16648 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016650 (exit $ac_status); } && {
16651 test -z "$ac_c_werror_flag" ||
16652 test ! -s conftest.err
16653 } && test -s conftest$ac_exeext &&
16654 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016655 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016656else
Martin v. Löwis11437992002-04-12 09:54:03 +000016657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016658sed 's/^/| /' conftest.$ac_ext >&5
16659
Martin v. Löwiseba40652007-08-30 20:10:57 +000016660 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016662
16663rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016664 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016666ac_res=`eval echo '${'$as_ac_var'}'`
16667 { echo "$as_me:$LINENO: result: $ac_res" >&5
16668echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016669if test `eval echo '${'$as_ac_var'}'` = yes; then
16670 cat >>confdefs.h <<_ACEOF
16671#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16672_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016673
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016674fi
16675done
16676
Michael W. Hudson54241132001-12-07 15:38:26 +000016677
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016678# For some functions, having a definition is not sufficient, since
16679# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016680{ echo "$as_me:$LINENO: checking for chroot" >&5
16681echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016683/* confdefs.h. */
16684_ACEOF
16685cat confdefs.h >>conftest.$ac_ext
16686cat >>conftest.$ac_ext <<_ACEOF
16687/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016688#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016689int
16690main ()
16691{
16692void *x=chroot
16693 ;
16694 return 0;
16695}
16696_ACEOF
16697rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016698if { (ac_try="$ac_compile"
16699case "(($ac_try" in
16700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16701 *) ac_try_echo=$ac_try;;
16702esac
16703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016706 grep -v '^ *+' conftest.er1 >conftest.err
16707 rm -f conftest.er1
16708 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016710 (exit $ac_status); } && {
16711 test -z "$ac_c_werror_flag" ||
16712 test ! -s conftest.err
16713 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016714
16715cat >>confdefs.h <<\_ACEOF
16716#define HAVE_CHROOT 1
16717_ACEOF
16718
Martin v. Löwiseba40652007-08-30 20:10:57 +000016719 { echo "$as_me:$LINENO: result: yes" >&5
16720echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016721else
16722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016723sed 's/^/| /' conftest.$ac_ext >&5
16724
Martin v. Löwiseba40652007-08-30 20:10:57 +000016725 { echo "$as_me:$LINENO: result: no" >&5
16726echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016727
16728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729
16730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16731{ echo "$as_me:$LINENO: checking for link" >&5
16732echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016734/* confdefs.h. */
16735_ACEOF
16736cat confdefs.h >>conftest.$ac_ext
16737cat >>conftest.$ac_ext <<_ACEOF
16738/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016739#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016740int
16741main ()
16742{
16743void *x=link
16744 ;
16745 return 0;
16746}
16747_ACEOF
16748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016749if { (ac_try="$ac_compile"
16750case "(($ac_try" in
16751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16752 *) ac_try_echo=$ac_try;;
16753esac
16754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016757 grep -v '^ *+' conftest.er1 >conftest.err
16758 rm -f conftest.er1
16759 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016761 (exit $ac_status); } && {
16762 test -z "$ac_c_werror_flag" ||
16763 test ! -s conftest.err
16764 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016765
16766cat >>confdefs.h <<\_ACEOF
16767#define HAVE_LINK 1
16768_ACEOF
16769
Martin v. Löwiseba40652007-08-30 20:10:57 +000016770 { echo "$as_me:$LINENO: result: yes" >&5
16771echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016772else
16773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016774sed 's/^/| /' conftest.$ac_ext >&5
16775
Martin v. Löwiseba40652007-08-30 20:10:57 +000016776 { echo "$as_me:$LINENO: result: no" >&5
16777echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016778
16779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016780
16781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16782{ echo "$as_me:$LINENO: checking for symlink" >&5
16783echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016784cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016785/* confdefs.h. */
16786_ACEOF
16787cat confdefs.h >>conftest.$ac_ext
16788cat >>conftest.$ac_ext <<_ACEOF
16789/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016790#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016791int
16792main ()
16793{
16794void *x=symlink
16795 ;
16796 return 0;
16797}
16798_ACEOF
16799rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016800if { (ac_try="$ac_compile"
16801case "(($ac_try" in
16802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16803 *) ac_try_echo=$ac_try;;
16804esac
16805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016808 grep -v '^ *+' conftest.er1 >conftest.err
16809 rm -f conftest.er1
16810 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016812 (exit $ac_status); } && {
16813 test -z "$ac_c_werror_flag" ||
16814 test ! -s conftest.err
16815 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016816
16817cat >>confdefs.h <<\_ACEOF
16818#define HAVE_SYMLINK 1
16819_ACEOF
16820
Martin v. Löwiseba40652007-08-30 20:10:57 +000016821 { echo "$as_me:$LINENO: result: yes" >&5
16822echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016823else
16824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016825sed 's/^/| /' conftest.$ac_ext >&5
16826
Martin v. Löwiseba40652007-08-30 20:10:57 +000016827 { echo "$as_me:$LINENO: result: no" >&5
16828echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016829
16830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016831
16832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16833{ echo "$as_me:$LINENO: checking for fchdir" >&5
16834echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016835cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016836/* confdefs.h. */
16837_ACEOF
16838cat confdefs.h >>conftest.$ac_ext
16839cat >>conftest.$ac_ext <<_ACEOF
16840/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016841#include <unistd.h>
16842int
16843main ()
16844{
16845void *x=fchdir
16846 ;
16847 return 0;
16848}
16849_ACEOF
16850rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016851if { (ac_try="$ac_compile"
16852case "(($ac_try" in
16853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16854 *) ac_try_echo=$ac_try;;
16855esac
16856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016859 grep -v '^ *+' conftest.er1 >conftest.err
16860 rm -f conftest.er1
16861 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016863 (exit $ac_status); } && {
16864 test -z "$ac_c_werror_flag" ||
16865 test ! -s conftest.err
16866 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016867
16868cat >>confdefs.h <<\_ACEOF
16869#define HAVE_FCHDIR 1
16870_ACEOF
16871
Martin v. Löwiseba40652007-08-30 20:10:57 +000016872 { echo "$as_me:$LINENO: result: yes" >&5
16873echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016874else
16875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016876sed 's/^/| /' conftest.$ac_ext >&5
16877
Martin v. Löwiseba40652007-08-30 20:10:57 +000016878 { echo "$as_me:$LINENO: result: no" >&5
16879echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016880
16881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016882
16883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16884{ echo "$as_me:$LINENO: checking for fsync" >&5
16885echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016887/* confdefs.h. */
16888_ACEOF
16889cat confdefs.h >>conftest.$ac_ext
16890cat >>conftest.$ac_ext <<_ACEOF
16891/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016892#include <unistd.h>
16893int
16894main ()
16895{
16896void *x=fsync
16897 ;
16898 return 0;
16899}
16900_ACEOF
16901rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016902if { (ac_try="$ac_compile"
16903case "(($ac_try" in
16904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16905 *) ac_try_echo=$ac_try;;
16906esac
16907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16908 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016910 grep -v '^ *+' conftest.er1 >conftest.err
16911 rm -f conftest.er1
16912 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016914 (exit $ac_status); } && {
16915 test -z "$ac_c_werror_flag" ||
16916 test ! -s conftest.err
16917 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016918
16919cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016920#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016921_ACEOF
16922
Martin v. Löwiseba40652007-08-30 20:10:57 +000016923 { echo "$as_me:$LINENO: result: yes" >&5
16924echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016925else
16926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016927sed 's/^/| /' conftest.$ac_ext >&5
16928
Martin v. Löwiseba40652007-08-30 20:10:57 +000016929 { echo "$as_me:$LINENO: result: no" >&5
16930echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016931
16932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016933
16934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16935{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16936echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016938/* confdefs.h. */
16939_ACEOF
16940cat confdefs.h >>conftest.$ac_ext
16941cat >>conftest.$ac_ext <<_ACEOF
16942/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016943#include <unistd.h>
16944int
16945main ()
16946{
16947void *x=fdatasync
16948 ;
16949 return 0;
16950}
16951_ACEOF
16952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016953if { (ac_try="$ac_compile"
16954case "(($ac_try" in
16955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16956 *) ac_try_echo=$ac_try;;
16957esac
16958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016961 grep -v '^ *+' conftest.er1 >conftest.err
16962 rm -f conftest.er1
16963 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016965 (exit $ac_status); } && {
16966 test -z "$ac_c_werror_flag" ||
16967 test ! -s conftest.err
16968 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016969
16970cat >>confdefs.h <<\_ACEOF
16971#define HAVE_FDATASYNC 1
16972_ACEOF
16973
Martin v. Löwiseba40652007-08-30 20:10:57 +000016974 { echo "$as_me:$LINENO: result: yes" >&5
16975echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016976else
16977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016978sed 's/^/| /' conftest.$ac_ext >&5
16979
Martin v. Löwiseba40652007-08-30 20:10:57 +000016980 { echo "$as_me:$LINENO: result: no" >&5
16981echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016982
16983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016984
16985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016986{ echo "$as_me:$LINENO: checking for epoll" >&5
16987echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16988cat >conftest.$ac_ext <<_ACEOF
16989/* confdefs.h. */
16990_ACEOF
16991cat confdefs.h >>conftest.$ac_ext
16992cat >>conftest.$ac_ext <<_ACEOF
16993/* end confdefs.h. */
16994#include <sys/epoll.h>
16995int
16996main ()
16997{
16998void *x=epoll_create
16999 ;
17000 return 0;
17001}
17002_ACEOF
17003rm -f conftest.$ac_objext
17004if { (ac_try="$ac_compile"
17005case "(($ac_try" in
17006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17007 *) ac_try_echo=$ac_try;;
17008esac
17009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17010 (eval "$ac_compile") 2>conftest.er1
17011 ac_status=$?
17012 grep -v '^ *+' conftest.er1 >conftest.err
17013 rm -f conftest.er1
17014 cat conftest.err >&5
17015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17016 (exit $ac_status); } && {
17017 test -z "$ac_c_werror_flag" ||
17018 test ! -s conftest.err
17019 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017020
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017021cat >>confdefs.h <<\_ACEOF
17022#define HAVE_EPOLL 1
17023_ACEOF
17024
17025 { echo "$as_me:$LINENO: result: yes" >&5
17026echo "${ECHO_T}yes" >&6; }
17027else
17028 echo "$as_me: failed program was:" >&5
17029sed 's/^/| /' conftest.$ac_ext >&5
17030
17031 { echo "$as_me:$LINENO: result: no" >&5
17032echo "${ECHO_T}no" >&6; }
17033
17034fi
17035
17036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17037{ echo "$as_me:$LINENO: checking for kqueue" >&5
17038echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
17039cat >conftest.$ac_ext <<_ACEOF
17040/* confdefs.h. */
17041_ACEOF
17042cat confdefs.h >>conftest.$ac_ext
17043cat >>conftest.$ac_ext <<_ACEOF
17044/* end confdefs.h. */
17045
17046#include <sys/types.h>
17047#include <sys/event.h>
17048
17049int
17050main ()
17051{
17052int x=kqueue()
17053 ;
17054 return 0;
17055}
17056_ACEOF
17057rm -f conftest.$ac_objext
17058if { (ac_try="$ac_compile"
17059case "(($ac_try" in
17060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17061 *) ac_try_echo=$ac_try;;
17062esac
17063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17064 (eval "$ac_compile") 2>conftest.er1
17065 ac_status=$?
17066 grep -v '^ *+' conftest.er1 >conftest.err
17067 rm -f conftest.er1
17068 cat conftest.err >&5
17069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17070 (exit $ac_status); } && {
17071 test -z "$ac_c_werror_flag" ||
17072 test ! -s conftest.err
17073 } && test -s conftest.$ac_objext; then
17074
17075cat >>confdefs.h <<\_ACEOF
17076#define HAVE_KQUEUE 1
17077_ACEOF
17078
17079 { echo "$as_me:$LINENO: result: yes" >&5
17080echo "${ECHO_T}yes" >&6; }
17081else
17082 echo "$as_me: failed program was:" >&5
17083sed 's/^/| /' conftest.$ac_ext >&5
17084
17085 { echo "$as_me:$LINENO: result: no" >&5
17086echo "${ECHO_T}no" >&6; }
17087
17088fi
17089
17090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017091# On some systems (eg. FreeBSD 5), we would find a definition of the
17092# functions ctermid_r, setgroups in the library, but no prototype
17093# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17094# address to avoid compiler warnings and potential miscompilations
17095# because of the missing prototypes.
17096
Martin v. Löwiseba40652007-08-30 20:10:57 +000017097{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17098echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017099cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017100/* confdefs.h. */
17101_ACEOF
17102cat confdefs.h >>conftest.$ac_ext
17103cat >>conftest.$ac_ext <<_ACEOF
17104/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017105
17106#include "confdefs.h"
17107#include <stdio.h>
17108
Martin v. Löwisd5843682002-11-21 20:41:28 +000017109int
17110main ()
17111{
17112void* p = ctermid_r
17113 ;
17114 return 0;
17115}
17116_ACEOF
17117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017118if { (ac_try="$ac_compile"
17119case "(($ac_try" in
17120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17121 *) ac_try_echo=$ac_try;;
17122esac
17123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017126 grep -v '^ *+' conftest.er1 >conftest.err
17127 rm -f conftest.er1
17128 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017130 (exit $ac_status); } && {
17131 test -z "$ac_c_werror_flag" ||
17132 test ! -s conftest.err
17133 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017134
17135cat >>confdefs.h <<\_ACEOF
17136#define HAVE_CTERMID_R 1
17137_ACEOF
17138
Martin v. Löwiseba40652007-08-30 20:10:57 +000017139 { echo "$as_me:$LINENO: result: yes" >&5
17140echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017141else
17142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017143sed 's/^/| /' conftest.$ac_ext >&5
17144
Martin v. Löwiseba40652007-08-30 20:10:57 +000017145 { echo "$as_me:$LINENO: result: no" >&5
17146echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017147
17148fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000017149
Martin v. Löwiseba40652007-08-30 20:10:57 +000017150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17151
17152{ echo "$as_me:$LINENO: checking for flock" >&5
17153echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017155/* confdefs.h. */
17156_ACEOF
17157cat confdefs.h >>conftest.$ac_ext
17158cat >>conftest.$ac_ext <<_ACEOF
17159/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017160
17161#include "confdefs.h"
17162#include <sys/file.h>
17163
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017164int
17165main ()
17166{
17167void* p = flock
17168 ;
17169 return 0;
17170}
17171_ACEOF
17172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017173if { (ac_try="$ac_compile"
17174case "(($ac_try" in
17175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17176 *) ac_try_echo=$ac_try;;
17177esac
17178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017181 grep -v '^ *+' conftest.er1 >conftest.err
17182 rm -f conftest.er1
17183 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017185 (exit $ac_status); } && {
17186 test -z "$ac_c_werror_flag" ||
17187 test ! -s conftest.err
17188 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017189
17190cat >>confdefs.h <<\_ACEOF
17191#define HAVE_FLOCK 1
17192_ACEOF
17193
Martin v. Löwiseba40652007-08-30 20:10:57 +000017194 { echo "$as_me:$LINENO: result: yes" >&5
17195echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017196else
17197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017198sed 's/^/| /' conftest.$ac_ext >&5
17199
Martin v. Löwiseba40652007-08-30 20:10:57 +000017200 { echo "$as_me:$LINENO: result: no" >&5
17201echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017202
17203fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017204
Martin v. Löwiseba40652007-08-30 20:10:57 +000017205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17206
17207{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17208echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017209cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017210/* confdefs.h. */
17211_ACEOF
17212cat confdefs.h >>conftest.$ac_ext
17213cat >>conftest.$ac_ext <<_ACEOF
17214/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017215
17216#include "confdefs.h"
17217#include <unistd.h>
17218
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017219int
17220main ()
17221{
17222void* p = getpagesize
17223 ;
17224 return 0;
17225}
17226_ACEOF
17227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017228if { (ac_try="$ac_compile"
17229case "(($ac_try" in
17230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17231 *) ac_try_echo=$ac_try;;
17232esac
17233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017236 grep -v '^ *+' conftest.er1 >conftest.err
17237 rm -f conftest.er1
17238 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017240 (exit $ac_status); } && {
17241 test -z "$ac_c_werror_flag" ||
17242 test ! -s conftest.err
17243 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017244
17245cat >>confdefs.h <<\_ACEOF
17246#define HAVE_GETPAGESIZE 1
17247_ACEOF
17248
Martin v. Löwiseba40652007-08-30 20:10:57 +000017249 { echo "$as_me:$LINENO: result: yes" >&5
17250echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017251else
17252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017253sed 's/^/| /' conftest.$ac_ext >&5
17254
Martin v. Löwiseba40652007-08-30 20:10:57 +000017255 { echo "$as_me:$LINENO: result: no" >&5
17256echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017257
17258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017259
17260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017261
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017262for ac_prog in true
17263do
17264 # Extract the first word of "$ac_prog", so it can be a program name with args.
17265set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000017266{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017268if test "${ac_cv_prog_TRUE+set}" = set; then
17269 echo $ECHO_N "(cached) $ECHO_C" >&6
17270else
17271 if test -n "$TRUE"; then
17272 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17273else
17274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17275for as_dir in $PATH
17276do
17277 IFS=$as_save_IFS
17278 test -z "$as_dir" && as_dir=.
17279 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000017280 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 +000017281 ac_cv_prog_TRUE="$ac_prog"
17282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17283 break 2
17284 fi
17285done
17286done
Martin v. Löwiseba40652007-08-30 20:10:57 +000017287IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017288
17289fi
17290fi
17291TRUE=$ac_cv_prog_TRUE
17292if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017293 { echo "$as_me:$LINENO: result: $TRUE" >&5
17294echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017295else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017296 { echo "$as_me:$LINENO: result: no" >&5
17297echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017298fi
17299
Martin v. Löwiseba40652007-08-30 20:10:57 +000017300
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017301 test -n "$TRUE" && break
17302done
17303test -n "$TRUE" || TRUE="/bin/true"
17304
17305
Martin v. Löwiseba40652007-08-30 20:10:57 +000017306{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17307echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017308if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17309 echo $ECHO_N "(cached) $ECHO_C" >&6
17310else
17311 ac_check_lib_save_LIBS=$LIBS
17312LIBS="-lc $LIBS"
17313cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017314/* confdefs.h. */
17315_ACEOF
17316cat confdefs.h >>conftest.$ac_ext
17317cat >>conftest.$ac_ext <<_ACEOF
17318/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017319
Martin v. Löwiseba40652007-08-30 20:10:57 +000017320/* Override any GCC internal prototype to avoid an error.
17321 Use char because int might match the return type of a GCC
17322 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017323#ifdef __cplusplus
17324extern "C"
17325#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017326char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017327int
17328main ()
17329{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017330return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017331 ;
17332 return 0;
17333}
17334_ACEOF
17335rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017336if { (ac_try="$ac_link"
17337case "(($ac_try" in
17338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17339 *) ac_try_echo=$ac_try;;
17340esac
17341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17342 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017344 grep -v '^ *+' conftest.er1 >conftest.err
17345 rm -f conftest.er1
17346 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017348 (exit $ac_status); } && {
17349 test -z "$ac_c_werror_flag" ||
17350 test ! -s conftest.err
17351 } && test -s conftest$ac_exeext &&
17352 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017353 ac_cv_lib_c_inet_aton=yes
17354else
17355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017356sed 's/^/| /' conftest.$ac_ext >&5
17357
Martin v. Löwiseba40652007-08-30 20:10:57 +000017358 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017360
17361rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017362 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017363LIBS=$ac_check_lib_save_LIBS
17364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017365{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17366echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017367if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017368 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017369else
17370
Martin v. Löwiseba40652007-08-30 20:10:57 +000017371{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17372echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017373if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17374 echo $ECHO_N "(cached) $ECHO_C" >&6
17375else
17376 ac_check_lib_save_LIBS=$LIBS
17377LIBS="-lresolv $LIBS"
17378cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017379/* confdefs.h. */
17380_ACEOF
17381cat confdefs.h >>conftest.$ac_ext
17382cat >>conftest.$ac_ext <<_ACEOF
17383/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017384
Martin v. Löwiseba40652007-08-30 20:10:57 +000017385/* Override any GCC internal prototype to avoid an error.
17386 Use char because int might match the return type of a GCC
17387 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017388#ifdef __cplusplus
17389extern "C"
17390#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017391char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017392int
17393main ()
17394{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017395return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017396 ;
17397 return 0;
17398}
17399_ACEOF
17400rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017401if { (ac_try="$ac_link"
17402case "(($ac_try" in
17403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17404 *) ac_try_echo=$ac_try;;
17405esac
17406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17407 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017409 grep -v '^ *+' conftest.er1 >conftest.err
17410 rm -f conftest.er1
17411 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017413 (exit $ac_status); } && {
17414 test -z "$ac_c_werror_flag" ||
17415 test ! -s conftest.err
17416 } && test -s conftest$ac_exeext &&
17417 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017418 ac_cv_lib_resolv_inet_aton=yes
17419else
17420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017421sed 's/^/| /' conftest.$ac_ext >&5
17422
Martin v. Löwiseba40652007-08-30 20:10:57 +000017423 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017425
17426rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017428LIBS=$ac_check_lib_save_LIBS
17429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017430{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17431echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017432if test $ac_cv_lib_resolv_inet_aton = yes; then
17433 cat >>confdefs.h <<_ACEOF
17434#define HAVE_LIBRESOLV 1
17435_ACEOF
17436
17437 LIBS="-lresolv $LIBS"
17438
17439fi
17440
17441
17442fi
17443
17444
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017445# On Tru64, chflags seems to be present, but calling it will
17446# exit Python
17447{ echo "$as_me:$LINENO: checking for chflags" >&5
17448echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17449if test "$cross_compiling" = yes; then
17450 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17451See \`config.log' for more details." >&5
17452echo "$as_me: error: cannot run test program while cross compiling
17453See \`config.log' for more details." >&2;}
17454 { (exit 1); exit 1; }; }
17455else
17456 cat >conftest.$ac_ext <<_ACEOF
17457/* confdefs.h. */
17458_ACEOF
17459cat confdefs.h >>conftest.$ac_ext
17460cat >>conftest.$ac_ext <<_ACEOF
17461/* end confdefs.h. */
17462
17463#include <sys/stat.h>
17464#include <unistd.h>
17465int main(int argc, char*argv[])
17466{
17467 if(chflags(argv[0], 0) != 0)
17468 return 1;
17469 return 0;
17470}
17471
17472_ACEOF
17473rm -f conftest$ac_exeext
17474if { (ac_try="$ac_link"
17475case "(($ac_try" in
17476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17477 *) ac_try_echo=$ac_try;;
17478esac
17479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17480 (eval "$ac_link") 2>&5
17481 ac_status=$?
17482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17483 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17484 { (case "(($ac_try" in
17485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17486 *) ac_try_echo=$ac_try;;
17487esac
17488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17489 (eval "$ac_try") 2>&5
17490 ac_status=$?
17491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17492 (exit $ac_status); }; }; then
17493
17494cat >>confdefs.h <<\_ACEOF
17495#define HAVE_CHFLAGS 1
17496_ACEOF
17497
17498 { echo "$as_me:$LINENO: result: yes" >&5
17499echo "${ECHO_T}yes" >&6; }
17500else
17501 echo "$as_me: program exited with status $ac_status" >&5
17502echo "$as_me: failed program was:" >&5
17503sed 's/^/| /' conftest.$ac_ext >&5
17504
17505( exit $ac_status )
17506{ echo "$as_me:$LINENO: result: no" >&5
17507echo "${ECHO_T}no" >&6; }
17508
17509fi
17510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17511fi
17512
17513
17514
17515{ echo "$as_me:$LINENO: checking for lchflags" >&5
17516echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17517if test "$cross_compiling" = yes; then
17518 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17519See \`config.log' for more details." >&5
17520echo "$as_me: error: cannot run test program while cross compiling
17521See \`config.log' for more details." >&2;}
17522 { (exit 1); exit 1; }; }
17523else
17524 cat >conftest.$ac_ext <<_ACEOF
17525/* confdefs.h. */
17526_ACEOF
17527cat confdefs.h >>conftest.$ac_ext
17528cat >>conftest.$ac_ext <<_ACEOF
17529/* end confdefs.h. */
17530
17531#include <sys/stat.h>
17532#include <unistd.h>
17533int main(int argc, char*argv[])
17534{
17535 if(lchflags(argv[0], 0) != 0)
17536 return 1;
17537 return 0;
17538}
17539
17540_ACEOF
17541rm -f conftest$ac_exeext
17542if { (ac_try="$ac_link"
17543case "(($ac_try" in
17544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17545 *) ac_try_echo=$ac_try;;
17546esac
17547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17548 (eval "$ac_link") 2>&5
17549 ac_status=$?
17550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17551 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17552 { (case "(($ac_try" in
17553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17554 *) ac_try_echo=$ac_try;;
17555esac
17556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17557 (eval "$ac_try") 2>&5
17558 ac_status=$?
17559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17560 (exit $ac_status); }; }; then
17561
17562cat >>confdefs.h <<\_ACEOF
17563#define HAVE_LCHFLAGS 1
17564_ACEOF
17565
17566 { echo "$as_me:$LINENO: result: yes" >&5
17567echo "${ECHO_T}yes" >&6; }
17568else
17569 echo "$as_me: program exited with status $ac_status" >&5
17570echo "$as_me: failed program was:" >&5
17571sed 's/^/| /' conftest.$ac_ext >&5
17572
17573( exit $ac_status )
17574{ echo "$as_me:$LINENO: result: no" >&5
17575echo "${ECHO_T}no" >&6; }
17576
17577fi
17578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17579fi
17580
17581
17582
Ronald Oussorenf8752642006-07-06 10:13:35 +000017583case $ac_sys_system/$ac_sys_release in
17584Darwin/*)
17585 _CUR_CFLAGS="${CFLAGS}"
17586 _CUR_LDFLAGS="${LDFLAGS}"
17587 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17588 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17589 ;;
17590esac
17591
Martin v. Löwiseba40652007-08-30 20:10:57 +000017592{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17593echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017594if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17595 echo $ECHO_N "(cached) $ECHO_C" >&6
17596else
17597 ac_check_lib_save_LIBS=$LIBS
17598LIBS="-lz $LIBS"
17599cat >conftest.$ac_ext <<_ACEOF
17600/* confdefs.h. */
17601_ACEOF
17602cat confdefs.h >>conftest.$ac_ext
17603cat >>conftest.$ac_ext <<_ACEOF
17604/* end confdefs.h. */
17605
Martin v. Löwiseba40652007-08-30 20:10:57 +000017606/* Override any GCC internal prototype to avoid an error.
17607 Use char because int might match the return type of a GCC
17608 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017609#ifdef __cplusplus
17610extern "C"
17611#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017612char inflateCopy ();
17613int
17614main ()
17615{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017616return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017617 ;
17618 return 0;
17619}
17620_ACEOF
17621rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017622if { (ac_try="$ac_link"
17623case "(($ac_try" in
17624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17625 *) ac_try_echo=$ac_try;;
17626esac
17627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17628 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017629 ac_status=$?
17630 grep -v '^ *+' conftest.er1 >conftest.err
17631 rm -f conftest.er1
17632 cat conftest.err >&5
17633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017634 (exit $ac_status); } && {
17635 test -z "$ac_c_werror_flag" ||
17636 test ! -s conftest.err
17637 } && test -s conftest$ac_exeext &&
17638 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017639 ac_cv_lib_z_inflateCopy=yes
17640else
17641 echo "$as_me: failed program was:" >&5
17642sed 's/^/| /' conftest.$ac_ext >&5
17643
Martin v. Löwiseba40652007-08-30 20:10:57 +000017644 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017646
17647rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017648 conftest$ac_exeext conftest.$ac_ext
17649LIBS=$ac_check_lib_save_LIBS
17650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017651{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17652echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017653if test $ac_cv_lib_z_inflateCopy = yes; then
17654
17655cat >>confdefs.h <<\_ACEOF
17656#define HAVE_ZLIB_COPY 1
17657_ACEOF
17658
17659fi
17660
17661
Ronald Oussorenf8752642006-07-06 10:13:35 +000017662case $ac_sys_system/$ac_sys_release in
17663Darwin/*)
17664 CFLAGS="${_CUR_CFLAGS}"
17665 LDFLAGS="${_CUR_LDFLAGS}"
17666 ;;
17667esac
17668
Martin v. Löwiseba40652007-08-30 20:10:57 +000017669{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17670echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017672/* confdefs.h. */
17673_ACEOF
17674cat confdefs.h >>conftest.$ac_ext
17675cat >>conftest.$ac_ext <<_ACEOF
17676/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017677
17678#include "confdefs.h"
17679#include <netdb.h>
17680
Martin v. Löwise9416172003-05-03 10:12:45 +000017681int
17682main ()
17683{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017684void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017685 ;
17686 return 0;
17687}
17688_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017689rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017690if { (ac_try="$ac_link"
17691case "(($ac_try" in
17692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17693 *) ac_try_echo=$ac_try;;
17694esac
17695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17696 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017698 grep -v '^ *+' conftest.er1 >conftest.err
17699 rm -f conftest.er1
17700 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017702 (exit $ac_status); } && {
17703 test -z "$ac_c_werror_flag" ||
17704 test ! -s conftest.err
17705 } && test -s conftest$ac_exeext &&
17706 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017707
17708cat >>confdefs.h <<\_ACEOF
17709#define HAVE_HSTRERROR 1
17710_ACEOF
17711
Martin v. Löwiseba40652007-08-30 20:10:57 +000017712 { echo "$as_me:$LINENO: result: yes" >&5
17713echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017714else
17715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017716sed 's/^/| /' conftest.$ac_ext >&5
17717
Martin v. Löwiseba40652007-08-30 20:10:57 +000017718 { echo "$as_me:$LINENO: result: no" >&5
17719echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017720
17721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017722
17723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017725
Martin v. Löwiseba40652007-08-30 20:10:57 +000017726{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17727echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017729/* confdefs.h. */
17730_ACEOF
17731cat confdefs.h >>conftest.$ac_ext
17732cat >>conftest.$ac_ext <<_ACEOF
17733/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017734
17735#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017736#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017737#include <sys/socket.h>
17738#include <netinet/in.h>
17739#include <arpa/inet.h>
17740
Martin v. Löwise9416172003-05-03 10:12:45 +000017741int
17742main ()
17743{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017744void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017745 ;
17746 return 0;
17747}
17748_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017749rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017750if { (ac_try="$ac_link"
17751case "(($ac_try" in
17752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17753 *) ac_try_echo=$ac_try;;
17754esac
17755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17756 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017758 grep -v '^ *+' conftest.er1 >conftest.err
17759 rm -f conftest.er1
17760 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017762 (exit $ac_status); } && {
17763 test -z "$ac_c_werror_flag" ||
17764 test ! -s conftest.err
17765 } && test -s conftest$ac_exeext &&
17766 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017767
17768cat >>confdefs.h <<\_ACEOF
17769#define HAVE_INET_ATON 1
17770_ACEOF
17771
Martin v. Löwiseba40652007-08-30 20:10:57 +000017772 { echo "$as_me:$LINENO: result: yes" >&5
17773echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017774else
17775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017776sed 's/^/| /' conftest.$ac_ext >&5
17777
Martin v. Löwiseba40652007-08-30 20:10:57 +000017778 { echo "$as_me:$LINENO: result: no" >&5
17779echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017780
17781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017782
17783rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017785
Martin v. Löwiseba40652007-08-30 20:10:57 +000017786{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17787echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017788cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017789/* confdefs.h. */
17790_ACEOF
17791cat confdefs.h >>conftest.$ac_ext
17792cat >>conftest.$ac_ext <<_ACEOF
17793/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017794
17795#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017796#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017797#include <sys/socket.h>
17798#include <netinet/in.h>
17799#include <arpa/inet.h>
17800
Martin v. Löwise9416172003-05-03 10:12:45 +000017801int
17802main ()
17803{
17804void* p = inet_pton
17805 ;
17806 return 0;
17807}
17808_ACEOF
17809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017810if { (ac_try="$ac_compile"
17811case "(($ac_try" in
17812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17813 *) ac_try_echo=$ac_try;;
17814esac
17815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017818 grep -v '^ *+' conftest.er1 >conftest.err
17819 rm -f conftest.er1
17820 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017822 (exit $ac_status); } && {
17823 test -z "$ac_c_werror_flag" ||
17824 test ! -s conftest.err
17825 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017826
17827cat >>confdefs.h <<\_ACEOF
17828#define HAVE_INET_PTON 1
17829_ACEOF
17830
Martin v. Löwiseba40652007-08-30 20:10:57 +000017831 { echo "$as_me:$LINENO: result: yes" >&5
17832echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017833else
17834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017835sed 's/^/| /' conftest.$ac_ext >&5
17836
Martin v. Löwiseba40652007-08-30 20:10:57 +000017837 { echo "$as_me:$LINENO: result: no" >&5
17838echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017839
17840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017841
17842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017843
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017844# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017845{ echo "$as_me:$LINENO: checking for setgroups" >&5
17846echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017848/* confdefs.h. */
17849_ACEOF
17850cat confdefs.h >>conftest.$ac_ext
17851cat >>conftest.$ac_ext <<_ACEOF
17852/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017853
17854#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017855#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017856#ifdef HAVE_GRP_H
17857#include <grp.h>
17858#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017859
Martin v. Löwisd5843682002-11-21 20:41:28 +000017860int
17861main ()
17862{
17863void* p = setgroups
17864 ;
17865 return 0;
17866}
17867_ACEOF
17868rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017869if { (ac_try="$ac_compile"
17870case "(($ac_try" in
17871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17872 *) ac_try_echo=$ac_try;;
17873esac
17874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17875 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017877 grep -v '^ *+' conftest.er1 >conftest.err
17878 rm -f conftest.er1
17879 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017881 (exit $ac_status); } && {
17882 test -z "$ac_c_werror_flag" ||
17883 test ! -s conftest.err
17884 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017885
17886cat >>confdefs.h <<\_ACEOF
17887#define HAVE_SETGROUPS 1
17888_ACEOF
17889
Martin v. Löwiseba40652007-08-30 20:10:57 +000017890 { echo "$as_me:$LINENO: result: yes" >&5
17891echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017892else
17893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017894sed 's/^/| /' conftest.$ac_ext >&5
17895
Martin v. Löwiseba40652007-08-30 20:10:57 +000017896 { echo "$as_me:$LINENO: result: no" >&5
17897echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017898
17899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017900
17901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017902
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017903# check for openpty and forkpty
17904
Martin v. Löwis11437992002-04-12 09:54:03 +000017905
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017906for ac_func in openpty
17907do
Martin v. Löwis11437992002-04-12 09:54:03 +000017908as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017909{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17910echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17911if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017912 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017913else
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017915/* confdefs.h. */
17916_ACEOF
17917cat confdefs.h >>conftest.$ac_ext
17918cat >>conftest.$ac_ext <<_ACEOF
17919/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017920/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17921 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17922#define $ac_func innocuous_$ac_func
17923
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017924/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017925 which can conflict with char $ac_func (); below.
17926 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017927 <limits.h> exists even on freestanding compilers. */
17928
17929#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017930# include <limits.h>
17931#else
17932# include <assert.h>
17933#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017934
17935#undef $ac_func
17936
Martin v. Löwiseba40652007-08-30 20:10:57 +000017937/* Override any GCC internal prototype to avoid an error.
17938 Use char because int might match the return type of a GCC
17939 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017940#ifdef __cplusplus
17941extern "C"
17942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017943char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017944/* The GNU C library defines this for functions which it implements
17945 to always fail with ENOSYS. Some functions are actually named
17946 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017947#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017948choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017949#endif
17950
Skip Montanaro6dead952003-09-25 14:50:04 +000017951int
17952main ()
17953{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017954return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 ;
17956 return 0;
17957}
17958_ACEOF
17959rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017960if { (ac_try="$ac_link"
17961case "(($ac_try" in
17962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17963 *) ac_try_echo=$ac_try;;
17964esac
17965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17966 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017968 grep -v '^ *+' conftest.er1 >conftest.err
17969 rm -f conftest.er1
17970 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017972 (exit $ac_status); } && {
17973 test -z "$ac_c_werror_flag" ||
17974 test ! -s conftest.err
17975 } && test -s conftest$ac_exeext &&
17976 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017978else
Martin v. Löwis11437992002-04-12 09:54:03 +000017979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017980sed 's/^/| /' conftest.$ac_ext >&5
17981
Martin v. Löwiseba40652007-08-30 20:10:57 +000017982 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017984
17985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017986 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017988ac_res=`eval echo '${'$as_ac_var'}'`
17989 { echo "$as_me:$LINENO: result: $ac_res" >&5
17990echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017991if test `eval echo '${'$as_ac_var'}'` = yes; then
17992 cat >>confdefs.h <<_ACEOF
17993#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17994_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017995
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017996else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017997 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17998echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017999if test "${ac_cv_lib_util_openpty+set}" = set; then
18000 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018001else
Martin v. Löwis11437992002-04-12 09:54:03 +000018002 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018003LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018004cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018005/* confdefs.h. */
18006_ACEOF
18007cat confdefs.h >>conftest.$ac_ext
18008cat >>conftest.$ac_ext <<_ACEOF
18009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018010
Martin v. Löwiseba40652007-08-30 20:10:57 +000018011/* Override any GCC internal prototype to avoid an error.
18012 Use char because int might match the return type of a GCC
18013 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018014#ifdef __cplusplus
18015extern "C"
18016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018017char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018018int
18019main ()
18020{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018021return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018022 ;
18023 return 0;
18024}
18025_ACEOF
18026rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018027if { (ac_try="$ac_link"
18028case "(($ac_try" in
18029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18030 *) ac_try_echo=$ac_try;;
18031esac
18032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18033 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018035 grep -v '^ *+' conftest.er1 >conftest.err
18036 rm -f conftest.er1
18037 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018039 (exit $ac_status); } && {
18040 test -z "$ac_c_werror_flag" ||
18041 test ! -s conftest.err
18042 } && test -s conftest$ac_exeext &&
18043 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018044 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018045else
Martin v. Löwis11437992002-04-12 09:54:03 +000018046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018047sed 's/^/| /' conftest.$ac_ext >&5
18048
Martin v. Löwiseba40652007-08-30 20:10:57 +000018049 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018051
18052rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018053 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018054LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018056{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18057echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018058if test $ac_cv_lib_util_openpty = yes; then
18059 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018060#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018061_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018062 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018063else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018064 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18065echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018066if test "${ac_cv_lib_bsd_openpty+set}" = set; then
18067 echo $ECHO_N "(cached) $ECHO_C" >&6
18068else
18069 ac_check_lib_save_LIBS=$LIBS
18070LIBS="-lbsd $LIBS"
18071cat >conftest.$ac_ext <<_ACEOF
18072/* confdefs.h. */
18073_ACEOF
18074cat confdefs.h >>conftest.$ac_ext
18075cat >>conftest.$ac_ext <<_ACEOF
18076/* end confdefs.h. */
18077
Martin v. Löwiseba40652007-08-30 20:10:57 +000018078/* Override any GCC internal prototype to avoid an error.
18079 Use char because int might match the return type of a GCC
18080 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018081#ifdef __cplusplus
18082extern "C"
18083#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018084char openpty ();
18085int
18086main ()
18087{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018088return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018089 ;
18090 return 0;
18091}
18092_ACEOF
18093rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018094if { (ac_try="$ac_link"
18095case "(($ac_try" in
18096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18097 *) ac_try_echo=$ac_try;;
18098esac
18099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18100 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018101 ac_status=$?
18102 grep -v '^ *+' conftest.er1 >conftest.err
18103 rm -f conftest.er1
18104 cat conftest.err >&5
18105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018106 (exit $ac_status); } && {
18107 test -z "$ac_c_werror_flag" ||
18108 test ! -s conftest.err
18109 } && test -s conftest$ac_exeext &&
18110 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018111 ac_cv_lib_bsd_openpty=yes
18112else
18113 echo "$as_me: failed program was:" >&5
18114sed 's/^/| /' conftest.$ac_ext >&5
18115
Martin v. Löwiseba40652007-08-30 20:10:57 +000018116 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018118
18119rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018120 conftest$ac_exeext conftest.$ac_ext
18121LIBS=$ac_check_lib_save_LIBS
18122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018123{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18124echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018125if test $ac_cv_lib_bsd_openpty = yes; then
18126 cat >>confdefs.h <<\_ACEOF
18127#define HAVE_OPENPTY 1
18128_ACEOF
18129 LIBS="$LIBS -lbsd"
18130fi
18131
18132
18133fi
18134
Fred Drake8cef4cf2000-06-28 16:40:38 +000018135
18136fi
18137done
18138
Martin v. Löwis11437992002-04-12 09:54:03 +000018139
Fred Drake8cef4cf2000-06-28 16:40:38 +000018140for ac_func in forkpty
18141do
Martin v. Löwis11437992002-04-12 09:54:03 +000018142as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018143{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18144echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18145if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018147else
Martin v. Löwis11437992002-04-12 09:54:03 +000018148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018149/* confdefs.h. */
18150_ACEOF
18151cat confdefs.h >>conftest.$ac_ext
18152cat >>conftest.$ac_ext <<_ACEOF
18153/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018154/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18155 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18156#define $ac_func innocuous_$ac_func
18157
Fred Drake8cef4cf2000-06-28 16:40:38 +000018158/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018159 which can conflict with char $ac_func (); below.
18160 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018161 <limits.h> exists even on freestanding compilers. */
18162
18163#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018164# include <limits.h>
18165#else
18166# include <assert.h>
18167#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018168
18169#undef $ac_func
18170
Martin v. Löwiseba40652007-08-30 20:10:57 +000018171/* Override any GCC internal prototype to avoid an error.
18172 Use char because int might match the return type of a GCC
18173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018174#ifdef __cplusplus
18175extern "C"
18176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018177char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018178/* The GNU C library defines this for functions which it implements
18179 to always fail with ENOSYS. Some functions are actually named
18180 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018181#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018182choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018183#endif
18184
Skip Montanaro6dead952003-09-25 14:50:04 +000018185int
18186main ()
18187{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018188return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018189 ;
18190 return 0;
18191}
18192_ACEOF
18193rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018194if { (ac_try="$ac_link"
18195case "(($ac_try" in
18196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18197 *) ac_try_echo=$ac_try;;
18198esac
18199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18200 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018202 grep -v '^ *+' conftest.er1 >conftest.err
18203 rm -f conftest.er1
18204 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018206 (exit $ac_status); } && {
18207 test -z "$ac_c_werror_flag" ||
18208 test ! -s conftest.err
18209 } && test -s conftest$ac_exeext &&
18210 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018211 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018212else
Martin v. Löwis11437992002-04-12 09:54:03 +000018213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018214sed 's/^/| /' conftest.$ac_ext >&5
18215
Martin v. Löwiseba40652007-08-30 20:10:57 +000018216 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018218
18219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018220 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018222ac_res=`eval echo '${'$as_ac_var'}'`
18223 { echo "$as_me:$LINENO: result: $ac_res" >&5
18224echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018225if test `eval echo '${'$as_ac_var'}'` = yes; then
18226 cat >>confdefs.h <<_ACEOF
18227#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18228_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018229
Fred Drake8cef4cf2000-06-28 16:40:38 +000018230else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018231 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18232echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018233if test "${ac_cv_lib_util_forkpty+set}" = set; then
18234 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018235else
Martin v. Löwis11437992002-04-12 09:54:03 +000018236 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018237LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018238cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018239/* confdefs.h. */
18240_ACEOF
18241cat confdefs.h >>conftest.$ac_ext
18242cat >>conftest.$ac_ext <<_ACEOF
18243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018244
Martin v. Löwiseba40652007-08-30 20:10:57 +000018245/* Override any GCC internal prototype to avoid an error.
18246 Use char because int might match the return type of a GCC
18247 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018248#ifdef __cplusplus
18249extern "C"
18250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018251char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018252int
18253main ()
18254{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018255return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018256 ;
18257 return 0;
18258}
18259_ACEOF
18260rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018261if { (ac_try="$ac_link"
18262case "(($ac_try" in
18263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18264 *) ac_try_echo=$ac_try;;
18265esac
18266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18267 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018269 grep -v '^ *+' conftest.er1 >conftest.err
18270 rm -f conftest.er1
18271 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018273 (exit $ac_status); } && {
18274 test -z "$ac_c_werror_flag" ||
18275 test ! -s conftest.err
18276 } && test -s conftest$ac_exeext &&
18277 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018278 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018279else
Martin v. Löwis11437992002-04-12 09:54:03 +000018280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018281sed 's/^/| /' conftest.$ac_ext >&5
18282
Martin v. Löwiseba40652007-08-30 20:10:57 +000018283 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018285
18286rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018287 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018288LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018290{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18291echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018292if test $ac_cv_lib_util_forkpty = yes; then
18293 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018294#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018295_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018296 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018297else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018298 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18299echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018300if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18301 echo $ECHO_N "(cached) $ECHO_C" >&6
18302else
18303 ac_check_lib_save_LIBS=$LIBS
18304LIBS="-lbsd $LIBS"
18305cat >conftest.$ac_ext <<_ACEOF
18306/* confdefs.h. */
18307_ACEOF
18308cat confdefs.h >>conftest.$ac_ext
18309cat >>conftest.$ac_ext <<_ACEOF
18310/* end confdefs.h. */
18311
Martin v. Löwiseba40652007-08-30 20:10:57 +000018312/* Override any GCC internal prototype to avoid an error.
18313 Use char because int might match the return type of a GCC
18314 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018315#ifdef __cplusplus
18316extern "C"
18317#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018318char forkpty ();
18319int
18320main ()
18321{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018322return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018323 ;
18324 return 0;
18325}
18326_ACEOF
18327rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018328if { (ac_try="$ac_link"
18329case "(($ac_try" in
18330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18331 *) ac_try_echo=$ac_try;;
18332esac
18333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18334 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018335 ac_status=$?
18336 grep -v '^ *+' conftest.er1 >conftest.err
18337 rm -f conftest.er1
18338 cat conftest.err >&5
18339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018340 (exit $ac_status); } && {
18341 test -z "$ac_c_werror_flag" ||
18342 test ! -s conftest.err
18343 } && test -s conftest$ac_exeext &&
18344 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018345 ac_cv_lib_bsd_forkpty=yes
18346else
18347 echo "$as_me: failed program was:" >&5
18348sed 's/^/| /' conftest.$ac_ext >&5
18349
Martin v. Löwiseba40652007-08-30 20:10:57 +000018350 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018352
18353rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018354 conftest$ac_exeext conftest.$ac_ext
18355LIBS=$ac_check_lib_save_LIBS
18356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018357{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18358echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018359if test $ac_cv_lib_bsd_forkpty = yes; then
18360 cat >>confdefs.h <<\_ACEOF
18361#define HAVE_FORKPTY 1
18362_ACEOF
18363 LIBS="$LIBS -lbsd"
18364fi
18365
18366
18367fi
18368
Fred Drake8cef4cf2000-06-28 16:40:38 +000018369
18370fi
18371done
18372
Jack Jansendd19cf82001-12-06 22:36:17 +000018373
Brett Cannonaa5778d2008-03-18 04:09:00 +000018374# Stuff for expat.
18375
18376for ac_func in memmove
18377do
18378as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18379{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18380echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18381if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18382 echo $ECHO_N "(cached) $ECHO_C" >&6
18383else
18384 cat >conftest.$ac_ext <<_ACEOF
18385/* confdefs.h. */
18386_ACEOF
18387cat confdefs.h >>conftest.$ac_ext
18388cat >>conftest.$ac_ext <<_ACEOF
18389/* end confdefs.h. */
18390/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18391 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18392#define $ac_func innocuous_$ac_func
18393
18394/* System header to define __stub macros and hopefully few prototypes,
18395 which can conflict with char $ac_func (); below.
18396 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18397 <limits.h> exists even on freestanding compilers. */
18398
18399#ifdef __STDC__
18400# include <limits.h>
18401#else
18402# include <assert.h>
18403#endif
18404
18405#undef $ac_func
18406
18407/* Override any GCC internal prototype to avoid an error.
18408 Use char because int might match the return type of a GCC
18409 builtin and then its argument prototype would still apply. */
18410#ifdef __cplusplus
18411extern "C"
18412#endif
18413char $ac_func ();
18414/* The GNU C library defines this for functions which it implements
18415 to always fail with ENOSYS. Some functions are actually named
18416 something starting with __ and the normal name is an alias. */
18417#if defined __stub_$ac_func || defined __stub___$ac_func
18418choke me
18419#endif
18420
18421int
18422main ()
18423{
18424return $ac_func ();
18425 ;
18426 return 0;
18427}
18428_ACEOF
18429rm -f conftest.$ac_objext conftest$ac_exeext
18430if { (ac_try="$ac_link"
18431case "(($ac_try" in
18432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18433 *) ac_try_echo=$ac_try;;
18434esac
18435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18436 (eval "$ac_link") 2>conftest.er1
18437 ac_status=$?
18438 grep -v '^ *+' conftest.er1 >conftest.err
18439 rm -f conftest.er1
18440 cat conftest.err >&5
18441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18442 (exit $ac_status); } && {
18443 test -z "$ac_c_werror_flag" ||
18444 test ! -s conftest.err
18445 } && test -s conftest$ac_exeext &&
18446 $as_test_x conftest$ac_exeext; then
18447 eval "$as_ac_var=yes"
18448else
18449 echo "$as_me: failed program was:" >&5
18450sed 's/^/| /' conftest.$ac_ext >&5
18451
18452 eval "$as_ac_var=no"
18453fi
18454
18455rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18456 conftest$ac_exeext conftest.$ac_ext
18457fi
18458ac_res=`eval echo '${'$as_ac_var'}'`
18459 { echo "$as_me:$LINENO: result: $ac_res" >&5
18460echo "${ECHO_T}$ac_res" >&6; }
18461if test `eval echo '${'$as_ac_var'}'` = yes; then
18462 cat >>confdefs.h <<_ACEOF
18463#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18464_ACEOF
18465
18466fi
18467done
18468
18469
Michael W. Hudson54241132001-12-07 15:38:26 +000018470# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018471
18472
18473
18474
18475
18476
Fred Drake8cef4cf2000-06-28 16:40:38 +000018477for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18478do
Martin v. Löwis11437992002-04-12 09:54:03 +000018479as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018480{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18481echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18482if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018483 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018484else
Martin v. Löwis11437992002-04-12 09:54:03 +000018485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018486/* confdefs.h. */
18487_ACEOF
18488cat confdefs.h >>conftest.$ac_ext
18489cat >>conftest.$ac_ext <<_ACEOF
18490/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018491/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18492 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18493#define $ac_func innocuous_$ac_func
18494
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018495/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018496 which can conflict with char $ac_func (); below.
18497 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018498 <limits.h> exists even on freestanding compilers. */
18499
18500#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018501# include <limits.h>
18502#else
18503# include <assert.h>
18504#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018505
18506#undef $ac_func
18507
Martin v. Löwiseba40652007-08-30 20:10:57 +000018508/* Override any GCC internal prototype to avoid an error.
18509 Use char because int might match the return type of a GCC
18510 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018511#ifdef __cplusplus
18512extern "C"
18513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018514char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018515/* The GNU C library defines this for functions which it implements
18516 to always fail with ENOSYS. Some functions are actually named
18517 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018519choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018520#endif
18521
Skip Montanaro6dead952003-09-25 14:50:04 +000018522int
18523main ()
18524{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018525return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018526 ;
18527 return 0;
18528}
18529_ACEOF
18530rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018531if { (ac_try="$ac_link"
18532case "(($ac_try" in
18533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18534 *) ac_try_echo=$ac_try;;
18535esac
18536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18537 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018539 grep -v '^ *+' conftest.er1 >conftest.err
18540 rm -f conftest.er1
18541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018543 (exit $ac_status); } && {
18544 test -z "$ac_c_werror_flag" ||
18545 test ! -s conftest.err
18546 } && test -s conftest$ac_exeext &&
18547 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018548 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018549else
Martin v. Löwis11437992002-04-12 09:54:03 +000018550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018551sed 's/^/| /' conftest.$ac_ext >&5
18552
Martin v. Löwiseba40652007-08-30 20:10:57 +000018553 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018555
18556rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018557 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018559ac_res=`eval echo '${'$as_ac_var'}'`
18560 { echo "$as_me:$LINENO: result: $ac_res" >&5
18561echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018562if test `eval echo '${'$as_ac_var'}'` = yes; then
18563 cat >>confdefs.h <<_ACEOF
18564#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18565_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018566
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018567fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018568done
18569
Michael W. Hudson54241132001-12-07 15:38:26 +000018570
Martin v. Löwis11437992002-04-12 09:54:03 +000018571
18572
18573
Brett Cannonaa5778d2008-03-18 04:09:00 +000018574for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018575do
Martin v. Löwis11437992002-04-12 09:54:03 +000018576as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018577{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18578echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18579if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018581else
Martin v. Löwis11437992002-04-12 09:54:03 +000018582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018583/* confdefs.h. */
18584_ACEOF
18585cat confdefs.h >>conftest.$ac_ext
18586cat >>conftest.$ac_ext <<_ACEOF
18587/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018588/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18589 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18590#define $ac_func innocuous_$ac_func
18591
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018592/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018593 which can conflict with char $ac_func (); below.
18594 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018595 <limits.h> exists even on freestanding compilers. */
18596
18597#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018598# include <limits.h>
18599#else
18600# include <assert.h>
18601#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018602
18603#undef $ac_func
18604
Martin v. Löwiseba40652007-08-30 20:10:57 +000018605/* Override any GCC internal prototype to avoid an error.
18606 Use char because int might match the return type of a GCC
18607 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018608#ifdef __cplusplus
18609extern "C"
18610#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018611char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018612/* The GNU C library defines this for functions which it implements
18613 to always fail with ENOSYS. Some functions are actually named
18614 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018615#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018616choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018617#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018618
Skip Montanaro6dead952003-09-25 14:50:04 +000018619int
18620main ()
18621{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018622return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018623 ;
18624 return 0;
18625}
18626_ACEOF
18627rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018628if { (ac_try="$ac_link"
18629case "(($ac_try" in
18630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18631 *) ac_try_echo=$ac_try;;
18632esac
18633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18634 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018636 grep -v '^ *+' conftest.er1 >conftest.err
18637 rm -f conftest.er1
18638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018640 (exit $ac_status); } && {
18641 test -z "$ac_c_werror_flag" ||
18642 test ! -s conftest.err
18643 } && test -s conftest$ac_exeext &&
18644 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018645 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018646else
Martin v. Löwis11437992002-04-12 09:54:03 +000018647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018648sed 's/^/| /' conftest.$ac_ext >&5
18649
Martin v. Löwiseba40652007-08-30 20:10:57 +000018650 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018652
18653rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018654 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018656ac_res=`eval echo '${'$as_ac_var'}'`
18657 { echo "$as_me:$LINENO: result: $ac_res" >&5
18658echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018659if test `eval echo '${'$as_ac_var'}'` = yes; then
18660 cat >>confdefs.h <<_ACEOF
18661#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18662_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018663
Martin v. Löwis1142de32002-03-29 16:28:31 +000018664else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018665 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018666 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018667 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18668 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018669esac
18670
Martin v. Löwis1142de32002-03-29 16:28:31 +000018671fi
18672done
18673
18674
Martin v. Löwis11437992002-04-12 09:54:03 +000018675
Martin v. Löwis1142de32002-03-29 16:28:31 +000018676for ac_func in getpgrp
18677do
Martin v. Löwis11437992002-04-12 09:54:03 +000018678as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018679{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18680echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18681if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018682 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018683else
Martin v. Löwis11437992002-04-12 09:54:03 +000018684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018685/* confdefs.h. */
18686_ACEOF
18687cat confdefs.h >>conftest.$ac_ext
18688cat >>conftest.$ac_ext <<_ACEOF
18689/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018690/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18691 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18692#define $ac_func innocuous_$ac_func
18693
Martin v. Löwis1142de32002-03-29 16:28:31 +000018694/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018695 which can conflict with char $ac_func (); below.
18696 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018697 <limits.h> exists even on freestanding compilers. */
18698
18699#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018700# include <limits.h>
18701#else
18702# include <assert.h>
18703#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018704
18705#undef $ac_func
18706
Martin v. Löwiseba40652007-08-30 20:10:57 +000018707/* Override any GCC internal prototype to avoid an error.
18708 Use char because int might match the return type of a GCC
18709 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018710#ifdef __cplusplus
18711extern "C"
18712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018713char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018714/* The GNU C library defines this for functions which it implements
18715 to always fail with ENOSYS. Some functions are actually named
18716 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018717#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018718choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018719#endif
18720
Skip Montanaro6dead952003-09-25 14:50:04 +000018721int
18722main ()
18723{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018724return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018725 ;
18726 return 0;
18727}
18728_ACEOF
18729rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018730if { (ac_try="$ac_link"
18731case "(($ac_try" in
18732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18733 *) ac_try_echo=$ac_try;;
18734esac
18735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18736 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018738 grep -v '^ *+' conftest.er1 >conftest.err
18739 rm -f conftest.er1
18740 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018742 (exit $ac_status); } && {
18743 test -z "$ac_c_werror_flag" ||
18744 test ! -s conftest.err
18745 } && test -s conftest$ac_exeext &&
18746 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018747 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018748else
Martin v. Löwis11437992002-04-12 09:54:03 +000018749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018750sed 's/^/| /' conftest.$ac_ext >&5
18751
Martin v. Löwiseba40652007-08-30 20:10:57 +000018752 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018754
18755rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018756 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018758ac_res=`eval echo '${'$as_ac_var'}'`
18759 { echo "$as_me:$LINENO: result: $ac_res" >&5
18760echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018761if test `eval echo '${'$as_ac_var'}'` = yes; then
18762 cat >>confdefs.h <<_ACEOF
18763#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18764_ACEOF
18765 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018766/* confdefs.h. */
18767_ACEOF
18768cat confdefs.h >>conftest.$ac_ext
18769cat >>conftest.$ac_ext <<_ACEOF
18770/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018771#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018772int
18773main ()
18774{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018775getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018776 ;
18777 return 0;
18778}
18779_ACEOF
18780rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018781if { (ac_try="$ac_compile"
18782case "(($ac_try" in
18783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18784 *) ac_try_echo=$ac_try;;
18785esac
18786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018789 grep -v '^ *+' conftest.er1 >conftest.err
18790 rm -f conftest.er1
18791 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018793 (exit $ac_status); } && {
18794 test -z "$ac_c_werror_flag" ||
18795 test ! -s conftest.err
18796 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018797
18798cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018799#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018800_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018801
Martin v. Löwis11437992002-04-12 09:54:03 +000018802
Guido van Rossumf78abae1997-01-21 22:02:36 +000018803else
Martin v. Löwis11437992002-04-12 09:54:03 +000018804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018805sed 's/^/| /' conftest.$ac_ext >&5
18806
Martin v. Löwiseba40652007-08-30 20:10:57 +000018807
Guido van Rossum627b2d71993-12-24 10:39:16 +000018808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018809
18810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018811
Guido van Rossum627b2d71993-12-24 10:39:16 +000018812fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018813done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018814
Jack Jansen150753c2003-03-29 22:07:47 +000018815
18816for ac_func in setpgrp
18817do
18818as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018819{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18820echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18821if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018823else
Martin v. Löwis11437992002-04-12 09:54:03 +000018824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018825/* confdefs.h. */
18826_ACEOF
18827cat confdefs.h >>conftest.$ac_ext
18828cat >>conftest.$ac_ext <<_ACEOF
18829/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018830/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18831 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18832#define $ac_func innocuous_$ac_func
18833
Jack Jansen150753c2003-03-29 22:07:47 +000018834/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018835 which can conflict with char $ac_func (); below.
18836 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018837 <limits.h> exists even on freestanding compilers. */
18838
18839#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018840# include <limits.h>
18841#else
18842# include <assert.h>
18843#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018844
18845#undef $ac_func
18846
Martin v. Löwiseba40652007-08-30 20:10:57 +000018847/* Override any GCC internal prototype to avoid an error.
18848 Use char because int might match the return type of a GCC
18849 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018850#ifdef __cplusplus
18851extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018852#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018853char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018854/* The GNU C library defines this for functions which it implements
18855 to always fail with ENOSYS. Some functions are actually named
18856 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018857#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018858choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018859#endif
18860
Skip Montanaro6dead952003-09-25 14:50:04 +000018861int
18862main ()
18863{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018864return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018865 ;
18866 return 0;
18867}
18868_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018869rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018870if { (ac_try="$ac_link"
18871case "(($ac_try" in
18872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18873 *) ac_try_echo=$ac_try;;
18874esac
18875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18876 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018878 grep -v '^ *+' conftest.er1 >conftest.err
18879 rm -f conftest.er1
18880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018882 (exit $ac_status); } && {
18883 test -z "$ac_c_werror_flag" ||
18884 test ! -s conftest.err
18885 } && test -s conftest$ac_exeext &&
18886 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018887 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018888else
Jack Jansen150753c2003-03-29 22:07:47 +000018889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018890sed 's/^/| /' conftest.$ac_ext >&5
18891
Martin v. Löwiseba40652007-08-30 20:10:57 +000018892 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018894
18895rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018896 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018898ac_res=`eval echo '${'$as_ac_var'}'`
18899 { echo "$as_me:$LINENO: result: $ac_res" >&5
18900echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018901if test `eval echo '${'$as_ac_var'}'` = yes; then
18902 cat >>confdefs.h <<_ACEOF
18903#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18904_ACEOF
18905 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018906/* confdefs.h. */
18907_ACEOF
18908cat confdefs.h >>conftest.$ac_ext
18909cat >>conftest.$ac_ext <<_ACEOF
18910/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018911#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018912int
18913main ()
18914{
18915setpgrp(0,0);
18916 ;
18917 return 0;
18918}
18919_ACEOF
18920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018921if { (ac_try="$ac_compile"
18922case "(($ac_try" in
18923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18924 *) ac_try_echo=$ac_try;;
18925esac
18926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18927 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018929 grep -v '^ *+' conftest.er1 >conftest.err
18930 rm -f conftest.er1
18931 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018933 (exit $ac_status); } && {
18934 test -z "$ac_c_werror_flag" ||
18935 test ! -s conftest.err
18936 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018937
18938cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018939#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018940_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018941
Jack Jansen150753c2003-03-29 22:07:47 +000018942
18943else
18944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018945sed 's/^/| /' conftest.$ac_ext >&5
18946
Martin v. Löwiseba40652007-08-30 20:10:57 +000018947
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018949
18950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018951
18952fi
18953done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018954
Martin v. Löwis11437992002-04-12 09:54:03 +000018955
Thomas Wouters3a584202000-08-05 23:28:51 +000018956for ac_func in gettimeofday
18957do
Martin v. Löwis11437992002-04-12 09:54:03 +000018958as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18960echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18961if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018962 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018963else
Martin v. Löwis11437992002-04-12 09:54:03 +000018964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018965/* confdefs.h. */
18966_ACEOF
18967cat confdefs.h >>conftest.$ac_ext
18968cat >>conftest.$ac_ext <<_ACEOF
18969/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018970/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18971 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18972#define $ac_func innocuous_$ac_func
18973
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018974/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018975 which can conflict with char $ac_func (); below.
18976 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018977 <limits.h> exists even on freestanding compilers. */
18978
18979#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018980# include <limits.h>
18981#else
18982# include <assert.h>
18983#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018984
18985#undef $ac_func
18986
Martin v. Löwiseba40652007-08-30 20:10:57 +000018987/* Override any GCC internal prototype to avoid an error.
18988 Use char because int might match the return type of a GCC
18989 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018990#ifdef __cplusplus
18991extern "C"
18992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018993char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018994/* The GNU C library defines this for functions which it implements
18995 to always fail with ENOSYS. Some functions are actually named
18996 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018997#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018998choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018999#endif
19000
Skip Montanaro6dead952003-09-25 14:50:04 +000019001int
19002main ()
19003{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019004return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019005 ;
19006 return 0;
19007}
19008_ACEOF
19009rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019010if { (ac_try="$ac_link"
19011case "(($ac_try" in
19012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19013 *) ac_try_echo=$ac_try;;
19014esac
19015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19016 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019018 grep -v '^ *+' conftest.er1 >conftest.err
19019 rm -f conftest.er1
19020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019022 (exit $ac_status); } && {
19023 test -z "$ac_c_werror_flag" ||
19024 test ! -s conftest.err
19025 } && test -s conftest$ac_exeext &&
19026 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019027 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019028else
Martin v. Löwis11437992002-04-12 09:54:03 +000019029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019030sed 's/^/| /' conftest.$ac_ext >&5
19031
Martin v. Löwiseba40652007-08-30 20:10:57 +000019032 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019034
19035rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019036 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019038ac_res=`eval echo '${'$as_ac_var'}'`
19039 { echo "$as_me:$LINENO: result: $ac_res" >&5
19040echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019041if test `eval echo '${'$as_ac_var'}'` = yes; then
19042 cat >>confdefs.h <<_ACEOF
19043#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19044_ACEOF
19045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019046/* confdefs.h. */
19047_ACEOF
19048cat confdefs.h >>conftest.$ac_ext
19049cat >>conftest.$ac_ext <<_ACEOF
19050/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019051#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019052int
19053main ()
19054{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019055gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019056 ;
19057 return 0;
19058}
19059_ACEOF
19060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019061if { (ac_try="$ac_compile"
19062case "(($ac_try" in
19063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19064 *) ac_try_echo=$ac_try;;
19065esac
19066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019069 grep -v '^ *+' conftest.er1 >conftest.err
19070 rm -f conftest.er1
19071 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019073 (exit $ac_status); } && {
19074 test -z "$ac_c_werror_flag" ||
19075 test ! -s conftest.err
19076 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019077 :
19078else
Martin v. Löwis11437992002-04-12 09:54:03 +000019079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019080sed 's/^/| /' conftest.$ac_ext >&5
19081
Martin v. Löwis11437992002-04-12 09:54:03 +000019082
19083cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019084#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019085_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019086
Martin v. Löwis11437992002-04-12 09:54:03 +000019087
Guido van Rossum627b2d71993-12-24 10:39:16 +000019088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019089
19090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019091
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019092fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019093done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019094
Michael W. Hudson54241132001-12-07 15:38:26 +000019095
Martin v. Löwiseba40652007-08-30 20:10:57 +000019096{ echo "$as_me:$LINENO: checking for major" >&5
19097echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019099/* confdefs.h. */
19100_ACEOF
19101cat confdefs.h >>conftest.$ac_ext
19102cat >>conftest.$ac_ext <<_ACEOF
19103/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019104
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019105#if defined(MAJOR_IN_MKDEV)
19106#include <sys/mkdev.h>
19107#elif defined(MAJOR_IN_SYSMACROS)
19108#include <sys/sysmacros.h>
19109#else
19110#include <sys/types.h>
19111#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019112
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019113int
19114main ()
19115{
19116
19117 makedev(major(0),minor(0));
19118
19119 ;
19120 return 0;
19121}
19122_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019123rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019124if { (ac_try="$ac_link"
19125case "(($ac_try" in
19126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19127 *) ac_try_echo=$ac_try;;
19128esac
19129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19130 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019132 grep -v '^ *+' conftest.er1 >conftest.err
19133 rm -f conftest.er1
19134 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019136 (exit $ac_status); } && {
19137 test -z "$ac_c_werror_flag" ||
19138 test ! -s conftest.err
19139 } && test -s conftest$ac_exeext &&
19140 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019141
19142
19143cat >>confdefs.h <<\_ACEOF
19144#define HAVE_DEVICE_MACROS 1
19145_ACEOF
19146
Martin v. Löwiseba40652007-08-30 20:10:57 +000019147 { echo "$as_me:$LINENO: result: yes" >&5
19148echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019149
19150else
19151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019152sed 's/^/| /' conftest.$ac_ext >&5
19153
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019154
Martin v. Löwiseba40652007-08-30 20:10:57 +000019155 { echo "$as_me:$LINENO: result: no" >&5
19156echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019157
19158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019159
19160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019161 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019162
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019163# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019164# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000019165{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19166echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019168/* confdefs.h. */
19169_ACEOF
19170cat confdefs.h >>conftest.$ac_ext
19171cat >>conftest.$ac_ext <<_ACEOF
19172/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019173
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019174#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019175#include <sys/socket.h>
19176#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019177#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019178
Martin v. Löwis11437992002-04-12 09:54:03 +000019179int
19180main ()
19181{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019182
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019183getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019184
Martin v. Löwis11437992002-04-12 09:54:03 +000019185 ;
19186 return 0;
19187}
19188_ACEOF
19189rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019190if { (ac_try="$ac_link"
19191case "(($ac_try" in
19192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19193 *) ac_try_echo=$ac_try;;
19194esac
19195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19196 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019198 grep -v '^ *+' conftest.er1 >conftest.err
19199 rm -f conftest.er1
19200 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019202 (exit $ac_status); } && {
19203 test -z "$ac_c_werror_flag" ||
19204 test ! -s conftest.err
19205 } && test -s conftest$ac_exeext &&
19206 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019207
Martin v. Löwiseba40652007-08-30 20:10:57 +000019208{ echo "$as_me:$LINENO: result: yes" >&5
19209echo "${ECHO_T}yes" >&6; }
19210{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19211echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019212if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019213 { echo "$as_me:$LINENO: result: buggy" >&5
19214echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019215buggygetaddrinfo=yes
19216else
Martin v. Löwis11437992002-04-12 09:54:03 +000019217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019218/* confdefs.h. */
19219_ACEOF
19220cat confdefs.h >>conftest.$ac_ext
19221cat >>conftest.$ac_ext <<_ACEOF
19222/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019223
19224#include <sys/types.h>
19225#include <netdb.h>
19226#include <string.h>
19227#include <sys/socket.h>
19228#include <netinet/in.h>
19229
19230main()
19231{
19232 int passive, gaierr, inet4 = 0, inet6 = 0;
19233 struct addrinfo hints, *ai, *aitop;
19234 char straddr[INET6_ADDRSTRLEN], strport[16];
19235
19236 for (passive = 0; passive <= 1; passive++) {
19237 memset(&hints, 0, sizeof(hints));
19238 hints.ai_family = AF_UNSPEC;
19239 hints.ai_flags = passive ? AI_PASSIVE : 0;
19240 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019241 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019242 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19243 (void)gai_strerror(gaierr);
19244 goto bad;
19245 }
19246 for (ai = aitop; ai; ai = ai->ai_next) {
19247 if (ai->ai_addr == NULL ||
19248 ai->ai_addrlen == 0 ||
19249 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19250 straddr, sizeof(straddr), strport, sizeof(strport),
19251 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19252 goto bad;
19253 }
19254 switch (ai->ai_family) {
19255 case AF_INET:
19256 if (strcmp(strport, "54321") != 0) {
19257 goto bad;
19258 }
19259 if (passive) {
19260 if (strcmp(straddr, "0.0.0.0") != 0) {
19261 goto bad;
19262 }
19263 } else {
19264 if (strcmp(straddr, "127.0.0.1") != 0) {
19265 goto bad;
19266 }
19267 }
19268 inet4++;
19269 break;
19270 case AF_INET6:
19271 if (strcmp(strport, "54321") != 0) {
19272 goto bad;
19273 }
19274 if (passive) {
19275 if (strcmp(straddr, "::") != 0) {
19276 goto bad;
19277 }
19278 } else {
19279 if (strcmp(straddr, "::1") != 0) {
19280 goto bad;
19281 }
19282 }
19283 inet6++;
19284 break;
19285 case AF_UNSPEC:
19286 goto bad;
19287 break;
19288 default:
19289 /* another family support? */
19290 break;
19291 }
19292 }
19293 }
19294
19295 if (!(inet4 == 0 || inet4 == 2))
19296 goto bad;
19297 if (!(inet6 == 0 || inet6 == 2))
19298 goto bad;
19299
19300 if (aitop)
19301 freeaddrinfo(aitop);
19302 exit(0);
19303
19304 bad:
19305 if (aitop)
19306 freeaddrinfo(aitop);
19307 exit(1);
19308}
19309
Martin v. Löwis11437992002-04-12 09:54:03 +000019310_ACEOF
19311rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019312if { (ac_try="$ac_link"
19313case "(($ac_try" in
19314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19315 *) ac_try_echo=$ac_try;;
19316esac
19317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19318 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019319 ac_status=$?
19320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19321 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000019322 { (case "(($ac_try" in
19323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19324 *) ac_try_echo=$ac_try;;
19325esac
19326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19327 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 ac_status=$?
19329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19330 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019331 { echo "$as_me:$LINENO: result: good" >&5
19332echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019333buggygetaddrinfo=no
19334else
Martin v. Löwis11437992002-04-12 09:54:03 +000019335 echo "$as_me: program exited with status $ac_status" >&5
19336echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019337sed 's/^/| /' conftest.$ac_ext >&5
19338
Martin v. Löwis11437992002-04-12 09:54:03 +000019339( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000019340{ echo "$as_me:$LINENO: result: buggy" >&5
19341echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019342buggygetaddrinfo=yes
19343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019344rm -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 +000019345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019346
19347
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019348else
Martin v. Löwis11437992002-04-12 09:54:03 +000019349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019350sed 's/^/| /' conftest.$ac_ext >&5
19351
Martin v. Löwis11437992002-04-12 09:54:03 +000019352
Martin v. Löwiseba40652007-08-30 20:10:57 +000019353{ echo "$as_me:$LINENO: result: no" >&5
19354echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019355buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019356
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019358
19359rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019360 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019361
19362if test "$buggygetaddrinfo" = "yes"; then
19363 if test "$ipv6" = "yes"; then
19364 echo 'Fatal: You must get working getaddrinfo() function.'
19365 echo ' or you can specify "--disable-ipv6"'.
19366 exit 1
19367 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019368else
Martin v. Löwis11437992002-04-12 09:54:03 +000019369
19370cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019371#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019372_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019373
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019374fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019375
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019376for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019377do
Martin v. Löwis11437992002-04-12 09:54:03 +000019378as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019379{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19380echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19381if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019383else
Martin v. Löwis11437992002-04-12 09:54:03 +000019384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019385/* confdefs.h. */
19386_ACEOF
19387cat confdefs.h >>conftest.$ac_ext
19388cat >>conftest.$ac_ext <<_ACEOF
19389/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019390/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19391 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19392#define $ac_func innocuous_$ac_func
19393
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019394/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019395 which can conflict with char $ac_func (); below.
19396 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019397 <limits.h> exists even on freestanding compilers. */
19398
19399#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019400# include <limits.h>
19401#else
19402# include <assert.h>
19403#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019404
19405#undef $ac_func
19406
Martin v. Löwiseba40652007-08-30 20:10:57 +000019407/* Override any GCC internal prototype to avoid an error.
19408 Use char because int might match the return type of a GCC
19409 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019410#ifdef __cplusplus
19411extern "C"
19412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019413char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019414/* The GNU C library defines this for functions which it implements
19415 to always fail with ENOSYS. Some functions are actually named
19416 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019417#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019418choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019419#endif
19420
Skip Montanaro6dead952003-09-25 14:50:04 +000019421int
19422main ()
19423{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019424return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019425 ;
19426 return 0;
19427}
19428_ACEOF
19429rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019430if { (ac_try="$ac_link"
19431case "(($ac_try" in
19432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19433 *) ac_try_echo=$ac_try;;
19434esac
19435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19436 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019438 grep -v '^ *+' conftest.er1 >conftest.err
19439 rm -f conftest.er1
19440 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019442 (exit $ac_status); } && {
19443 test -z "$ac_c_werror_flag" ||
19444 test ! -s conftest.err
19445 } && test -s conftest$ac_exeext &&
19446 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019447 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019448else
Martin v. Löwis11437992002-04-12 09:54:03 +000019449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019450sed 's/^/| /' conftest.$ac_ext >&5
19451
Martin v. Löwiseba40652007-08-30 20:10:57 +000019452 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019454
19455rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019456 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019458ac_res=`eval echo '${'$as_ac_var'}'`
19459 { echo "$as_me:$LINENO: result: $ac_res" >&5
19460echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019461if test `eval echo '${'$as_ac_var'}'` = yes; then
19462 cat >>confdefs.h <<_ACEOF
19463#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19464_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019465
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019466fi
19467done
19468
Michael W. Hudson54241132001-12-07 15:38:26 +000019469
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019470# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019471{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19472echo $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 +000019473if test "${ac_cv_header_time+set}" = set; then
19474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019475else
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019477/* confdefs.h. */
19478_ACEOF
19479cat confdefs.h >>conftest.$ac_ext
19480cat >>conftest.$ac_ext <<_ACEOF
19481/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019482#include <sys/types.h>
19483#include <sys/time.h>
19484#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019485
Martin v. Löwis11437992002-04-12 09:54:03 +000019486int
19487main ()
19488{
19489if ((struct tm *) 0)
19490return 0;
19491 ;
19492 return 0;
19493}
19494_ACEOF
19495rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019496if { (ac_try="$ac_compile"
19497case "(($ac_try" in
19498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19499 *) ac_try_echo=$ac_try;;
19500esac
19501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019504 grep -v '^ *+' conftest.er1 >conftest.err
19505 rm -f conftest.er1
19506 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019508 (exit $ac_status); } && {
19509 test -z "$ac_c_werror_flag" ||
19510 test ! -s conftest.err
19511 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019512 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019513else
Martin v. Löwis11437992002-04-12 09:54:03 +000019514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019515sed 's/^/| /' conftest.$ac_ext >&5
19516
Martin v. Löwiseba40652007-08-30 20:10:57 +000019517 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019519
19520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19523echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019524if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019525
19526cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019527#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019528_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019529
19530fi
19531
Martin v. Löwiseba40652007-08-30 20:10:57 +000019532{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19533echo $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 +000019534if test "${ac_cv_struct_tm+set}" = set; then
19535 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019536else
Martin v. Löwis11437992002-04-12 09:54:03 +000019537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019538/* confdefs.h. */
19539_ACEOF
19540cat confdefs.h >>conftest.$ac_ext
19541cat >>conftest.$ac_ext <<_ACEOF
19542/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019543#include <sys/types.h>
19544#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019545
Martin v. Löwis11437992002-04-12 09:54:03 +000019546int
19547main ()
19548{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019549struct tm tm;
19550 int *p = &tm.tm_sec;
19551 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019552 ;
19553 return 0;
19554}
19555_ACEOF
19556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019557if { (ac_try="$ac_compile"
19558case "(($ac_try" in
19559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19560 *) ac_try_echo=$ac_try;;
19561esac
19562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019565 grep -v '^ *+' conftest.er1 >conftest.err
19566 rm -f conftest.er1
19567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019569 (exit $ac_status); } && {
19570 test -z "$ac_c_werror_flag" ||
19571 test ! -s conftest.err
19572 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019573 ac_cv_struct_tm=time.h
19574else
Martin v. Löwis11437992002-04-12 09:54:03 +000019575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019576sed 's/^/| /' conftest.$ac_ext >&5
19577
Martin v. Löwiseba40652007-08-30 20:10:57 +000019578 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019580
19581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19584echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019585if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019586
19587cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019588#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019589_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019590
19591fi
19592
Martin v. Löwiseba40652007-08-30 20:10:57 +000019593{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19594echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019595if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19596 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019597else
Martin v. Löwis11437992002-04-12 09:54:03 +000019598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019599/* confdefs.h. */
19600_ACEOF
19601cat confdefs.h >>conftest.$ac_ext
19602cat >>conftest.$ac_ext <<_ACEOF
19603/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019604#include <sys/types.h>
19605#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019606
19607
Martin v. Löwis11437992002-04-12 09:54:03 +000019608int
19609main ()
19610{
19611static struct tm ac_aggr;
19612if (ac_aggr.tm_zone)
19613return 0;
19614 ;
19615 return 0;
19616}
19617_ACEOF
19618rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019619if { (ac_try="$ac_compile"
19620case "(($ac_try" in
19621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19622 *) ac_try_echo=$ac_try;;
19623esac
19624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019627 grep -v '^ *+' conftest.er1 >conftest.err
19628 rm -f conftest.er1
19629 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019631 (exit $ac_status); } && {
19632 test -z "$ac_c_werror_flag" ||
19633 test ! -s conftest.err
19634 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019635 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019636else
Martin v. Löwis11437992002-04-12 09:54:03 +000019637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019638sed 's/^/| /' conftest.$ac_ext >&5
19639
Martin v. Löwiseba40652007-08-30 20:10:57 +000019640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019641/* confdefs.h. */
19642_ACEOF
19643cat confdefs.h >>conftest.$ac_ext
19644cat >>conftest.$ac_ext <<_ACEOF
19645/* end confdefs.h. */
19646#include <sys/types.h>
19647#include <$ac_cv_struct_tm>
19648
19649
19650int
19651main ()
19652{
19653static struct tm ac_aggr;
19654if (sizeof ac_aggr.tm_zone)
19655return 0;
19656 ;
19657 return 0;
19658}
19659_ACEOF
19660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019661if { (ac_try="$ac_compile"
19662case "(($ac_try" in
19663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19664 *) ac_try_echo=$ac_try;;
19665esac
19666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19667 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669 grep -v '^ *+' conftest.er1 >conftest.err
19670 rm -f conftest.er1
19671 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019673 (exit $ac_status); } && {
19674 test -z "$ac_c_werror_flag" ||
19675 test ! -s conftest.err
19676 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019677 ac_cv_member_struct_tm_tm_zone=yes
19678else
19679 echo "$as_me: failed program was:" >&5
19680sed 's/^/| /' conftest.$ac_ext >&5
19681
Martin v. Löwiseba40652007-08-30 20:10:57 +000019682 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019684
19685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019687
19688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019690{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19691echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019692if test $ac_cv_member_struct_tm_tm_zone = yes; then
19693
19694cat >>confdefs.h <<_ACEOF
19695#define HAVE_STRUCT_TM_TM_ZONE 1
19696_ACEOF
19697
19698
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019699fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019700
Martin v. Löwis11437992002-04-12 09:54:03 +000019701if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19702
19703cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019704#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019705_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019706
19707else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019708 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19709echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19710if test "${ac_cv_have_decl_tzname+set}" = set; then
19711 echo $ECHO_N "(cached) $ECHO_C" >&6
19712else
19713 cat >conftest.$ac_ext <<_ACEOF
19714/* confdefs.h. */
19715_ACEOF
19716cat confdefs.h >>conftest.$ac_ext
19717cat >>conftest.$ac_ext <<_ACEOF
19718/* end confdefs.h. */
19719#include <time.h>
19720
19721int
19722main ()
19723{
19724#ifndef tzname
19725 (void) tzname;
19726#endif
19727
19728 ;
19729 return 0;
19730}
19731_ACEOF
19732rm -f conftest.$ac_objext
19733if { (ac_try="$ac_compile"
19734case "(($ac_try" in
19735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19736 *) ac_try_echo=$ac_try;;
19737esac
19738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19739 (eval "$ac_compile") 2>conftest.er1
19740 ac_status=$?
19741 grep -v '^ *+' conftest.er1 >conftest.err
19742 rm -f conftest.er1
19743 cat conftest.err >&5
19744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19745 (exit $ac_status); } && {
19746 test -z "$ac_c_werror_flag" ||
19747 test ! -s conftest.err
19748 } && test -s conftest.$ac_objext; then
19749 ac_cv_have_decl_tzname=yes
19750else
19751 echo "$as_me: failed program was:" >&5
19752sed 's/^/| /' conftest.$ac_ext >&5
19753
19754 ac_cv_have_decl_tzname=no
19755fi
19756
19757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19758fi
19759{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19760echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19761if test $ac_cv_have_decl_tzname = yes; then
19762
19763cat >>confdefs.h <<_ACEOF
19764#define HAVE_DECL_TZNAME 1
19765_ACEOF
19766
19767
19768else
19769 cat >>confdefs.h <<_ACEOF
19770#define HAVE_DECL_TZNAME 0
19771_ACEOF
19772
19773
19774fi
19775
19776
19777 { echo "$as_me:$LINENO: checking for tzname" >&5
19778echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019779if test "${ac_cv_var_tzname+set}" = set; then
19780 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019781else
Martin v. Löwis11437992002-04-12 09:54:03 +000019782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019783/* confdefs.h. */
19784_ACEOF
19785cat confdefs.h >>conftest.$ac_ext
19786cat >>conftest.$ac_ext <<_ACEOF
19787/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019788#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019789#if !HAVE_DECL_TZNAME
19790extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019792
Martin v. Löwis11437992002-04-12 09:54:03 +000019793int
19794main ()
19795{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019796return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019797 ;
19798 return 0;
19799}
19800_ACEOF
19801rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019802if { (ac_try="$ac_link"
19803case "(($ac_try" in
19804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19805 *) ac_try_echo=$ac_try;;
19806esac
19807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19808 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019810 grep -v '^ *+' conftest.er1 >conftest.err
19811 rm -f conftest.er1
19812 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019814 (exit $ac_status); } && {
19815 test -z "$ac_c_werror_flag" ||
19816 test ! -s conftest.err
19817 } && test -s conftest$ac_exeext &&
19818 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019819 ac_cv_var_tzname=yes
19820else
Martin v. Löwis11437992002-04-12 09:54:03 +000019821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019822sed 's/^/| /' conftest.$ac_ext >&5
19823
Martin v. Löwiseba40652007-08-30 20:10:57 +000019824 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019826
19827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019828 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019830{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19831echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019832 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019833
19834cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019835#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019836_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019837
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019838 fi
19839fi
19840
Martin v. Löwiseba40652007-08-30 20:10:57 +000019841{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19842echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019843if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19844 echo $ECHO_N "(cached) $ECHO_C" >&6
19845else
19846 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019847/* confdefs.h. */
19848_ACEOF
19849cat confdefs.h >>conftest.$ac_ext
19850cat >>conftest.$ac_ext <<_ACEOF
19851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019852$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019853int
19854main ()
19855{
19856static struct stat ac_aggr;
19857if (ac_aggr.st_rdev)
19858return 0;
19859 ;
19860 return 0;
19861}
19862_ACEOF
19863rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019864if { (ac_try="$ac_compile"
19865case "(($ac_try" in
19866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19867 *) ac_try_echo=$ac_try;;
19868esac
19869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019872 grep -v '^ *+' conftest.er1 >conftest.err
19873 rm -f conftest.er1
19874 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019876 (exit $ac_status); } && {
19877 test -z "$ac_c_werror_flag" ||
19878 test ! -s conftest.err
19879 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019880 ac_cv_member_struct_stat_st_rdev=yes
19881else
19882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019883sed 's/^/| /' conftest.$ac_ext >&5
19884
Martin v. Löwiseba40652007-08-30 20:10:57 +000019885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019886/* confdefs.h. */
19887_ACEOF
19888cat confdefs.h >>conftest.$ac_ext
19889cat >>conftest.$ac_ext <<_ACEOF
19890/* end confdefs.h. */
19891$ac_includes_default
19892int
19893main ()
19894{
19895static struct stat ac_aggr;
19896if (sizeof ac_aggr.st_rdev)
19897return 0;
19898 ;
19899 return 0;
19900}
19901_ACEOF
19902rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019903if { (ac_try="$ac_compile"
19904case "(($ac_try" in
19905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19906 *) ac_try_echo=$ac_try;;
19907esac
19908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19909 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019911 grep -v '^ *+' conftest.er1 >conftest.err
19912 rm -f conftest.er1
19913 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019915 (exit $ac_status); } && {
19916 test -z "$ac_c_werror_flag" ||
19917 test ! -s conftest.err
19918 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019919 ac_cv_member_struct_stat_st_rdev=yes
19920else
19921 echo "$as_me: failed program was:" >&5
19922sed 's/^/| /' conftest.$ac_ext >&5
19923
Martin v. Löwiseba40652007-08-30 20:10:57 +000019924 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019926
19927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019929
19930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019932{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19933echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019934if test $ac_cv_member_struct_stat_st_rdev = yes; then
19935
19936cat >>confdefs.h <<_ACEOF
19937#define HAVE_STRUCT_STAT_ST_RDEV 1
19938_ACEOF
19939
19940
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019941fi
19942
Martin v. Löwiseba40652007-08-30 20:10:57 +000019943{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19944echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019945if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19946 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019947else
Martin v. Löwis11437992002-04-12 09:54:03 +000019948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019949/* confdefs.h. */
19950_ACEOF
19951cat confdefs.h >>conftest.$ac_ext
19952cat >>conftest.$ac_ext <<_ACEOF
19953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019954$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019955int
19956main ()
19957{
19958static struct stat ac_aggr;
19959if (ac_aggr.st_blksize)
19960return 0;
19961 ;
19962 return 0;
19963}
19964_ACEOF
19965rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019966if { (ac_try="$ac_compile"
19967case "(($ac_try" in
19968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19969 *) ac_try_echo=$ac_try;;
19970esac
19971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019974 grep -v '^ *+' conftest.er1 >conftest.err
19975 rm -f conftest.er1
19976 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019978 (exit $ac_status); } && {
19979 test -z "$ac_c_werror_flag" ||
19980 test ! -s conftest.err
19981 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019983else
Martin v. Löwis11437992002-04-12 09:54:03 +000019984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019985sed 's/^/| /' conftest.$ac_ext >&5
19986
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019988/* confdefs.h. */
19989_ACEOF
19990cat confdefs.h >>conftest.$ac_ext
19991cat >>conftest.$ac_ext <<_ACEOF
19992/* end confdefs.h. */
19993$ac_includes_default
19994int
19995main ()
19996{
19997static struct stat ac_aggr;
19998if (sizeof ac_aggr.st_blksize)
19999return 0;
20000 ;
20001 return 0;
20002}
20003_ACEOF
20004rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020005if { (ac_try="$ac_compile"
20006case "(($ac_try" in
20007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20008 *) ac_try_echo=$ac_try;;
20009esac
20010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20011 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020013 grep -v '^ *+' conftest.er1 >conftest.err
20014 rm -f conftest.er1
20015 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020017 (exit $ac_status); } && {
20018 test -z "$ac_c_werror_flag" ||
20019 test ! -s conftest.err
20020 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020021 ac_cv_member_struct_stat_st_blksize=yes
20022else
20023 echo "$as_me: failed program was:" >&5
20024sed 's/^/| /' conftest.$ac_ext >&5
20025
Martin v. Löwiseba40652007-08-30 20:10:57 +000020026 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020028
20029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020031
20032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020034{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20035echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020036if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020037
Martin v. Löwis11437992002-04-12 09:54:03 +000020038cat >>confdefs.h <<_ACEOF
20039#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20040_ACEOF
20041
20042
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020043fi
20044
Martin v. Löwiseba40652007-08-30 20:10:57 +000020045{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20046echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020047if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
20048 echo $ECHO_N "(cached) $ECHO_C" >&6
20049else
20050 cat >conftest.$ac_ext <<_ACEOF
20051/* confdefs.h. */
20052_ACEOF
20053cat confdefs.h >>conftest.$ac_ext
20054cat >>conftest.$ac_ext <<_ACEOF
20055/* end confdefs.h. */
20056$ac_includes_default
20057int
20058main ()
20059{
20060static struct stat ac_aggr;
20061if (ac_aggr.st_flags)
20062return 0;
20063 ;
20064 return 0;
20065}
20066_ACEOF
20067rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020068if { (ac_try="$ac_compile"
20069case "(($ac_try" in
20070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20071 *) ac_try_echo=$ac_try;;
20072esac
20073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20074 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020075 ac_status=$?
20076 grep -v '^ *+' conftest.er1 >conftest.err
20077 rm -f conftest.er1
20078 cat conftest.err >&5
20079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020080 (exit $ac_status); } && {
20081 test -z "$ac_c_werror_flag" ||
20082 test ! -s conftest.err
20083 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020084 ac_cv_member_struct_stat_st_flags=yes
20085else
20086 echo "$as_me: failed program was:" >&5
20087sed 's/^/| /' conftest.$ac_ext >&5
20088
Martin v. Löwiseba40652007-08-30 20:10:57 +000020089 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020090/* confdefs.h. */
20091_ACEOF
20092cat confdefs.h >>conftest.$ac_ext
20093cat >>conftest.$ac_ext <<_ACEOF
20094/* end confdefs.h. */
20095$ac_includes_default
20096int
20097main ()
20098{
20099static struct stat ac_aggr;
20100if (sizeof ac_aggr.st_flags)
20101return 0;
20102 ;
20103 return 0;
20104}
20105_ACEOF
20106rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020107if { (ac_try="$ac_compile"
20108case "(($ac_try" in
20109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20110 *) ac_try_echo=$ac_try;;
20111esac
20112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20113 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020114 ac_status=$?
20115 grep -v '^ *+' conftest.er1 >conftest.err
20116 rm -f conftest.er1
20117 cat conftest.err >&5
20118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020119 (exit $ac_status); } && {
20120 test -z "$ac_c_werror_flag" ||
20121 test ! -s conftest.err
20122 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020123 ac_cv_member_struct_stat_st_flags=yes
20124else
20125 echo "$as_me: failed program was:" >&5
20126sed 's/^/| /' conftest.$ac_ext >&5
20127
Martin v. Löwiseba40652007-08-30 20:10:57 +000020128 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020130
20131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133
20134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020136{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20137echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020138if test $ac_cv_member_struct_stat_st_flags = yes; then
20139
20140cat >>confdefs.h <<_ACEOF
20141#define HAVE_STRUCT_STAT_ST_FLAGS 1
20142_ACEOF
20143
20144
20145fi
20146
Martin v. Löwiseba40652007-08-30 20:10:57 +000020147{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20148echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020149if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
20150 echo $ECHO_N "(cached) $ECHO_C" >&6
20151else
20152 cat >conftest.$ac_ext <<_ACEOF
20153/* confdefs.h. */
20154_ACEOF
20155cat confdefs.h >>conftest.$ac_ext
20156cat >>conftest.$ac_ext <<_ACEOF
20157/* end confdefs.h. */
20158$ac_includes_default
20159int
20160main ()
20161{
20162static struct stat ac_aggr;
20163if (ac_aggr.st_gen)
20164return 0;
20165 ;
20166 return 0;
20167}
20168_ACEOF
20169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020170if { (ac_try="$ac_compile"
20171case "(($ac_try" in
20172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20173 *) ac_try_echo=$ac_try;;
20174esac
20175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020177 ac_status=$?
20178 grep -v '^ *+' conftest.er1 >conftest.err
20179 rm -f conftest.er1
20180 cat conftest.err >&5
20181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020182 (exit $ac_status); } && {
20183 test -z "$ac_c_werror_flag" ||
20184 test ! -s conftest.err
20185 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020186 ac_cv_member_struct_stat_st_gen=yes
20187else
20188 echo "$as_me: failed program was:" >&5
20189sed 's/^/| /' conftest.$ac_ext >&5
20190
Martin v. Löwiseba40652007-08-30 20:10:57 +000020191 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020192/* confdefs.h. */
20193_ACEOF
20194cat confdefs.h >>conftest.$ac_ext
20195cat >>conftest.$ac_ext <<_ACEOF
20196/* end confdefs.h. */
20197$ac_includes_default
20198int
20199main ()
20200{
20201static struct stat ac_aggr;
20202if (sizeof ac_aggr.st_gen)
20203return 0;
20204 ;
20205 return 0;
20206}
20207_ACEOF
20208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020209if { (ac_try="$ac_compile"
20210case "(($ac_try" in
20211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20212 *) ac_try_echo=$ac_try;;
20213esac
20214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020216 ac_status=$?
20217 grep -v '^ *+' conftest.er1 >conftest.err
20218 rm -f conftest.er1
20219 cat conftest.err >&5
20220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020221 (exit $ac_status); } && {
20222 test -z "$ac_c_werror_flag" ||
20223 test ! -s conftest.err
20224 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020225 ac_cv_member_struct_stat_st_gen=yes
20226else
20227 echo "$as_me: failed program was:" >&5
20228sed 's/^/| /' conftest.$ac_ext >&5
20229
Martin v. Löwiseba40652007-08-30 20:10:57 +000020230 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020232
20233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020235
20236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020238{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20239echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020240if test $ac_cv_member_struct_stat_st_gen = yes; then
20241
20242cat >>confdefs.h <<_ACEOF
20243#define HAVE_STRUCT_STAT_ST_GEN 1
20244_ACEOF
20245
20246
20247fi
20248
Martin v. Löwiseba40652007-08-30 20:10:57 +000020249{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20250echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020251if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20252 echo $ECHO_N "(cached) $ECHO_C" >&6
20253else
20254 cat >conftest.$ac_ext <<_ACEOF
20255/* confdefs.h. */
20256_ACEOF
20257cat confdefs.h >>conftest.$ac_ext
20258cat >>conftest.$ac_ext <<_ACEOF
20259/* end confdefs.h. */
20260$ac_includes_default
20261int
20262main ()
20263{
20264static struct stat ac_aggr;
20265if (ac_aggr.st_birthtime)
20266return 0;
20267 ;
20268 return 0;
20269}
20270_ACEOF
20271rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020272if { (ac_try="$ac_compile"
20273case "(($ac_try" in
20274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20275 *) ac_try_echo=$ac_try;;
20276esac
20277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20278 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020279 ac_status=$?
20280 grep -v '^ *+' conftest.er1 >conftest.err
20281 rm -f conftest.er1
20282 cat conftest.err >&5
20283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020284 (exit $ac_status); } && {
20285 test -z "$ac_c_werror_flag" ||
20286 test ! -s conftest.err
20287 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020288 ac_cv_member_struct_stat_st_birthtime=yes
20289else
20290 echo "$as_me: failed program was:" >&5
20291sed 's/^/| /' conftest.$ac_ext >&5
20292
Martin v. Löwiseba40652007-08-30 20:10:57 +000020293 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020294/* confdefs.h. */
20295_ACEOF
20296cat confdefs.h >>conftest.$ac_ext
20297cat >>conftest.$ac_ext <<_ACEOF
20298/* end confdefs.h. */
20299$ac_includes_default
20300int
20301main ()
20302{
20303static struct stat ac_aggr;
20304if (sizeof ac_aggr.st_birthtime)
20305return 0;
20306 ;
20307 return 0;
20308}
20309_ACEOF
20310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020311if { (ac_try="$ac_compile"
20312case "(($ac_try" in
20313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20314 *) ac_try_echo=$ac_try;;
20315esac
20316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020318 ac_status=$?
20319 grep -v '^ *+' conftest.er1 >conftest.err
20320 rm -f conftest.er1
20321 cat conftest.err >&5
20322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020323 (exit $ac_status); } && {
20324 test -z "$ac_c_werror_flag" ||
20325 test ! -s conftest.err
20326 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020327 ac_cv_member_struct_stat_st_birthtime=yes
20328else
20329 echo "$as_me: failed program was:" >&5
20330sed 's/^/| /' conftest.$ac_ext >&5
20331
Martin v. Löwiseba40652007-08-30 20:10:57 +000020332 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020334
20335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337
20338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020340{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20341echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020342if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20343
20344cat >>confdefs.h <<_ACEOF
20345#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20346_ACEOF
20347
20348
20349fi
20350
Martin v. Löwiseba40652007-08-30 20:10:57 +000020351{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20352echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020353if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20354 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020355else
Martin v. Löwis11437992002-04-12 09:54:03 +000020356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020357/* confdefs.h. */
20358_ACEOF
20359cat confdefs.h >>conftest.$ac_ext
20360cat >>conftest.$ac_ext <<_ACEOF
20361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020362$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020363int
20364main ()
20365{
20366static struct stat ac_aggr;
20367if (ac_aggr.st_blocks)
20368return 0;
20369 ;
20370 return 0;
20371}
20372_ACEOF
20373rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020374if { (ac_try="$ac_compile"
20375case "(($ac_try" in
20376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20377 *) ac_try_echo=$ac_try;;
20378esac
20379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20380 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020382 grep -v '^ *+' conftest.er1 >conftest.err
20383 rm -f conftest.er1
20384 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020386 (exit $ac_status); } && {
20387 test -z "$ac_c_werror_flag" ||
20388 test ! -s conftest.err
20389 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020390 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020391else
Martin v. Löwis11437992002-04-12 09:54:03 +000020392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020393sed 's/^/| /' conftest.$ac_ext >&5
20394
Martin v. Löwiseba40652007-08-30 20:10:57 +000020395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020396/* confdefs.h. */
20397_ACEOF
20398cat confdefs.h >>conftest.$ac_ext
20399cat >>conftest.$ac_ext <<_ACEOF
20400/* end confdefs.h. */
20401$ac_includes_default
20402int
20403main ()
20404{
20405static struct stat ac_aggr;
20406if (sizeof ac_aggr.st_blocks)
20407return 0;
20408 ;
20409 return 0;
20410}
20411_ACEOF
20412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020413if { (ac_try="$ac_compile"
20414case "(($ac_try" in
20415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20416 *) ac_try_echo=$ac_try;;
20417esac
20418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20419 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020421 grep -v '^ *+' conftest.er1 >conftest.err
20422 rm -f conftest.er1
20423 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020425 (exit $ac_status); } && {
20426 test -z "$ac_c_werror_flag" ||
20427 test ! -s conftest.err
20428 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020429 ac_cv_member_struct_stat_st_blocks=yes
20430else
20431 echo "$as_me: failed program was:" >&5
20432sed 's/^/| /' conftest.$ac_ext >&5
20433
Martin v. Löwiseba40652007-08-30 20:10:57 +000020434 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020436
20437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439
20440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020442{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20443echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020444if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020445
Martin v. Löwis11437992002-04-12 09:54:03 +000020446cat >>confdefs.h <<_ACEOF
20447#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20448_ACEOF
20449
20450
20451cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020452#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020453_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020454
20455else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020456 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020457 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020458 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20459 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020460esac
20461
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020462fi
20463
Michael W. Hudson54241132001-12-07 15:38:26 +000020464
Martin v. Löwis11437992002-04-12 09:54:03 +000020465
Martin v. Löwiseba40652007-08-30 20:10:57 +000020466{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20467echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020468if test "${ac_cv_header_time_altzone+set}" = set; then
20469 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020470else
Martin v. Löwis11437992002-04-12 09:54:03 +000020471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020472/* confdefs.h. */
20473_ACEOF
20474cat confdefs.h >>conftest.$ac_ext
20475cat >>conftest.$ac_ext <<_ACEOF
20476/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020477#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020478int
20479main ()
20480{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020481return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020482 ;
20483 return 0;
20484}
20485_ACEOF
20486rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020487if { (ac_try="$ac_compile"
20488case "(($ac_try" in
20489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20490 *) ac_try_echo=$ac_try;;
20491esac
20492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20493 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020495 grep -v '^ *+' conftest.er1 >conftest.err
20496 rm -f conftest.er1
20497 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020499 (exit $ac_status); } && {
20500 test -z "$ac_c_werror_flag" ||
20501 test ! -s conftest.err
20502 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020503 ac_cv_header_time_altzone=yes
20504else
Martin v. Löwis11437992002-04-12 09:54:03 +000020505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020506sed 's/^/| /' conftest.$ac_ext >&5
20507
Martin v. Löwiseba40652007-08-30 20:10:57 +000020508 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020509fi
20510
Martin v. Löwiseba40652007-08-30 20:10:57 +000020511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20512fi
20513
20514{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20515echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020516if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020517
20518cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020519#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020520_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020521
20522fi
20523
Guido van Rossumda88dad1995-01-26 00:46:29 +000020524was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020525{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20526echo $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 +000020527cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020528/* confdefs.h. */
20529_ACEOF
20530cat confdefs.h >>conftest.$ac_ext
20531cat >>conftest.$ac_ext <<_ACEOF
20532/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020533
20534#include <sys/types.h>
20535#include <sys/select.h>
20536#include <sys/time.h>
20537
Martin v. Löwis11437992002-04-12 09:54:03 +000020538int
20539main ()
20540{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020541;
Martin v. Löwis11437992002-04-12 09:54:03 +000020542 ;
20543 return 0;
20544}
20545_ACEOF
20546rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020547if { (ac_try="$ac_compile"
20548case "(($ac_try" in
20549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20550 *) ac_try_echo=$ac_try;;
20551esac
20552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020555 grep -v '^ *+' conftest.er1 >conftest.err
20556 rm -f conftest.er1
20557 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020559 (exit $ac_status); } && {
20560 test -z "$ac_c_werror_flag" ||
20561 test ! -s conftest.err
20562 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020563
20564
20565cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020566#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020567_ACEOF
20568
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020569 was_it_defined=yes
20570
Guido van Rossumf78abae1997-01-21 22:02:36 +000020571else
Martin v. Löwis11437992002-04-12 09:54:03 +000020572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020573sed 's/^/| /' conftest.$ac_ext >&5
20574
Brett Cannon19fab762007-06-02 03:02:29 +000020575
Martin v. Löwiseba40652007-08-30 20:10:57 +000020576fi
20577
20578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20579{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20580echo "${ECHO_T}$was_it_defined" >&6; }
20581
20582{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20583echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020584if test "${ac_cv_struct_addrinfo+set}" = set; then
20585 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020586else
Martin v. Löwis11437992002-04-12 09:54:03 +000020587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020588/* confdefs.h. */
20589_ACEOF
20590cat confdefs.h >>conftest.$ac_ext
20591cat >>conftest.$ac_ext <<_ACEOF
20592/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020593
20594# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020595int
20596main ()
20597{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020598struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020599 ;
20600 return 0;
20601}
20602_ACEOF
20603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020604if { (ac_try="$ac_compile"
20605case "(($ac_try" in
20606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20607 *) ac_try_echo=$ac_try;;
20608esac
20609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020612 grep -v '^ *+' conftest.er1 >conftest.err
20613 rm -f conftest.er1
20614 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020616 (exit $ac_status); } && {
20617 test -z "$ac_c_werror_flag" ||
20618 test ! -s conftest.err
20619 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020620 ac_cv_struct_addrinfo=yes
20621else
Martin v. Löwis11437992002-04-12 09:54:03 +000020622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020623sed 's/^/| /' conftest.$ac_ext >&5
20624
Martin v. Löwiseba40652007-08-30 20:10:57 +000020625 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020626fi
20627
Martin v. Löwiseba40652007-08-30 20:10:57 +000020628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20629fi
20630
20631{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20632echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020633if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020634
20635cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020636#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020637_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020638
20639fi
20640
Martin v. Löwiseba40652007-08-30 20:10:57 +000020641{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20642echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020643if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20644 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020645else
Martin v. Löwis11437992002-04-12 09:54:03 +000020646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020647/* confdefs.h. */
20648_ACEOF
20649cat confdefs.h >>conftest.$ac_ext
20650cat >>conftest.$ac_ext <<_ACEOF
20651/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020652
20653# include <sys/types.h>
20654# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020655int
20656main ()
20657{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020658struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020659 ;
20660 return 0;
20661}
20662_ACEOF
20663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020664if { (ac_try="$ac_compile"
20665case "(($ac_try" in
20666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20667 *) ac_try_echo=$ac_try;;
20668esac
20669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020672 grep -v '^ *+' conftest.er1 >conftest.err
20673 rm -f conftest.er1
20674 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020676 (exit $ac_status); } && {
20677 test -z "$ac_c_werror_flag" ||
20678 test ! -s conftest.err
20679 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020680 ac_cv_struct_sockaddr_storage=yes
20681else
Martin v. Löwis11437992002-04-12 09:54:03 +000020682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020683sed 's/^/| /' conftest.$ac_ext >&5
20684
Martin v. Löwiseba40652007-08-30 20:10:57 +000020685 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020686fi
20687
Martin v. Löwiseba40652007-08-30 20:10:57 +000020688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20689fi
20690
20691{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20692echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020693if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020694
20695cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020696#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020697_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020698
20699fi
20700
Guido van Rossum627b2d71993-12-24 10:39:16 +000020701# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020702
Michael W. Hudson54241132001-12-07 15:38:26 +000020703
Martin v. Löwiseba40652007-08-30 20:10:57 +000020704{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20705echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020706if test "${ac_cv_c_char_unsigned+set}" = set; then
20707 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020708else
Martin v. Löwis11437992002-04-12 09:54:03 +000020709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020710/* confdefs.h. */
20711_ACEOF
20712cat confdefs.h >>conftest.$ac_ext
20713cat >>conftest.$ac_ext <<_ACEOF
20714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020715$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020716int
20717main ()
20718{
20719static int test_array [1 - 2 * !(((char) -1) < 0)];
20720test_array [0] = 0
20721
20722 ;
20723 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020724}
Martin v. Löwis11437992002-04-12 09:54:03 +000020725_ACEOF
20726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020727if { (ac_try="$ac_compile"
20728case "(($ac_try" in
20729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20730 *) ac_try_echo=$ac_try;;
20731esac
20732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020735 grep -v '^ *+' conftest.er1 >conftest.err
20736 rm -f conftest.er1
20737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020739 (exit $ac_status); } && {
20740 test -z "$ac_c_werror_flag" ||
20741 test ! -s conftest.err
20742 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020743 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020744else
20745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020746sed 's/^/| /' conftest.$ac_ext >&5
20747
Martin v. Löwiseba40652007-08-30 20:10:57 +000020748 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020750
20751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020753{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20754echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020755if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020756 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020757#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020758_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020759
20760fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020761
Martin v. Löwiseba40652007-08-30 20:10:57 +000020762{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20763echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020764if test "${ac_cv_c_const+set}" = set; then
20765 echo $ECHO_N "(cached) $ECHO_C" >&6
20766else
20767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020768/* confdefs.h. */
20769_ACEOF
20770cat confdefs.h >>conftest.$ac_ext
20771cat >>conftest.$ac_ext <<_ACEOF
20772/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020773
Martin v. Löwis11437992002-04-12 09:54:03 +000020774int
20775main ()
20776{
20777/* FIXME: Include the comments suggested by Paul. */
20778#ifndef __cplusplus
20779 /* Ultrix mips cc rejects this. */
20780 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020781 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020782 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020783 char const *const *pcpcc;
20784 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020785 /* NEC SVR4.0.2 mips cc rejects this. */
20786 struct point {int x, y;};
20787 static struct point const zero = {0,0};
20788 /* AIX XL C 1.02.0.0 rejects this.
20789 It does not let you subtract one const X* pointer from another in
20790 an arm of an if-expression whose if-part is not a constant
20791 expression */
20792 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020793 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020794 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020795 ++pcpcc;
20796 ppc = (char**) pcpcc;
20797 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020798 { /* SCO 3.2v4 cc rejects this. */
20799 char *t;
20800 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020801
Martin v. Löwis11437992002-04-12 09:54:03 +000020802 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020803 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020804 }
20805 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20806 int x[] = {25, 17};
20807 const int *foo = &x[0];
20808 ++foo;
20809 }
20810 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20811 typedef const int *iptr;
20812 iptr p = 0;
20813 ++p;
20814 }
20815 { /* AIX XL C 1.02.0.0 rejects this saying
20816 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20817 struct s { int j; const int *ap[3]; };
20818 struct s *b; b->j = 5;
20819 }
20820 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20821 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020823 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020824 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020825#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020826
Martin v. Löwis11437992002-04-12 09:54:03 +000020827 ;
20828 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020829}
Martin v. Löwis11437992002-04-12 09:54:03 +000020830_ACEOF
20831rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020832if { (ac_try="$ac_compile"
20833case "(($ac_try" in
20834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20835 *) ac_try_echo=$ac_try;;
20836esac
20837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020840 grep -v '^ *+' conftest.er1 >conftest.err
20841 rm -f conftest.er1
20842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020844 (exit $ac_status); } && {
20845 test -z "$ac_c_werror_flag" ||
20846 test ! -s conftest.err
20847 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020848 ac_cv_c_const=yes
20849else
Martin v. Löwis11437992002-04-12 09:54:03 +000020850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020851sed 's/^/| /' conftest.$ac_ext >&5
20852
Martin v. Löwiseba40652007-08-30 20:10:57 +000020853 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020855
20856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020858{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20859echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020860if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020861
20862cat >>confdefs.h <<\_ACEOF
20863#define const
20864_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020865
20866fi
20867
Michael W. Hudson54241132001-12-07 15:38:26 +000020868
Guido van Rossumda88dad1995-01-26 00:46:29 +000020869works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020870{ echo "$as_me:$LINENO: checking for working volatile" >&5
20871echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020872cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020873/* confdefs.h. */
20874_ACEOF
20875cat confdefs.h >>conftest.$ac_ext
20876cat >>conftest.$ac_ext <<_ACEOF
20877/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020878
Martin v. Löwis11437992002-04-12 09:54:03 +000020879int
20880main ()
20881{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020882volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020883 ;
20884 return 0;
20885}
20886_ACEOF
20887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020888if { (ac_try="$ac_compile"
20889case "(($ac_try" in
20890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20891 *) ac_try_echo=$ac_try;;
20892esac
20893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020896 grep -v '^ *+' conftest.er1 >conftest.err
20897 rm -f conftest.er1
20898 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020900 (exit $ac_status); } && {
20901 test -z "$ac_c_werror_flag" ||
20902 test ! -s conftest.err
20903 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020904 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020905else
Martin v. Löwis11437992002-04-12 09:54:03 +000020906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020907sed 's/^/| /' conftest.$ac_ext >&5
20908
Martin v. Löwis11437992002-04-12 09:54:03 +000020909
20910cat >>confdefs.h <<\_ACEOF
20911#define volatile
20912_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020913
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020914
Guido van Rossum627b2d71993-12-24 10:39:16 +000020915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020916
20917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20918{ echo "$as_me:$LINENO: result: $works" >&5
20919echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020920
Guido van Rossumda88dad1995-01-26 00:46:29 +000020921works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020922{ echo "$as_me:$LINENO: checking for working signed char" >&5
20923echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020924cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020925/* confdefs.h. */
20926_ACEOF
20927cat confdefs.h >>conftest.$ac_ext
20928cat >>conftest.$ac_ext <<_ACEOF
20929/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020930
Martin v. Löwis11437992002-04-12 09:54:03 +000020931int
20932main ()
20933{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020934signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020935 ;
20936 return 0;
20937}
20938_ACEOF
20939rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020940if { (ac_try="$ac_compile"
20941case "(($ac_try" in
20942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20943 *) ac_try_echo=$ac_try;;
20944esac
20945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020948 grep -v '^ *+' conftest.er1 >conftest.err
20949 rm -f conftest.er1
20950 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020952 (exit $ac_status); } && {
20953 test -z "$ac_c_werror_flag" ||
20954 test ! -s conftest.err
20955 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020956 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020957else
Martin v. Löwis11437992002-04-12 09:54:03 +000020958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020959sed 's/^/| /' conftest.$ac_ext >&5
20960
Martin v. Löwis11437992002-04-12 09:54:03 +000020961
20962cat >>confdefs.h <<\_ACEOF
20963#define signed
20964_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020965
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020966
Guido van Rossum7f43da71994-08-01 12:15:30 +000020967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020968
20969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20970{ echo "$as_me:$LINENO: result: $works" >&5
20971echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020972
Guido van Rossumda88dad1995-01-26 00:46:29 +000020973have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020974{ echo "$as_me:$LINENO: checking for prototypes" >&5
20975echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020976cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020977/* confdefs.h. */
20978_ACEOF
20979cat confdefs.h >>conftest.$ac_ext
20980cat >>conftest.$ac_ext <<_ACEOF
20981/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020982int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020983int
20984main ()
20985{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020986return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020987 ;
20988 return 0;
20989}
20990_ACEOF
20991rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020992if { (ac_try="$ac_compile"
20993case "(($ac_try" in
20994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20995 *) ac_try_echo=$ac_try;;
20996esac
20997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20998 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021000 grep -v '^ *+' conftest.er1 >conftest.err
21001 rm -f conftest.er1
21002 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021004 (exit $ac_status); } && {
21005 test -z "$ac_c_werror_flag" ||
21006 test ! -s conftest.err
21007 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021008
21009
21010cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021011#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021012_ACEOF
21013
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021014 have_prototypes=yes
21015
Guido van Rossumf78abae1997-01-21 22:02:36 +000021016else
Martin v. Löwis11437992002-04-12 09:54:03 +000021017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021018sed 's/^/| /' conftest.$ac_ext >&5
21019
Martin v. Löwiseba40652007-08-30 20:10:57 +000021020
Guido van Rossum7f43da71994-08-01 12:15:30 +000021021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021022
21023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21024{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21025echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021026
Guido van Rossumda88dad1995-01-26 00:46:29 +000021027works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021028{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21029echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021030cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021031/* confdefs.h. */
21032_ACEOF
21033cat confdefs.h >>conftest.$ac_ext
21034cat >>conftest.$ac_ext <<_ACEOF
21035/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021036
21037#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021038int foo(int x, ...) {
21039 va_list va;
21040 va_start(va, x);
21041 va_arg(va, int);
21042 va_arg(va, char *);
21043 va_arg(va, double);
21044 return 0;
21045}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021046
Martin v. Löwis11437992002-04-12 09:54:03 +000021047int
21048main ()
21049{
Guido van Rossum90eea071996-08-30 20:58:57 +000021050return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021051 ;
21052 return 0;
21053}
21054_ACEOF
21055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021056if { (ac_try="$ac_compile"
21057case "(($ac_try" in
21058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21059 *) ac_try_echo=$ac_try;;
21060esac
21061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021064 grep -v '^ *+' conftest.er1 >conftest.err
21065 rm -f conftest.er1
21066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021068 (exit $ac_status); } && {
21069 test -z "$ac_c_werror_flag" ||
21070 test ! -s conftest.err
21071 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021072
21073
21074cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021075#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021076_ACEOF
21077
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021078 works=yes
21079
Guido van Rossumf78abae1997-01-21 22:02:36 +000021080else
Martin v. Löwis11437992002-04-12 09:54:03 +000021081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021082sed 's/^/| /' conftest.$ac_ext >&5
21083
Martin v. Löwiseba40652007-08-30 20:10:57 +000021084
Guido van Rossum627b2d71993-12-24 10:39:16 +000021085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021086
21087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21088{ echo "$as_me:$LINENO: result: $works" >&5
21089echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021090
Martin v. Löwisd6320502004-08-12 13:45:08 +000021091# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000021092{ echo "$as_me:$LINENO: checking for socketpair" >&5
21093echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021094cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021095/* confdefs.h. */
21096_ACEOF
21097cat confdefs.h >>conftest.$ac_ext
21098cat >>conftest.$ac_ext <<_ACEOF
21099/* end confdefs.h. */
21100
21101#include <sys/types.h>
21102#include <sys/socket.h>
21103
21104int
21105main ()
21106{
21107void *x=socketpair
21108 ;
21109 return 0;
21110}
21111_ACEOF
21112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021113if { (ac_try="$ac_compile"
21114case "(($ac_try" in
21115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21116 *) ac_try_echo=$ac_try;;
21117esac
21118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021121 grep -v '^ *+' conftest.er1 >conftest.err
21122 rm -f conftest.er1
21123 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021125 (exit $ac_status); } && {
21126 test -z "$ac_c_werror_flag" ||
21127 test ! -s conftest.err
21128 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021129
21130cat >>confdefs.h <<\_ACEOF
21131#define HAVE_SOCKETPAIR 1
21132_ACEOF
21133
Martin v. Löwiseba40652007-08-30 20:10:57 +000021134 { echo "$as_me:$LINENO: result: yes" >&5
21135echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021136else
21137 echo "$as_me: failed program was:" >&5
21138sed 's/^/| /' conftest.$ac_ext >&5
21139
Martin v. Löwiseba40652007-08-30 20:10:57 +000021140 { echo "$as_me:$LINENO: result: no" >&5
21141echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021142
21143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021144
21145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021146
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021147# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000021148{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21149echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021150cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021151/* confdefs.h. */
21152_ACEOF
21153cat confdefs.h >>conftest.$ac_ext
21154cat >>conftest.$ac_ext <<_ACEOF
21155/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021156#include <sys/types.h>
21157#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021158int
21159main ()
21160{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021161struct sockaddr x;
21162x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021163 ;
21164 return 0;
21165}
21166_ACEOF
21167rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021168if { (ac_try="$ac_compile"
21169case "(($ac_try" in
21170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21171 *) ac_try_echo=$ac_try;;
21172esac
21173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021176 grep -v '^ *+' conftest.er1 >conftest.err
21177 rm -f conftest.er1
21178 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021180 (exit $ac_status); } && {
21181 test -z "$ac_c_werror_flag" ||
21182 test ! -s conftest.err
21183 } && test -s conftest.$ac_objext; then
21184 { echo "$as_me:$LINENO: result: yes" >&5
21185echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021186
21187cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021188#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021189_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021190
21191else
Martin v. Löwis11437992002-04-12 09:54:03 +000021192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021193sed 's/^/| /' conftest.$ac_ext >&5
21194
Martin v. Löwiseba40652007-08-30 20:10:57 +000021195 { echo "$as_me:$LINENO: result: no" >&5
21196echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021198
21199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021200
Guido van Rossumda88dad1995-01-26 00:46:29 +000021201va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021202{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21203echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021205/* confdefs.h. */
21206_ACEOF
21207cat confdefs.h >>conftest.$ac_ext
21208cat >>conftest.$ac_ext <<_ACEOF
21209/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021210
21211#ifdef HAVE_STDARG_PROTOTYPES
21212#include <stdarg.h>
21213#else
21214#include <varargs.h>
21215#endif
21216
Martin v. Löwis11437992002-04-12 09:54:03 +000021217int
21218main ()
21219{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021220va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021221 ;
21222 return 0;
21223}
21224_ACEOF
21225rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021226if { (ac_try="$ac_compile"
21227case "(($ac_try" in
21228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21229 *) ac_try_echo=$ac_try;;
21230esac
21231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021234 grep -v '^ *+' conftest.er1 >conftest.err
21235 rm -f conftest.er1
21236 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021238 (exit $ac_status); } && {
21239 test -z "$ac_c_werror_flag" ||
21240 test ! -s conftest.err
21241 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021242 :
21243else
Martin v. Löwis11437992002-04-12 09:54:03 +000021244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021245sed 's/^/| /' conftest.$ac_ext >&5
21246
Martin v. Löwis11437992002-04-12 09:54:03 +000021247
21248
21249cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021250#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021251_ACEOF
21252
Guido van Rossumda88dad1995-01-26 00:46:29 +000021253 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021254
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021256
21257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21258{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21259echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021260
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021261# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021262
21263
21264
Martin v. Löwiseba40652007-08-30 20:10:57 +000021265{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21266echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021267if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21268 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021269else
Martin v. Löwis11437992002-04-12 09:54:03 +000021270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021271/* confdefs.h. */
21272_ACEOF
21273cat confdefs.h >>conftest.$ac_ext
21274cat >>conftest.$ac_ext <<_ACEOF
21275/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021276/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21277 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21278#define gethostbyname_r innocuous_gethostbyname_r
21279
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021280/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021281 which can conflict with char gethostbyname_r (); below.
21282 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021283 <limits.h> exists even on freestanding compilers. */
21284
21285#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021286# include <limits.h>
21287#else
21288# include <assert.h>
21289#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021290
21291#undef gethostbyname_r
21292
Martin v. Löwiseba40652007-08-30 20:10:57 +000021293/* Override any GCC internal prototype to avoid an error.
21294 Use char because int might match the return type of a GCC
21295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021296#ifdef __cplusplus
21297extern "C"
21298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021299char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021300/* The GNU C library defines this for functions which it implements
21301 to always fail with ENOSYS. Some functions are actually named
21302 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021303#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021304choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021305#endif
21306
Skip Montanaro6dead952003-09-25 14:50:04 +000021307int
21308main ()
21309{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021310return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021311 ;
21312 return 0;
21313}
21314_ACEOF
21315rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021316if { (ac_try="$ac_link"
21317case "(($ac_try" in
21318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21319 *) ac_try_echo=$ac_try;;
21320esac
21321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21322 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021324 grep -v '^ *+' conftest.er1 >conftest.err
21325 rm -f conftest.er1
21326 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021328 (exit $ac_status); } && {
21329 test -z "$ac_c_werror_flag" ||
21330 test ! -s conftest.err
21331 } && test -s conftest$ac_exeext &&
21332 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021333 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021334else
Martin v. Löwis11437992002-04-12 09:54:03 +000021335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021336sed 's/^/| /' conftest.$ac_ext >&5
21337
Martin v. Löwiseba40652007-08-30 20:10:57 +000021338 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021340
21341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021342 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021344{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21345echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021346if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021347
Martin v. Löwis11437992002-04-12 09:54:03 +000021348 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021349#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021350_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021351
Martin v. Löwiseba40652007-08-30 20:10:57 +000021352 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21353echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021354 OLD_CFLAGS=$CFLAGS
21355 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021357/* confdefs.h. */
21358_ACEOF
21359cat confdefs.h >>conftest.$ac_ext
21360cat >>conftest.$ac_ext <<_ACEOF
21361/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021362
21363# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021364
Martin v. Löwis11437992002-04-12 09:54:03 +000021365int
21366main ()
21367{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021368
21369 char *name;
21370 struct hostent *he, *res;
21371 char buffer[2048];
21372 int buflen = 2048;
21373 int h_errnop;
21374
21375 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021376
21377 ;
21378 return 0;
21379}
21380_ACEOF
21381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021382if { (ac_try="$ac_compile"
21383case "(($ac_try" in
21384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21385 *) ac_try_echo=$ac_try;;
21386esac
21387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021390 grep -v '^ *+' conftest.er1 >conftest.err
21391 rm -f conftest.er1
21392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021394 (exit $ac_status); } && {
21395 test -z "$ac_c_werror_flag" ||
21396 test ! -s conftest.err
21397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021398
21399 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021400#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021401_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021402
Martin v. Löwis11437992002-04-12 09:54:03 +000021403
21404cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021405#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021406_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021407
Martin v. Löwiseba40652007-08-30 20:10:57 +000021408 { echo "$as_me:$LINENO: result: yes" >&5
21409echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021410
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021411else
Martin v. Löwis11437992002-04-12 09:54:03 +000021412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021413sed 's/^/| /' conftest.$ac_ext >&5
21414
Martin v. Löwis11437992002-04-12 09:54:03 +000021415
Martin v. Löwiseba40652007-08-30 20:10:57 +000021416 { echo "$as_me:$LINENO: result: no" >&5
21417echo "${ECHO_T}no" >&6; }
21418 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21419echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021421/* confdefs.h. */
21422_ACEOF
21423cat confdefs.h >>conftest.$ac_ext
21424cat >>conftest.$ac_ext <<_ACEOF
21425/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021426
21427# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021428
Martin v. Löwis11437992002-04-12 09:54:03 +000021429int
21430main ()
21431{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021432
21433 char *name;
21434 struct hostent *he;
21435 char buffer[2048];
21436 int buflen = 2048;
21437 int h_errnop;
21438
21439 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021440
21441 ;
21442 return 0;
21443}
21444_ACEOF
21445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021446if { (ac_try="$ac_compile"
21447case "(($ac_try" in
21448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21449 *) ac_try_echo=$ac_try;;
21450esac
21451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021454 grep -v '^ *+' conftest.er1 >conftest.err
21455 rm -f conftest.er1
21456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021458 (exit $ac_status); } && {
21459 test -z "$ac_c_werror_flag" ||
21460 test ! -s conftest.err
21461 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021462
21463 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021464#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021465_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021466
Martin v. Löwis11437992002-04-12 09:54:03 +000021467
21468cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021469#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021470_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021471
Martin v. Löwiseba40652007-08-30 20:10:57 +000021472 { echo "$as_me:$LINENO: result: yes" >&5
21473echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021474
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021475else
Martin v. Löwis11437992002-04-12 09:54:03 +000021476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021477sed 's/^/| /' conftest.$ac_ext >&5
21478
Martin v. Löwis11437992002-04-12 09:54:03 +000021479
Martin v. Löwiseba40652007-08-30 20:10:57 +000021480 { echo "$as_me:$LINENO: result: no" >&5
21481echo "${ECHO_T}no" >&6; }
21482 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21483echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021485/* confdefs.h. */
21486_ACEOF
21487cat confdefs.h >>conftest.$ac_ext
21488cat >>conftest.$ac_ext <<_ACEOF
21489/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021490
21491# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021492
Martin v. Löwis11437992002-04-12 09:54:03 +000021493int
21494main ()
21495{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021496
21497 char *name;
21498 struct hostent *he;
21499 struct hostent_data data;
21500
21501 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021502
21503 ;
21504 return 0;
21505}
21506_ACEOF
21507rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021508if { (ac_try="$ac_compile"
21509case "(($ac_try" in
21510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21511 *) ac_try_echo=$ac_try;;
21512esac
21513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021516 grep -v '^ *+' conftest.er1 >conftest.err
21517 rm -f conftest.er1
21518 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021520 (exit $ac_status); } && {
21521 test -z "$ac_c_werror_flag" ||
21522 test ! -s conftest.err
21523 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021524
21525 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021526#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021527_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021528
Martin v. Löwis11437992002-04-12 09:54:03 +000021529
21530cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021531#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021532_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021533
Martin v. Löwiseba40652007-08-30 20:10:57 +000021534 { echo "$as_me:$LINENO: result: yes" >&5
21535echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021536
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021537else
Martin v. Löwis11437992002-04-12 09:54:03 +000021538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021539sed 's/^/| /' conftest.$ac_ext >&5
21540
Martin v. Löwis11437992002-04-12 09:54:03 +000021541
Martin v. Löwiseba40652007-08-30 20:10:57 +000021542 { echo "$as_me:$LINENO: result: no" >&5
21543echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021544
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021546
21547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021550
21551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021552
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021554
21555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021556 CFLAGS=$OLD_CFLAGS
21557
21558else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021559
Martin v. Löwis11437992002-04-12 09:54:03 +000021560
21561for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021562do
Martin v. Löwis11437992002-04-12 09:54:03 +000021563as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021564{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21565echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21566if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021567 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021568else
Martin v. Löwis11437992002-04-12 09:54:03 +000021569 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021570/* confdefs.h. */
21571_ACEOF
21572cat confdefs.h >>conftest.$ac_ext
21573cat >>conftest.$ac_ext <<_ACEOF
21574/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021575/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21576 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21577#define $ac_func innocuous_$ac_func
21578
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021579/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021580 which can conflict with char $ac_func (); below.
21581 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021582 <limits.h> exists even on freestanding compilers. */
21583
21584#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021585# include <limits.h>
21586#else
21587# include <assert.h>
21588#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021589
21590#undef $ac_func
21591
Martin v. Löwiseba40652007-08-30 20:10:57 +000021592/* Override any GCC internal prototype to avoid an error.
21593 Use char because int might match the return type of a GCC
21594 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021595#ifdef __cplusplus
21596extern "C"
21597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021598char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021599/* The GNU C library defines this for functions which it implements
21600 to always fail with ENOSYS. Some functions are actually named
21601 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021602#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021603choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021604#endif
21605
Skip Montanaro6dead952003-09-25 14:50:04 +000021606int
21607main ()
21608{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021609return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021610 ;
21611 return 0;
21612}
21613_ACEOF
21614rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021615if { (ac_try="$ac_link"
21616case "(($ac_try" in
21617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21618 *) ac_try_echo=$ac_try;;
21619esac
21620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21621 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021623 grep -v '^ *+' conftest.er1 >conftest.err
21624 rm -f conftest.er1
21625 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021627 (exit $ac_status); } && {
21628 test -z "$ac_c_werror_flag" ||
21629 test ! -s conftest.err
21630 } && test -s conftest$ac_exeext &&
21631 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021632 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021633else
Martin v. Löwis11437992002-04-12 09:54:03 +000021634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021635sed 's/^/| /' conftest.$ac_ext >&5
21636
Martin v. Löwiseba40652007-08-30 20:10:57 +000021637 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021639
21640rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021641 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021643ac_res=`eval echo '${'$as_ac_var'}'`
21644 { echo "$as_me:$LINENO: result: $ac_res" >&5
21645echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021646if test `eval echo '${'$as_ac_var'}'` = yes; then
21647 cat >>confdefs.h <<_ACEOF
21648#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21649_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021650
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021651fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021652done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021653
Michael W. Hudson54241132001-12-07 15:38:26 +000021654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021655fi
21656
Michael W. Hudson54241132001-12-07 15:38:26 +000021657
21658
21659
21660
21661
21662
Guido van Rossum627b2d71993-12-24 10:39:16 +000021663# checks for system services
21664# (none yet)
21665
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021666# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021667{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21668echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021669if test "${ac_cv_func___fpu_control+set}" = set; then
21670 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021671else
Martin v. Löwis11437992002-04-12 09:54:03 +000021672 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021673/* confdefs.h. */
21674_ACEOF
21675cat confdefs.h >>conftest.$ac_ext
21676cat >>conftest.$ac_ext <<_ACEOF
21677/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021678/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21679 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21680#define __fpu_control innocuous___fpu_control
21681
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021682/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021683 which can conflict with char __fpu_control (); below.
21684 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021685 <limits.h> exists even on freestanding compilers. */
21686
21687#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021688# include <limits.h>
21689#else
21690# include <assert.h>
21691#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021692
21693#undef __fpu_control
21694
Martin v. Löwiseba40652007-08-30 20:10:57 +000021695/* Override any GCC internal prototype to avoid an error.
21696 Use char because int might match the return type of a GCC
21697 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021698#ifdef __cplusplus
21699extern "C"
21700#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021701char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021702/* The GNU C library defines this for functions which it implements
21703 to always fail with ENOSYS. Some functions are actually named
21704 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021705#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021706choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021707#endif
21708
Skip Montanaro6dead952003-09-25 14:50:04 +000021709int
21710main ()
21711{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021712return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021713 ;
21714 return 0;
21715}
21716_ACEOF
21717rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021718if { (ac_try="$ac_link"
21719case "(($ac_try" in
21720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21721 *) ac_try_echo=$ac_try;;
21722esac
21723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21724 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021726 grep -v '^ *+' conftest.er1 >conftest.err
21727 rm -f conftest.er1
21728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021730 (exit $ac_status); } && {
21731 test -z "$ac_c_werror_flag" ||
21732 test ! -s conftest.err
21733 } && test -s conftest$ac_exeext &&
21734 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021735 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021736else
Martin v. Löwis11437992002-04-12 09:54:03 +000021737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021738sed 's/^/| /' conftest.$ac_ext >&5
21739
Martin v. Löwiseba40652007-08-30 20:10:57 +000021740 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021742
21743rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021744 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021746{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21747echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021748if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021749 :
21750else
Martin v. Löwis11437992002-04-12 09:54:03 +000021751
Martin v. Löwiseba40652007-08-30 20:10:57 +000021752{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21753echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021754if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21755 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021756else
Martin v. Löwis11437992002-04-12 09:54:03 +000021757 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021758LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021759cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021760/* confdefs.h. */
21761_ACEOF
21762cat confdefs.h >>conftest.$ac_ext
21763cat >>conftest.$ac_ext <<_ACEOF
21764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021765
Martin v. Löwiseba40652007-08-30 20:10:57 +000021766/* Override any GCC internal prototype to avoid an error.
21767 Use char because int might match the return type of a GCC
21768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021769#ifdef __cplusplus
21770extern "C"
21771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021772char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021773int
21774main ()
21775{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021776return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021777 ;
21778 return 0;
21779}
21780_ACEOF
21781rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021782if { (ac_try="$ac_link"
21783case "(($ac_try" in
21784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21785 *) ac_try_echo=$ac_try;;
21786esac
21787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21788 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021790 grep -v '^ *+' conftest.er1 >conftest.err
21791 rm -f conftest.er1
21792 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021794 (exit $ac_status); } && {
21795 test -z "$ac_c_werror_flag" ||
21796 test ! -s conftest.err
21797 } && test -s conftest$ac_exeext &&
21798 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021799 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021800else
Martin v. Löwis11437992002-04-12 09:54:03 +000021801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021802sed 's/^/| /' conftest.$ac_ext >&5
21803
Martin v. Löwiseba40652007-08-30 20:10:57 +000021804 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021806
21807rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021808 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021809LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021811{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21812echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021813if test $ac_cv_lib_ieee___fpu_control = yes; then
21814 cat >>confdefs.h <<_ACEOF
21815#define HAVE_LIBIEEE 1
21816_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021817
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021818 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021819
Guido van Rossum627b2d71993-12-24 10:39:16 +000021820fi
21821
Michael W. Hudson54241132001-12-07 15:38:26 +000021822
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021823fi
21824
Michael W. Hudson54241132001-12-07 15:38:26 +000021825
Guido van Rossum7f253911997-05-09 02:42:48 +000021826# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021827{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21828echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021829
Martin v. Löwiseba40652007-08-30 20:10:57 +000021830# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021831if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021832 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021833if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021834then
21835
21836cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021837#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021838_ACEOF
21839
Martin v. Löwiseba40652007-08-30 20:10:57 +000021840 { echo "$as_me:$LINENO: result: yes" >&5
21841echo "${ECHO_T}yes" >&6; }
21842else { echo "$as_me:$LINENO: result: no" >&5
21843echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021844fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021845else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021846 { echo "$as_me:$LINENO: result: no" >&5
21847echo "${ECHO_T}no" >&6; }
21848fi
21849
Guido van Rossum7f253911997-05-09 02:42:48 +000021850
Guido van Rossum7f43da71994-08-01 12:15:30 +000021851# check for --with-libm=...
21852
Guido van Rossum563e7081996-09-10 18:20:48 +000021853case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021854Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021855BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021856*) LIBM=-lm
21857esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021858{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21859echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021860
Martin v. Löwiseba40652007-08-30 20:10:57 +000021861# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021862if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021863 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021864if test "$withval" = no
21865then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021866 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21867echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021868elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021869then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021870 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21871echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021872else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21873echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21874 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021875fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021876else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21878echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21879fi
21880
Guido van Rossum7f43da71994-08-01 12:15:30 +000021881
21882# check for --with-libc=...
21883
Martin v. Löwiseba40652007-08-30 20:10:57 +000021884{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21885echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021886
Martin v. Löwiseba40652007-08-30 20:10:57 +000021887# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021888if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021889 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021890if test "$withval" = no
21891then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021892 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21893echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021894elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021895then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021896 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21897echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021898else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21899echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21900 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021901fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021902else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021903 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21904echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21905fi
21906
Guido van Rossum7f43da71994-08-01 12:15:30 +000021907
Christian Heimes0a8143f2007-12-18 23:22:54 +000021908# ************************************
21909# * Check for mathematical functions *
21910# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021911
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021912LIBS_SAVE=$LIBS
21913LIBS="$LIBS $LIBM"
21914
Mark Dickinson04b27232009-01-04 12:29:36 +000021915# Detect whether system arithmetic is subject to x87-style double
21916# rounding issues. The result of this test has little meaning on non
21917# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21918# mode is round-to-nearest and double rounding issues are present, and
21919# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21920{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21921echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21922if test "${ac_cv_x87_double_rounding+set}" = set; then
21923 echo $ECHO_N "(cached) $ECHO_C" >&6
21924else
21925
21926if test "$cross_compiling" = yes; then
21927 ac_cv_x87_double_rounding=no
21928else
21929 cat >conftest.$ac_ext <<_ACEOF
21930/* confdefs.h. */
21931_ACEOF
21932cat confdefs.h >>conftest.$ac_ext
21933cat >>conftest.$ac_ext <<_ACEOF
21934/* end confdefs.h. */
21935
21936#include <stdlib.h>
21937#include <math.h>
21938int main() {
21939 volatile double x, y, z;
21940 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21941 x = 0.99999999999999989; /* 1-2**-53 */
21942 y = 1./x;
21943 if (y != 1.)
21944 exit(0);
21945 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21946 x = 1e16;
21947 y = 2.99999;
21948 z = x + y;
21949 if (z != 1e16+4.)
21950 exit(0);
21951 /* both tests show evidence of double rounding */
21952 exit(1);
21953}
21954
21955_ACEOF
21956rm -f conftest$ac_exeext
21957if { (ac_try="$ac_link"
21958case "(($ac_try" in
21959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21960 *) ac_try_echo=$ac_try;;
21961esac
21962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21963 (eval "$ac_link") 2>&5
21964 ac_status=$?
21965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21966 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21967 { (case "(($ac_try" in
21968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21969 *) ac_try_echo=$ac_try;;
21970esac
21971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21972 (eval "$ac_try") 2>&5
21973 ac_status=$?
21974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21975 (exit $ac_status); }; }; then
21976 ac_cv_x87_double_rounding=no
21977else
21978 echo "$as_me: program exited with status $ac_status" >&5
21979echo "$as_me: failed program was:" >&5
21980sed 's/^/| /' conftest.$ac_ext >&5
21981
21982( exit $ac_status )
21983ac_cv_x87_double_rounding=yes
21984fi
21985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21986fi
21987
21988
21989fi
21990
21991{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
21992echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
21993if test "$ac_cv_x87_double_rounding" = yes
21994then
21995
21996cat >>confdefs.h <<\_ACEOF
21997#define X87_DOUBLE_ROUNDING 1
21998_ACEOF
21999
22000fi
22001
22002
Mark Dickinson265d7382008-04-21 22:32:24 +000022003# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22004# -0. on some architectures.
22005{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22006echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
22007if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
22008 echo $ECHO_N "(cached) $ECHO_C" >&6
22009else
22010
22011if test "$cross_compiling" = yes; then
22012 ac_cv_tanh_preserves_zero_sign=no
22013else
22014 cat >conftest.$ac_ext <<_ACEOF
22015/* confdefs.h. */
22016_ACEOF
22017cat confdefs.h >>conftest.$ac_ext
22018cat >>conftest.$ac_ext <<_ACEOF
22019/* end confdefs.h. */
22020
22021#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000022022#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000022023int main() {
22024 /* return 0 if either negative zeros don't exist
22025 on this platform or if negative zeros exist
22026 and tanh(-0.) == -0. */
22027 if (atan2(0., -1.) == atan2(-0., -1.) ||
22028 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22029 else exit(1);
22030}
22031
22032_ACEOF
22033rm -f conftest$ac_exeext
22034if { (ac_try="$ac_link"
22035case "(($ac_try" in
22036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22037 *) ac_try_echo=$ac_try;;
22038esac
22039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22040 (eval "$ac_link") 2>&5
22041 ac_status=$?
22042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22044 { (case "(($ac_try" in
22045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22046 *) ac_try_echo=$ac_try;;
22047esac
22048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22049 (eval "$ac_try") 2>&5
22050 ac_status=$?
22051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22052 (exit $ac_status); }; }; then
22053 ac_cv_tanh_preserves_zero_sign=yes
22054else
22055 echo "$as_me: program exited with status $ac_status" >&5
22056echo "$as_me: failed program was:" >&5
22057sed 's/^/| /' conftest.$ac_ext >&5
22058
22059( exit $ac_status )
22060ac_cv_tanh_preserves_zero_sign=no
22061fi
22062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22063fi
22064
22065
22066fi
22067
22068{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22069echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
22070if test "$ac_cv_tanh_preserves_zero_sign" = yes
22071then
22072
22073cat >>confdefs.h <<\_ACEOF
22074#define TANH_PRESERVES_ZERO_SIGN 1
22075_ACEOF
22076
22077fi
22078
Martin v. Löwis11437992002-04-12 09:54:03 +000022079
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022080
Michael W. Hudson54241132001-12-07 15:38:26 +000022081
Christian Heimes0a8143f2007-12-18 23:22:54 +000022082
22083
22084
22085
22086
Mark Dickinson1de33272009-01-04 20:19:41 +000022087for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000022088do
22089as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22090{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22091echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22092if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22093 echo $ECHO_N "(cached) $ECHO_C" >&6
22094else
22095 cat >conftest.$ac_ext <<_ACEOF
22096/* confdefs.h. */
22097_ACEOF
22098cat confdefs.h >>conftest.$ac_ext
22099cat >>conftest.$ac_ext <<_ACEOF
22100/* end confdefs.h. */
22101/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22102 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22103#define $ac_func innocuous_$ac_func
22104
22105/* System header to define __stub macros and hopefully few prototypes,
22106 which can conflict with char $ac_func (); below.
22107 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22108 <limits.h> exists even on freestanding compilers. */
22109
22110#ifdef __STDC__
22111# include <limits.h>
22112#else
22113# include <assert.h>
22114#endif
22115
22116#undef $ac_func
22117
22118/* Override any GCC internal prototype to avoid an error.
22119 Use char because int might match the return type of a GCC
22120 builtin and then its argument prototype would still apply. */
22121#ifdef __cplusplus
22122extern "C"
22123#endif
22124char $ac_func ();
22125/* The GNU C library defines this for functions which it implements
22126 to always fail with ENOSYS. Some functions are actually named
22127 something starting with __ and the normal name is an alias. */
22128#if defined __stub_$ac_func || defined __stub___$ac_func
22129choke me
22130#endif
22131
22132int
22133main ()
22134{
22135return $ac_func ();
22136 ;
22137 return 0;
22138}
22139_ACEOF
22140rm -f conftest.$ac_objext conftest$ac_exeext
22141if { (ac_try="$ac_link"
22142case "(($ac_try" in
22143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22144 *) ac_try_echo=$ac_try;;
22145esac
22146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22147 (eval "$ac_link") 2>conftest.er1
22148 ac_status=$?
22149 grep -v '^ *+' conftest.er1 >conftest.err
22150 rm -f conftest.er1
22151 cat conftest.err >&5
22152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22153 (exit $ac_status); } && {
22154 test -z "$ac_c_werror_flag" ||
22155 test ! -s conftest.err
22156 } && test -s conftest$ac_exeext &&
22157 $as_test_x conftest$ac_exeext; then
22158 eval "$as_ac_var=yes"
22159else
22160 echo "$as_me: failed program was:" >&5
22161sed 's/^/| /' conftest.$ac_ext >&5
22162
22163 eval "$as_ac_var=no"
22164fi
22165
22166rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22167 conftest$ac_exeext conftest.$ac_ext
22168fi
22169ac_res=`eval echo '${'$as_ac_var'}'`
22170 { echo "$as_me:$LINENO: result: $ac_res" >&5
22171echo "${ECHO_T}$ac_res" >&6; }
22172if test `eval echo '${'$as_ac_var'}'` = yes; then
22173 cat >>confdefs.h <<_ACEOF
22174#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22175_ACEOF
22176
22177fi
22178done
22179
Mark Dickinsond181e3a2009-01-04 13:57:26 +000022180{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22181echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
22182if test "${ac_cv_have_decl_isinf+set}" = set; then
22183 echo $ECHO_N "(cached) $ECHO_C" >&6
22184else
22185 cat >conftest.$ac_ext <<_ACEOF
22186/* confdefs.h. */
22187_ACEOF
22188cat confdefs.h >>conftest.$ac_ext
22189cat >>conftest.$ac_ext <<_ACEOF
22190/* end confdefs.h. */
22191#include <math.h>
22192
22193int
22194main ()
22195{
22196#ifndef isinf
22197 (void) isinf;
22198#endif
22199
22200 ;
22201 return 0;
22202}
22203_ACEOF
22204rm -f conftest.$ac_objext
22205if { (ac_try="$ac_compile"
22206case "(($ac_try" in
22207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22208 *) ac_try_echo=$ac_try;;
22209esac
22210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22211 (eval "$ac_compile") 2>conftest.er1
22212 ac_status=$?
22213 grep -v '^ *+' conftest.er1 >conftest.err
22214 rm -f conftest.er1
22215 cat conftest.err >&5
22216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22217 (exit $ac_status); } && {
22218 test -z "$ac_c_werror_flag" ||
22219 test ! -s conftest.err
22220 } && test -s conftest.$ac_objext; then
22221 ac_cv_have_decl_isinf=yes
22222else
22223 echo "$as_me: failed program was:" >&5
22224sed 's/^/| /' conftest.$ac_ext >&5
22225
22226 ac_cv_have_decl_isinf=no
22227fi
22228
22229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22230fi
22231{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22232echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22233if test $ac_cv_have_decl_isinf = yes; then
22234
22235cat >>confdefs.h <<_ACEOF
22236#define HAVE_DECL_ISINF 1
22237_ACEOF
22238
22239
22240else
22241 cat >>confdefs.h <<_ACEOF
22242#define HAVE_DECL_ISINF 0
22243_ACEOF
22244
22245
22246fi
22247{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22248echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
22249if test "${ac_cv_have_decl_isnan+set}" = set; then
22250 echo $ECHO_N "(cached) $ECHO_C" >&6
22251else
22252 cat >conftest.$ac_ext <<_ACEOF
22253/* confdefs.h. */
22254_ACEOF
22255cat confdefs.h >>conftest.$ac_ext
22256cat >>conftest.$ac_ext <<_ACEOF
22257/* end confdefs.h. */
22258#include <math.h>
22259
22260int
22261main ()
22262{
22263#ifndef isnan
22264 (void) isnan;
22265#endif
22266
22267 ;
22268 return 0;
22269}
22270_ACEOF
22271rm -f conftest.$ac_objext
22272if { (ac_try="$ac_compile"
22273case "(($ac_try" in
22274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22275 *) ac_try_echo=$ac_try;;
22276esac
22277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22278 (eval "$ac_compile") 2>conftest.er1
22279 ac_status=$?
22280 grep -v '^ *+' conftest.er1 >conftest.err
22281 rm -f conftest.er1
22282 cat conftest.err >&5
22283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22284 (exit $ac_status); } && {
22285 test -z "$ac_c_werror_flag" ||
22286 test ! -s conftest.err
22287 } && test -s conftest.$ac_objext; then
22288 ac_cv_have_decl_isnan=yes
22289else
22290 echo "$as_me: failed program was:" >&5
22291sed 's/^/| /' conftest.$ac_ext >&5
22292
22293 ac_cv_have_decl_isnan=no
22294fi
22295
22296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22297fi
22298{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22299echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22300if test $ac_cv_have_decl_isnan = yes; then
22301
22302cat >>confdefs.h <<_ACEOF
22303#define HAVE_DECL_ISNAN 1
22304_ACEOF
22305
22306
22307else
22308 cat >>confdefs.h <<_ACEOF
22309#define HAVE_DECL_ISNAN 0
22310_ACEOF
22311
22312
22313fi
22314{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22315echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
22316if test "${ac_cv_have_decl_isfinite+set}" = set; then
22317 echo $ECHO_N "(cached) $ECHO_C" >&6
22318else
22319 cat >conftest.$ac_ext <<_ACEOF
22320/* confdefs.h. */
22321_ACEOF
22322cat confdefs.h >>conftest.$ac_ext
22323cat >>conftest.$ac_ext <<_ACEOF
22324/* end confdefs.h. */
22325#include <math.h>
22326
22327int
22328main ()
22329{
22330#ifndef isfinite
22331 (void) isfinite;
22332#endif
22333
22334 ;
22335 return 0;
22336}
22337_ACEOF
22338rm -f conftest.$ac_objext
22339if { (ac_try="$ac_compile"
22340case "(($ac_try" in
22341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22342 *) ac_try_echo=$ac_try;;
22343esac
22344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22345 (eval "$ac_compile") 2>conftest.er1
22346 ac_status=$?
22347 grep -v '^ *+' conftest.er1 >conftest.err
22348 rm -f conftest.er1
22349 cat conftest.err >&5
22350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22351 (exit $ac_status); } && {
22352 test -z "$ac_c_werror_flag" ||
22353 test ! -s conftest.err
22354 } && test -s conftest.$ac_objext; then
22355 ac_cv_have_decl_isfinite=yes
22356else
22357 echo "$as_me: failed program was:" >&5
22358sed 's/^/| /' conftest.$ac_ext >&5
22359
22360 ac_cv_have_decl_isfinite=no
22361fi
22362
22363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22364fi
22365{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22366echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22367if test $ac_cv_have_decl_isfinite = yes; then
22368
22369cat >>confdefs.h <<_ACEOF
22370#define HAVE_DECL_ISFINITE 1
22371_ACEOF
22372
22373
22374else
22375 cat >>confdefs.h <<_ACEOF
22376#define HAVE_DECL_ISFINITE 0
22377_ACEOF
22378
22379
22380fi
22381
22382
Christian Heimes0a8143f2007-12-18 23:22:54 +000022383
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022384LIBS=$LIBS_SAVE
22385
Mark Dickinsonefc82f72009-03-20 15:51:55 +000022386# determine what size digit to use for Python's longs
22387{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22388echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
22389# Check whether --enable-big-digits was given.
22390if test "${enable_big_digits+set}" = set; then
22391 enableval=$enable_big_digits; case $enable_big_digits in
22392yes)
22393 enable_big_digits=30 ;;
22394no)
22395 enable_big_digits=15 ;;
2239615|30)
22397 ;;
22398*)
22399 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22400echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
22401 { (exit 1); exit 1; }; } ;;
22402esac
22403{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22404echo "${ECHO_T}$enable_big_digits" >&6; }
22405
22406cat >>confdefs.h <<_ACEOF
22407#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22408_ACEOF
22409
22410
22411else
22412 { echo "$as_me:$LINENO: result: no value specified" >&5
22413echo "${ECHO_T}no value specified" >&6; }
22414fi
22415
22416
Guido van Rossumef2255b2000-03-10 22:30:29 +000022417# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022418if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022419 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22420echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022421if test "${ac_cv_header_wchar_h+set}" = set; then
22422 echo $ECHO_N "(cached) $ECHO_C" >&6
22423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022424{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22425echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022426else
Martin v. Löwis11437992002-04-12 09:54:03 +000022427 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022428{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22429echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022430cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022431/* confdefs.h. */
22432_ACEOF
22433cat confdefs.h >>conftest.$ac_ext
22434cat >>conftest.$ac_ext <<_ACEOF
22435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022436$ac_includes_default
22437#include <wchar.h>
22438_ACEOF
22439rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022440if { (ac_try="$ac_compile"
22441case "(($ac_try" in
22442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22443 *) ac_try_echo=$ac_try;;
22444esac
22445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022448 grep -v '^ *+' conftest.er1 >conftest.err
22449 rm -f conftest.er1
22450 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022452 (exit $ac_status); } && {
22453 test -z "$ac_c_werror_flag" ||
22454 test ! -s conftest.err
22455 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022456 ac_header_compiler=yes
22457else
22458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022459sed 's/^/| /' conftest.$ac_ext >&5
22460
Martin v. Löwiseba40652007-08-30 20:10:57 +000022461 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022463
22464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22465{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22466echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022467
22468# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022469{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22470echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022472/* confdefs.h. */
22473_ACEOF
22474cat confdefs.h >>conftest.$ac_ext
22475cat >>conftest.$ac_ext <<_ACEOF
22476/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022477#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022478_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022479if { (ac_try="$ac_cpp conftest.$ac_ext"
22480case "(($ac_try" in
22481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22482 *) ac_try_echo=$ac_try;;
22483esac
22484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22485 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022486 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022487 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022488 rm -f conftest.er1
22489 cat conftest.err >&5
22490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022491 (exit $ac_status); } >/dev/null && {
22492 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22493 test ! -s conftest.err
22494 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022495 ac_header_preproc=yes
22496else
22497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022498sed 's/^/| /' conftest.$ac_ext >&5
22499
Martin v. Löwis11437992002-04-12 09:54:03 +000022500 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022502
Martin v. Löwis11437992002-04-12 09:54:03 +000022503rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022504{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22505echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022506
22507# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022508case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22509 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022510 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22511echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022512 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22513echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22514 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022515 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022516 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022517 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22518echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022519 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22520echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22521 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22522echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22523 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22524echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022525 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22526echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022527 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22528echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022529 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022530## ------------------------------------------------ ##
22531## Report this to http://www.python.org/python-bugs ##
22532## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022533_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022534 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022535 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022536esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022537{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22538echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022539if test "${ac_cv_header_wchar_h+set}" = set; then
22540 echo $ECHO_N "(cached) $ECHO_C" >&6
22541else
22542 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022544{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22545echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022546
22547fi
22548if test $ac_cv_header_wchar_h = yes; then
22549
22550
22551cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022552#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022553_ACEOF
22554
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022555 wchar_h="yes"
22556
Guido van Rossumef2255b2000-03-10 22:30:29 +000022557else
Martin v. Löwis11437992002-04-12 09:54:03 +000022558 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022559
22560fi
22561
Michael W. Hudson54241132001-12-07 15:38:26 +000022562
Martin v. Löwis11437992002-04-12 09:54:03 +000022563
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022564# determine wchar_t size
22565if test "$wchar_h" = yes
22566then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022567 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22568echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022569if test "${ac_cv_type_wchar_t+set}" = set; then
22570 echo $ECHO_N "(cached) $ECHO_C" >&6
22571else
22572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022573/* confdefs.h. */
22574_ACEOF
22575cat confdefs.h >>conftest.$ac_ext
22576cat >>conftest.$ac_ext <<_ACEOF
22577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022578#include <wchar.h>
22579
Martin v. Löwiseba40652007-08-30 20:10:57 +000022580typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022581int
22582main ()
22583{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022584if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022585 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022586if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022587 return 0;
22588 ;
22589 return 0;
22590}
22591_ACEOF
22592rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022593if { (ac_try="$ac_compile"
22594case "(($ac_try" in
22595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22596 *) ac_try_echo=$ac_try;;
22597esac
22598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22599 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022601 grep -v '^ *+' conftest.er1 >conftest.err
22602 rm -f conftest.er1
22603 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022605 (exit $ac_status); } && {
22606 test -z "$ac_c_werror_flag" ||
22607 test ! -s conftest.err
22608 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022609 ac_cv_type_wchar_t=yes
22610else
22611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022612sed 's/^/| /' conftest.$ac_ext >&5
22613
Martin v. Löwiseba40652007-08-30 20:10:57 +000022614 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022615fi
Brett Cannon19fab762007-06-02 03:02:29 +000022616
Martin v. Löwiseba40652007-08-30 20:10:57 +000022617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22618fi
22619{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22620echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22621
22622# The cast to long int works around a bug in the HP C Compiler
22623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22625# This bug is HP SR number 8606223364.
22626{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22627echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022628if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22629 echo $ECHO_N "(cached) $ECHO_C" >&6
22630else
Martin v. Löwis11437992002-04-12 09:54:03 +000022631 if test "$cross_compiling" = yes; then
22632 # Depending upon the size, compute the lo and hi bounds.
22633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022634/* confdefs.h. */
22635_ACEOF
22636cat confdefs.h >>conftest.$ac_ext
22637cat >>conftest.$ac_ext <<_ACEOF
22638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022639#include <wchar.h>
22640
Martin v. Löwiseba40652007-08-30 20:10:57 +000022641 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022642int
22643main ()
22644{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022645static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022646test_array [0] = 0
22647
22648 ;
22649 return 0;
22650}
22651_ACEOF
22652rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022653if { (ac_try="$ac_compile"
22654case "(($ac_try" in
22655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22656 *) ac_try_echo=$ac_try;;
22657esac
22658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22659 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022661 grep -v '^ *+' conftest.er1 >conftest.err
22662 rm -f conftest.er1
22663 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022665 (exit $ac_status); } && {
22666 test -z "$ac_c_werror_flag" ||
22667 test ! -s conftest.err
22668 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022669 ac_lo=0 ac_mid=0
22670 while :; do
22671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022672/* confdefs.h. */
22673_ACEOF
22674cat confdefs.h >>conftest.$ac_ext
22675cat >>conftest.$ac_ext <<_ACEOF
22676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022677#include <wchar.h>
22678
Martin v. Löwiseba40652007-08-30 20:10:57 +000022679 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022680int
22681main ()
22682{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022683static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022684test_array [0] = 0
22685
22686 ;
22687 return 0;
22688}
22689_ACEOF
22690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022691if { (ac_try="$ac_compile"
22692case "(($ac_try" in
22693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22694 *) ac_try_echo=$ac_try;;
22695esac
22696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022699 grep -v '^ *+' conftest.er1 >conftest.err
22700 rm -f conftest.er1
22701 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022703 (exit $ac_status); } && {
22704 test -z "$ac_c_werror_flag" ||
22705 test ! -s conftest.err
22706 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022707 ac_hi=$ac_mid; break
22708else
22709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022710sed 's/^/| /' conftest.$ac_ext >&5
22711
Martin v. Löwiseba40652007-08-30 20:10:57 +000022712 ac_lo=`expr $ac_mid + 1`
22713 if test $ac_lo -le $ac_mid; then
22714 ac_lo= ac_hi=
22715 break
22716 fi
22717 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022719
22720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022721 done
22722else
22723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022724sed 's/^/| /' conftest.$ac_ext >&5
22725
Martin v. Löwiseba40652007-08-30 20:10:57 +000022726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022727/* confdefs.h. */
22728_ACEOF
22729cat confdefs.h >>conftest.$ac_ext
22730cat >>conftest.$ac_ext <<_ACEOF
22731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022732#include <wchar.h>
22733
Martin v. Löwiseba40652007-08-30 20:10:57 +000022734 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022735int
22736main ()
22737{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022738static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022739test_array [0] = 0
22740
22741 ;
22742 return 0;
22743}
22744_ACEOF
22745rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022746if { (ac_try="$ac_compile"
22747case "(($ac_try" in
22748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22749 *) ac_try_echo=$ac_try;;
22750esac
22751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022754 grep -v '^ *+' conftest.er1 >conftest.err
22755 rm -f conftest.er1
22756 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022758 (exit $ac_status); } && {
22759 test -z "$ac_c_werror_flag" ||
22760 test ! -s conftest.err
22761 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022762 ac_hi=-1 ac_mid=-1
22763 while :; do
22764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022765/* confdefs.h. */
22766_ACEOF
22767cat confdefs.h >>conftest.$ac_ext
22768cat >>conftest.$ac_ext <<_ACEOF
22769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022770#include <wchar.h>
22771
Martin v. Löwiseba40652007-08-30 20:10:57 +000022772 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022773int
22774main ()
22775{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022776static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022777test_array [0] = 0
22778
22779 ;
22780 return 0;
22781}
22782_ACEOF
22783rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022784if { (ac_try="$ac_compile"
22785case "(($ac_try" in
22786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22787 *) ac_try_echo=$ac_try;;
22788esac
22789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22790 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022792 grep -v '^ *+' conftest.er1 >conftest.err
22793 rm -f conftest.er1
22794 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022796 (exit $ac_status); } && {
22797 test -z "$ac_c_werror_flag" ||
22798 test ! -s conftest.err
22799 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022800 ac_lo=$ac_mid; break
22801else
22802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022803sed 's/^/| /' conftest.$ac_ext >&5
22804
Martin v. Löwiseba40652007-08-30 20:10:57 +000022805 ac_hi=`expr '(' $ac_mid ')' - 1`
22806 if test $ac_mid -le $ac_hi; then
22807 ac_lo= ac_hi=
22808 break
22809 fi
22810 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022812
22813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022814 done
22815else
22816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022817sed 's/^/| /' conftest.$ac_ext >&5
22818
Martin v. Löwiseba40652007-08-30 20:10:57 +000022819 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022821
22822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022824
22825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022826# Binary search between lo and hi bounds.
22827while test "x$ac_lo" != "x$ac_hi"; do
22828 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022830/* confdefs.h. */
22831_ACEOF
22832cat confdefs.h >>conftest.$ac_ext
22833cat >>conftest.$ac_ext <<_ACEOF
22834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022835#include <wchar.h>
22836
Martin v. Löwiseba40652007-08-30 20:10:57 +000022837 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022838int
22839main ()
22840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022841static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022842test_array [0] = 0
22843
22844 ;
22845 return 0;
22846}
22847_ACEOF
22848rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022849if { (ac_try="$ac_compile"
22850case "(($ac_try" in
22851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22852 *) ac_try_echo=$ac_try;;
22853esac
22854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022857 grep -v '^ *+' conftest.er1 >conftest.err
22858 rm -f conftest.er1
22859 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022861 (exit $ac_status); } && {
22862 test -z "$ac_c_werror_flag" ||
22863 test ! -s conftest.err
22864 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022865 ac_hi=$ac_mid
22866else
22867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022868sed 's/^/| /' conftest.$ac_ext >&5
22869
Martin v. Löwiseba40652007-08-30 20:10:57 +000022870 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022872
22873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022874done
22875case $ac_lo in
22876?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022877'') if test "$ac_cv_type_wchar_t" = yes; then
22878 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022879See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022880echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022881See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022882 { (exit 77); exit 77; }; }
22883 else
22884 ac_cv_sizeof_wchar_t=0
22885 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022886esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022887else
Martin v. Löwis11437992002-04-12 09:54:03 +000022888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022889/* confdefs.h. */
22890_ACEOF
22891cat confdefs.h >>conftest.$ac_ext
22892cat >>conftest.$ac_ext <<_ACEOF
22893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022894#include <wchar.h>
22895
Martin v. Löwiseba40652007-08-30 20:10:57 +000022896 typedef wchar_t ac__type_sizeof_;
22897static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22898static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022899#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022900#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022901int
22902main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022903{
Martin v. Löwis11437992002-04-12 09:54:03 +000022904
22905 FILE *f = fopen ("conftest.val", "w");
22906 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022907 return 1;
22908 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022909 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022910 long int i = longval ();
22911 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22912 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022913 fprintf (f, "%ld\n", i);
22914 }
22915 else
22916 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022917 unsigned long int i = ulongval ();
22918 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22919 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022920 fprintf (f, "%lu\n", i);
22921 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022923
22924 ;
22925 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022926}
Martin v. Löwis11437992002-04-12 09:54:03 +000022927_ACEOF
22928rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022929if { (ac_try="$ac_link"
22930case "(($ac_try" in
22931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22932 *) ac_try_echo=$ac_try;;
22933esac
22934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22935 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022936 ac_status=$?
22937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22938 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022939 { (case "(($ac_try" in
22940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22941 *) ac_try_echo=$ac_try;;
22942esac
22943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22944 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022945 ac_status=$?
22946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22947 (exit $ac_status); }; }; then
22948 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022949else
Martin v. Löwis11437992002-04-12 09:54:03 +000022950 echo "$as_me: program exited with status $ac_status" >&5
22951echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022952sed 's/^/| /' conftest.$ac_ext >&5
22953
Martin v. Löwis11437992002-04-12 09:54:03 +000022954( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022955if test "$ac_cv_type_wchar_t" = yes; then
22956 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022957See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022958echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022959See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022960 { (exit 77); exit 77; }; }
22961 else
22962 ac_cv_sizeof_wchar_t=0
22963 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022965rm -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 +000022966fi
22967rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022969{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22970echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22971
22972
22973
Martin v. Löwis11437992002-04-12 09:54:03 +000022974cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022975#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022976_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022977
Michael W. Hudson54241132001-12-07 15:38:26 +000022978
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022979fi
22980
Martin v. Löwiseba40652007-08-30 20:10:57 +000022981{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22982echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022983have_ucs4_tcl=no
22984cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022985/* confdefs.h. */
22986_ACEOF
22987cat confdefs.h >>conftest.$ac_ext
22988cat >>conftest.$ac_ext <<_ACEOF
22989/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022990
22991#include <tcl.h>
22992#if TCL_UTF_MAX != 6
22993# error "NOT UCS4_TCL"
22994#endif
22995int
22996main ()
22997{
22998
22999 ;
23000 return 0;
23001}
23002_ACEOF
23003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023004if { (ac_try="$ac_compile"
23005case "(($ac_try" in
23006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23007 *) ac_try_echo=$ac_try;;
23008esac
23009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023012 grep -v '^ *+' conftest.er1 >conftest.err
23013 rm -f conftest.er1
23014 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023016 (exit $ac_status); } && {
23017 test -z "$ac_c_werror_flag" ||
23018 test ! -s conftest.err
23019 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023020
23021
23022cat >>confdefs.h <<\_ACEOF
23023#define HAVE_UCS4_TCL 1
23024_ACEOF
23025
23026 have_ucs4_tcl=yes
23027
23028else
23029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023030sed 's/^/| /' conftest.$ac_ext >&5
23031
Martin v. Löwiseba40652007-08-30 20:10:57 +000023032
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023034
23035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23036{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23037echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023038
Skip Montanaro6dead952003-09-25 14:50:04 +000023039# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023040if test "$wchar_h" = yes
23041then
23042 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000023043 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23044echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023045 if test "${ac_cv_wchar_t_signed+set}" = set; then
23046 echo $ECHO_N "(cached) $ECHO_C" >&6
23047else
23048
23049 if test "$cross_compiling" = yes; then
23050 ac_cv_wchar_t_signed=yes
23051else
23052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023053/* confdefs.h. */
23054_ACEOF
23055cat confdefs.h >>conftest.$ac_ext
23056cat >>conftest.$ac_ext <<_ACEOF
23057/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023058
23059 #include <wchar.h>
23060 int main()
23061 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000023062 /* Success: exit code 0 */
23063 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023064 }
23065
23066_ACEOF
23067rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023068if { (ac_try="$ac_link"
23069case "(($ac_try" in
23070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23071 *) ac_try_echo=$ac_try;;
23072esac
23073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23074 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023075 ac_status=$?
23076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23077 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023078 { (case "(($ac_try" in
23079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23080 *) ac_try_echo=$ac_try;;
23081esac
23082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23083 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023084 ac_status=$?
23085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23086 (exit $ac_status); }; }; then
23087 ac_cv_wchar_t_signed=yes
23088else
23089 echo "$as_me: program exited with status $ac_status" >&5
23090echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023091sed 's/^/| /' conftest.$ac_ext >&5
23092
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023093( exit $ac_status )
23094ac_cv_wchar_t_signed=no
23095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023096rm -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 +000023097fi
23098
Martin v. Löwiseba40652007-08-30 20:10:57 +000023099
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023100fi
23101
Martin v. Löwiseba40652007-08-30 20:10:57 +000023102 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23103echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
23104fi
23105
23106{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
23107echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
23108# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023109if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023110 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023111else
23112 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000023113fi
23114
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023115
23116if test $enable_unicode = yes
23117then
Martin v. Löwisfd917792001-06-27 20:22:04 +000023118 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023119 case "$have_ucs4_tcl" in
23120 yes) enable_unicode="ucs4"
23121 ;;
23122 *) enable_unicode="ucs2"
23123 ;;
23124 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023125fi
23126
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023127
23128
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023129case "$enable_unicode" in
23130ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000023131 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023132#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000023133_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023134
23135 ;;
23136ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000023137 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023138#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023139_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023140
23141 ;;
23142esac
23143
Michael W. Hudson54241132001-12-07 15:38:26 +000023144
Martin v. Löwis11437992002-04-12 09:54:03 +000023145
23146
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023147
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023148if test "$enable_unicode" = "no"
23149then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023150 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000023151 { echo "$as_me:$LINENO: result: not used" >&5
23152echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023153else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023154 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000023155
23156cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023157#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023158_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023159
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023160
23161 # wchar_t is only usable if it maps to an unsigned type
23162 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023163 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023164 then
23165 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023166
Martin v. Löwis11437992002-04-12 09:54:03 +000023167cat >>confdefs.h <<\_ACEOF
23168#define HAVE_USABLE_WCHAR_T 1
23169_ACEOF
23170
23171 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023172#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023173_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023174
23175 elif test "$ac_cv_sizeof_short" = "$unicode_size"
23176 then
23177 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000023178 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023179#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023180_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023181
23182 elif test "$ac_cv_sizeof_long" = "$unicode_size"
23183 then
23184 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000023185 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023186#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023187_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023188
23189 else
23190 PY_UNICODE_TYPE="no type found"
23191 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023192 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23193echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023194fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023195
23196# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000023197{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23198echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023199if test "${ac_cv_c_bigendian+set}" = set; then
23200 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023201else
Martin v. Löwis11437992002-04-12 09:54:03 +000023202 # See if sys/param.h defines the BYTE_ORDER macro.
23203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023204/* confdefs.h. */
23205_ACEOF
23206cat confdefs.h >>conftest.$ac_ext
23207cat >>conftest.$ac_ext <<_ACEOF
23208/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023209#include <sys/types.h>
23210#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023211
Martin v. Löwis11437992002-04-12 09:54:03 +000023212int
23213main ()
23214{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023215#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23216 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000023217 bogus endian macros
23218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023219
23220 ;
23221 return 0;
23222}
23223_ACEOF
23224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023225if { (ac_try="$ac_compile"
23226case "(($ac_try" in
23227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23228 *) ac_try_echo=$ac_try;;
23229esac
23230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023233 grep -v '^ *+' conftest.er1 >conftest.err
23234 rm -f conftest.er1
23235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023237 (exit $ac_status); } && {
23238 test -z "$ac_c_werror_flag" ||
23239 test ! -s conftest.err
23240 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023241 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000023242cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023243/* confdefs.h. */
23244_ACEOF
23245cat confdefs.h >>conftest.$ac_ext
23246cat >>conftest.$ac_ext <<_ACEOF
23247/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023248#include <sys/types.h>
23249#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023250
Martin v. Löwis11437992002-04-12 09:54:03 +000023251int
23252main ()
23253{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023254#if BYTE_ORDER != BIG_ENDIAN
23255 not big endian
23256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023257
23258 ;
23259 return 0;
23260}
23261_ACEOF
23262rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023263if { (ac_try="$ac_compile"
23264case "(($ac_try" in
23265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23266 *) ac_try_echo=$ac_try;;
23267esac
23268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023271 grep -v '^ *+' conftest.er1 >conftest.err
23272 rm -f conftest.er1
23273 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023275 (exit $ac_status); } && {
23276 test -z "$ac_c_werror_flag" ||
23277 test ! -s conftest.err
23278 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023279 ac_cv_c_bigendian=yes
23280else
Martin v. Löwis11437992002-04-12 09:54:03 +000023281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023282sed 's/^/| /' conftest.$ac_ext >&5
23283
Martin v. Löwiseba40652007-08-30 20:10:57 +000023284 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023286
23287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023288else
Martin v. Löwis11437992002-04-12 09:54:03 +000023289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023290sed 's/^/| /' conftest.$ac_ext >&5
23291
Martin v. Löwiseba40652007-08-30 20:10:57 +000023292 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023293if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023294 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023295 ac_cv_c_bigendian=unknown
23296 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023297/* confdefs.h. */
23298_ACEOF
23299cat confdefs.h >>conftest.$ac_ext
23300cat >>conftest.$ac_ext <<_ACEOF
23301/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023302short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23303short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023304void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023305short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23306short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023307void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023308int
23309main ()
23310{
23311 _ascii (); _ebcdic ();
23312 ;
23313 return 0;
23314}
23315_ACEOF
23316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023317if { (ac_try="$ac_compile"
23318case "(($ac_try" in
23319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23320 *) ac_try_echo=$ac_try;;
23321esac
23322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023325 grep -v '^ *+' conftest.er1 >conftest.err
23326 rm -f conftest.er1
23327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023329 (exit $ac_status); } && {
23330 test -z "$ac_c_werror_flag" ||
23331 test ! -s conftest.err
23332 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023333 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023334 ac_cv_c_bigendian=yes
23335fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023336if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023337 if test "$ac_cv_c_bigendian" = unknown; then
23338 ac_cv_c_bigendian=no
23339 else
23340 # finding both strings is unlikely to happen, but who knows?
23341 ac_cv_c_bigendian=unknown
23342 fi
23343fi
23344else
23345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023346sed 's/^/| /' conftest.$ac_ext >&5
23347
Martin v. Löwiseba40652007-08-30 20:10:57 +000023348
Martin v. Löwis11437992002-04-12 09:54:03 +000023349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023350
23351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023352else
23353 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023354/* confdefs.h. */
23355_ACEOF
23356cat confdefs.h >>conftest.$ac_ext
23357cat >>conftest.$ac_ext <<_ACEOF
23358/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023359$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023360int
23361main ()
23362{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023363
Guido van Rossumef2255b2000-03-10 22:30:29 +000023364 /* Are we little or big endian? From Harbison&Steele. */
23365 union
23366 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023367 long int l;
23368 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023369 } u;
23370 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023371 return u.c[sizeof (long int) - 1] == 1;
23372
23373 ;
23374 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023375}
Martin v. Löwis11437992002-04-12 09:54:03 +000023376_ACEOF
23377rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023378if { (ac_try="$ac_link"
23379case "(($ac_try" in
23380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23381 *) ac_try_echo=$ac_try;;
23382esac
23383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23384 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023385 ac_status=$?
23386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23387 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023388 { (case "(($ac_try" in
23389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23390 *) ac_try_echo=$ac_try;;
23391esac
23392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23393 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023394 ac_status=$?
23395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23396 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023397 ac_cv_c_bigendian=no
23398else
Martin v. Löwis11437992002-04-12 09:54:03 +000023399 echo "$as_me: program exited with status $ac_status" >&5
23400echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023401sed 's/^/| /' conftest.$ac_ext >&5
23402
Martin v. Löwis11437992002-04-12 09:54:03 +000023403( exit $ac_status )
23404ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406rm -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 +000023407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023408
23409
Martin v. Löwis11437992002-04-12 09:54:03 +000023410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023411
23412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023414{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23415echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023416case $ac_cv_c_bigendian in
23417 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023418
Martin v. Löwis11437992002-04-12 09:54:03 +000023419cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023420#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023421_ACEOF
23422 ;;
23423 no)
23424 ;;
23425 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023426 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023427presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023428echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023429presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23430 { (exit 1); exit 1; }; } ;;
23431esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023432
Michael W. Hudson54241132001-12-07 15:38:26 +000023433
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023434# Check whether right shifting a negative integer extends the sign bit
23435# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023436{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23437echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023438if test "${ac_cv_rshift_extends_sign+set}" = set; then
23439 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023440else
Martin v. Löwis11437992002-04-12 09:54:03 +000023441
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023442if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023443 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023444else
Martin v. Löwis11437992002-04-12 09:54:03 +000023445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023446/* confdefs.h. */
23447_ACEOF
23448cat confdefs.h >>conftest.$ac_ext
23449cat >>conftest.$ac_ext <<_ACEOF
23450/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023451
23452int main()
23453{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023454 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023455}
23456
Martin v. Löwis11437992002-04-12 09:54:03 +000023457_ACEOF
23458rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023459if { (ac_try="$ac_link"
23460case "(($ac_try" in
23461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23462 *) ac_try_echo=$ac_try;;
23463esac
23464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23465 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023466 ac_status=$?
23467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023469 { (case "(($ac_try" in
23470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23471 *) ac_try_echo=$ac_try;;
23472esac
23473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23474 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023475 ac_status=$?
23476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23477 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023478 ac_cv_rshift_extends_sign=yes
23479else
Martin v. Löwis11437992002-04-12 09:54:03 +000023480 echo "$as_me: program exited with status $ac_status" >&5
23481echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023482sed 's/^/| /' conftest.$ac_ext >&5
23483
Martin v. Löwis11437992002-04-12 09:54:03 +000023484( exit $ac_status )
23485ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023487rm -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 +000023488fi
23489
Martin v. Löwiseba40652007-08-30 20:10:57 +000023490
23491fi
23492
23493{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23494echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023495if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023496then
Martin v. Löwis11437992002-04-12 09:54:03 +000023497
23498cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023499#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023500_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023501
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023502fi
23503
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023504# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023505{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23506echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023507if test "${ac_cv_have_getc_unlocked+set}" = set; then
23508 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023509else
Martin v. Löwis11437992002-04-12 09:54:03 +000023510
23511cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023512/* confdefs.h. */
23513_ACEOF
23514cat confdefs.h >>conftest.$ac_ext
23515cat >>conftest.$ac_ext <<_ACEOF
23516/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023517#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023518int
23519main ()
23520{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023521
23522 FILE *f = fopen("/dev/null", "r");
23523 flockfile(f);
23524 getc_unlocked(f);
23525 funlockfile(f);
23526
Martin v. Löwis11437992002-04-12 09:54:03 +000023527 ;
23528 return 0;
23529}
23530_ACEOF
23531rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023532if { (ac_try="$ac_link"
23533case "(($ac_try" in
23534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23535 *) ac_try_echo=$ac_try;;
23536esac
23537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23538 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023540 grep -v '^ *+' conftest.er1 >conftest.err
23541 rm -f conftest.er1
23542 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023544 (exit $ac_status); } && {
23545 test -z "$ac_c_werror_flag" ||
23546 test ! -s conftest.err
23547 } && test -s conftest$ac_exeext &&
23548 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023549 ac_cv_have_getc_unlocked=yes
23550else
Martin v. Löwis11437992002-04-12 09:54:03 +000023551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023552sed 's/^/| /' conftest.$ac_ext >&5
23553
Martin v. Löwiseba40652007-08-30 20:10:57 +000023554 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023556
23557rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023558 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023559fi
23560
Martin v. Löwiseba40652007-08-30 20:10:57 +000023561{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23562echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023563if test "$ac_cv_have_getc_unlocked" = yes
23564then
Martin v. Löwis11437992002-04-12 09:54:03 +000023565
23566cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023567#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023568_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023569
23570fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023571
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023572# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023573# save the value of LIBS so we don't actually link Python with readline
23574LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023575
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023576# On some systems we need to link readline to a termcap compatible
23577# library. NOTE: Keep the precedence of listed libraries synchronised
23578# with setup.py.
23579py_cv_lib_readline=no
23580{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23581echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23582for py_libtermcap in "" ncursesw ncurses curses termcap; do
23583 if test -z "$py_libtermcap"; then
23584 READLINE_LIBS="-lreadline"
23585 else
23586 READLINE_LIBS="-lreadline -l$py_libtermcap"
23587 fi
23588 LIBS="$READLINE_LIBS $LIBS_no_readline"
23589 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023590/* confdefs.h. */
23591_ACEOF
23592cat confdefs.h >>conftest.$ac_ext
23593cat >>conftest.$ac_ext <<_ACEOF
23594/* end confdefs.h. */
23595
Martin v. Löwiseba40652007-08-30 20:10:57 +000023596/* Override any GCC internal prototype to avoid an error.
23597 Use char because int might match the return type of a GCC
23598 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023599#ifdef __cplusplus
23600extern "C"
23601#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023602char readline ();
23603int
23604main ()
23605{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023606return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023607 ;
23608 return 0;
23609}
23610_ACEOF
23611rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023612if { (ac_try="$ac_link"
23613case "(($ac_try" in
23614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23615 *) ac_try_echo=$ac_try;;
23616esac
23617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23618 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023619 ac_status=$?
23620 grep -v '^ *+' conftest.er1 >conftest.err
23621 rm -f conftest.er1
23622 cat conftest.err >&5
23623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023624 (exit $ac_status); } && {
23625 test -z "$ac_c_werror_flag" ||
23626 test ! -s conftest.err
23627 } && test -s conftest$ac_exeext &&
23628 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023629 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023630else
23631 echo "$as_me: failed program was:" >&5
23632sed 's/^/| /' conftest.$ac_ext >&5
23633
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023634
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023636
23637rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023638 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023639 if test $py_cv_lib_readline = yes; then
23640 break
23641 fi
23642done
23643# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23644#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023645if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023646 { echo "$as_me:$LINENO: result: none" >&5
23647echo "${ECHO_T}none" >&6; }
23648else
23649 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23650echo "${ECHO_T}$READLINE_LIBS" >&6; }
23651
23652cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023653#define HAVE_LIBREADLINE 1
23654_ACEOF
23655
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023656fi
23657
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023658# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023659{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23660echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023661if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23662 echo $ECHO_N "(cached) $ECHO_C" >&6
23663else
23664 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023665LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023666cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023667/* confdefs.h. */
23668_ACEOF
23669cat confdefs.h >>conftest.$ac_ext
23670cat >>conftest.$ac_ext <<_ACEOF
23671/* end confdefs.h. */
23672
Martin v. Löwiseba40652007-08-30 20:10:57 +000023673/* Override any GCC internal prototype to avoid an error.
23674 Use char because int might match the return type of a GCC
23675 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023676#ifdef __cplusplus
23677extern "C"
23678#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023679char rl_callback_handler_install ();
23680int
23681main ()
23682{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023683return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023684 ;
23685 return 0;
23686}
23687_ACEOF
23688rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023689if { (ac_try="$ac_link"
23690case "(($ac_try" in
23691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23692 *) ac_try_echo=$ac_try;;
23693esac
23694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23695 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023697 grep -v '^ *+' conftest.er1 >conftest.err
23698 rm -f conftest.er1
23699 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023701 (exit $ac_status); } && {
23702 test -z "$ac_c_werror_flag" ||
23703 test ! -s conftest.err
23704 } && test -s conftest$ac_exeext &&
23705 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023706 ac_cv_lib_readline_rl_callback_handler_install=yes
23707else
23708 echo "$as_me: failed program was:" >&5
23709sed 's/^/| /' conftest.$ac_ext >&5
23710
Martin v. Löwiseba40652007-08-30 20:10:57 +000023711 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023713
23714rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023715 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023716LIBS=$ac_check_lib_save_LIBS
23717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023718{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23719echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023720if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23721
23722cat >>confdefs.h <<\_ACEOF
23723#define HAVE_RL_CALLBACK 1
23724_ACEOF
23725
23726fi
23727
23728
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023729# check for readline 2.2
23730cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023731/* confdefs.h. */
23732_ACEOF
23733cat confdefs.h >>conftest.$ac_ext
23734cat >>conftest.$ac_ext <<_ACEOF
23735/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023736#include <readline/readline.h>
23737_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023738if { (ac_try="$ac_cpp conftest.$ac_ext"
23739case "(($ac_try" in
23740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23741 *) ac_try_echo=$ac_try;;
23742esac
23743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23744 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023745 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023746 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023747 rm -f conftest.er1
23748 cat conftest.err >&5
23749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023750 (exit $ac_status); } >/dev/null && {
23751 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23752 test ! -s conftest.err
23753 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023754 have_readline=yes
23755else
23756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023757sed 's/^/| /' conftest.$ac_ext >&5
23758
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023759 have_readline=no
23760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023761
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023762rm -f conftest.err conftest.$ac_ext
23763if test $have_readline = yes
23764then
23765 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023766/* confdefs.h. */
23767_ACEOF
23768cat confdefs.h >>conftest.$ac_ext
23769cat >>conftest.$ac_ext <<_ACEOF
23770/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023771#include <readline/readline.h>
23772
23773_ACEOF
23774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023775 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023776
23777cat >>confdefs.h <<\_ACEOF
23778#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23779_ACEOF
23780
23781fi
23782rm -f conftest*
23783
23784fi
23785
Martin v. Löwis0daad592001-09-30 21:09:59 +000023786# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023787{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23788echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023789if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23790 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023791else
Martin v. Löwis11437992002-04-12 09:54:03 +000023792 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023793LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023795/* confdefs.h. */
23796_ACEOF
23797cat confdefs.h >>conftest.$ac_ext
23798cat >>conftest.$ac_ext <<_ACEOF
23799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023800
Martin v. Löwiseba40652007-08-30 20:10:57 +000023801/* Override any GCC internal prototype to avoid an error.
23802 Use char because int might match the return type of a GCC
23803 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023804#ifdef __cplusplus
23805extern "C"
23806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023807char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023808int
23809main ()
23810{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023811return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023812 ;
23813 return 0;
23814}
23815_ACEOF
23816rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023817if { (ac_try="$ac_link"
23818case "(($ac_try" in
23819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23820 *) ac_try_echo=$ac_try;;
23821esac
23822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23823 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023825 grep -v '^ *+' conftest.er1 >conftest.err
23826 rm -f conftest.er1
23827 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023829 (exit $ac_status); } && {
23830 test -z "$ac_c_werror_flag" ||
23831 test ! -s conftest.err
23832 } && test -s conftest$ac_exeext &&
23833 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023834 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023835else
Martin v. Löwis11437992002-04-12 09:54:03 +000023836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023837sed 's/^/| /' conftest.$ac_ext >&5
23838
Martin v. Löwiseba40652007-08-30 20:10:57 +000023839 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023841
23842rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023844LIBS=$ac_check_lib_save_LIBS
23845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023846{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23847echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023848if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023849
Martin v. Löwis11437992002-04-12 09:54:03 +000023850cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023851#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023852_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023853
Martin v. Löwis0daad592001-09-30 21:09:59 +000023854fi
23855
Michael W. Hudson54241132001-12-07 15:38:26 +000023856
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023857# also in 4.0
23858{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23859echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23860if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23861 echo $ECHO_N "(cached) $ECHO_C" >&6
23862else
23863 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023864LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023865cat >conftest.$ac_ext <<_ACEOF
23866/* confdefs.h. */
23867_ACEOF
23868cat confdefs.h >>conftest.$ac_ext
23869cat >>conftest.$ac_ext <<_ACEOF
23870/* end confdefs.h. */
23871
23872/* Override any GCC internal prototype to avoid an error.
23873 Use char because int might match the return type of a GCC
23874 builtin and then its argument prototype would still apply. */
23875#ifdef __cplusplus
23876extern "C"
23877#endif
23878char rl_completion_display_matches_hook ();
23879int
23880main ()
23881{
23882return rl_completion_display_matches_hook ();
23883 ;
23884 return 0;
23885}
23886_ACEOF
23887rm -f conftest.$ac_objext conftest$ac_exeext
23888if { (ac_try="$ac_link"
23889case "(($ac_try" in
23890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23891 *) ac_try_echo=$ac_try;;
23892esac
23893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23894 (eval "$ac_link") 2>conftest.er1
23895 ac_status=$?
23896 grep -v '^ *+' conftest.er1 >conftest.err
23897 rm -f conftest.er1
23898 cat conftest.err >&5
23899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23900 (exit $ac_status); } && {
23901 test -z "$ac_c_werror_flag" ||
23902 test ! -s conftest.err
23903 } && test -s conftest$ac_exeext &&
23904 $as_test_x conftest$ac_exeext; then
23905 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23906else
23907 echo "$as_me: failed program was:" >&5
23908sed 's/^/| /' conftest.$ac_ext >&5
23909
23910 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23911fi
23912
23913rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23914 conftest$ac_exeext conftest.$ac_ext
23915LIBS=$ac_check_lib_save_LIBS
23916fi
23917{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23918echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23919if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23920
23921cat >>confdefs.h <<\_ACEOF
23922#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23923_ACEOF
23924
23925fi
23926
23927
Martin v. Löwis0daad592001-09-30 21:09:59 +000023928# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023929{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23930echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023931if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23932 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023933else
Martin v. Löwis11437992002-04-12 09:54:03 +000023934 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023935LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023936cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023937/* confdefs.h. */
23938_ACEOF
23939cat confdefs.h >>conftest.$ac_ext
23940cat >>conftest.$ac_ext <<_ACEOF
23941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023942
Martin v. Löwiseba40652007-08-30 20:10:57 +000023943/* Override any GCC internal prototype to avoid an error.
23944 Use char because int might match the return type of a GCC
23945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023946#ifdef __cplusplus
23947extern "C"
23948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023949char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023950int
23951main ()
23952{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023953return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023954 ;
23955 return 0;
23956}
23957_ACEOF
23958rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023959if { (ac_try="$ac_link"
23960case "(($ac_try" in
23961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23962 *) ac_try_echo=$ac_try;;
23963esac
23964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23965 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023967 grep -v '^ *+' conftest.er1 >conftest.err
23968 rm -f conftest.er1
23969 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023971 (exit $ac_status); } && {
23972 test -z "$ac_c_werror_flag" ||
23973 test ! -s conftest.err
23974 } && test -s conftest$ac_exeext &&
23975 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023976 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023977else
Martin v. Löwis11437992002-04-12 09:54:03 +000023978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023979sed 's/^/| /' conftest.$ac_ext >&5
23980
Martin v. Löwiseba40652007-08-30 20:10:57 +000023981 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023983
23984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023986LIBS=$ac_check_lib_save_LIBS
23987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023988{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23989echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023990if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023991
Martin v. Löwis11437992002-04-12 09:54:03 +000023992cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023993#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023994_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023995
Guido van Rossum353ae582001-07-10 16:45:32 +000023996fi
23997
Jack Jansendd19cf82001-12-06 22:36:17 +000023998
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023999# also in readline 4.2
24000cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024001/* confdefs.h. */
24002_ACEOF
24003cat confdefs.h >>conftest.$ac_ext
24004cat >>conftest.$ac_ext <<_ACEOF
24005/* end confdefs.h. */
24006#include <readline/readline.h>
24007_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024008if { (ac_try="$ac_cpp conftest.$ac_ext"
24009case "(($ac_try" in
24010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24011 *) ac_try_echo=$ac_try;;
24012esac
24013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24014 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024015 ac_status=$?
24016 grep -v '^ *+' conftest.er1 >conftest.err
24017 rm -f conftest.er1
24018 cat conftest.err >&5
24019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024020 (exit $ac_status); } >/dev/null && {
24021 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24022 test ! -s conftest.err
24023 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024024 have_readline=yes
24025else
24026 echo "$as_me: failed program was:" >&5
24027sed 's/^/| /' conftest.$ac_ext >&5
24028
24029 have_readline=no
24030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024031
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024032rm -f conftest.err conftest.$ac_ext
24033if test $have_readline = yes
24034then
24035 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024036/* confdefs.h. */
24037_ACEOF
24038cat confdefs.h >>conftest.$ac_ext
24039cat >>conftest.$ac_ext <<_ACEOF
24040/* end confdefs.h. */
24041#include <readline/readline.h>
24042
24043_ACEOF
24044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24045 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24046
24047cat >>confdefs.h <<\_ACEOF
24048#define HAVE_RL_CATCH_SIGNAL 1
24049_ACEOF
24050
24051fi
24052rm -f conftest*
24053
24054fi
24055
Martin v. Löwis82bca632006-02-10 20:49:30 +000024056# End of readline checks: restore LIBS
24057LIBS=$LIBS_no_readline
24058
Martin v. Löwiseba40652007-08-30 20:10:57 +000024059{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24060echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024061if test "${ac_cv_broken_nice+set}" = set; then
24062 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024063else
Martin v. Löwis11437992002-04-12 09:54:03 +000024064
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024065if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024066 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024067else
Martin v. Löwis11437992002-04-12 09:54:03 +000024068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024069/* confdefs.h. */
24070_ACEOF
24071cat confdefs.h >>conftest.$ac_ext
24072cat >>conftest.$ac_ext <<_ACEOF
24073/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024074
24075int main()
24076{
24077 int val1 = nice(1);
24078 if (val1 != -1 && val1 == nice(2))
24079 exit(0);
24080 exit(1);
24081}
24082
Martin v. Löwis11437992002-04-12 09:54:03 +000024083_ACEOF
24084rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024085if { (ac_try="$ac_link"
24086case "(($ac_try" in
24087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24088 *) ac_try_echo=$ac_try;;
24089esac
24090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24091 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024092 ac_status=$?
24093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24094 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024095 { (case "(($ac_try" in
24096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24097 *) ac_try_echo=$ac_try;;
24098esac
24099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24100 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024101 ac_status=$?
24102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24103 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024104 ac_cv_broken_nice=yes
24105else
Martin v. Löwis11437992002-04-12 09:54:03 +000024106 echo "$as_me: program exited with status $ac_status" >&5
24107echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024108sed 's/^/| /' conftest.$ac_ext >&5
24109
Martin v. Löwis11437992002-04-12 09:54:03 +000024110( exit $ac_status )
24111ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024113rm -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 +000024114fi
24115
Martin v. Löwiseba40652007-08-30 20:10:57 +000024116
24117fi
24118
24119{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24120echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024121if test "$ac_cv_broken_nice" = yes
24122then
Martin v. Löwis11437992002-04-12 09:54:03 +000024123
24124cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024125#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024126_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024127
24128fi
24129
Martin v. Löwiseba40652007-08-30 20:10:57 +000024130{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24131echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024132if test "$cross_compiling" = yes; then
24133 ac_cv_broken_poll=no
24134else
24135 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024136/* confdefs.h. */
24137_ACEOF
24138cat confdefs.h >>conftest.$ac_ext
24139cat >>conftest.$ac_ext <<_ACEOF
24140/* end confdefs.h. */
24141
24142#include <poll.h>
24143
24144int main (void)
24145 {
24146 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24147
24148 close (42);
24149
24150 int poll_test = poll (&poll_struct, 1, 0);
24151
24152 if (poll_test < 0)
24153 {
24154 exit(0);
24155 }
24156 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24157 {
24158 exit(0);
24159 }
24160 else
24161 {
24162 exit(1);
24163 }
24164 }
24165
24166_ACEOF
24167rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024168if { (ac_try="$ac_link"
24169case "(($ac_try" in
24170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24171 *) ac_try_echo=$ac_try;;
24172esac
24173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24174 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024175 ac_status=$?
24176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24177 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024178 { (case "(($ac_try" in
24179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24180 *) ac_try_echo=$ac_try;;
24181esac
24182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24183 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024184 ac_status=$?
24185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24186 (exit $ac_status); }; }; then
24187 ac_cv_broken_poll=yes
24188else
24189 echo "$as_me: program exited with status $ac_status" >&5
24190echo "$as_me: failed program was:" >&5
24191sed 's/^/| /' conftest.$ac_ext >&5
24192
24193( exit $ac_status )
24194ac_cv_broken_poll=no
24195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024196rm -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 +000024197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024198
24199
24200{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24201echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024202if test "$ac_cv_broken_poll" = yes
24203then
24204
24205cat >>confdefs.h <<\_ACEOF
24206#define HAVE_BROKEN_POLL 1
24207_ACEOF
24208
24209fi
24210
Brett Cannon43802422005-02-10 20:48:03 +000024211# 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 +000024212# (which is not required by ISO C or UNIX spec) and/or if we support
24213# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000024214{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24215echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024216if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
24217 echo $ECHO_N "(cached) $ECHO_C" >&6
24218else
24219 cat >conftest.$ac_ext <<_ACEOF
24220/* confdefs.h. */
24221_ACEOF
24222cat confdefs.h >>conftest.$ac_ext
24223cat >>conftest.$ac_ext <<_ACEOF
24224/* end confdefs.h. */
24225#include <sys/types.h>
24226#include <$ac_cv_struct_tm>
24227
24228
24229int
24230main ()
24231{
24232static struct tm ac_aggr;
24233if (ac_aggr.tm_zone)
24234return 0;
24235 ;
24236 return 0;
24237}
24238_ACEOF
24239rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024240if { (ac_try="$ac_compile"
24241case "(($ac_try" in
24242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24243 *) ac_try_echo=$ac_try;;
24244esac
24245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24246 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024247 ac_status=$?
24248 grep -v '^ *+' conftest.er1 >conftest.err
24249 rm -f conftest.er1
24250 cat conftest.err >&5
24251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024252 (exit $ac_status); } && {
24253 test -z "$ac_c_werror_flag" ||
24254 test ! -s conftest.err
24255 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024256 ac_cv_member_struct_tm_tm_zone=yes
24257else
24258 echo "$as_me: failed program was:" >&5
24259sed 's/^/| /' conftest.$ac_ext >&5
24260
Martin v. Löwiseba40652007-08-30 20:10:57 +000024261 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024262/* confdefs.h. */
24263_ACEOF
24264cat confdefs.h >>conftest.$ac_ext
24265cat >>conftest.$ac_ext <<_ACEOF
24266/* end confdefs.h. */
24267#include <sys/types.h>
24268#include <$ac_cv_struct_tm>
24269
24270
24271int
24272main ()
24273{
24274static struct tm ac_aggr;
24275if (sizeof ac_aggr.tm_zone)
24276return 0;
24277 ;
24278 return 0;
24279}
24280_ACEOF
24281rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024282if { (ac_try="$ac_compile"
24283case "(($ac_try" in
24284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24285 *) ac_try_echo=$ac_try;;
24286esac
24287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24288 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024289 ac_status=$?
24290 grep -v '^ *+' conftest.er1 >conftest.err
24291 rm -f conftest.er1
24292 cat conftest.err >&5
24293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024294 (exit $ac_status); } && {
24295 test -z "$ac_c_werror_flag" ||
24296 test ! -s conftest.err
24297 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024298 ac_cv_member_struct_tm_tm_zone=yes
24299else
24300 echo "$as_me: failed program was:" >&5
24301sed 's/^/| /' conftest.$ac_ext >&5
24302
Martin v. Löwiseba40652007-08-30 20:10:57 +000024303 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024305
24306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024308
24309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024311{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24312echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024313if test $ac_cv_member_struct_tm_tm_zone = yes; then
24314
24315cat >>confdefs.h <<_ACEOF
24316#define HAVE_STRUCT_TM_TM_ZONE 1
24317_ACEOF
24318
24319
24320fi
24321
24322if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24323
24324cat >>confdefs.h <<\_ACEOF
24325#define HAVE_TM_ZONE 1
24326_ACEOF
24327
24328else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024329 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24330echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24331if test "${ac_cv_have_decl_tzname+set}" = set; then
24332 echo $ECHO_N "(cached) $ECHO_C" >&6
24333else
24334 cat >conftest.$ac_ext <<_ACEOF
24335/* confdefs.h. */
24336_ACEOF
24337cat confdefs.h >>conftest.$ac_ext
24338cat >>conftest.$ac_ext <<_ACEOF
24339/* end confdefs.h. */
24340#include <time.h>
24341
24342int
24343main ()
24344{
24345#ifndef tzname
24346 (void) tzname;
24347#endif
24348
24349 ;
24350 return 0;
24351}
24352_ACEOF
24353rm -f conftest.$ac_objext
24354if { (ac_try="$ac_compile"
24355case "(($ac_try" in
24356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24357 *) ac_try_echo=$ac_try;;
24358esac
24359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24360 (eval "$ac_compile") 2>conftest.er1
24361 ac_status=$?
24362 grep -v '^ *+' conftest.er1 >conftest.err
24363 rm -f conftest.er1
24364 cat conftest.err >&5
24365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24366 (exit $ac_status); } && {
24367 test -z "$ac_c_werror_flag" ||
24368 test ! -s conftest.err
24369 } && test -s conftest.$ac_objext; then
24370 ac_cv_have_decl_tzname=yes
24371else
24372 echo "$as_me: failed program was:" >&5
24373sed 's/^/| /' conftest.$ac_ext >&5
24374
24375 ac_cv_have_decl_tzname=no
24376fi
24377
24378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24379fi
24380{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24381echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24382if test $ac_cv_have_decl_tzname = yes; then
24383
24384cat >>confdefs.h <<_ACEOF
24385#define HAVE_DECL_TZNAME 1
24386_ACEOF
24387
24388
24389else
24390 cat >>confdefs.h <<_ACEOF
24391#define HAVE_DECL_TZNAME 0
24392_ACEOF
24393
24394
24395fi
24396
24397
24398 { echo "$as_me:$LINENO: checking for tzname" >&5
24399echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024400if test "${ac_cv_var_tzname+set}" = set; then
24401 echo $ECHO_N "(cached) $ECHO_C" >&6
24402else
24403 cat >conftest.$ac_ext <<_ACEOF
24404/* confdefs.h. */
24405_ACEOF
24406cat confdefs.h >>conftest.$ac_ext
24407cat >>conftest.$ac_ext <<_ACEOF
24408/* end confdefs.h. */
24409#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000024410#if !HAVE_DECL_TZNAME
24411extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024412#endif
24413
24414int
24415main ()
24416{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024417return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024418 ;
24419 return 0;
24420}
24421_ACEOF
24422rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024423if { (ac_try="$ac_link"
24424case "(($ac_try" in
24425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24426 *) ac_try_echo=$ac_try;;
24427esac
24428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24429 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024430 ac_status=$?
24431 grep -v '^ *+' conftest.er1 >conftest.err
24432 rm -f conftest.er1
24433 cat conftest.err >&5
24434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024435 (exit $ac_status); } && {
24436 test -z "$ac_c_werror_flag" ||
24437 test ! -s conftest.err
24438 } && test -s conftest$ac_exeext &&
24439 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024440 ac_cv_var_tzname=yes
24441else
24442 echo "$as_me: failed program was:" >&5
24443sed 's/^/| /' conftest.$ac_ext >&5
24444
Martin v. Löwiseba40652007-08-30 20:10:57 +000024445 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024447
24448rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024449 conftest$ac_exeext conftest.$ac_ext
24450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024451{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24452echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024453 if test $ac_cv_var_tzname = yes; then
24454
24455cat >>confdefs.h <<\_ACEOF
24456#define HAVE_TZNAME 1
24457_ACEOF
24458
24459 fi
24460fi
24461
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024462
Martin v. Löwis1d459062005-03-14 21:23:33 +000024463# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024464{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24465echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024466if test "${ac_cv_working_tzset+set}" = set; then
24467 echo $ECHO_N "(cached) $ECHO_C" >&6
24468else
24469
24470if test "$cross_compiling" = yes; then
24471 ac_cv_working_tzset=no
24472else
24473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024474/* confdefs.h. */
24475_ACEOF
24476cat confdefs.h >>conftest.$ac_ext
24477cat >>conftest.$ac_ext <<_ACEOF
24478/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024479
24480#include <stdlib.h>
24481#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024482#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024483
24484#if HAVE_TZNAME
24485extern char *tzname[];
24486#endif
24487
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024488int main()
24489{
Brett Cannon18367812003-09-19 00:59:16 +000024490 /* Note that we need to ensure that not only does tzset(3)
24491 do 'something' with localtime, but it works as documented
24492 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024493 This includes making sure that tzname is set properly if
24494 tm->tm_zone does not exist since it is the alternative way
24495 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024496
24497 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024498 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024499 */
24500
Martin v. Löwis1d459062005-03-14 21:23:33 +000024501 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024502 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24503
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024504 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024505 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024506 if (localtime(&groundhogday)->tm_hour != 0)
24507 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024508#if HAVE_TZNAME
24509 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24510 if (strcmp(tzname[0], "UTC") ||
24511 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24512 exit(1);
24513#endif
Brett Cannon18367812003-09-19 00:59:16 +000024514
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024515 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024516 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024517 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024518 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024519#if HAVE_TZNAME
24520 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24521 exit(1);
24522#endif
Brett Cannon18367812003-09-19 00:59:16 +000024523
24524 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24525 tzset();
24526 if (localtime(&groundhogday)->tm_hour != 11)
24527 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024528#if HAVE_TZNAME
24529 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24530 exit(1);
24531#endif
24532
24533#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024534 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24535 exit(1);
24536 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24537 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024538#endif
Brett Cannon18367812003-09-19 00:59:16 +000024539
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024540 exit(0);
24541}
24542
24543_ACEOF
24544rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024545if { (ac_try="$ac_link"
24546case "(($ac_try" in
24547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24548 *) ac_try_echo=$ac_try;;
24549esac
24550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24551 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024552 ac_status=$?
24553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024555 { (case "(($ac_try" in
24556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24557 *) ac_try_echo=$ac_try;;
24558esac
24559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24560 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024561 ac_status=$?
24562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24563 (exit $ac_status); }; }; then
24564 ac_cv_working_tzset=yes
24565else
24566 echo "$as_me: program exited with status $ac_status" >&5
24567echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024568sed 's/^/| /' conftest.$ac_ext >&5
24569
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024570( exit $ac_status )
24571ac_cv_working_tzset=no
24572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024573rm -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 +000024574fi
24575
Martin v. Löwiseba40652007-08-30 20:10:57 +000024576
24577fi
24578
24579{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24580echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024581if test "$ac_cv_working_tzset" = yes
24582then
24583
24584cat >>confdefs.h <<\_ACEOF
24585#define HAVE_WORKING_TZSET 1
24586_ACEOF
24587
24588fi
24589
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024590# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024591{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24592echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024593if test "${ac_cv_stat_tv_nsec+set}" = set; then
24594 echo $ECHO_N "(cached) $ECHO_C" >&6
24595else
24596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024597/* confdefs.h. */
24598_ACEOF
24599cat confdefs.h >>conftest.$ac_ext
24600cat >>conftest.$ac_ext <<_ACEOF
24601/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024602#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024603int
24604main ()
24605{
24606
24607struct stat st;
24608st.st_mtim.tv_nsec = 1;
24609
24610 ;
24611 return 0;
24612}
24613_ACEOF
24614rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024615if { (ac_try="$ac_compile"
24616case "(($ac_try" in
24617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24618 *) ac_try_echo=$ac_try;;
24619esac
24620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24621 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024623 grep -v '^ *+' conftest.er1 >conftest.err
24624 rm -f conftest.er1
24625 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024627 (exit $ac_status); } && {
24628 test -z "$ac_c_werror_flag" ||
24629 test ! -s conftest.err
24630 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024631 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024632else
24633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024634sed 's/^/| /' conftest.$ac_ext >&5
24635
Martin v. Löwiseba40652007-08-30 20:10:57 +000024636 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024637fi
24638
Martin v. Löwiseba40652007-08-30 20:10:57 +000024639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24640fi
24641
24642{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24643echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024644if test "$ac_cv_stat_tv_nsec" = yes
24645then
24646
24647cat >>confdefs.h <<\_ACEOF
24648#define HAVE_STAT_TV_NSEC 1
24649_ACEOF
24650
24651fi
24652
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024653# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024654{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24655echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024656if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24657 echo $ECHO_N "(cached) $ECHO_C" >&6
24658else
24659 cat >conftest.$ac_ext <<_ACEOF
24660/* confdefs.h. */
24661_ACEOF
24662cat confdefs.h >>conftest.$ac_ext
24663cat >>conftest.$ac_ext <<_ACEOF
24664/* end confdefs.h. */
24665#include <sys/stat.h>
24666int
24667main ()
24668{
24669
24670struct stat st;
24671st.st_mtimespec.tv_nsec = 1;
24672
24673 ;
24674 return 0;
24675}
24676_ACEOF
24677rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024678if { (ac_try="$ac_compile"
24679case "(($ac_try" in
24680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24681 *) ac_try_echo=$ac_try;;
24682esac
24683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024685 ac_status=$?
24686 grep -v '^ *+' conftest.er1 >conftest.err
24687 rm -f conftest.er1
24688 cat conftest.err >&5
24689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024690 (exit $ac_status); } && {
24691 test -z "$ac_c_werror_flag" ||
24692 test ! -s conftest.err
24693 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024694 ac_cv_stat_tv_nsec2=yes
24695else
24696 echo "$as_me: failed program was:" >&5
24697sed 's/^/| /' conftest.$ac_ext >&5
24698
Martin v. Löwiseba40652007-08-30 20:10:57 +000024699 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024700fi
24701
Martin v. Löwiseba40652007-08-30 20:10:57 +000024702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24703fi
24704
24705{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24706echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024707if test "$ac_cv_stat_tv_nsec2" = yes
24708then
24709
24710cat >>confdefs.h <<\_ACEOF
24711#define HAVE_STAT_TV_NSEC2 1
24712_ACEOF
24713
24714fi
24715
Jack Jansen666b1e72001-10-31 12:11:48 +000024716# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024717{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24718echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024719if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24720 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024721else
Martin v. Löwis11437992002-04-12 09:54:03 +000024722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024723/* confdefs.h. */
24724_ACEOF
24725cat confdefs.h >>conftest.$ac_ext
24726cat >>conftest.$ac_ext <<_ACEOF
24727/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024728#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024729int
24730main ()
24731{
Jack Jansen666b1e72001-10-31 12:11:48 +000024732
24733 int rtn;
24734 rtn = mvwdelch(0,0,0);
24735
Martin v. Löwis11437992002-04-12 09:54:03 +000024736 ;
24737 return 0;
24738}
24739_ACEOF
24740rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024741if { (ac_try="$ac_compile"
24742case "(($ac_try" in
24743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24744 *) ac_try_echo=$ac_try;;
24745esac
24746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024749 grep -v '^ *+' conftest.er1 >conftest.err
24750 rm -f conftest.er1
24751 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024753 (exit $ac_status); } && {
24754 test -z "$ac_c_werror_flag" ||
24755 test ! -s conftest.err
24756 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024757 ac_cv_mvwdelch_is_expression=yes
24758else
Martin v. Löwis11437992002-04-12 09:54:03 +000024759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024760sed 's/^/| /' conftest.$ac_ext >&5
24761
Martin v. Löwiseba40652007-08-30 20:10:57 +000024762 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024763fi
24764
Martin v. Löwiseba40652007-08-30 20:10:57 +000024765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24766fi
24767
24768{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24769echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024770
24771if test "$ac_cv_mvwdelch_is_expression" = yes
24772then
Martin v. Löwis11437992002-04-12 09:54:03 +000024773
24774cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024775#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024776_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024777
24778fi
24779
Martin v. Löwiseba40652007-08-30 20:10:57 +000024780{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24781echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024782if test "${ac_cv_window_has_flags+set}" = set; then
24783 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024784else
Martin v. Löwis11437992002-04-12 09:54:03 +000024785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024786/* confdefs.h. */
24787_ACEOF
24788cat confdefs.h >>conftest.$ac_ext
24789cat >>conftest.$ac_ext <<_ACEOF
24790/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024791#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024792int
24793main ()
24794{
Jack Jansen666b1e72001-10-31 12:11:48 +000024795
24796 WINDOW *w;
24797 w->_flags = 0;
24798
Martin v. Löwis11437992002-04-12 09:54:03 +000024799 ;
24800 return 0;
24801}
24802_ACEOF
24803rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024804if { (ac_try="$ac_compile"
24805case "(($ac_try" in
24806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24807 *) ac_try_echo=$ac_try;;
24808esac
24809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024812 grep -v '^ *+' conftest.er1 >conftest.err
24813 rm -f conftest.er1
24814 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024816 (exit $ac_status); } && {
24817 test -z "$ac_c_werror_flag" ||
24818 test ! -s conftest.err
24819 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024820 ac_cv_window_has_flags=yes
24821else
Martin v. Löwis11437992002-04-12 09:54:03 +000024822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024823sed 's/^/| /' conftest.$ac_ext >&5
24824
Martin v. Löwiseba40652007-08-30 20:10:57 +000024825 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024826fi
24827
Martin v. Löwiseba40652007-08-30 20:10:57 +000024828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24829fi
24830
24831{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24832echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024833
Jack Jansen666b1e72001-10-31 12:11:48 +000024834
24835if test "$ac_cv_window_has_flags" = yes
24836then
Martin v. Löwis11437992002-04-12 09:54:03 +000024837
24838cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024839#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024840_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024841
24842fi
24843
Martin v. Löwiseba40652007-08-30 20:10:57 +000024844{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24845echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024846cat >conftest.$ac_ext <<_ACEOF
24847/* confdefs.h. */
24848_ACEOF
24849cat confdefs.h >>conftest.$ac_ext
24850cat >>conftest.$ac_ext <<_ACEOF
24851/* end confdefs.h. */
24852#include <curses.h>
24853int
24854main ()
24855{
24856void *x=is_term_resized
24857 ;
24858 return 0;
24859}
24860_ACEOF
24861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024862if { (ac_try="$ac_compile"
24863case "(($ac_try" in
24864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24865 *) ac_try_echo=$ac_try;;
24866esac
24867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24868 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024869 ac_status=$?
24870 grep -v '^ *+' conftest.er1 >conftest.err
24871 rm -f conftest.er1
24872 cat conftest.err >&5
24873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024874 (exit $ac_status); } && {
24875 test -z "$ac_c_werror_flag" ||
24876 test ! -s conftest.err
24877 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024878
24879cat >>confdefs.h <<\_ACEOF
24880#define HAVE_CURSES_IS_TERM_RESIZED 1
24881_ACEOF
24882
Martin v. Löwiseba40652007-08-30 20:10:57 +000024883 { echo "$as_me:$LINENO: result: yes" >&5
24884echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024885else
24886 echo "$as_me: failed program was:" >&5
24887sed 's/^/| /' conftest.$ac_ext >&5
24888
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889 { echo "$as_me:$LINENO: result: no" >&5
24890echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024891
24892fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024893
Martin v. Löwiseba40652007-08-30 20:10:57 +000024894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24895
24896{ echo "$as_me:$LINENO: checking for resize_term" >&5
24897echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024898cat >conftest.$ac_ext <<_ACEOF
24899/* confdefs.h. */
24900_ACEOF
24901cat confdefs.h >>conftest.$ac_ext
24902cat >>conftest.$ac_ext <<_ACEOF
24903/* end confdefs.h. */
24904#include <curses.h>
24905int
24906main ()
24907{
24908void *x=resize_term
24909 ;
24910 return 0;
24911}
24912_ACEOF
24913rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024914if { (ac_try="$ac_compile"
24915case "(($ac_try" in
24916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24917 *) ac_try_echo=$ac_try;;
24918esac
24919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24920 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024921 ac_status=$?
24922 grep -v '^ *+' conftest.er1 >conftest.err
24923 rm -f conftest.er1
24924 cat conftest.err >&5
24925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024926 (exit $ac_status); } && {
24927 test -z "$ac_c_werror_flag" ||
24928 test ! -s conftest.err
24929 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024930
24931cat >>confdefs.h <<\_ACEOF
24932#define HAVE_CURSES_RESIZE_TERM 1
24933_ACEOF
24934
Martin v. Löwiseba40652007-08-30 20:10:57 +000024935 { echo "$as_me:$LINENO: result: yes" >&5
24936echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024937else
24938 echo "$as_me: failed program was:" >&5
24939sed 's/^/| /' conftest.$ac_ext >&5
24940
Martin v. Löwiseba40652007-08-30 20:10:57 +000024941 { echo "$as_me:$LINENO: result: no" >&5
24942echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024943
24944fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024945
Martin v. Löwiseba40652007-08-30 20:10:57 +000024946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24947
24948{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24949echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024950cat >conftest.$ac_ext <<_ACEOF
24951/* confdefs.h. */
24952_ACEOF
24953cat confdefs.h >>conftest.$ac_ext
24954cat >>conftest.$ac_ext <<_ACEOF
24955/* end confdefs.h. */
24956#include <curses.h>
24957int
24958main ()
24959{
24960void *x=resizeterm
24961 ;
24962 return 0;
24963}
24964_ACEOF
24965rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024966if { (ac_try="$ac_compile"
24967case "(($ac_try" in
24968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24969 *) ac_try_echo=$ac_try;;
24970esac
24971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24972 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024973 ac_status=$?
24974 grep -v '^ *+' conftest.er1 >conftest.err
24975 rm -f conftest.er1
24976 cat conftest.err >&5
24977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024978 (exit $ac_status); } && {
24979 test -z "$ac_c_werror_flag" ||
24980 test ! -s conftest.err
24981 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024982
24983cat >>confdefs.h <<\_ACEOF
24984#define HAVE_CURSES_RESIZETERM 1
24985_ACEOF
24986
Martin v. Löwiseba40652007-08-30 20:10:57 +000024987 { echo "$as_me:$LINENO: result: yes" >&5
24988echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024989else
24990 echo "$as_me: failed program was:" >&5
24991sed 's/^/| /' conftest.$ac_ext >&5
24992
Martin v. Löwiseba40652007-08-30 20:10:57 +000024993 { echo "$as_me:$LINENO: result: no" >&5
24994echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024995
24996fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024997
Martin v. Löwiseba40652007-08-30 20:10:57 +000024998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24999
25000{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25001echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025002
25003if test -r /dev/ptmx
25004then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025005 { echo "$as_me:$LINENO: result: yes" >&5
25006echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025007
25008cat >>confdefs.h <<\_ACEOF
25009#define HAVE_DEV_PTMX 1
25010_ACEOF
25011
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025012else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025013 { echo "$as_me:$LINENO: result: no" >&5
25014echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025015fi
25016
Martin v. Löwiseba40652007-08-30 20:10:57 +000025017{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25018echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025019
25020if test -r /dev/ptc
25021then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025022 { echo "$as_me:$LINENO: result: yes" >&5
25023echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025024
25025cat >>confdefs.h <<\_ACEOF
25026#define HAVE_DEV_PTC 1
25027_ACEOF
25028
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025029else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025030 { echo "$as_me:$LINENO: result: no" >&5
25031echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025032fi
25033
Martin v. Löwiseba40652007-08-30 20:10:57 +000025034{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25035echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025036if test "$cross_compiling" = yes; then
25037 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
25038See \`config.log' for more details." >&5
25039echo "$as_me: error: cannot run test program while cross compiling
25040See \`config.log' for more details." >&2;}
25041 { (exit 1); exit 1; }; }
25042else
25043 cat >conftest.$ac_ext <<_ACEOF
25044/* confdefs.h. */
25045_ACEOF
25046cat confdefs.h >>conftest.$ac_ext
25047cat >>conftest.$ac_ext <<_ACEOF
25048/* end confdefs.h. */
25049#include <stdio.h>
25050#include <stddef.h>
25051#include <string.h>
25052
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025053#ifdef HAVE_SYS_TYPES_H
25054#include <sys/types.h>
25055#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025056
25057#ifdef HAVE_SSIZE_T
25058typedef ssize_t Py_ssize_t;
25059#elif SIZEOF_VOID_P == SIZEOF_LONG
25060typedef long Py_ssize_t;
25061#else
25062typedef int Py_ssize_t;
25063#endif
Brett Cannon09d12362006-05-11 05:11:33 +000025064
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025065int main()
25066{
25067 char buffer[256];
25068
Brett Cannon09d12362006-05-11 05:11:33 +000025069 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25070 return 1;
25071
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025072 if (strcmp(buffer, "123"))
25073 return 1;
25074
25075 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25076 return 1;
25077
25078 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000025079 return 1;
25080
25081 return 0;
25082}
25083_ACEOF
25084rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025085if { (ac_try="$ac_link"
25086case "(($ac_try" in
25087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25088 *) ac_try_echo=$ac_try;;
25089esac
25090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25091 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025092 ac_status=$?
25093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25094 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025095 { (case "(($ac_try" in
25096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25097 *) ac_try_echo=$ac_try;;
25098esac
25099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25100 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025101 ac_status=$?
25102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25103 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025104 { echo "$as_me:$LINENO: result: yes" >&5
25105echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025106
25107cat >>confdefs.h <<\_ACEOF
25108#define PY_FORMAT_SIZE_T "z"
25109_ACEOF
25110
25111else
25112 echo "$as_me: program exited with status $ac_status" >&5
25113echo "$as_me: failed program was:" >&5
25114sed 's/^/| /' conftest.$ac_ext >&5
25115
25116( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025117{ echo "$as_me:$LINENO: result: no" >&5
25118echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000025121fi
25122
Martin v. Löwiseba40652007-08-30 20:10:57 +000025123
25124
25125{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25126echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025127if test "${ac_cv_type_socklen_t+set}" = set; then
25128 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025129else
Martin v. Löwis11437992002-04-12 09:54:03 +000025130 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025131/* confdefs.h. */
25132_ACEOF
25133cat confdefs.h >>conftest.$ac_ext
25134cat >>conftest.$ac_ext <<_ACEOF
25135/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025136
25137#ifdef HAVE_SYS_TYPES_H
25138#include <sys/types.h>
25139#endif
25140#ifdef HAVE_SYS_SOCKET_H
25141#include <sys/socket.h>
25142#endif
25143
25144
Martin v. Löwiseba40652007-08-30 20:10:57 +000025145typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025146int
25147main ()
25148{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025149if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025150 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000025152 return 0;
25153 ;
25154 return 0;
25155}
25156_ACEOF
25157rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025158if { (ac_try="$ac_compile"
25159case "(($ac_try" in
25160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25161 *) ac_try_echo=$ac_try;;
25162esac
25163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025166 grep -v '^ *+' conftest.er1 >conftest.err
25167 rm -f conftest.er1
25168 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025170 (exit $ac_status); } && {
25171 test -z "$ac_c_werror_flag" ||
25172 test ! -s conftest.err
25173 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000025174 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025175else
Martin v. Löwis11437992002-04-12 09:54:03 +000025176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025177sed 's/^/| /' conftest.$ac_ext >&5
25178
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025181
25182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025184{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25185echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025186if test $ac_cv_type_socklen_t = yes; then
25187 :
25188else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025189
Martin v. Löwis01c04012002-11-11 14:58:44 +000025190cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025191#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025192_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025193
25194fi
25195
Michael W. Hudson54241132001-12-07 15:38:26 +000025196
Michael W. Hudson54241132001-12-07 15:38:26 +000025197
25198
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025199for h in `(cd $srcdir;echo Python/thread_*.h)`
25200do
25201 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25202done
25203
Michael W. Hudson54241132001-12-07 15:38:26 +000025204
Neal Norwitzd24499d2005-12-18 21:36:39 +000025205SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025206{ echo "$as_me:$LINENO: checking for build directories" >&5
25207echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025208for dir in $SRCDIRS; do
25209 if test ! -d $dir; then
25210 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025211 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025212done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025213{ echo "$as_me:$LINENO: result: done" >&5
25214echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025215
Guido van Rossum627b2d71993-12-24 10:39:16 +000025216# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000025217ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025218
Martin v. Löwis11437992002-04-12 09:54:03 +000025219cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025220# This file is a shell script that caches the results of configure
25221# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025222# scripts and configure runs, see configure's option --config-cache.
25223# It is not useful on other systems. If it contains results you don't
25224# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025225#
Martin v. Löwis11437992002-04-12 09:54:03 +000025226# config.status only pays attention to the cache file if you give it
25227# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025228#
Skip Montanaro6dead952003-09-25 14:50:04 +000025229# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025230# loading this file, other *unset* `ac_cv_foo' will be assigned the
25231# following values.
25232
25233_ACEOF
25234
Guido van Rossumf78abae1997-01-21 22:02:36 +000025235# The following way of writing the cache mishandles newlines in values,
25236# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025237# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025238# Ultrix sh set writes to stderr and can't be redirected directly,
25239# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025240(
25241 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25242 eval ac_val=\$$ac_var
25243 case $ac_val in #(
25244 *${as_nl}*)
25245 case $ac_var in #(
25246 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25247echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
25248 esac
25249 case $ac_var in #(
25250 _ | IFS | as_nl) ;; #(
25251 *) $as_unset $ac_var ;;
25252 esac ;;
25253 esac
25254 done
25255
Martin v. Löwis11437992002-04-12 09:54:03 +000025256 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025257 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25258 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025259 # `set' does not quote correctly, so add quotes (double-quote
25260 # substitution turns \\\\ into \\, and sed turns \\ into \).
25261 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025262 "s/'/'\\\\''/g;
25263 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025264 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025265 *)
25266 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025267 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025268 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025269 esac |
25270 sort
25271) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025272 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025273 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025274 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000025275 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025276 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25277 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000025278 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25279 :end' >>confcache
25280if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25281 if test -w "$cache_file"; then
25282 test "x$cache_file" != "x/dev/null" &&
25283 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25284echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025285 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025286 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025287 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25288echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025289 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025290fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025291rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025292
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025293test "x$prefix" = xNONE && prefix=$ac_default_prefix
25294# Let make expand exec_prefix.
25295test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025296
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025297DEFS=-DHAVE_CONFIG_H
25298
Skip Montanaro6dead952003-09-25 14:50:04 +000025299ac_libobjs=
25300ac_ltlibobjs=
25301for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25302 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025303 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25304 ac_i=`echo "$ac_i" | sed "$ac_script"`
25305 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25306 # will be set to the directory where LIBOBJS objects are built.
25307 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25308 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025309done
25310LIBOBJS=$ac_libobjs
25311
25312LTLIBOBJS=$ac_ltlibobjs
25313
25314
Martin v. Löwis11437992002-04-12 09:54:03 +000025315
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025316: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025317ac_clean_files_save=$ac_clean_files
25318ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25319{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25320echo "$as_me: creating $CONFIG_STATUS" >&6;}
25321cat >$CONFIG_STATUS <<_ACEOF
25322#! $SHELL
25323# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025324# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025325# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025326# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025327
Martin v. Löwis11437992002-04-12 09:54:03 +000025328debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025329ac_cs_recheck=false
25330ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025331SHELL=\${CONFIG_SHELL-$SHELL}
25332_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025333
Martin v. Löwis11437992002-04-12 09:54:03 +000025334cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025335## --------------------- ##
25336## M4sh Initialization. ##
25337## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025338
Martin v. Löwiseba40652007-08-30 20:10:57 +000025339# Be more Bourne compatible
25340DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025341if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25342 emulate sh
25343 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025344 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25345 # is contrary to our usage. Disable this feature.
25346 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025347 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025348else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025349 case `(set -o) 2>/dev/null` in
25350 *posix*) set -o posix ;;
25351esac
25352
Martin v. Löwis11437992002-04-12 09:54:03 +000025353fi
Michael W. Hudson54241132001-12-07 15:38:26 +000025354
Skip Montanaro6dead952003-09-25 14:50:04 +000025355
Martin v. Löwis11437992002-04-12 09:54:03 +000025356
25357
Martin v. Löwiseba40652007-08-30 20:10:57 +000025358# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025359# Avoid depending upon Character Ranges.
25360as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25361as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25362as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25363as_cr_digits='0123456789'
25364as_cr_alnum=$as_cr_Letters$as_cr_digits
25365
25366# The user is always right.
25367if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025368 echo "#! /bin/sh" >conf$$.sh
25369 echo "exit 0" >>conf$$.sh
25370 chmod +x conf$$.sh
25371 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025372 PATH_SEPARATOR=';'
25373 else
25374 PATH_SEPARATOR=:
25375 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025376 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025377fi
25378
Martin v. Löwiseba40652007-08-30 20:10:57 +000025379# Support unset when possible.
25380if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25381 as_unset=unset
25382else
25383 as_unset=false
25384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025385
Martin v. Löwiseba40652007-08-30 20:10:57 +000025386
25387# IFS
25388# We need space, tab and new line, in precisely that order. Quoting is
25389# there to prevent editors from complaining about space-tab.
25390# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25391# splitting by setting IFS to empty value.)
25392as_nl='
25393'
25394IFS=" "" $as_nl"
25395
25396# Find who we are. Look in the path if we contain no directory separator.
25397case $0 in
25398 *[\\/]* ) as_myself=$0 ;;
25399 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025400for as_dir in $PATH
25401do
25402 IFS=$as_save_IFS
25403 test -z "$as_dir" && as_dir=.
25404 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25405done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025406IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025407
Martin v. Löwiseba40652007-08-30 20:10:57 +000025408 ;;
25409esac
25410# We did not find ourselves, most probably we were run as `sh COMMAND'
25411# in which case we are not to be found in the path.
25412if test "x$as_myself" = x; then
25413 as_myself=$0
25414fi
25415if test ! -f "$as_myself"; then
25416 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25417 { (exit 1); exit 1; }
25418fi
25419
25420# Work around bugs in pre-3.0 UWIN ksh.
25421for as_var in ENV MAIL MAILPATH
25422do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25423done
25424PS1='$ '
25425PS2='> '
25426PS4='+ '
25427
25428# NLS nuisances.
25429for as_var in \
25430 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25431 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25432 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025433do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025434 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25435 eval $as_var=C; export $as_var
25436 else
25437 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25438 fi
25439done
25440
25441# Required to use basename.
25442if expr a : '\(a\)' >/dev/null 2>&1 &&
25443 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25444 as_expr=expr
25445else
25446 as_expr=false
25447fi
25448
25449if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25450 as_basename=basename
25451else
25452 as_basename=false
25453fi
25454
25455
25456# Name of the executable.
25457as_me=`$as_basename -- "$0" ||
25458$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25459 X"$0" : 'X\(//\)$' \| \
25460 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25461echo X/"$0" |
25462 sed '/^.*\/\([^/][^/]*\)\/*$/{
25463 s//\1/
25464 q
25465 }
25466 /^X\/\(\/\/\)$/{
25467 s//\1/
25468 q
25469 }
25470 /^X\/\(\/\).*/{
25471 s//\1/
25472 q
25473 }
25474 s/.*/./; q'`
25475
25476# CDPATH.
25477$as_unset CDPATH
25478
25479
25480
Martin v. Löwis11437992002-04-12 09:54:03 +000025481 as_lineno_1=$LINENO
25482 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025483 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025484 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025485
Martin v. Löwis11437992002-04-12 09:54:03 +000025486 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25487 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025488 # line-number line after each line using $LINENO; the second 'sed'
25489 # does the real work. The second script uses 'N' to pair each
25490 # line-number line with the line containing $LINENO, and appends
25491 # trailing '-' during substitution so that $LINENO is not a special
25492 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025493 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025494 # scripts with optimization help from Paolo Bonzini. Blame Lee
25495 # E. McMahon (1931-1989) for sed's syntax. :-)
25496 sed -n '
25497 p
25498 /[$]LINENO/=
25499 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025500 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025501 s/[$]LINENO.*/&-/
25502 t lineno
25503 b
25504 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025505 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025506 :loop
25507 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025508 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025509 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025510 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025511 chmod +x "$as_me.lineno" ||
25512 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025513 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025514
Martin v. Löwis11437992002-04-12 09:54:03 +000025515 # Don't try to exec as it changes $[0], causing all sort of problems
25516 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025517 # original and so on. Autoconf is especially sensitive to this).
25518 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025519 # Exit status is that of the last command.
25520 exit
25521}
25522
25523
Martin v. Löwiseba40652007-08-30 20:10:57 +000025524if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25525 as_dirname=dirname
25526else
25527 as_dirname=false
25528fi
25529
25530ECHO_C= ECHO_N= ECHO_T=
25531case `echo -n x` in
25532-n*)
25533 case `echo 'x\c'` in
25534 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25535 *) ECHO_C='\c';;
25536 esac;;
25537*)
25538 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025539esac
25540
Martin v. Löwiseba40652007-08-30 20:10:57 +000025541if expr a : '\(a\)' >/dev/null 2>&1 &&
25542 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025543 as_expr=expr
25544else
25545 as_expr=false
25546fi
25547
25548rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025549if test -d conf$$.dir; then
25550 rm -f conf$$.dir/conf$$.file
25551else
25552 rm -f conf$$.dir
25553 mkdir conf$$.dir
25554fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025555echo >conf$$.file
25556if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025557 as_ln_s='ln -s'
25558 # ... but there are two gotchas:
25559 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25560 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25561 # In both cases, we have to default to `cp -p'.
25562 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025563 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025564elif ln conf$$.file conf$$ 2>/dev/null; then
25565 as_ln_s=ln
25566else
25567 as_ln_s='cp -p'
25568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025569rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25570rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025571
Skip Montanaro6dead952003-09-25 14:50:04 +000025572if mkdir -p . 2>/dev/null; then
25573 as_mkdir_p=:
25574else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025575 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025576 as_mkdir_p=false
25577fi
25578
Martin v. Löwiseba40652007-08-30 20:10:57 +000025579if test -x / >/dev/null 2>&1; then
25580 as_test_x='test -x'
25581else
25582 if ls -dL / >/dev/null 2>&1; then
25583 as_ls_L_option=L
25584 else
25585 as_ls_L_option=
25586 fi
25587 as_test_x='
25588 eval sh -c '\''
25589 if test -d "$1"; then
25590 test -d "$1/.";
25591 else
25592 case $1 in
25593 -*)set "./$1";;
25594 esac;
25595 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25596 ???[sx]*):;;*)false;;esac;fi
25597 '\'' sh
25598 '
25599fi
25600as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025601
25602# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025603as_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 +000025604
25605# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025606as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025607
25608
Martin v. Löwis11437992002-04-12 09:54:03 +000025609exec 6>&1
25610
Martin v. Löwiseba40652007-08-30 20:10:57 +000025611# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025612# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025613# values after options handling.
25614ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000025615This file was extended by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025616generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025617
25618 CONFIG_FILES = $CONFIG_FILES
25619 CONFIG_HEADERS = $CONFIG_HEADERS
25620 CONFIG_LINKS = $CONFIG_LINKS
25621 CONFIG_COMMANDS = $CONFIG_COMMANDS
25622 $ $0 $@
25623
Martin v. Löwiseba40652007-08-30 20:10:57 +000025624on `(hostname || uname -n) 2>/dev/null | sed 1q`
25625"
25626
Martin v. Löwis11437992002-04-12 09:54:03 +000025627_ACEOF
25628
Martin v. Löwiseba40652007-08-30 20:10:57 +000025629cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025630# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025631config_files="$ac_config_files"
25632config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025633
Martin v. Löwiseba40652007-08-30 20:10:57 +000025634_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025635
25636cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025637ac_cs_usage="\
25638\`$as_me' instantiates files from templates according to the
25639current configuration.
25640
25641Usage: $0 [OPTIONS] [FILE]...
25642
25643 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025644 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025645 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025646 -d, --debug don't remove temporary files
25647 --recheck update $as_me by reconfiguring in the same conditions
25648 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025649 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025650 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025651 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025652
25653Configuration files:
25654$config_files
25655
25656Configuration headers:
25657$config_headers
25658
25659Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025660
Martin v. Löwiseba40652007-08-30 20:10:57 +000025661_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025662cat >>$CONFIG_STATUS <<_ACEOF
25663ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000025664python config.status 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +000025665configured by $0, generated by GNU Autoconf 2.61,
25666 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025667
Martin v. Löwiseba40652007-08-30 20:10:57 +000025668Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025669This config.status script is free software; the Free Software Foundation
25670gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025671
25672ac_pwd='$ac_pwd'
25673srcdir='$srcdir'
25674INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025675_ACEOF
25676
25677cat >>$CONFIG_STATUS <<\_ACEOF
25678# If no file are specified by the user, then we need to provide default
25679# value. By we need to know if files were specified by the user.
25680ac_need_defaults=:
25681while test $# != 0
25682do
25683 case $1 in
25684 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025685 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25686 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025687 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025688 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025689 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025690 ac_option=$1
25691 ac_optarg=$2
25692 ac_shift=shift
25693 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025694 esac
25695
Skip Montanaro6dead952003-09-25 14:50:04 +000025696 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025697 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025698 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25699 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025700 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25701 echo "$ac_cs_version"; exit ;;
25702 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025703 debug=: ;;
25704 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025705 $ac_shift
25706 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025707 ac_need_defaults=false;;
25708 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025709 $ac_shift
25710 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025711 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025712 --he | --h)
25713 # Conflict between --help and --header
25714 { echo "$as_me: error: ambiguous option: $1
25715Try \`$0 --help' for more information." >&2
25716 { (exit 1); exit 1; }; };;
25717 --help | --hel | -h )
25718 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025719 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25720 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25721 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025722
25723 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025724 -*) { echo "$as_me: error: unrecognized option: $1
25725Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025726 { (exit 1); exit 1; }; } ;;
25727
Martin v. Löwiseba40652007-08-30 20:10:57 +000025728 *) ac_config_targets="$ac_config_targets $1"
25729 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025730
25731 esac
25732 shift
25733done
25734
Skip Montanaro6dead952003-09-25 14:50:04 +000025735ac_configure_extra_args=
25736
25737if $ac_cs_silent; then
25738 exec 6>/dev/null
25739 ac_configure_extra_args="$ac_configure_extra_args --silent"
25740fi
25741
25742_ACEOF
25743cat >>$CONFIG_STATUS <<_ACEOF
25744if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025745 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25746 CONFIG_SHELL=$SHELL
25747 export CONFIG_SHELL
25748 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025749fi
25750
Martin v. Löwis11437992002-04-12 09:54:03 +000025751_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025752cat >>$CONFIG_STATUS <<\_ACEOF
25753exec 5>>config.log
25754{
25755 echo
25756 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25757## Running $as_me. ##
25758_ASBOX
25759 echo "$ac_log"
25760} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025761
Martin v. Löwiseba40652007-08-30 20:10:57 +000025762_ACEOF
25763cat >>$CONFIG_STATUS <<_ACEOF
25764_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025765
25766cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025767
25768# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025769for ac_config_target in $ac_config_targets
25770do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025771 case $ac_config_target in
25772 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25773 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25774 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25775 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025776 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25777 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025778 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25779 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25780
Martin v. Löwis11437992002-04-12 09:54:03 +000025781 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25782echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25783 { (exit 1); exit 1; }; };;
25784 esac
25785done
25786
Martin v. Löwiseba40652007-08-30 20:10:57 +000025787
Martin v. Löwis11437992002-04-12 09:54:03 +000025788# If the user did not use the arguments to specify the items to instantiate,
25789# then the envvar interface is used. Set only those that are not.
25790# We use the long form for the default assignment because of an extremely
25791# bizarre bug on SunOS 4.1.3.
25792if $ac_need_defaults; then
25793 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25794 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25795fi
25796
Skip Montanaro6dead952003-09-25 14:50:04 +000025797# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025798# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025799# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025800# Hook for its removal unless debugging.
25801# Note that there is a small window in which the directory will not be cleaned:
25802# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025803$debug ||
25804{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025805 tmp=
25806 trap 'exit_status=$?
25807 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25808' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025809 trap '{ (exit 1); exit 1; }' 1 2 13 15
25810}
Martin v. Löwis11437992002-04-12 09:54:03 +000025811# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025812
Martin v. Löwis11437992002-04-12 09:54:03 +000025813{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025814 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025815 test -n "$tmp" && test -d "$tmp"
25816} ||
25817{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025818 tmp=./conf$$-$RANDOM
25819 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025820} ||
25821{
Skip Montanaro6dead952003-09-25 14:50:04 +000025822 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025823 { (exit 1); exit 1; }
25824}
25825
Martin v. Löwis11437992002-04-12 09:54:03 +000025826#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025827# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025828#
25829
25830# No need to generate the scripts if there are no CONFIG_FILES.
25831# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025832if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025833
25834_ACEOF
25835
Martin v. Löwiseba40652007-08-30 20:10:57 +000025836
25837
25838ac_delim='%!_!# '
25839for ac_last_try in false false false false false :; do
25840 cat >conf$$subs.sed <<_ACEOF
25841SHELL!$SHELL$ac_delim
25842PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25843PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25844PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25845PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25846PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25847PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25848exec_prefix!$exec_prefix$ac_delim
25849prefix!$prefix$ac_delim
25850program_transform_name!$program_transform_name$ac_delim
25851bindir!$bindir$ac_delim
25852sbindir!$sbindir$ac_delim
25853libexecdir!$libexecdir$ac_delim
25854datarootdir!$datarootdir$ac_delim
25855datadir!$datadir$ac_delim
25856sysconfdir!$sysconfdir$ac_delim
25857sharedstatedir!$sharedstatedir$ac_delim
25858localstatedir!$localstatedir$ac_delim
25859includedir!$includedir$ac_delim
25860oldincludedir!$oldincludedir$ac_delim
25861docdir!$docdir$ac_delim
25862infodir!$infodir$ac_delim
25863htmldir!$htmldir$ac_delim
25864dvidir!$dvidir$ac_delim
25865pdfdir!$pdfdir$ac_delim
25866psdir!$psdir$ac_delim
25867libdir!$libdir$ac_delim
25868localedir!$localedir$ac_delim
25869mandir!$mandir$ac_delim
25870DEFS!$DEFS$ac_delim
25871ECHO_C!$ECHO_C$ac_delim
25872ECHO_N!$ECHO_N$ac_delim
25873ECHO_T!$ECHO_T$ac_delim
25874LIBS!$LIBS$ac_delim
25875build_alias!$build_alias$ac_delim
25876host_alias!$host_alias$ac_delim
25877target_alias!$target_alias$ac_delim
25878VERSION!$VERSION$ac_delim
25879SOVERSION!$SOVERSION$ac_delim
25880CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25881UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025882ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025883PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025884PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025885PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25886PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25887PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25888FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25889FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25890FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25891FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25892FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25893MACHDEP!$MACHDEP$ac_delim
25894SGI_ABI!$SGI_ABI$ac_delim
25895EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25896EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25897CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25898EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25899CC!$CC$ac_delim
25900CFLAGS!$CFLAGS$ac_delim
25901LDFLAGS!$LDFLAGS$ac_delim
25902CPPFLAGS!$CPPFLAGS$ac_delim
25903ac_ct_CC!$ac_ct_CC$ac_delim
25904EXEEXT!$EXEEXT$ac_delim
25905OBJEXT!$OBJEXT$ac_delim
25906CXX!$CXX$ac_delim
25907MAINCC!$MAINCC$ac_delim
25908CPP!$CPP$ac_delim
25909GREP!$GREP$ac_delim
25910EGREP!$EGREP$ac_delim
25911BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25912LIBRARY!$LIBRARY$ac_delim
25913LDLIBRARY!$LDLIBRARY$ac_delim
25914DLLLIBRARY!$DLLLIBRARY$ac_delim
25915BLDLIBRARY!$BLDLIBRARY$ac_delim
25916LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25917INSTSONAME!$INSTSONAME$ac_delim
25918RUNSHARED!$RUNSHARED$ac_delim
25919LINKCC!$LINKCC$ac_delim
25920RANLIB!$RANLIB$ac_delim
25921AR!$AR$ac_delim
25922SVNVERSION!$SVNVERSION$ac_delim
25923INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25924INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25925INSTALL_DATA!$INSTALL_DATA$ac_delim
25926LN!$LN$ac_delim
25927OPT!$OPT$ac_delim
25928BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025929UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025930OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25931LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25932SO!$SO$ac_delim
25933LDSHARED!$LDSHARED$ac_delim
25934BLDSHARED!$BLDSHARED$ac_delim
25935CCSHARED!$CCSHARED$ac_delim
25936LINKFORSHARED!$LINKFORSHARED$ac_delim
25937CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025938_ACEOF
25939
25940 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25941 break
25942 elif $ac_last_try; then
25943 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25944echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25945 { (exit 1); exit 1; }; }
25946 else
25947 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025948 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025949done
25950
25951ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25952if test -n "$ac_eof"; then
25953 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25954 ac_eof=`expr $ac_eof + 1`
25955fi
25956
25957cat >>$CONFIG_STATUS <<_ACEOF
25958cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25959/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25960_ACEOF
25961sed '
25962s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25963s/^/s,@/; s/!/@,|#_!!_#|/
25964:n
25965t n
25966s/'"$ac_delim"'$/,g/; t
25967s/$/\\/; p
25968N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25969' >>$CONFIG_STATUS <conf$$subs.sed
25970rm -f conf$$subs.sed
25971cat >>$CONFIG_STATUS <<_ACEOF
25972CEOF$ac_eof
25973_ACEOF
25974
25975
25976ac_delim='%!_!# '
25977for ac_last_try in false false false false false :; do
25978 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025979SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025980USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025981SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025982USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25983LDLAST!$LDLAST$ac_delim
25984THREADOBJ!$THREADOBJ$ac_delim
25985DLINCLDIR!$DLINCLDIR$ac_delim
25986DYNLOADFILE!$DYNLOADFILE$ac_delim
25987MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25988TRUE!$TRUE$ac_delim
25989LIBOBJS!$LIBOBJS$ac_delim
25990HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25991HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25992HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25993HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25994HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25995LIBM!$LIBM$ac_delim
25996LIBC!$LIBC$ac_delim
25997UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25998THREADHEADERS!$THREADHEADERS$ac_delim
25999SRCDIRS!$SRCDIRS$ac_delim
26000LTLIBOBJS!$LTLIBOBJS$ac_delim
26001_ACEOF
26002
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000026003 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026004 break
26005 elif $ac_last_try; then
26006 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26007echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26008 { (exit 1); exit 1; }; }
26009 else
26010 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26011 fi
26012done
26013
26014ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26015if test -n "$ac_eof"; then
26016 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26017 ac_eof=`expr $ac_eof + 1`
26018fi
26019
26020cat >>$CONFIG_STATUS <<_ACEOF
26021cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26022/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26023_ACEOF
26024sed '
26025s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26026s/^/s,@/; s/!/@,|#_!!_#|/
26027:n
26028t n
26029s/'"$ac_delim"'$/,g/; t
26030s/$/\\/; p
26031N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26032' >>$CONFIG_STATUS <conf$$subs.sed
26033rm -f conf$$subs.sed
26034cat >>$CONFIG_STATUS <<_ACEOF
26035:end
26036s/|#_!!_#|//g
26037CEOF$ac_eof
26038_ACEOF
26039
26040
26041# VPATH may cause trouble with some makes, so we remove $(srcdir),
26042# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26043# trailing colons and then remove the whole line if VPATH becomes empty
26044# (actually we leave an empty line to preserve line numbers).
26045if test "x$srcdir" = x.; then
26046 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26047s/:*\$(srcdir):*/:/
26048s/:*\${srcdir}:*/:/
26049s/:*@srcdir@:*/:/
26050s/^\([^=]*=[ ]*\):*/\1/
26051s/:*$//
26052s/^[^=]*=[ ]*$//
26053}'
26054fi
26055
26056cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026057fi # test -n "$CONFIG_FILES"
26058
Martin v. Löwiseba40652007-08-30 20:10:57 +000026059
26060for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
26061do
26062 case $ac_tag in
26063 :[FHLC]) ac_mode=$ac_tag; continue;;
26064 esac
26065 case $ac_mode$ac_tag in
26066 :[FHL]*:*);;
26067 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26068echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26069 { (exit 1); exit 1; }; };;
26070 :[FH]-) ac_tag=-:-;;
26071 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26072 esac
26073 ac_save_IFS=$IFS
26074 IFS=:
26075 set x $ac_tag
26076 IFS=$ac_save_IFS
26077 shift
26078 ac_file=$1
26079 shift
26080
26081 case $ac_mode in
26082 :L) ac_source=$1;;
26083 :[FH])
26084 ac_file_inputs=
26085 for ac_f
26086 do
26087 case $ac_f in
26088 -) ac_f="$tmp/stdin";;
26089 *) # Look for the file first in the build tree, then in the source tree
26090 # (if the path is not absolute). The absolute path cannot be DOS-style,
26091 # because $ac_f cannot contain `:'.
26092 test -f "$ac_f" ||
26093 case $ac_f in
26094 [\\/$]*) false;;
26095 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26096 esac ||
26097 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26098echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26099 { (exit 1); exit 1; }; };;
26100 esac
26101 ac_file_inputs="$ac_file_inputs $ac_f"
26102 done
26103
26104 # Let's still pretend it is `configure' which instantiates (i.e., don't
26105 # use $as_me), people would be surprised to read:
26106 # /* config.h. Generated by config.status. */
26107 configure_input="Generated from "`IFS=:
26108 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26109 if test x"$ac_file" != x-; then
26110 configure_input="$ac_file. $configure_input"
26111 { echo "$as_me:$LINENO: creating $ac_file" >&5
26112echo "$as_me: creating $ac_file" >&6;}
26113 fi
26114
26115 case $ac_tag in
26116 *:-:* | *:-) cat >"$tmp/stdin";;
26117 esac
26118 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026119 esac
26120
Martin v. Löwiseba40652007-08-30 20:10:57 +000026121 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026122$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026123 X"$ac_file" : 'X\(//\)[^/]' \| \
26124 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026125 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026126echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026127 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26128 s//\1/
26129 q
26130 }
26131 /^X\(\/\/\)[^/].*/{
26132 s//\1/
26133 q
26134 }
26135 /^X\(\/\/\)$/{
26136 s//\1/
26137 q
26138 }
26139 /^X\(\/\).*/{
26140 s//\1/
26141 q
26142 }
26143 s/.*/./; q'`
26144 { as_dir="$ac_dir"
26145 case $as_dir in #(
26146 -*) as_dir=./$as_dir;;
26147 esac
26148 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026149 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000026150 while :; do
26151 case $as_dir in #(
26152 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26153 *) as_qdir=$as_dir;;
26154 esac
26155 as_dirs="'$as_qdir' $as_dirs"
26156 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026157$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026158 X"$as_dir" : 'X\(//\)[^/]' \| \
26159 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026160 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026161echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026162 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26163 s//\1/
26164 q
26165 }
26166 /^X\(\/\/\)[^/].*/{
26167 s//\1/
26168 q
26169 }
26170 /^X\(\/\/\)$/{
26171 s//\1/
26172 q
26173 }
26174 /^X\(\/\).*/{
26175 s//\1/
26176 q
26177 }
26178 s/.*/./; q'`
26179 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026180 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026181 test -z "$as_dirs" || eval "mkdir $as_dirs"
26182 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26183echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026184 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026185 ac_builddir=.
26186
Martin v. Löwiseba40652007-08-30 20:10:57 +000026187case "$ac_dir" in
26188.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26189*)
Martin v. Löwis11437992002-04-12 09:54:03 +000026190 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026191 # A ".." for each directory in $ac_dir_suffix.
26192 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
26193 case $ac_top_builddir_sub in
26194 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26195 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26196 esac ;;
26197esac
26198ac_abs_top_builddir=$ac_pwd
26199ac_abs_builddir=$ac_pwd$ac_dir_suffix
26200# for backward compatibility:
26201ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026202
26203case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026204 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026205 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026206 ac_top_srcdir=$ac_top_builddir_sub
26207 ac_abs_top_srcdir=$ac_pwd ;;
26208 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026209 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026210 ac_top_srcdir=$srcdir
26211 ac_abs_top_srcdir=$srcdir ;;
26212 *) # Relative name.
26213 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26214 ac_top_srcdir=$ac_top_build_prefix$srcdir
26215 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026216esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026217ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026218
Martin v. Löwis11437992002-04-12 09:54:03 +000026219
Martin v. Löwiseba40652007-08-30 20:10:57 +000026220 case $ac_mode in
26221 :F)
26222 #
26223 # CONFIG_FILE
26224 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026225
26226 case $INSTALL in
26227 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026228 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026229 esac
Brett Cannon19fab762007-06-02 03:02:29 +000026230_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026231
26232cat >>$CONFIG_STATUS <<\_ACEOF
26233# If the template does not know about datarootdir, expand it.
26234# FIXME: This hack should be removed a few years after 2.60.
26235ac_datarootdir_hack=; ac_datarootdir_seen=
26236
26237case `sed -n '/datarootdir/ {
26238 p
26239 q
26240}
26241/@datadir@/p
26242/@docdir@/p
26243/@infodir@/p
26244/@localedir@/p
26245/@mandir@/p
26246' $ac_file_inputs` in
26247*datarootdir*) ac_datarootdir_seen=yes;;
26248*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26249 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26250echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26251_ACEOF
26252cat >>$CONFIG_STATUS <<_ACEOF
26253 ac_datarootdir_hack='
26254 s&@datadir@&$datadir&g
26255 s&@docdir@&$docdir&g
26256 s&@infodir@&$infodir&g
26257 s&@localedir@&$localedir&g
26258 s&@mandir@&$mandir&g
26259 s&\\\${datarootdir}&$datarootdir&g' ;;
26260esac
26261_ACEOF
26262
26263# Neutralize VPATH when `$srcdir' = `.'.
26264# Shell code in configure.ac might set extrasub.
26265# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000026266cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026267 sed "$ac_vpsub
26268$extrasub
26269_ACEOF
26270cat >>$CONFIG_STATUS <<\_ACEOF
26271:t
26272/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000026273s&@configure_input@&$configure_input&;t t
26274s&@top_builddir@&$ac_top_builddir_sub&;t t
26275s&@srcdir@&$ac_srcdir&;t t
26276s&@abs_srcdir@&$ac_abs_srcdir&;t t
26277s&@top_srcdir@&$ac_top_srcdir&;t t
26278s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26279s&@builddir@&$ac_builddir&;t t
26280s&@abs_builddir@&$ac_abs_builddir&;t t
26281s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26282s&@INSTALL@&$ac_INSTALL&;t t
26283$ac_datarootdir_hack
26284" $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 +000026285
Martin v. Löwiseba40652007-08-30 20:10:57 +000026286test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26287 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26288 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26289 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26290which seems to be undefined. Please make sure it is defined." >&5
26291echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26292which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026293
Martin v. Löwiseba40652007-08-30 20:10:57 +000026294 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026295 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026296 -) cat "$tmp/out"; rm -f "$tmp/out";;
26297 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026298 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026299 ;;
26300 :H)
26301 #
26302 # CONFIG_HEADER
26303 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026304_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026305
Martin v. Löwiseba40652007-08-30 20:10:57 +000026306# Transform confdefs.h into a sed script `conftest.defines', that
26307# substitutes the proper values into config.h.in to produce config.h.
26308rm -f conftest.defines conftest.tail
26309# First, append a space to every undef/define line, to ease matching.
26310echo 's/$/ /' >conftest.defines
26311# Then, protect against being on the right side of a sed subst, or in
26312# an unquoted here document, in config.status. If some macros were
26313# called several times there might be several #defines for the same
26314# symbol, which is useless. But do not sort them, since the last
26315# AC_DEFINE must be honored.
26316ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26317# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26318# NAME is the cpp macro being defined, VALUE is the value it is being given.
26319# PARAMS is the parameter list in the macro definition--in most cases, it's
26320# just an empty string.
26321ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26322ac_dB='\\)[ (].*,\\1define\\2'
26323ac_dC=' '
26324ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026325
Martin v. Löwiseba40652007-08-30 20:10:57 +000026326uniq confdefs.h |
26327 sed -n '
26328 t rset
26329 :rset
26330 s/^[ ]*#[ ]*define[ ][ ]*//
26331 t ok
26332 d
26333 :ok
26334 s/[\\&,]/\\&/g
26335 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26336 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26337 ' >>conftest.defines
26338
26339# Remove the space that was appended to ease matching.
26340# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026341# example, in the case of _POSIX_SOURCE, which is predefined and required
26342# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026343# (The regexp can be short, since the line contains either #define or #undef.)
26344echo 's/ $//
26345s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000026346
Martin v. Löwiseba40652007-08-30 20:10:57 +000026347# Break up conftest.defines:
26348ac_max_sed_lines=50
26349
26350# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26351# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26352# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26353# et cetera.
26354ac_in='$ac_file_inputs'
26355ac_out='"$tmp/out1"'
26356ac_nxt='"$tmp/out2"'
26357
26358while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000026359do
Martin v. Löwiseba40652007-08-30 20:10:57 +000026360 # Write a here document:
26361 cat >>$CONFIG_STATUS <<_ACEOF
26362 # First, check the format of the line:
26363 cat >"\$tmp/defines.sed" <<\\CEOF
26364/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26365/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26366b
26367:def
26368_ACEOF
26369 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026370 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026371 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26372 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26373 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26374 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026375 rm -f conftest.defines
26376 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026377done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026378rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026379
Martin v. Löwiseba40652007-08-30 20:10:57 +000026380echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026381cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026382 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026383 echo "/* $configure_input */" >"$tmp/config.h"
26384 cat "$ac_result" >>"$tmp/config.h"
26385 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026386 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26387echo "$as_me: $ac_file is unchanged" >&6;}
26388 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026389 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026390 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026391 fi
26392 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026393 echo "/* $configure_input */"
26394 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026395 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026396 rm -f "$tmp/out12"
26397 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026398
Martin v. Löwiseba40652007-08-30 20:10:57 +000026399
26400 esac
26401
26402done # for ac_tag
26403
Guido van Rossum627b2d71993-12-24 10:39:16 +000026404
Martin v. Löwis11437992002-04-12 09:54:03 +000026405{ (exit 0); exit 0; }
26406_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026407chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026408ac_clean_files=$ac_clean_files_save
26409
26410
26411# configure is writing to config.log, and then calls config.status.
26412# config.status does its own redirection, appending to config.log.
26413# Unfortunately, on DOS this fails, as config.log is still kept open
26414# by configure, so config.status won't be able to write to it; its
26415# output is simply discarded. So we exec the FD to /dev/null,
26416# effectively closing config.log, so it can be properly (re)opened and
26417# appended to by config.status. When coming back to configure, we
26418# need to make the FD available again.
26419if test "$no_create" != yes; then
26420 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026421 ac_config_status_args=
26422 test "$silent" = yes &&
26423 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026424 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026425 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026426 exec 5>>config.log
26427 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26428 # would make configure fail if this is the last instruction.
26429 $ac_cs_success || { (exit 1); exit 1; }
26430fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026431
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026432
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026433echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026434if test ! -f Modules/Setup
26435then
26436 cp $srcdir/Modules/Setup.dist Modules/Setup
26437fi
26438
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026439echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026440if test ! -f Modules/Setup.local
26441then
26442 echo "# Edit this file for local setup changes" >Modules/Setup.local
26443fi
26444
26445echo "creating Makefile"
26446$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26447 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026448 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026449
26450case $ac_sys_system in
26451BeOS)
26452 { echo "$as_me:$LINENO: WARNING:
26453
26454 Support for BeOS is deprecated as of Python 2.6.
26455 See PEP 11 for the gory details.
26456 " >&5
26457echo "$as_me: WARNING:
26458
26459 Support for BeOS is deprecated as of Python 2.6.
26460 See PEP 11 for the gory details.
26461 " >&2;}
26462 ;;
26463*) ;;
26464esac
26465
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026466mv config.c Modules