blob: 837f3e80c750152c8fb55b2a26849a95d32710a0 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002# From configure.in Revision: 1.437 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Skip Montanaro6dead952003-09-25 14:50:04 +00004# Generated by GNU Autoconf 2.57 for python 2.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000010## --------------------- ##
11## M4sh Initialization. ##
12## --------------------- ##
13
14# Be Bourne compatible
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22 set -o posix
23fi
24
Martin v. Löwis11437992002-04-12 09:54:03 +000025# Support unset when possible.
26if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
27 as_unset=unset
28else
29 as_unset=false
30fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
33# Work around bugs in pre-3.0 UWIN ksh.
34$as_unset ENV MAIL MAILPATH
35PS1='$ '
36PS2='> '
37PS4='+ '
38
39# NLS nuisances.
40for as_var in \
41 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
42 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
43 LC_TELEPHONE LC_TIME
44do
45 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
46 eval $as_var=C; export $as_var
47 else
48 $as_unset $as_var
49 fi
50done
51
52# Required to use basename.
53if expr a : '\(a\)' >/dev/null 2>&1; then
54 as_expr=expr
55else
56 as_expr=false
57fi
58
59if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
60 as_basename=basename
61else
62 as_basename=false
63fi
Martin v. Löwis11437992002-04-12 09:54:03 +000064
65
66# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000067as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000068$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69 X"$0" : 'X\(//\)$' \| \
70 X"$0" : 'X\(/\)$' \| \
71 . : '\(.\)' 2>/dev/null ||
72echo X/"$0" |
73 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
74 /^X\/\(\/\/\)$/{ s//\1/; q; }
75 /^X\/\(\/\).*/{ s//\1/; q; }
76 s/.*/./; q'`
77
Skip Montanaro6dead952003-09-25 14:50:04 +000078
Martin v. Löwis11437992002-04-12 09:54:03 +000079# PATH needs CR, and LINENO needs CR and PATH.
80# Avoid depending upon Character Ranges.
81as_cr_letters='abcdefghijklmnopqrstuvwxyz'
82as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
83as_cr_Letters=$as_cr_letters$as_cr_LETTERS
84as_cr_digits='0123456789'
85as_cr_alnum=$as_cr_Letters$as_cr_digits
86
87# The user is always right.
88if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000089 echo "#! /bin/sh" >conf$$.sh
90 echo "exit 0" >>conf$$.sh
91 chmod +x conf$$.sh
92 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000093 PATH_SEPARATOR=';'
94 else
95 PATH_SEPARATOR=:
96 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000097 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000098fi
99
100
101 as_lineno_1=$LINENO
102 as_lineno_2=$LINENO
103 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
104 test "x$as_lineno_1" != "x$as_lineno_2" &&
105 test "x$as_lineno_3" = "x$as_lineno_2" || {
106 # Find who we are. Look in the path if we contain no path at all
107 # relative or not.
108 case $0 in
109 *[\\/]* ) as_myself=$0 ;;
110 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
111for as_dir in $PATH
112do
113 IFS=$as_save_IFS
114 test -z "$as_dir" && as_dir=.
115 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
116done
117
118 ;;
119 esac
120 # We did not find ourselves, most probably we were run as `sh COMMAND'
121 # in which case we are not to be found in the path.
122 if test "x$as_myself" = x; then
123 as_myself=$0
124 fi
125 if test ! -f "$as_myself"; then
126 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
127 { (exit 1); exit 1; }; }
128 fi
129 case $CONFIG_SHELL in
130 '')
131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133do
134 IFS=$as_save_IFS
135 test -z "$as_dir" && as_dir=.
136 for as_base in sh bash ksh sh5; do
137 case $as_dir in
138 /*)
139 if ("$as_dir/$as_base" -c '
140 as_lineno_1=$LINENO
141 as_lineno_2=$LINENO
142 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
143 test "x$as_lineno_1" != "x$as_lineno_2" &&
144 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000145 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
146 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000147 CONFIG_SHELL=$as_dir/$as_base
148 export CONFIG_SHELL
149 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
150 fi;;
151 esac
152 done
153done
154;;
155 esac
156
157 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
158 # uniformly replaced by the line number. The first 'sed' inserts a
159 # line-number line before each line; the second 'sed' does the real
160 # work. The second script uses 'N' to pair each line-number line
161 # with the numbered line, and appends trailing '-' during
162 # substitution so that $LINENO is not a special case at line end.
163 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
164 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
165 sed '=' <$as_myself |
166 sed '
167 N
168 s,$,-,
169 : loop
170 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
171 t loop
172 s,-$,,
173 s,^['$as_cr_digits']*\n,,
174 ' >$as_me.lineno &&
175 chmod +x $as_me.lineno ||
176 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
177 { (exit 1); exit 1; }; }
178
179 # Don't try to exec as it changes $[0], causing all sort of problems
180 # (the dirname of $[0] is not the place where we might find the
181 # original and so on. Autoconf is especially sensible to this).
182 . ./$as_me.lineno
183 # Exit status is that of the last command.
184 exit
185}
186
187
188case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
189 *c*,-n*) ECHO_N= ECHO_C='
190' ECHO_T=' ' ;;
191 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
192 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
193esac
194
195if expr a : '\(a\)' >/dev/null 2>&1; then
196 as_expr=expr
197else
198 as_expr=false
199fi
200
201rm -f conf$$ conf$$.exe conf$$.file
202echo >conf$$.file
203if ln -s conf$$.file conf$$ 2>/dev/null; then
204 # We could just check for DJGPP; but this test a) works b) is more generic
205 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
206 if test -f conf$$.exe; then
207 # Don't use ln at all; we don't have any links
208 as_ln_s='cp -p'
209 else
210 as_ln_s='ln -s'
211 fi
212elif ln conf$$.file conf$$ 2>/dev/null; then
213 as_ln_s=ln
214else
215 as_ln_s='cp -p'
216fi
217rm -f conf$$ conf$$.exe conf$$.file
218
Skip Montanaro6dead952003-09-25 14:50:04 +0000219if mkdir -p . 2>/dev/null; then
220 as_mkdir_p=:
221else
222 as_mkdir_p=false
223fi
224
Martin v. Löwis11437992002-04-12 09:54:03 +0000225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
228as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000241$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000254ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000255ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000268PACKAGE_NAME='python'
269PACKAGE_TARNAME='python'
Fred Drake9bd44622003-07-30 17:39:48 +0000270PACKAGE_VERSION='2.4'
271PACKAGE_STRING='python 2.4'
Martin v. Löwis88afe662002-10-26 13:47:44 +0000272PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000273
274ac_unique_file="Include/object.h"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
Skip Montanaro6dead952003-09-25 14:50:04 +0000312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
313ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000314
Guido van Rossum7f43da71994-08-01 12:15:30 +0000315# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000316ac_init_help=
317ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# The variables have the same names as the options, with
319# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000320cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000321exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000322no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000328silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000329site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000330srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332x_includes=NONE
333x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000352
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353ac_prev=
354for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000355do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000361 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
Martin v. Löwis11437992002-04-12 09:54:03 +0000367 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000372 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000373
374 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000375 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000377 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000394
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000397 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403
404 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000406 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413 *) ac_optarg=yes ;;
414 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000415 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
426 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429
Martin v. Löwis11437992002-04-12 09:54:03 +0000430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000436
437 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000440 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000473 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000479
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000481 # Obsolete; use --without-fp.
482 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486 no_create=yes ;;
487
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000500
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000511 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000518 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000535 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000545 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000556 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000557
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000561 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000562
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000566 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000567
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000574
Guido van Rossum7f43da71994-08-01 12:15:30 +0000575 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000576 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000578 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000585
586 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000588 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000592 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595 *) ac_optarg=yes ;;
596 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000597 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000598
599 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000601 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000607
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000624 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000625
Martin v. Löwis11437992002-04-12 09:54:03 +0000626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000629 ;;
630
Martin v. Löwis11437992002-04-12 09:54:03 +0000631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000641 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000647 ;;
648
649 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000650done
651
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000656fi
657
Martin v. Löwis11437992002-04-12 09:54:03 +0000658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000660do
Martin v. Löwis11437992002-04-12 09:54:03 +0000661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000666 esac
667done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000668
Martin v. Löwis11437992002-04-12 09:54:03 +0000669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671 localstatedir libdir includedir oldincludedir infodir mandir
672do
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
678 esac
679done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000680
Martin v. Löwis11437992002-04-12 09:54:03 +0000681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000687
Martin v. Löwis11437992002-04-12 09:54:03 +0000688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
698
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
703
Guido van Rossum627b2d71993-12-24 10:39:16 +0000704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000708 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000723 srcdir=..
724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000725else
726 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000727fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000728if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000729 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000732 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000735 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000736fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773
Martin v. Löwis11437992002-04-12 09:54:03 +0000774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
780 cat <<_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000781\`configure' configures python 2.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
801_ACEOF
802
803 cat <<_ACEOF
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
806 [$ac_default_prefix]
807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
808 [PREFIX]
809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
830_ACEOF
831
832 cat <<\_ACEOF
833_ACEOF
834fi
835
836if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000837 case $ac_init_help in
Fred Drake9bd44622003-07-30 17:39:48 +0000838 short | recursive ) echo "Configuration of python 2.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000839 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 cat <<\_ACEOF
841
842Optional Features:
843 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
844 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000845 --enable-framework[=INSTALLDIR]
846 Build (MacOSX|Darwin) framework
847 --enable-shared disable/enable building shared python library
848 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
849 --enable-ipv6 Enable ipv6 (with ipv4) support
850 --disable-ipv6 Disable ipv6 support
851 --enable-unicode[=ucs[24]]
852 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853
854Optional Packages:
855 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
856 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000857 --without-gcc never use gcc
858 --with-cxx=<compiler> enable C++ support
859 --with-suffix=.exe set executable suffix
860 --with-pydebug build with Py_DEBUG defined
861 --with-libs='lib1 ...' link against additional libs
862 --with-signal-module disable/enable signal module
863 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
864 --with(out)-threads[=DIRECTORY]
865 disable/enable thread support
866 --with(out)-thread[=DIRECTORY]
867 deprecated; use --with(out)-threads
868 --with-pth use GNU pth threading libraries
869 --with(out)-universal-newlines
870 disable/enable foreign newlines
871 --with(out)-doc-strings disable/enable documentation strings
872 --with(out)-pymalloc disable/enable specialized mallocs
873 --with-wctype-functions use wctype.h functions
874 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
875 --with-dl-dld=DL_DIR GNU dynamic linking
876 --with-fpectl enable SIGFPE catching
877 --with-libm=STRING math library
878 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000879
880Some influential environment variables:
881 CC C compiler command
882 CFLAGS C compiler flags
883 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
884 nonstandard directory <lib dir>
885 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
886 headers in a nonstandard directory <include dir>
887 CPP C preprocessor
888
889Use these variables to override the choices made by `configure' or to help
890it to find libraries and programs with nonstandard names/locations.
891
892_ACEOF
893fi
894
895if test "$ac_init_help" = "recursive"; then
896 # If there are subdirs, report their specific --help.
897 ac_popdir=`pwd`
898 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
899 test -d $ac_dir || continue
900 ac_builddir=.
901
902if test "$ac_dir" != .; then
903 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
904 # A "../" for each directory in $ac_dir_suffix.
905 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
906else
907 ac_dir_suffix= ac_top_builddir=
908fi
909
910case $srcdir in
911 .) # No --srcdir option. We are building in place.
912 ac_srcdir=.
913 if test -z "$ac_top_builddir"; then
914 ac_top_srcdir=.
915 else
916 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
917 fi ;;
918 [\\/]* | ?:[\\/]* ) # Absolute path.
919 ac_srcdir=$srcdir$ac_dir_suffix;
920 ac_top_srcdir=$srcdir ;;
921 *) # Relative path.
922 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
923 ac_top_srcdir=$ac_top_builddir$srcdir ;;
924esac
925# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
926# absolute.
927ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000928ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000929ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
930ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
931
932 cd $ac_dir
933 # Check for guested configure; otherwise get Cygnus style configure.
934 if test -f $ac_srcdir/configure.gnu; then
935 echo
936 $SHELL $ac_srcdir/configure.gnu --help=recursive
937 elif test -f $ac_srcdir/configure; then
938 echo
939 $SHELL $ac_srcdir/configure --help=recursive
940 elif test -f $ac_srcdir/configure.ac ||
941 test -f $ac_srcdir/configure.in; then
942 echo
943 $ac_configure --help
944 else
945 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
946 fi
947 cd $ac_popdir
948 done
949fi
950
951test -n "$ac_init_help" && exit 0
952if $ac_init_version; then
953 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000954python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000955generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000956
957Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
958Free Software Foundation, Inc.
959This configure script is free software; the Free Software Foundation
960gives unlimited permission to copy, distribute and modify it.
961_ACEOF
962 exit 0
963fi
964exec 5>config.log
965cat >&5 <<_ACEOF
966This file contains any messages produced by compilers while
967running configure, to aid debugging if configure makes a mistake.
968
Fred Drake9bd44622003-07-30 17:39:48 +0000969It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000970generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000971
972 $ $0 $@
973
974_ACEOF
975{
976cat <<_ASUNAME
977## --------- ##
978## Platform. ##
979## --------- ##
980
981hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
982uname -m = `(uname -m) 2>/dev/null || echo unknown`
983uname -r = `(uname -r) 2>/dev/null || echo unknown`
984uname -s = `(uname -s) 2>/dev/null || echo unknown`
985uname -v = `(uname -v) 2>/dev/null || echo unknown`
986
987/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
988/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
989
990/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
991/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
992/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
993hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
994/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
995/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
996/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
997
998_ASUNAME
999
1000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1001for as_dir in $PATH
1002do
1003 IFS=$as_save_IFS
1004 test -z "$as_dir" && as_dir=.
1005 echo "PATH: $as_dir"
1006done
1007
1008} >&5
1009
1010cat >&5 <<_ACEOF
1011
1012
1013## ----------- ##
1014## Core tests. ##
1015## ----------- ##
1016
1017_ACEOF
1018
1019
1020# Keep a trace of the command line.
1021# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001022# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001023# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001024# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001025ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001026ac_configure_args0=
1027ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001028ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001029ac_must_keep_next=false
1030for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001031do
Skip Montanaro6dead952003-09-25 14:50:04 +00001032 for ac_arg
1033 do
1034 case $ac_arg in
1035 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1036 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1037 | -silent | --silent | --silen | --sile | --sil)
1038 continue ;;
1039 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1040 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1041 esac
1042 case $ac_pass in
1043 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1044 2)
1045 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1046 if test $ac_must_keep_next = true; then
1047 ac_must_keep_next=false # Got value, back to normal.
1048 else
1049 case $ac_arg in
1050 *=* | --config-cache | -C | -disable-* | --disable-* \
1051 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1052 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1053 | -with-* | --with-* | -without-* | --without-* | --x)
1054 case "$ac_configure_args0 " in
1055 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1056 esac
1057 ;;
1058 -* ) ac_must_keep_next=true ;;
1059 esac
1060 fi
1061 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1062 # Get rid of the leading space.
1063 ac_sep=" "
1064 ;;
1065 esac
1066 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001067done
Skip Montanaro6dead952003-09-25 14:50:04 +00001068$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1069$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 +00001070
1071# When interrupted or exit'd, cleanup temporary files, and complete
1072# config.log. We remove comments because anyway the quotes in there
1073# would cause problems or look ugly.
1074# WARNING: Be sure not to use single quotes in there, as some shells,
1075# such as our DU 5.0 friend, will then `close' the trap.
1076trap 'exit_status=$?
1077 # Save into config.log some information that might help in debugging.
1078 {
1079 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001080
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 cat <<\_ASBOX
1082## ---------------- ##
1083## Cache variables. ##
1084## ---------------- ##
1085_ASBOX
1086 echo
1087 # The following way of writing the cache mishandles newlines in values,
1088{
1089 (set) 2>&1 |
1090 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1091 *ac_space=\ *)
1092 sed -n \
1093 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1094 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1095 ;;
1096 *)
1097 sed -n \
1098 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1099 ;;
1100 esac;
1101}
1102 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001103
1104 cat <<\_ASBOX
1105## ----------------- ##
1106## Output variables. ##
1107## ----------------- ##
1108_ASBOX
1109 echo
1110 for ac_var in $ac_subst_vars
1111 do
1112 eval ac_val=$`echo $ac_var`
1113 echo "$ac_var='"'"'$ac_val'"'"'"
1114 done | sort
1115 echo
1116
1117 if test -n "$ac_subst_files"; then
1118 cat <<\_ASBOX
1119## ------------- ##
1120## Output files. ##
1121## ------------- ##
1122_ASBOX
1123 echo
1124 for ac_var in $ac_subst_files
1125 do
1126 eval ac_val=$`echo $ac_var`
1127 echo "$ac_var='"'"'$ac_val'"'"'"
1128 done | sort
1129 echo
1130 fi
1131
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 if test -s confdefs.h; then
1133 cat <<\_ASBOX
1134## ----------- ##
1135## confdefs.h. ##
1136## ----------- ##
1137_ASBOX
1138 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001139 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 echo
1141 fi
1142 test "$ac_signal" != 0 &&
1143 echo "$as_me: caught signal $ac_signal"
1144 echo "$as_me: exit $exit_status"
1145 } >&5
1146 rm -f core core.* *.core &&
1147 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1148 exit $exit_status
1149 ' 0
1150for ac_signal in 1 2 13 15; do
1151 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1152done
1153ac_signal=0
1154
1155# confdefs.h avoids OS command line length limits that DEFS can exceed.
1156rm -rf conftest* confdefs.h
1157# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1158echo >confdefs.h
1159
1160# Predefined preprocessor variables.
1161
1162cat >>confdefs.h <<_ACEOF
1163#define PACKAGE_NAME "$PACKAGE_NAME"
1164_ACEOF
1165
1166
1167cat >>confdefs.h <<_ACEOF
1168#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1169_ACEOF
1170
1171
1172cat >>confdefs.h <<_ACEOF
1173#define PACKAGE_VERSION "$PACKAGE_VERSION"
1174_ACEOF
1175
1176
1177cat >>confdefs.h <<_ACEOF
1178#define PACKAGE_STRING "$PACKAGE_STRING"
1179_ACEOF
1180
1181
1182cat >>confdefs.h <<_ACEOF
1183#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1184_ACEOF
1185
1186
1187# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188# Prefer explicitly selected file to automatically selected ones.
1189if test -z "$CONFIG_SITE"; then
1190 if test "x$prefix" != xNONE; then
1191 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1192 else
1193 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1194 fi
1195fi
1196for ac_site_file in $CONFIG_SITE; do
1197 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1199echo "$as_me: loading site script $ac_site_file" >&6;}
1200 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 . "$ac_site_file"
1202 fi
1203done
1204
1205if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 # Some versions of bash will fail to source /dev/null (special
1207 # files actually), so we avoid doing that.
1208 if test -f "$cache_file"; then
1209 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1210echo "$as_me: loading cache $cache_file" >&6;}
1211 case $cache_file in
1212 [\\/]* | ?:[\\/]* ) . $cache_file;;
1213 *) . ./$cache_file;;
1214 esac
1215 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216else
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1218echo "$as_me: creating cache $cache_file" >&6;}
1219 >$cache_file
1220fi
1221
1222# Check that the precious variables saved in the cache have kept the same
1223# value.
1224ac_cache_corrupted=false
1225for ac_var in `(set) 2>&1 |
1226 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1227 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1228 eval ac_new_set=\$ac_env_${ac_var}_set
1229 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1230 eval ac_new_val="\$ac_env_${ac_var}_value"
1231 case $ac_old_set,$ac_new_set in
1232 set,)
1233 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1234echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1235 ac_cache_corrupted=: ;;
1236 ,set)
1237 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1238echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1239 ac_cache_corrupted=: ;;
1240 ,);;
1241 *)
1242 if test "x$ac_old_val" != "x$ac_new_val"; then
1243 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1244echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1245 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1246echo "$as_me: former value: $ac_old_val" >&2;}
1247 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1248echo "$as_me: current value: $ac_new_val" >&2;}
1249 ac_cache_corrupted=:
1250 fi;;
1251 esac
1252 # Pass precious variables to config.status.
1253 if test "$ac_new_set" = set; then
1254 case $ac_new_val in
1255 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1256 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1257 *) ac_arg=$ac_var=$ac_new_val ;;
1258 esac
1259 case " $ac_configure_args " in
1260 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1261 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1262 esac
1263 fi
1264done
1265if $ac_cache_corrupted; then
1266 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1267echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1268 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1269echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1270 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271fi
1272
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001275ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1276ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1277ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279
Michael W. Hudson54241132001-12-07 15:38:26 +00001280
1281
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282
Martin v. Löwis11437992002-04-12 09:54:03 +00001283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
Martin v. Löwis88afe662002-10-26 13:47:44 +00001296
1297
1298
1299
1300
1301
1302
1303
1304
Skip Montanaro6dead952003-09-25 14:50:04 +00001305
1306 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309
1310
1311
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001312
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001313
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001314# We don't use PACKAGE_ variables, and they cause conflicts
1315# with other autoconf-based packages that include Python.h
1316grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1317rm confdefs.h
1318mv confdefs.h.new confdefs.h
1319
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001320
Fred Drake9bd44622003-07-30 17:39:48 +00001321VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001322
Martin v. Löwis1142de32002-03-29 16:28:31 +00001323
1324SOVERSION=1.0
1325
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001326# The later defininition of _XOPEN_SOURCE disables certain features
1327# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1328
1329cat >>confdefs.h <<\_ACEOF
1330#define _GNU_SOURCE 1
1331_ACEOF
1332
1333
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001334# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1335# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1336# them.
1337
1338cat >>confdefs.h <<\_ACEOF
1339#define _NETBSD_SOURCE 1
1340_ACEOF
1341
1342
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001343# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1344# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1345# them.
1346
1347cat >>confdefs.h <<\_ACEOF
1348#define __BSD_VISIBLE 1
1349_ACEOF
1350
1351
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001352define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001353
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001354# Arguments passed to configure.
1355
1356CONFIG_ARGS="$ac_configure_args"
1357
Jack Jansene578a632001-08-15 01:27:14 +00001358# Check whether --enable-framework or --disable-framework was given.
1359if test "${enable_framework+set}" = set; then
1360 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
Jack Jansene578a632001-08-15 01:27:14 +00001362 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001363 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001364 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001365 esac
1366 case $enableval in
1367 no)
1368 PYTHONFRAMEWORK=
1369 PYTHONFRAMEWORKDIR=no-framework
1370 PYTHONFRAMEWORKPREFIX=
1371 PYTHONFRAMEWORKINSTALLDIR=
1372 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001373 ;;
1374 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001375 PYTHONFRAMEWORK=Python
1376 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001377 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001378 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1379 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001380 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Guido van Rossum563e7081996-09-10 18:20:48 +00001382else
Martin v. Löwis11437992002-04-12 09:54:03 +00001383
Jack Jansene578a632001-08-15 01:27:14 +00001384 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001385 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001386 PYTHONFRAMEWORKPREFIX=
1387 PYTHONFRAMEWORKINSTALLDIR=
1388 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001389
Martin v. Löwis11437992002-04-12 09:54:03 +00001390fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001391
1392
1393
1394
Jack Jansene578a632001-08-15 01:27:14 +00001395
1396##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001397## AC_HELP_STRING(--with-dyld,
1398## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001399##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001400# Set name for machine-dependent library files
1401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402echo "$as_me:$LINENO: checking MACHDEP" >&5
1403echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001404if test -z "$MACHDEP"
1405then
Guido van Rossum563e7081996-09-10 18:20:48 +00001406 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001407 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1408 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001410 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001411 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001412 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001413 ac_md_system=`echo $ac_sys_system |
1414 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1415 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001416 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001417 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001418
Guido van Rossum07397971997-04-29 21:49:50 +00001419 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001420 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001421 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001422 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001423 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001424 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001425 esac
1426fi
Guido van Rossum91922671997-10-09 20:24:13 +00001427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001428# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1429# disable features if it is defined, without any means to access these
1430# features as extensions. For these systems, we skip the definition of
1431# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1432# some feature, make sure there is no alternative way to access this
1433# feature. Also, when using wildcards, make sure you have verified the
1434# need for not defining _XOPEN_SOURCE on all systems matching the
1435# wildcard, and that the wildcard does not include future systems
1436# (which may remove their limitations).
1437case $ac_sys_system/$ac_sys_release in
1438 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1439 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001440 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1441 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001442 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001443 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1444 # of union __?sigval. Reported by Stuart Bishop.
1445 SunOS/5.6)
1446 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001447 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1448 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1449 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1450 define_xopen_source=no;;
1451 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001452 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001453 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001454 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001455 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1456 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1457 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1458 # This should hopefully be fixed in FreeBSD 4.9
1459 FreeBSD/4.8* | Darwin/6* )
1460 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001461esac
1462
1463if test $define_xopen_source = yes
1464then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001465
1466cat >>confdefs.h <<\_ACEOF
1467#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001468_ACEOF
1469
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001470
1471 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1472 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1473 # several APIs are not declared. Since this is also needed in some
1474 # cases for HP-UX, we define it globally.
1475
1476
1477cat >>confdefs.h <<\_ACEOF
1478#define _XOPEN_SOURCE_EXTENDED 1
1479_ACEOF
1480
1481
1482cat >>confdefs.h <<\_ACEOF
1483#define _POSIX_C_SOURCE 200112L
1484_ACEOF
1485
1486
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001487fi
1488
Guido van Rossum91922671997-10-09 20:24:13 +00001489#
1490# SGI compilers allow the specification of the both the ABI and the
1491# ISA on the command line. Depending on the values of these switches,
1492# different and often incompatable code will be generated.
1493#
1494# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1495# thus supply support for various ABI/ISA combinations. The MACHDEP
1496# variable is also adjusted.
1497#
1498
1499if test ! -z "$SGI_ABI"
1500then
1501 CC="cc $SGI_ABI"
1502 LDFLAGS="$SGI_ABI $LDFLAGS"
1503 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1504fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001505echo "$as_me:$LINENO: result: $MACHDEP" >&5
1506echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001507
Jack Jansen83f898c2002-12-30 22:23:40 +00001508# And add extra plat-mac for darwin
1509
Jack Jansen7b59b422003-03-17 15:44:10 +00001510
Jack Jansen83f898c2002-12-30 22:23:40 +00001511echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1512echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1513if test -z "$EXTRAPLATDIR"
1514then
1515 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001516 darwin)
1517 EXTRAPLATDIR="\$(PLATMACDIRS)"
1518 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1519 ;;
1520 *)
1521 EXTRAPLATDIR=""
1522 EXTRAMACHDEPPATH=""
1523 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001524 esac
1525fi
1526echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1527echo "${ECHO_T}$EXTRAPLATDIR" >&6
1528
Guido van Rossum627b2d71993-12-24 10:39:16 +00001529# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001530
1531# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1532# for debug/optimization stuff. BASECFLAGS is for flags that are required
1533# just to get things to compile and link. Users are free to override OPT
1534# when running configure or make. The build should not break if they do.
1535# BASECFLAGS should generally not be messed with, however.
1536
1537# XXX shouldn't some/most/all of this code be merged with the stuff later
1538# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001539echo "$as_me:$LINENO: checking for --without-gcc" >&5
1540echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1541
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001542# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001543if test "${with_gcc+set}" = set; then
1544 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001545
Guido van Rossum7f43da71994-08-01 12:15:30 +00001546 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001547 no) CC=cc
1548 without_gcc=yes;;
1549 yes) CC=gcc
1550 without_gcc=no;;
1551 *) CC=$withval
1552 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001553 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001554else
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001556 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001557 AIX*) CC=cc_r
1558 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001559 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001560 case $BE_HOST_CPU in
1561 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001562 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001563 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001564 BASECFLAGS="$BASECFLAGS -export pragma"
1565 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001566 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001567 ;;
1568 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001569 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001570 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001571 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001572 ;;
1573 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1575echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1576 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001577 ;;
1578 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001579 AR="\$(srcdir)/Modules/ar_beos"
1580 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001581 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001582 Monterey*)
1583 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001584 without_gcc=;;
1585 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001586 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001587fi;
1588echo "$as_me:$LINENO: result: $without_gcc" >&5
1589echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001590
1591
Guido van Rossum95012191999-12-16 17:50:52 +00001592
Fred Drakea1a84e72001-03-06 05:52:16 +00001593MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001594echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1595echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1596
Guido van Rossum95012191999-12-16 17:50:52 +00001597# Check whether --with-cxx or --without-cxx was given.
1598if test "${with_cxx+set}" = set; then
1599 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
Martin v. Löwis22352952000-12-13 17:37:02 +00001601 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001602 case $withval in
1603 no) CXX=
1604 with_cxx=no;;
1605 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001606 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001607 with_cxx=$withval;;
1608 esac
1609else
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
Guido van Rossum95012191999-12-16 17:50:52 +00001611 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001612 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001613
Martin v. Löwis11437992002-04-12 09:54:03 +00001614fi;
1615echo "$as_me:$LINENO: result: $with_cxx" >&5
1616echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001617
1618if test "$with_cxx" = "yes"
1619then
Martin v. Löwis11437992002-04-12 09:54:03 +00001620 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1621echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1622 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001623fi
1624
1625
1626
1627
Martin v. Löwis11437992002-04-12 09:54:03 +00001628if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001629then
1630 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1631do
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001633set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001634echo "$as_me:$LINENO: checking for $ac_word" >&5
1635echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1636if test "${ac_cv_prog_CXX+set}" = set; then
1637 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001638else
1639 if test -n "$CXX"; then
1640 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1641else
Martin v. Löwis11437992002-04-12 09:54:03 +00001642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1643for as_dir in $PATH
1644do
1645 IFS=$as_save_IFS
1646 test -z "$as_dir" && as_dir=.
1647 for ac_exec_ext in '' $ac_executable_extensions; do
1648 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1649 ac_cv_prog_CXX="$ac_prog"
1650 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1651 break 2
1652 fi
1653done
1654done
1655
Martin v. Löwis22352952000-12-13 17:37:02 +00001656fi
1657fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001658CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001659if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001660 echo "$as_me:$LINENO: result: $CXX" >&5
1661echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001662else
Martin v. Löwis11437992002-04-12 09:54:03 +00001663 echo "$as_me:$LINENO: result: no" >&5
1664echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001665fi
1666
Martin v. Löwis11437992002-04-12 09:54:03 +00001667 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001668done
1669test -n "$CXX" || CXX="notfound"
1670
1671 if test "$CXX" = "notfound"
1672 then
1673 CXX=
1674 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001675 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001676ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001677ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1678ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1679ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1680 cat >conftest.$ac_ext <<_ACEOF
1681#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001682/* confdefs.h. */
1683_ACEOF
1684cat confdefs.h >>conftest.$ac_ext
1685cat >>conftest.$ac_ext <<_ACEOF
1686/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001687
Martin v. Löwis11437992002-04-12 09:54:03 +00001688int
1689main ()
1690{
Michael W. Hudson54241132001-12-07 15:38:26 +00001691
Martin v. Löwis11437992002-04-12 09:54:03 +00001692 ;
1693 return 0;
1694}
1695_ACEOF
1696ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001697ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001698# Try to create an executable without -o first, disregard a.out.
1699# It will help us diagnose broken compilers, and finding out an intuition
1700# of exeext.
1701echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1702echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1703ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1704if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1705 (eval $ac_link_default) 2>&5
1706 ac_status=$?
1707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1708 (exit $ac_status); }; then
1709 # Find the output, starting from the most likely. This scheme is
1710# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1711# resort.
1712
1713# Be careful to initialize this variable, since it used to be cached.
1714# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1715ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001716# b.out is created by i960 compilers.
1717for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1718do
1719 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001721 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1722 ;;
1723 conftest.$ac_ext )
1724 # This is the source file.
1725 ;;
1726 [ab].out )
1727 # We found the default executable, but exeext='' is most
1728 # certainly right.
1729 break;;
1730 *.* )
1731 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1732 # FIXME: I believe we export ac_cv_exeext for Libtool,
1733 # but it would be cool to find out if it's true. Does anybody
1734 # maintain Libtool? --akim.
1735 export ac_cv_exeext
1736 break;;
1737 * )
1738 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 esac
1740done
1741else
1742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001743sed 's/^/| /' conftest.$ac_ext >&5
1744
1745{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1746See \`config.log' for more details." >&5
1747echo "$as_me: error: C++ compiler cannot create executables
1748See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001750fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001751
1752ac_exeext=$ac_cv_exeext
1753echo "$as_me:$LINENO: result: $ac_file" >&5
1754echo "${ECHO_T}$ac_file" >&6
1755
1756# Check the compiler produces executables we can run. If not, either
1757# the compiler is broken, or we cross compile.
1758echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1759echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1760# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1761# If not cross compiling, check that we can run a simple program.
1762if test "$cross_compiling" != yes; then
1763 if { ac_try='./$ac_file'
1764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1765 (eval $ac_try) 2>&5
1766 ac_status=$?
1767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1768 (exit $ac_status); }; }; then
1769 cross_compiling=no
1770 else
1771 if test "$cross_compiling" = maybe; then
1772 cross_compiling=yes
1773 else
1774 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001775If you meant to cross compile, use \`--host'.
1776See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001777echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001778If you meant to cross compile, use \`--host'.
1779See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001780 { (exit 1); exit 1; }; }
1781 fi
1782 fi
1783fi
1784echo "$as_me:$LINENO: result: yes" >&5
1785echo "${ECHO_T}yes" >&6
1786
Skip Montanaro6dead952003-09-25 14:50:04 +00001787rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001788ac_clean_files=$ac_clean_files_save
1789# Check the compiler produces executables we can run. If not, either
1790# the compiler is broken, or we cross compile.
1791echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1792echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1793echo "$as_me:$LINENO: result: $cross_compiling" >&5
1794echo "${ECHO_T}$cross_compiling" >&6
1795
1796echo "$as_me:$LINENO: checking for suffix of executables" >&5
1797echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1799 (eval $ac_link) 2>&5
1800 ac_status=$?
1801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1802 (exit $ac_status); }; then
1803 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1804# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1805# work properly (i.e., refer to `conftest.exe'), while it won't with
1806# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001807for ac_file in conftest.exe conftest conftest.*; do
1808 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001809 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001810 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001811 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1812 export ac_cv_exeext
1813 break;;
1814 * ) break;;
1815 esac
1816done
1817else
Skip Montanaro6dead952003-09-25 14:50:04 +00001818 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1819See \`config.log' for more details." >&5
1820echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1821See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001822 { (exit 1); exit 1; }; }
1823fi
1824
1825rm -f conftest$ac_cv_exeext
1826echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1827echo "${ECHO_T}$ac_cv_exeext" >&6
1828
1829rm -f conftest.$ac_ext
1830EXEEXT=$ac_cv_exeext
1831ac_exeext=$EXEEXT
1832
1833 ac_ext=c
1834ac_cpp='$CPP $CPPFLAGS'
1835ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1836ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1837ac_compiler_gnu=$ac_cv_c_compiler_gnu
1838
1839
Martin v. Löwis22352952000-12-13 17:37:02 +00001840
1841 fi
1842fi
1843
Guido van Rossum8b131c51995-03-09 14:10:13 +00001844# If the user switches compilers, we can't believe the cache
1845if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1846then
Martin v. Löwis11437992002-04-12 09:54:03 +00001847 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1848(it is also a good idea to do 'make clean' before compiling)" >&5
1849echo "$as_me: error: cached CC is different -- throw away $cache_file
1850(it is also a good idea to do 'make clean' before compiling)" >&2;}
1851 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001852fi
1853
Martin v. Löwis11437992002-04-12 09:54:03 +00001854ac_ext=c
1855ac_cpp='$CPP $CPPFLAGS'
1856ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1857ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1858ac_compiler_gnu=$ac_cv_c_compiler_gnu
1859if test -n "$ac_tool_prefix"; then
1860 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1861set dummy ${ac_tool_prefix}gcc; ac_word=$2
1862echo "$as_me:$LINENO: checking for $ac_word" >&5
1863echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1864if test "${ac_cv_prog_CC+set}" = set; then
1865 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001866else
1867 if test -n "$CC"; then
1868 ac_cv_prog_CC="$CC" # Let the user override the test.
1869else
Martin v. Löwis11437992002-04-12 09:54:03 +00001870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1871for as_dir in $PATH
1872do
1873 IFS=$as_save_IFS
1874 test -z "$as_dir" && as_dir=.
1875 for ac_exec_ext in '' $ac_executable_extensions; do
1876 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1877 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1878 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1879 break 2
1880 fi
1881done
1882done
1883
Jack Jansendd19cf82001-12-06 22:36:17 +00001884fi
1885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001886CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001887if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001888 echo "$as_me:$LINENO: result: $CC" >&5
1889echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001890else
Martin v. Löwis11437992002-04-12 09:54:03 +00001891 echo "$as_me:$LINENO: result: no" >&5
1892echo "${ECHO_T}no" >&6
1893fi
1894
1895fi
1896if test -z "$ac_cv_prog_CC"; then
1897 ac_ct_CC=$CC
1898 # Extract the first word of "gcc", so it can be a program name with args.
1899set dummy gcc; ac_word=$2
1900echo "$as_me:$LINENO: checking for $ac_word" >&5
1901echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1902if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1903 echo $ECHO_N "(cached) $ECHO_C" >&6
1904else
1905 if test -n "$ac_ct_CC"; then
1906 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1907else
1908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1909for as_dir in $PATH
1910do
1911 IFS=$as_save_IFS
1912 test -z "$as_dir" && as_dir=.
1913 for ac_exec_ext in '' $ac_executable_extensions; do
1914 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1915 ac_cv_prog_ac_ct_CC="gcc"
1916 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1917 break 2
1918 fi
1919done
1920done
1921
1922fi
1923fi
1924ac_ct_CC=$ac_cv_prog_ac_ct_CC
1925if test -n "$ac_ct_CC"; then
1926 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1927echo "${ECHO_T}$ac_ct_CC" >&6
1928else
1929 echo "$as_me:$LINENO: result: no" >&5
1930echo "${ECHO_T}no" >&6
1931fi
1932
1933 CC=$ac_ct_CC
1934else
1935 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001936fi
1937
Jack Jansendd19cf82001-12-06 22:36:17 +00001938if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001939 if test -n "$ac_tool_prefix"; then
1940 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1941set dummy ${ac_tool_prefix}cc; ac_word=$2
1942echo "$as_me:$LINENO: checking for $ac_word" >&5
1943echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1944if test "${ac_cv_prog_CC+set}" = set; then
1945 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001946else
1947 if test -n "$CC"; then
1948 ac_cv_prog_CC="$CC" # Let the user override the test.
1949else
Martin v. Löwis11437992002-04-12 09:54:03 +00001950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1951for as_dir in $PATH
1952do
1953 IFS=$as_save_IFS
1954 test -z "$as_dir" && as_dir=.
1955 for ac_exec_ext in '' $ac_executable_extensions; do
1956 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1957 ac_cv_prog_CC="${ac_tool_prefix}cc"
1958 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1959 break 2
1960 fi
1961done
1962done
1963
1964fi
1965fi
1966CC=$ac_cv_prog_CC
1967if test -n "$CC"; then
1968 echo "$as_me:$LINENO: result: $CC" >&5
1969echo "${ECHO_T}$CC" >&6
1970else
1971 echo "$as_me:$LINENO: result: no" >&5
1972echo "${ECHO_T}no" >&6
1973fi
1974
1975fi
1976if test -z "$ac_cv_prog_CC"; then
1977 ac_ct_CC=$CC
1978 # Extract the first word of "cc", so it can be a program name with args.
1979set dummy cc; ac_word=$2
1980echo "$as_me:$LINENO: checking for $ac_word" >&5
1981echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1982if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1983 echo $ECHO_N "(cached) $ECHO_C" >&6
1984else
1985 if test -n "$ac_ct_CC"; then
1986 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1987else
1988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1989for as_dir in $PATH
1990do
1991 IFS=$as_save_IFS
1992 test -z "$as_dir" && as_dir=.
1993 for ac_exec_ext in '' $ac_executable_extensions; do
1994 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1995 ac_cv_prog_ac_ct_CC="cc"
1996 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1997 break 2
1998 fi
1999done
2000done
2001
2002fi
2003fi
2004ac_ct_CC=$ac_cv_prog_ac_ct_CC
2005if test -n "$ac_ct_CC"; then
2006 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2007echo "${ECHO_T}$ac_ct_CC" >&6
2008else
2009 echo "$as_me:$LINENO: result: no" >&5
2010echo "${ECHO_T}no" >&6
2011fi
2012
2013 CC=$ac_ct_CC
2014else
2015 CC="$ac_cv_prog_CC"
2016fi
2017
2018fi
2019if test -z "$CC"; then
2020 # Extract the first word of "cc", so it can be a program name with args.
2021set dummy cc; ac_word=$2
2022echo "$as_me:$LINENO: checking for $ac_word" >&5
2023echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2024if test "${ac_cv_prog_CC+set}" = set; then
2025 echo $ECHO_N "(cached) $ECHO_C" >&6
2026else
2027 if test -n "$CC"; then
2028 ac_cv_prog_CC="$CC" # Let the user override the test.
2029else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002030 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2032for as_dir in $PATH
2033do
2034 IFS=$as_save_IFS
2035 test -z "$as_dir" && as_dir=.
2036 for ac_exec_ext in '' $ac_executable_extensions; do
2037 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2038 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2039 ac_prog_rejected=yes
2040 continue
2041 fi
2042 ac_cv_prog_CC="cc"
2043 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2044 break 2
2045 fi
2046done
2047done
2048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002049if test $ac_prog_rejected = yes; then
2050 # We found a bogon in the path, so make sure we never use it.
2051 set dummy $ac_cv_prog_CC
2052 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002053 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002054 # We chose a different compiler from the bogus one.
2055 # However, it has the same basename, so the bogon will be chosen
2056 # first if we set CC to just the basename; use the full file name.
2057 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002058 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002059 fi
2060fi
2061fi
2062fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002063CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002064if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002065 echo "$as_me:$LINENO: result: $CC" >&5
2066echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002067else
Martin v. Löwis11437992002-04-12 09:54:03 +00002068 echo "$as_me:$LINENO: result: no" >&5
2069echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070fi
2071
Martin v. Löwis11437992002-04-12 09:54:03 +00002072fi
2073if test -z "$CC"; then
2074 if test -n "$ac_tool_prefix"; then
2075 for ac_prog in cl
2076 do
2077 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2078set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2079echo "$as_me:$LINENO: checking for $ac_word" >&5
2080echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2081if test "${ac_cv_prog_CC+set}" = set; then
2082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002083else
2084 if test -n "$CC"; then
2085 ac_cv_prog_CC="$CC" # Let the user override the test.
2086else
Martin v. Löwis11437992002-04-12 09:54:03 +00002087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2088for as_dir in $PATH
2089do
2090 IFS=$as_save_IFS
2091 test -z "$as_dir" && as_dir=.
2092 for ac_exec_ext in '' $ac_executable_extensions; do
2093 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2094 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2095 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2096 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002097 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002098done
2099done
2100
2101fi
2102fi
2103CC=$ac_cv_prog_CC
2104if test -n "$CC"; then
2105 echo "$as_me:$LINENO: result: $CC" >&5
2106echo "${ECHO_T}$CC" >&6
2107else
2108 echo "$as_me:$LINENO: result: no" >&5
2109echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002110fi
2111
Martin v. Löwis11437992002-04-12 09:54:03 +00002112 test -n "$CC" && break
2113 done
2114fi
2115if test -z "$CC"; then
2116 ac_ct_CC=$CC
2117 for ac_prog in cl
2118do
2119 # Extract the first word of "$ac_prog", so it can be a program name with args.
2120set dummy $ac_prog; ac_word=$2
2121echo "$as_me:$LINENO: checking for $ac_word" >&5
2122echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2123if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2124 echo $ECHO_N "(cached) $ECHO_C" >&6
2125else
2126 if test -n "$ac_ct_CC"; then
2127 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2128else
2129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2130for as_dir in $PATH
2131do
2132 IFS=$as_save_IFS
2133 test -z "$as_dir" && as_dir=.
2134 for ac_exec_ext in '' $ac_executable_extensions; do
2135 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2136 ac_cv_prog_ac_ct_CC="$ac_prog"
2137 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2138 break 2
2139 fi
2140done
2141done
Jack Jansendd19cf82001-12-06 22:36:17 +00002142
Martin v. Löwis11437992002-04-12 09:54:03 +00002143fi
2144fi
2145ac_ct_CC=$ac_cv_prog_ac_ct_CC
2146if test -n "$ac_ct_CC"; then
2147 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2148echo "${ECHO_T}$ac_ct_CC" >&6
2149else
2150 echo "$as_me:$LINENO: result: no" >&5
2151echo "${ECHO_T}no" >&6
2152fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002153
Martin v. Löwis11437992002-04-12 09:54:03 +00002154 test -n "$ac_ct_CC" && break
2155done
Michael W. Hudson54241132001-12-07 15:38:26 +00002156
Martin v. Löwis11437992002-04-12 09:54:03 +00002157 CC=$ac_ct_CC
2158fi
2159
2160fi
2161
2162
Skip Montanaro6dead952003-09-25 14:50:04 +00002163test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2164See \`config.log' for more details." >&5
2165echo "$as_me: error: no acceptable C compiler found in \$PATH
2166See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002167 { (exit 1); exit 1; }; }
2168
2169# Provide some information about the compiler.
2170echo "$as_me:$LINENO:" \
2171 "checking for C compiler version" >&5
2172ac_compiler=`set X $ac_compile; echo $2`
2173{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2174 (eval $ac_compiler --version </dev/null >&5) 2>&5
2175 ac_status=$?
2176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2177 (exit $ac_status); }
2178{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2179 (eval $ac_compiler -v </dev/null >&5) 2>&5
2180 ac_status=$?
2181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182 (exit $ac_status); }
2183{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2184 (eval $ac_compiler -V </dev/null >&5) 2>&5
2185 ac_status=$?
2186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187 (exit $ac_status); }
2188
2189cat >conftest.$ac_ext <<_ACEOF
2190#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002191/* confdefs.h. */
2192_ACEOF
2193cat confdefs.h >>conftest.$ac_ext
2194cat >>conftest.$ac_ext <<_ACEOF
2195/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002196
Martin v. Löwis11437992002-04-12 09:54:03 +00002197int
2198main ()
2199{
2200
2201 ;
2202 return 0;
2203}
2204_ACEOF
2205ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002206ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002207# Try to create an executable without -o first, disregard a.out.
2208# It will help us diagnose broken compilers, and finding out an intuition
2209# of exeext.
2210echo "$as_me:$LINENO: checking for C compiler default output" >&5
2211echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2212ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2213if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2214 (eval $ac_link_default) 2>&5
2215 ac_status=$?
2216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2217 (exit $ac_status); }; then
2218 # Find the output, starting from the most likely. This scheme is
2219# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2220# resort.
2221
2222# Be careful to initialize this variable, since it used to be cached.
2223# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2224ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002225# b.out is created by i960 compilers.
2226for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2227do
2228 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002229 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002230 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2231 ;;
2232 conftest.$ac_ext )
2233 # This is the source file.
2234 ;;
2235 [ab].out )
2236 # We found the default executable, but exeext='' is most
2237 # certainly right.
2238 break;;
2239 *.* )
2240 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2241 # FIXME: I believe we export ac_cv_exeext for Libtool,
2242 # but it would be cool to find out if it's true. Does anybody
2243 # maintain Libtool? --akim.
2244 export ac_cv_exeext
2245 break;;
2246 * )
2247 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002248 esac
2249done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002250else
Martin v. Löwis11437992002-04-12 09:54:03 +00002251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002252sed 's/^/| /' conftest.$ac_ext >&5
2253
2254{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2255See \`config.log' for more details." >&5
2256echo "$as_me: error: C compiler cannot create executables
2257See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002258 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002259fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002260
Martin v. Löwis11437992002-04-12 09:54:03 +00002261ac_exeext=$ac_cv_exeext
2262echo "$as_me:$LINENO: result: $ac_file" >&5
2263echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002264
Martin v. Löwis11437992002-04-12 09:54:03 +00002265# Check the compiler produces executables we can run. If not, either
2266# the compiler is broken, or we cross compile.
2267echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2268echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2269# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2270# If not cross compiling, check that we can run a simple program.
2271if test "$cross_compiling" != yes; then
2272 if { ac_try='./$ac_file'
2273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2274 (eval $ac_try) 2>&5
2275 ac_status=$?
2276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277 (exit $ac_status); }; }; then
2278 cross_compiling=no
2279 else
2280 if test "$cross_compiling" = maybe; then
2281 cross_compiling=yes
2282 else
2283 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002284If you meant to cross compile, use \`--host'.
2285See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002286echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002287If you meant to cross compile, use \`--host'.
2288See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002289 { (exit 1); exit 1; }; }
2290 fi
2291 fi
2292fi
2293echo "$as_me:$LINENO: result: yes" >&5
2294echo "${ECHO_T}yes" >&6
2295
Skip Montanaro6dead952003-09-25 14:50:04 +00002296rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002297ac_clean_files=$ac_clean_files_save
2298# Check the compiler produces executables we can run. If not, either
2299# the compiler is broken, or we cross compile.
2300echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2301echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2302echo "$as_me:$LINENO: result: $cross_compiling" >&5
2303echo "${ECHO_T}$cross_compiling" >&6
2304
2305echo "$as_me:$LINENO: checking for suffix of executables" >&5
2306echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2308 (eval $ac_link) 2>&5
2309 ac_status=$?
2310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2311 (exit $ac_status); }; then
2312 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2313# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2314# work properly (i.e., refer to `conftest.exe'), while it won't with
2315# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002316for ac_file in conftest.exe conftest conftest.*; do
2317 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002318 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002319 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002320 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2321 export ac_cv_exeext
2322 break;;
2323 * ) break;;
2324 esac
2325done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002326else
Skip Montanaro6dead952003-09-25 14:50:04 +00002327 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2328See \`config.log' for more details." >&5
2329echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2330See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002331 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002332fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002333
Martin v. Löwis11437992002-04-12 09:54:03 +00002334rm -f conftest$ac_cv_exeext
2335echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2336echo "${ECHO_T}$ac_cv_exeext" >&6
2337
2338rm -f conftest.$ac_ext
2339EXEEXT=$ac_cv_exeext
2340ac_exeext=$EXEEXT
2341echo "$as_me:$LINENO: checking for suffix of object files" >&5
2342echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2343if test "${ac_cv_objext+set}" = set; then
2344 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002345else
Martin v. Löwis11437992002-04-12 09:54:03 +00002346 cat >conftest.$ac_ext <<_ACEOF
2347#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002348/* confdefs.h. */
2349_ACEOF
2350cat confdefs.h >>conftest.$ac_ext
2351cat >>conftest.$ac_ext <<_ACEOF
2352/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002353
Martin v. Löwis11437992002-04-12 09:54:03 +00002354int
2355main ()
2356{
2357
2358 ;
2359 return 0;
2360}
2361_ACEOF
2362rm -f conftest.o conftest.obj
2363if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2364 (eval $ac_compile) 2>&5
2365 ac_status=$?
2366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2367 (exit $ac_status); }; then
2368 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2369 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002370 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002371 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2372 break;;
2373 esac
2374done
2375else
2376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002377sed 's/^/| /' conftest.$ac_ext >&5
2378
2379{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2380See \`config.log' for more details." >&5
2381echo "$as_me: error: cannot compute suffix of object files: cannot compile
2382See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002383 { (exit 1); exit 1; }; }
2384fi
2385
2386rm -f conftest.$ac_cv_objext conftest.$ac_ext
2387fi
2388echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2389echo "${ECHO_T}$ac_cv_objext" >&6
2390OBJEXT=$ac_cv_objext
2391ac_objext=$OBJEXT
2392echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2393echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2394if test "${ac_cv_c_compiler_gnu+set}" = set; then
2395 echo $ECHO_N "(cached) $ECHO_C" >&6
2396else
2397 cat >conftest.$ac_ext <<_ACEOF
2398#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002399/* confdefs.h. */
2400_ACEOF
2401cat confdefs.h >>conftest.$ac_ext
2402cat >>conftest.$ac_ext <<_ACEOF
2403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002404
Martin v. Löwis11437992002-04-12 09:54:03 +00002405int
2406main ()
2407{
2408#ifndef __GNUC__
2409 choke me
2410#endif
2411
2412 ;
2413 return 0;
2414}
2415_ACEOF
2416rm -f conftest.$ac_objext
2417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2418 (eval $ac_compile) 2>&5
2419 ac_status=$?
2420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2421 (exit $ac_status); } &&
2422 { ac_try='test -s conftest.$ac_objext'
2423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2424 (eval $ac_try) 2>&5
2425 ac_status=$?
2426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427 (exit $ac_status); }; }; then
2428 ac_compiler_gnu=yes
2429else
2430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002431sed 's/^/| /' conftest.$ac_ext >&5
2432
Martin v. Löwis11437992002-04-12 09:54:03 +00002433ac_compiler_gnu=no
2434fi
2435rm -f conftest.$ac_objext conftest.$ac_ext
2436ac_cv_c_compiler_gnu=$ac_compiler_gnu
2437
2438fi
2439echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2440echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2441GCC=`test $ac_compiler_gnu = yes && echo yes`
2442ac_test_CFLAGS=${CFLAGS+set}
2443ac_save_CFLAGS=$CFLAGS
2444CFLAGS="-g"
2445echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2446echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2447if test "${ac_cv_prog_cc_g+set}" = set; then
2448 echo $ECHO_N "(cached) $ECHO_C" >&6
2449else
2450 cat >conftest.$ac_ext <<_ACEOF
2451#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002452/* confdefs.h. */
2453_ACEOF
2454cat confdefs.h >>conftest.$ac_ext
2455cat >>conftest.$ac_ext <<_ACEOF
2456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002457
Martin v. Löwis11437992002-04-12 09:54:03 +00002458int
2459main ()
2460{
2461
2462 ;
2463 return 0;
2464}
2465_ACEOF
2466rm -f conftest.$ac_objext
2467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2468 (eval $ac_compile) 2>&5
2469 ac_status=$?
2470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2471 (exit $ac_status); } &&
2472 { ac_try='test -s conftest.$ac_objext'
2473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2474 (eval $ac_try) 2>&5
2475 ac_status=$?
2476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2477 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002478 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002479else
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002481sed 's/^/| /' conftest.$ac_ext >&5
2482
Martin v. Löwis11437992002-04-12 09:54:03 +00002483ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002485rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002486fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002487echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2488echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002489if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002491elif test $ac_cv_prog_cc_g = yes; then
2492 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002493 CFLAGS="-g -O2"
2494 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002495 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002496 fi
2497else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002498 if test "$GCC" = yes; then
2499 CFLAGS="-O2"
2500 else
2501 CFLAGS=
2502 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002503fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002504echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2505echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2506if test "${ac_cv_prog_cc_stdc+set}" = set; then
2507 echo $ECHO_N "(cached) $ECHO_C" >&6
2508else
2509 ac_cv_prog_cc_stdc=no
2510ac_save_CC=$CC
2511cat >conftest.$ac_ext <<_ACEOF
2512#line $LINENO "configure"
2513/* confdefs.h. */
2514_ACEOF
2515cat confdefs.h >>conftest.$ac_ext
2516cat >>conftest.$ac_ext <<_ACEOF
2517/* end confdefs.h. */
2518#include <stdarg.h>
2519#include <stdio.h>
2520#include <sys/types.h>
2521#include <sys/stat.h>
2522/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2523struct buf { int x; };
2524FILE * (*rcsopen) (struct buf *, struct stat *, int);
2525static char *e (p, i)
2526 char **p;
2527 int i;
2528{
2529 return p[i];
2530}
2531static char *f (char * (*g) (char **, int), char **p, ...)
2532{
2533 char *s;
2534 va_list v;
2535 va_start (v,p);
2536 s = g (p, va_arg (v,int));
2537 va_end (v);
2538 return s;
2539}
2540int test (int i, double x);
2541struct s1 {int (*f) (int a);};
2542struct s2 {int (*f) (double a);};
2543int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2544int argc;
2545char **argv;
2546int
2547main ()
2548{
2549return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2550 ;
2551 return 0;
2552}
2553_ACEOF
2554# Don't try gcc -ansi; that turns off useful extensions and
2555# breaks some systems' header files.
2556# AIX -qlanglvl=ansi
2557# Ultrix and OSF/1 -std1
2558# HP-UX 10.20 and later -Ae
2559# HP-UX older versions -Aa -D_HPUX_SOURCE
2560# SVR4 -Xc -D__EXTENSIONS__
2561for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2562do
2563 CC="$ac_save_CC $ac_arg"
2564 rm -f conftest.$ac_objext
2565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2566 (eval $ac_compile) 2>&5
2567 ac_status=$?
2568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2569 (exit $ac_status); } &&
2570 { ac_try='test -s conftest.$ac_objext'
2571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2572 (eval $ac_try) 2>&5
2573 ac_status=$?
2574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2575 (exit $ac_status); }; }; then
2576 ac_cv_prog_cc_stdc=$ac_arg
2577break
2578else
2579 echo "$as_me: failed program was:" >&5
2580sed 's/^/| /' conftest.$ac_ext >&5
2581
2582fi
2583rm -f conftest.$ac_objext
2584done
2585rm -f conftest.$ac_ext conftest.$ac_objext
2586CC=$ac_save_CC
2587
2588fi
2589
2590case "x$ac_cv_prog_cc_stdc" in
2591 x|xno)
2592 echo "$as_me:$LINENO: result: none needed" >&5
2593echo "${ECHO_T}none needed" >&6 ;;
2594 *)
2595 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2596echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2597 CC="$CC $ac_cv_prog_cc_stdc" ;;
2598esac
2599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600# Some people use a C++ compiler to compile C. Since we use `exit',
2601# in C++ we need to declare it. In case someone uses the same compiler
2602# for both compiling C and C++ we need to have the C++ compiler decide
2603# the declaration of exit, since it's the most demanding environment.
2604cat >conftest.$ac_ext <<_ACEOF
2605#ifndef __cplusplus
2606 choke me
2607#endif
2608_ACEOF
2609rm -f conftest.$ac_objext
2610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2611 (eval $ac_compile) 2>&5
2612 ac_status=$?
2613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2614 (exit $ac_status); } &&
2615 { ac_try='test -s conftest.$ac_objext'
2616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2617 (eval $ac_try) 2>&5
2618 ac_status=$?
2619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2620 (exit $ac_status); }; }; then
2621 for ac_declaration in \
2622 ''\
2623 '#include <stdlib.h>' \
2624 'extern "C" void std::exit (int) throw (); using std::exit;' \
2625 'extern "C" void std::exit (int); using std::exit;' \
2626 'extern "C" void exit (int) throw ();' \
2627 'extern "C" void exit (int);' \
2628 'void exit (int);'
2629do
2630 cat >conftest.$ac_ext <<_ACEOF
2631#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002632/* confdefs.h. */
2633_ACEOF
2634cat confdefs.h >>conftest.$ac_ext
2635cat >>conftest.$ac_ext <<_ACEOF
2636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002637#include <stdlib.h>
2638$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002639int
2640main ()
2641{
2642exit (42);
2643 ;
2644 return 0;
2645}
2646_ACEOF
2647rm -f conftest.$ac_objext
2648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2649 (eval $ac_compile) 2>&5
2650 ac_status=$?
2651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652 (exit $ac_status); } &&
2653 { ac_try='test -s conftest.$ac_objext'
2654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2655 (eval $ac_try) 2>&5
2656 ac_status=$?
2657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2658 (exit $ac_status); }; }; then
2659 :
2660else
2661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002662sed 's/^/| /' conftest.$ac_ext >&5
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664continue
2665fi
2666rm -f conftest.$ac_objext conftest.$ac_ext
2667 cat >conftest.$ac_ext <<_ACEOF
2668#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002669/* confdefs.h. */
2670_ACEOF
2671cat confdefs.h >>conftest.$ac_ext
2672cat >>conftest.$ac_ext <<_ACEOF
2673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002674$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002675int
2676main ()
2677{
2678exit (42);
2679 ;
2680 return 0;
2681}
2682_ACEOF
2683rm -f conftest.$ac_objext
2684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2685 (eval $ac_compile) 2>&5
2686 ac_status=$?
2687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2688 (exit $ac_status); } &&
2689 { ac_try='test -s conftest.$ac_objext'
2690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2691 (eval $ac_try) 2>&5
2692 ac_status=$?
2693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2694 (exit $ac_status); }; }; then
2695 break
2696else
2697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002698sed 's/^/| /' conftest.$ac_ext >&5
2699
Martin v. Löwis11437992002-04-12 09:54:03 +00002700fi
2701rm -f conftest.$ac_objext conftest.$ac_ext
2702done
2703rm -f conftest*
2704if test -n "$ac_declaration"; then
2705 echo '#ifdef __cplusplus' >>confdefs.h
2706 echo $ac_declaration >>confdefs.h
2707 echo '#endif' >>confdefs.h
2708fi
2709
2710else
2711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002712sed 's/^/| /' conftest.$ac_ext >&5
2713
Martin v. Löwis11437992002-04-12 09:54:03 +00002714fi
2715rm -f conftest.$ac_objext conftest.$ac_ext
2716ac_ext=c
2717ac_cpp='$CPP $CPPFLAGS'
2718ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2719ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2720ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002722
2723# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002724
2725ac_ext=c
2726ac_cpp='$CPP $CPPFLAGS'
2727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729ac_compiler_gnu=$ac_cv_c_compiler_gnu
2730echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2731echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002732# On Suns, sometimes $CPP names a directory.
2733if test -n "$CPP" && test -d "$CPP"; then
2734 CPP=
2735fi
2736if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 if test "${ac_cv_prog_CPP+set}" = set; then
2738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002739else
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 # Double quotes because CPP needs to be expanded
2741 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2742 do
2743 ac_preproc_ok=false
2744for ac_c_preproc_warn_flag in '' yes
2745do
2746 # Use a header file that comes with gcc, so configuring glibc
2747 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002748 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2749 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002750 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 # not just through cpp. "Syntax error" is here to catch this case.
2752 cat >conftest.$ac_ext <<_ACEOF
2753#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002754/* confdefs.h. */
2755_ACEOF
2756cat confdefs.h >>conftest.$ac_ext
2757cat >>conftest.$ac_ext <<_ACEOF
2758/* end confdefs.h. */
2759#ifdef __STDC__
2760# include <limits.h>
2761#else
2762# include <assert.h>
2763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002764 Syntax error
2765_ACEOF
2766if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2767 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2768 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002769 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 rm -f conftest.er1
2771 cat conftest.err >&5
2772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2773 (exit $ac_status); } >/dev/null; then
2774 if test -s conftest.err; then
2775 ac_cpp_err=$ac_c_preproc_warn_flag
2776 else
2777 ac_cpp_err=
2778 fi
2779else
2780 ac_cpp_err=yes
2781fi
2782if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002783 :
2784else
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002786sed 's/^/| /' conftest.$ac_ext >&5
2787
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 # Broken: fails on valid input.
2789continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002790fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002791rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002792
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 # OK, works on sane cases. Now check whether non-existent headers
2794 # can be detected and how.
2795 cat >conftest.$ac_ext <<_ACEOF
2796#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002797/* confdefs.h. */
2798_ACEOF
2799cat confdefs.h >>conftest.$ac_ext
2800cat >>conftest.$ac_ext <<_ACEOF
2801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002802#include <ac_nonexistent.h>
2803_ACEOF
2804if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2805 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2806 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002807 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002808 rm -f conftest.er1
2809 cat conftest.err >&5
2810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2811 (exit $ac_status); } >/dev/null; then
2812 if test -s conftest.err; then
2813 ac_cpp_err=$ac_c_preproc_warn_flag
2814 else
2815 ac_cpp_err=
2816 fi
2817else
2818 ac_cpp_err=yes
2819fi
2820if test -z "$ac_cpp_err"; then
2821 # Broken: success on invalid input.
2822continue
2823else
2824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002825sed 's/^/| /' conftest.$ac_ext >&5
2826
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 # Passes both tests.
2828ac_preproc_ok=:
2829break
2830fi
2831rm -f conftest.err conftest.$ac_ext
2832
2833done
2834# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2835rm -f conftest.err conftest.$ac_ext
2836if $ac_preproc_ok; then
2837 break
2838fi
2839
2840 done
2841 ac_cv_prog_CPP=$CPP
2842
2843fi
2844 CPP=$ac_cv_prog_CPP
2845else
2846 ac_cv_prog_CPP=$CPP
2847fi
2848echo "$as_me:$LINENO: result: $CPP" >&5
2849echo "${ECHO_T}$CPP" >&6
2850ac_preproc_ok=false
2851for ac_c_preproc_warn_flag in '' yes
2852do
2853 # Use a header file that comes with gcc, so configuring glibc
2854 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002855 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2856 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002857 # On the NeXT, cc -E runs the code through the compiler's parser,
2858 # not just through cpp. "Syntax error" is here to catch this case.
2859 cat >conftest.$ac_ext <<_ACEOF
2860#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002861/* confdefs.h. */
2862_ACEOF
2863cat confdefs.h >>conftest.$ac_ext
2864cat >>conftest.$ac_ext <<_ACEOF
2865/* end confdefs.h. */
2866#ifdef __STDC__
2867# include <limits.h>
2868#else
2869# include <assert.h>
2870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 Syntax error
2872_ACEOF
2873if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2874 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2875 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002876 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 rm -f conftest.er1
2878 cat conftest.err >&5
2879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2880 (exit $ac_status); } >/dev/null; then
2881 if test -s conftest.err; then
2882 ac_cpp_err=$ac_c_preproc_warn_flag
2883 else
2884 ac_cpp_err=
2885 fi
2886else
2887 ac_cpp_err=yes
2888fi
2889if test -z "$ac_cpp_err"; then
2890 :
2891else
2892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002893sed 's/^/| /' conftest.$ac_ext >&5
2894
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 # Broken: fails on valid input.
2896continue
2897fi
2898rm -f conftest.err conftest.$ac_ext
2899
2900 # OK, works on sane cases. Now check whether non-existent headers
2901 # can be detected and how.
2902 cat >conftest.$ac_ext <<_ACEOF
2903#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002904/* confdefs.h. */
2905_ACEOF
2906cat confdefs.h >>conftest.$ac_ext
2907cat >>conftest.$ac_ext <<_ACEOF
2908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002909#include <ac_nonexistent.h>
2910_ACEOF
2911if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2912 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2913 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002914 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 rm -f conftest.er1
2916 cat conftest.err >&5
2917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2918 (exit $ac_status); } >/dev/null; then
2919 if test -s conftest.err; then
2920 ac_cpp_err=$ac_c_preproc_warn_flag
2921 else
2922 ac_cpp_err=
2923 fi
2924else
2925 ac_cpp_err=yes
2926fi
2927if test -z "$ac_cpp_err"; then
2928 # Broken: success on invalid input.
2929continue
2930else
2931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002932sed 's/^/| /' conftest.$ac_ext >&5
2933
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 # Passes both tests.
2935ac_preproc_ok=:
2936break
2937fi
2938rm -f conftest.err conftest.$ac_ext
2939
2940done
2941# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2942rm -f conftest.err conftest.$ac_ext
2943if $ac_preproc_ok; then
2944 :
2945else
Skip Montanaro6dead952003-09-25 14:50:04 +00002946 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2947See \`config.log' for more details." >&5
2948echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2949See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002950 { (exit 1); exit 1; }; }
2951fi
2952
2953ac_ext=c
2954ac_cpp='$CPP $CPPFLAGS'
2955ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2956ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2957ac_compiler_gnu=$ac_cv_c_compiler_gnu
2958
2959
Skip Montanaro6dead952003-09-25 14:50:04 +00002960echo "$as_me:$LINENO: checking for egrep" >&5
2961echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2962if test "${ac_cv_prog_egrep+set}" = set; then
2963 echo $ECHO_N "(cached) $ECHO_C" >&6
2964else
2965 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2966 then ac_cv_prog_egrep='grep -E'
2967 else ac_cv_prog_egrep='egrep'
2968 fi
2969fi
2970echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2971echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2972 EGREP=$ac_cv_prog_egrep
2973
2974
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
2976echo "$as_me:$LINENO: checking for AIX" >&5
2977echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2978cat >conftest.$ac_ext <<_ACEOF
2979#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002980/* confdefs.h. */
2981_ACEOF
2982cat confdefs.h >>conftest.$ac_ext
2983cat >>conftest.$ac_ext <<_ACEOF
2984/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002985#ifdef _AIX
2986 yes
2987#endif
2988
Martin v. Löwis11437992002-04-12 09:54:03 +00002989_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002991 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 echo "$as_me:$LINENO: result: yes" >&5
2993echo "${ECHO_T}yes" >&6
2994cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002996_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002997
2998else
Martin v. Löwis11437992002-04-12 09:54:03 +00002999 echo "$as_me:$LINENO: result: no" >&5
3000echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003001fi
3002rm -f conftest*
3003
Michael W. Hudson54241132001-12-07 15:38:26 +00003004
Martin v. Löwis11437992002-04-12 09:54:03 +00003005echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3006echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3007if test "${ac_cv_header_stdc+set}" = set; then
3008 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003009else
Martin v. Löwis11437992002-04-12 09:54:03 +00003010 cat >conftest.$ac_ext <<_ACEOF
3011#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003012/* confdefs.h. */
3013_ACEOF
3014cat confdefs.h >>conftest.$ac_ext
3015cat >>conftest.$ac_ext <<_ACEOF
3016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003017#include <stdlib.h>
3018#include <stdarg.h>
3019#include <string.h>
3020#include <float.h>
3021
Skip Montanaro6dead952003-09-25 14:50:04 +00003022int
3023main ()
3024{
3025
3026 ;
3027 return 0;
3028}
Martin v. Löwis11437992002-04-12 09:54:03 +00003029_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003030rm -f conftest.$ac_objext
3031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3032 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003033 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00003034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003035 (exit $ac_status); } &&
3036 { ac_try='test -s conftest.$ac_objext'
3037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3038 (eval $ac_try) 2>&5
3039 ac_status=$?
3040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3041 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003042 ac_cv_header_stdc=yes
3043else
3044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003045sed 's/^/| /' conftest.$ac_ext >&5
3046
3047ac_cv_header_stdc=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003048fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003049rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003050
3051if test $ac_cv_header_stdc = yes; then
3052 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3053 cat >conftest.$ac_ext <<_ACEOF
3054#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003055/* confdefs.h. */
3056_ACEOF
3057cat confdefs.h >>conftest.$ac_ext
3058cat >>conftest.$ac_ext <<_ACEOF
3059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003060#include <string.h>
3061
3062_ACEOF
3063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003064 $EGREP "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003065 :
3066else
3067 ac_cv_header_stdc=no
3068fi
3069rm -f conftest*
3070
3071fi
3072
3073if test $ac_cv_header_stdc = yes; then
3074 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3075 cat >conftest.$ac_ext <<_ACEOF
3076#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003077/* confdefs.h. */
3078_ACEOF
3079cat confdefs.h >>conftest.$ac_ext
3080cat >>conftest.$ac_ext <<_ACEOF
3081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003082#include <stdlib.h>
3083
3084_ACEOF
3085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003086 $EGREP "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003087 :
3088else
3089 ac_cv_header_stdc=no
3090fi
3091rm -f conftest*
3092
3093fi
3094
3095if test $ac_cv_header_stdc = yes; then
3096 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3097 if test "$cross_compiling" = yes; then
3098 :
3099else
3100 cat >conftest.$ac_ext <<_ACEOF
3101#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003102/* confdefs.h. */
3103_ACEOF
3104cat confdefs.h >>conftest.$ac_ext
3105cat >>conftest.$ac_ext <<_ACEOF
3106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003107#include <ctype.h>
3108#if ((' ' & 0x0FF) == 0x020)
3109# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3110# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3111#else
Skip Montanaro6dead952003-09-25 14:50:04 +00003112# define ISLOWER(c) \
3113 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00003114 || ('j' <= (c) && (c) <= 'r') \
3115 || ('s' <= (c) && (c) <= 'z'))
3116# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3117#endif
3118
3119#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3120int
3121main ()
3122{
3123 int i;
3124 for (i = 0; i < 256; i++)
3125 if (XOR (islower (i), ISLOWER (i))
3126 || toupper (i) != TOUPPER (i))
3127 exit(2);
3128 exit (0);
3129}
3130_ACEOF
3131rm -f conftest$ac_exeext
3132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3133 (eval $ac_link) 2>&5
3134 ac_status=$?
3135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3138 (eval $ac_try) 2>&5
3139 ac_status=$?
3140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3141 (exit $ac_status); }; }; then
3142 :
3143else
3144 echo "$as_me: program exited with status $ac_status" >&5
3145echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003146sed 's/^/| /' conftest.$ac_ext >&5
3147
Martin v. Löwis11437992002-04-12 09:54:03 +00003148( exit $ac_status )
3149ac_cv_header_stdc=no
3150fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003151rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003152fi
3153fi
3154fi
3155echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3156echo "${ECHO_T}$ac_cv_header_stdc" >&6
3157if test $ac_cv_header_stdc = yes; then
3158
3159cat >>confdefs.h <<\_ACEOF
3160#define STDC_HEADERS 1
3161_ACEOF
3162
3163fi
3164
3165# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3176 inttypes.h stdint.h unistd.h
3177do
3178as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3179echo "$as_me:$LINENO: checking for $ac_header" >&5
3180echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3181if eval "test \"\${$as_ac_Header+set}\" = set"; then
3182 echo $ECHO_N "(cached) $ECHO_C" >&6
3183else
3184 cat >conftest.$ac_ext <<_ACEOF
3185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003186/* confdefs.h. */
3187_ACEOF
3188cat confdefs.h >>conftest.$ac_ext
3189cat >>conftest.$ac_ext <<_ACEOF
3190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003191$ac_includes_default
3192
3193#include <$ac_header>
3194_ACEOF
3195rm -f conftest.$ac_objext
3196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3197 (eval $ac_compile) 2>&5
3198 ac_status=$?
3199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3200 (exit $ac_status); } &&
3201 { ac_try='test -s conftest.$ac_objext'
3202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3203 (eval $ac_try) 2>&5
3204 ac_status=$?
3205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3206 (exit $ac_status); }; }; then
3207 eval "$as_ac_Header=yes"
3208else
3209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003210sed 's/^/| /' conftest.$ac_ext >&5
3211
Martin v. Löwis11437992002-04-12 09:54:03 +00003212eval "$as_ac_Header=no"
3213fi
3214rm -f conftest.$ac_objext conftest.$ac_ext
3215fi
3216echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3217echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3218if test `eval echo '${'$as_ac_Header'}'` = yes; then
3219 cat >>confdefs.h <<_ACEOF
3220#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3221_ACEOF
3222
3223fi
3224
3225done
3226
3227
3228if test "${ac_cv_header_minix_config_h+set}" = set; then
3229 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3230echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3231if test "${ac_cv_header_minix_config_h+set}" = set; then
3232 echo $ECHO_N "(cached) $ECHO_C" >&6
3233fi
3234echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3235echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3236else
3237 # Is the header compilable?
3238echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3239echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3240cat >conftest.$ac_ext <<_ACEOF
3241#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003242/* confdefs.h. */
3243_ACEOF
3244cat confdefs.h >>conftest.$ac_ext
3245cat >>conftest.$ac_ext <<_ACEOF
3246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003247$ac_includes_default
3248#include <minix/config.h>
3249_ACEOF
3250rm -f conftest.$ac_objext
3251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3252 (eval $ac_compile) 2>&5
3253 ac_status=$?
3254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3255 (exit $ac_status); } &&
3256 { ac_try='test -s conftest.$ac_objext'
3257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3258 (eval $ac_try) 2>&5
3259 ac_status=$?
3260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3261 (exit $ac_status); }; }; then
3262 ac_header_compiler=yes
3263else
3264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003265sed 's/^/| /' conftest.$ac_ext >&5
3266
Martin v. Löwis11437992002-04-12 09:54:03 +00003267ac_header_compiler=no
3268fi
3269rm -f conftest.$ac_objext conftest.$ac_ext
3270echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3271echo "${ECHO_T}$ac_header_compiler" >&6
3272
3273# Is the header present?
3274echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3275echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3276cat >conftest.$ac_ext <<_ACEOF
3277#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003278/* confdefs.h. */
3279_ACEOF
3280cat confdefs.h >>conftest.$ac_ext
3281cat >>conftest.$ac_ext <<_ACEOF
3282/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003283#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003284_ACEOF
3285if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3286 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3287 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003288 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003289 rm -f conftest.er1
3290 cat conftest.err >&5
3291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3292 (exit $ac_status); } >/dev/null; then
3293 if test -s conftest.err; then
3294 ac_cpp_err=$ac_c_preproc_warn_flag
3295 else
3296 ac_cpp_err=
3297 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003298else
Martin v. Löwis11437992002-04-12 09:54:03 +00003299 ac_cpp_err=yes
3300fi
3301if test -z "$ac_cpp_err"; then
3302 ac_header_preproc=yes
3303else
3304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003305sed 's/^/| /' conftest.$ac_ext >&5
3306
Martin v. Löwis11437992002-04-12 09:54:03 +00003307 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003309rm -f conftest.err conftest.$ac_ext
3310echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3311echo "${ECHO_T}$ac_header_preproc" >&6
3312
3313# So? What about this header?
3314case $ac_header_compiler:$ac_header_preproc in
3315 yes:no )
3316 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3317echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3318 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003319echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3320 (
3321 cat <<\_ASBOX
3322## ------------------------------------ ##
3323## Report this to bug-autoconf@gnu.org. ##
3324## ------------------------------------ ##
3325_ASBOX
3326 ) |
3327 sed "s/^/$as_me: WARNING: /" >&2
3328 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003329 no:yes )
3330 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3331echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3332 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3333echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3334 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003335echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3336 (
3337 cat <<\_ASBOX
3338## ------------------------------------ ##
3339## Report this to bug-autoconf@gnu.org. ##
3340## ------------------------------------ ##
3341_ASBOX
3342 ) |
3343 sed "s/^/$as_me: WARNING: /" >&2
3344 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003345esac
3346echo "$as_me:$LINENO: checking for minix/config.h" >&5
3347echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3348if test "${ac_cv_header_minix_config_h+set}" = set; then
3349 echo $ECHO_N "(cached) $ECHO_C" >&6
3350else
3351 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003352fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003353echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3354echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3355
3356fi
3357if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003358 MINIX=yes
3359else
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003361fi
3362
Martin v. Löwis11437992002-04-12 09:54:03 +00003363
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003364if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003365
3366cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003367#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003368_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003369
Martin v. Löwis11437992002-04-12 09:54:03 +00003370
3371cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003372#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003373_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003374
Martin v. Löwis11437992002-04-12 09:54:03 +00003375
3376cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003377#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003378_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003379
3380fi
3381
3382
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003383# Check for unsupported systems
3384case $ac_sys_system/$ac_sys_release in
3385SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3386 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3387 echo See README for details.
3388 exit 1;;
3389esac
3390
3391if test "$MINIX" = yes; then
3392 echo This system \(MINIX\) is no longer supported.
3393 echo Read README for details.
3394 exit 1
3395fi
3396
Michael W. Hudson54241132001-12-07 15:38:26 +00003397
Martin v. Löwis11437992002-04-12 09:54:03 +00003398echo "$as_me:$LINENO: checking for --with-suffix" >&5
3399echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003400
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003401# Check whether --with-suffix or --without-suffix was given.
3402if test "${with_suffix+set}" = set; then
3403 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003404
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003405 case $withval in
3406 no) EXEEXT=;;
3407 yes) EXEEXT=.exe;;
3408 *) EXEEXT=$withval;;
3409 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003410fi;
3411echo "$as_me:$LINENO: result: $EXEEXT" >&5
3412echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003413
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003414# Test whether we're running on a non-case-sensitive system, in which
3415# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003416
Martin v. Löwis11437992002-04-12 09:54:03 +00003417echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3418echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003419if test ! -d CaseSensitiveTestDir; then
3420mkdir CaseSensitiveTestDir
3421fi
3422
3423if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003424then
Martin v. Löwis11437992002-04-12 09:54:03 +00003425 echo "$as_me:$LINENO: result: yes" >&5
3426echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003427 BUILDEXEEXT=.exe
3428else
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 echo "$as_me:$LINENO: result: no" >&5
3430echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003431 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003432fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003433rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003434
Guido van Rossumdd997f71998-10-07 19:58:26 +00003435case $MACHDEP in
3436bsdos*)
3437 case $CC in
3438 gcc) CC="$CC -D_HAVE_BSDI";;
3439 esac;;
3440esac
3441
Guido van Rossum24b1e751997-08-21 02:29:16 +00003442case $ac_sys_system in
3443hp*|HP*)
3444 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003445 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003446 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003447Monterey*)
3448 case $CC in
3449 cc) CC="$CC -Wl,-Bexport";;
3450 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003451SunOS*)
3452 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003453
3454cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003455#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003456_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003457
3458 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003459esac
3460
Michael W. Hudson54241132001-12-07 15:38:26 +00003461
3462
Martin v. Löwis11437992002-04-12 09:54:03 +00003463echo "$as_me:$LINENO: checking LIBRARY" >&5
3464echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003465if test -z "$LIBRARY"
3466then
3467 LIBRARY='libpython$(VERSION).a'
3468fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469echo "$as_me:$LINENO: result: $LIBRARY" >&5
3470echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003471
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003472# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003473# name of the library into which to insert object files). BLDLIBRARY is also
3474# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3475# is blank as the main program is not linked directly against LDLIBRARY.
3476# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3477# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3478# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3479# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003480#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003481# RUNSHARED is used to run shared python without installed libraries
3482#
3483# INSTSONAME is the name of the shared library that will be use to install
3484# on the system - some systems like version suffix, others don't
3485
3486
Michael W. Hudson54241132001-12-07 15:38:26 +00003487
3488
3489
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003490
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003491LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003492BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003493INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003494DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003495LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003496RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003497
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003498# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003499# If CXX is set, and if it is needed to link a main function that was
3500# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3501# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003502# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003503# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003504
Martin v. Löwis11437992002-04-12 09:54:03 +00003505echo "$as_me:$LINENO: checking LINKCC" >&5
3506echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003507if test -z "$LINKCC"
3508then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003509 if test -z "$CXX"; then
3510 LINKCC="\$(PURIFY) \$(CC)"
3511 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003512 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003513 $CXX -c conftest.$ac_ext 2>&5
3514 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3515 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3516 then
3517 LINKCC="\$(PURIFY) \$(CC)"
3518 else
3519 LINKCC="\$(PURIFY) \$(CXX)"
3520 fi
3521 rm -fr conftest*
3522 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003523 case $ac_sys_system in
3524 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003525 exp_extra="\"\""
3526 if test $ac_sys_release -ge 5 -o \
3527 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3528 exp_extra="."
3529 fi
3530 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003531 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003532 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003533 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003534 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003535 esac
3536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003537echo "$as_me:$LINENO: result: $LINKCC" >&5
3538echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003539
Martin v. Löwis11437992002-04-12 09:54:03 +00003540echo "$as_me:$LINENO: checking for --enable-shared" >&5
3541echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003542# Check whether --enable-shared or --disable-shared was given.
3543if test "${enable_shared+set}" = set; then
3544 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003545
Martin v. Löwis11437992002-04-12 09:54:03 +00003546fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003547
3548if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003549then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003550 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003551 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003552 enable_shared="yes";;
3553 *)
3554 enable_shared="no";;
3555 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003557echo "$as_me:$LINENO: result: $enable_shared" >&5
3558echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003559
3560
Martin v. Löwis11437992002-04-12 09:54:03 +00003561echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3562echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003563
Guido van Rossumb8552162001-09-05 14:58:11 +00003564# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3565# library that we build, but we do not want to link against it (we
3566# will find it with a -framework option). For this reason there is an
3567# extra variable BLDLIBRARY against which Python and the extension
3568# modules are linked, BLDLIBRARY. This is normally the same as
3569# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003570if test "$enable_framework"
3571then
3572 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003573 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003574 BLDLIBRARY=''
3575else
3576 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003577fi
Jack Jansene578a632001-08-15 01:27:14 +00003578
Martin v. Löwis1142de32002-03-29 16:28:31 +00003579# Other platforms follow
3580if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003581
3582cat >>confdefs.h <<\_ACEOF
3583#define Py_ENABLE_SHARED 1
3584_ACEOF
3585
Martin v. Löwis1142de32002-03-29 16:28:31 +00003586 case $ac_sys_system in
3587 BeOS*)
3588 LDLIBRARY='libpython$(VERSION).so'
3589 ;;
3590 CYGWIN*)
3591 LDLIBRARY='libpython$(VERSION).dll.a'
3592 DLLLIBRARY='libpython$(VERSION).dll'
3593 ;;
3594 SunOS*)
3595 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003596 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003597 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003598 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003599 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003600 LDLIBRARY='libpython$(VERSION).so'
3601 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003602 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003603 INSTSONAME="$LDLIBRARY".$SOVERSION
3604 ;;
3605 hp*|HP*)
3606 LDLIBRARY='libpython$(VERSION).sl'
3607 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003608 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003609 ;;
3610 OSF*)
3611 LDLIBRARY='libpython$(VERSION).so'
3612 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003613 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003614 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003615 atheos*)
3616 LDLIBRARY='libpython$(VERSION).so'
3617 BLDLIBRARY='-L. -lpython$(VERSION)'
3618 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3619 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003620 esac
3621 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3622 case $MACHDEP in
3623 dguxR4)
3624 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003625 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003626 ;;
3627 esac
Jason Tishler30765592003-09-04 11:04:06 +00003628else # shared is disabled
3629 case $ac_sys_system in
3630 CYGWIN*)
3631 BLDLIBRARY='$(LIBRARY)'
3632 LDLIBRARY='libpython$(VERSION).dll.a'
3633 ;;
3634 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003635fi
3636
Martin v. Löwis11437992002-04-12 09:54:03 +00003637echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3638echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003639
Martin v. Löwis11437992002-04-12 09:54:03 +00003640if test -n "$ac_tool_prefix"; then
3641 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3642set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3643echo "$as_me:$LINENO: checking for $ac_word" >&5
3644echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3645if test "${ac_cv_prog_RANLIB+set}" = set; then
3646 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003647else
3648 if test -n "$RANLIB"; then
3649 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3650else
Martin v. Löwis11437992002-04-12 09:54:03 +00003651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3652for as_dir in $PATH
3653do
3654 IFS=$as_save_IFS
3655 test -z "$as_dir" && as_dir=.
3656 for ac_exec_ext in '' $ac_executable_extensions; do
3657 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3658 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3659 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3660 break 2
3661 fi
3662done
3663done
3664
Guido van Rossum627b2d71993-12-24 10:39:16 +00003665fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003666fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003667RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003668if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003669 echo "$as_me:$LINENO: result: $RANLIB" >&5
3670echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003671else
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 echo "$as_me:$LINENO: result: no" >&5
3673echo "${ECHO_T}no" >&6
3674fi
3675
3676fi
3677if test -z "$ac_cv_prog_RANLIB"; then
3678 ac_ct_RANLIB=$RANLIB
3679 # Extract the first word of "ranlib", so it can be a program name with args.
3680set dummy ranlib; ac_word=$2
3681echo "$as_me:$LINENO: checking for $ac_word" >&5
3682echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3683if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3684 echo $ECHO_N "(cached) $ECHO_C" >&6
3685else
3686 if test -n "$ac_ct_RANLIB"; then
3687 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3688else
3689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3690for as_dir in $PATH
3691do
3692 IFS=$as_save_IFS
3693 test -z "$as_dir" && as_dir=.
3694 for ac_exec_ext in '' $ac_executable_extensions; do
3695 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3696 ac_cv_prog_ac_ct_RANLIB="ranlib"
3697 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3698 break 2
3699 fi
3700done
3701done
3702
3703 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3704fi
3705fi
3706ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3707if test -n "$ac_ct_RANLIB"; then
3708 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3709echo "${ECHO_T}$ac_ct_RANLIB" >&6
3710else
3711 echo "$as_me:$LINENO: result: no" >&5
3712echo "${ECHO_T}no" >&6
3713fi
3714
3715 RANLIB=$ac_ct_RANLIB
3716else
3717 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003718fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003719
3720
Guido van Rossum7f43da71994-08-01 12:15:30 +00003721for ac_prog in ar aal
3722do
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003725echo "$as_me:$LINENO: checking for $ac_word" >&5
3726echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3727if test "${ac_cv_prog_AR+set}" = set; then
3728 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003729else
3730 if test -n "$AR"; then
3731 ac_cv_prog_AR="$AR" # Let the user override the test.
3732else
Martin v. Löwis11437992002-04-12 09:54:03 +00003733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734for as_dir in $PATH
3735do
3736 IFS=$as_save_IFS
3737 test -z "$as_dir" && as_dir=.
3738 for ac_exec_ext in '' $ac_executable_extensions; do
3739 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3740 ac_cv_prog_AR="$ac_prog"
3741 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3742 break 2
3743 fi
3744done
3745done
3746
Guido van Rossum7f43da71994-08-01 12:15:30 +00003747fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003749AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003750if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 echo "$as_me:$LINENO: result: $AR" >&5
3752echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003753else
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 echo "$as_me:$LINENO: result: no" >&5
3755echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003756fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003757
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003759done
3760test -n "$AR" || AR="ar"
3761
Michael W. Hudson54241132001-12-07 15:38:26 +00003762
Neil Schemenauera42c8272001-03-31 00:01:55 +00003763case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003764bsdos*|hp*|HP*)
3765 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003766 if test -z "$INSTALL"
3767 then
3768 INSTALL="${srcdir}/install-sh -c"
3769 fi
3770esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003771ac_aux_dir=
3772for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3773 if test -f $ac_dir/install-sh; then
3774 ac_aux_dir=$ac_dir
3775 ac_install_sh="$ac_aux_dir/install-sh -c"
3776 break
3777 elif test -f $ac_dir/install.sh; then
3778 ac_aux_dir=$ac_dir
3779 ac_install_sh="$ac_aux_dir/install.sh -c"
3780 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 elif test -f $ac_dir/shtool; then
3782 ac_aux_dir=$ac_dir
3783 ac_install_sh="$ac_aux_dir/shtool install -c"
3784 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003785 fi
3786done
3787if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3789echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3790 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003791fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003792ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3793ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3794ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003795
3796# Find a good install program. We prefer a C program (faster),
3797# so one script is as good as another. But avoid the broken or
3798# incompatible versions:
3799# SysV /etc/install, /usr/sbin/install
3800# SunOS /usr/etc/install
3801# IRIX /sbin/install
3802# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003803# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003804# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3805# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3806# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3807# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003808echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3809echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003810if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003811if test "${ac_cv_path_install+set}" = set; then
3812 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003813else
Martin v. Löwis11437992002-04-12 09:54:03 +00003814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3815for as_dir in $PATH
3816do
3817 IFS=$as_save_IFS
3818 test -z "$as_dir" && as_dir=.
3819 # Account for people who put trailing slashes in PATH elements.
3820case $as_dir/ in
3821 ./ | .// | /cC/* | \
3822 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3823 /usr/ucb/* ) ;;
3824 *)
3825 # OSF1 and SCO ODT 3.0 have their own names for install.
3826 # Don't use installbsd from OSF since it installs stuff as root
3827 # by default.
3828 for ac_prog in ginstall scoinst install; do
3829 for ac_exec_ext in '' $ac_executable_extensions; do
3830 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3831 if test $ac_prog = install &&
3832 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3833 # AIX install. It has an incompatible calling convention.
3834 :
3835 elif test $ac_prog = install &&
3836 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3837 # program-specific install script used by HP pwplus--don't use.
3838 :
3839 else
3840 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3841 break 3
3842 fi
3843 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003844 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 done
3846 ;;
3847esac
3848done
3849
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003850
3851fi
3852 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003854 else
3855 # As a last resort, use the slow shell script. We don't cache a
3856 # path for INSTALL within a source directory, because that will
3857 # break other packages using the cache if that directory is
3858 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003860 fi
3861fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003862echo "$as_me:$LINENO: result: $INSTALL" >&5
3863echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003864
3865# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3866# It thinks the first close brace ends the variable substitution.
3867test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3868
Martin v. Löwis11437992002-04-12 09:54:03 +00003869test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003870
3871test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3872
Michael W. Hudson54241132001-12-07 15:38:26 +00003873
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003874# Not every filesystem supports hard links
3875
3876if test -z "$LN" ; then
3877 case $ac_sys_system in
3878 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003879 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003880 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003881 *) LN=ln;;
3882 esac
3883fi
3884
Fred Drake109d9862001-07-11 06:27:56 +00003885# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003886echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3887echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3888
Fred Drake109d9862001-07-11 06:27:56 +00003889# Check whether --with-pydebug or --without-pydebug was given.
3890if test "${with_pydebug+set}" = set; then
3891 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003892
Fred Drake109d9862001-07-11 06:27:56 +00003893if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003894then
3895
3896cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003897#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003898_ACEOF
3899
3900 echo "$as_me:$LINENO: result: yes" >&5
3901echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003902 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003903else echo "$as_me:$LINENO: result: no" >&5
3904echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003905fi
3906else
Martin v. Löwis11437992002-04-12 09:54:03 +00003907 echo "$as_me:$LINENO: result: no" >&5
3908echo "${ECHO_T}no" >&6
3909fi;
Fred Drake109d9862001-07-11 06:27:56 +00003910
Skip Montanarodecc6a42003-01-01 20:07:49 +00003911# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3912# merged with this chunk of code?
3913
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003914# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003915# ------------------------
3916# (The following bit of code is complicated enough - please keep things
3917# indented properly. Just pretend you're editing Python code. ;-)
3918
3919# There are two parallel sets of case statements below, one that checks to
3920# see if OPT was set and one that does BASECFLAGS setting based upon
3921# compiler and platform. BASECFLAGS tweaks need to be made even if the
3922# user set OPT.
3923
3924# tweak OPT based on compiler and platform, only if the user didn't set
3925# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003926
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003927if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003928then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003929 case $GCC in
3930 yes)
3931 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003932 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003933 if test "$Py_DEBUG" = 'true' ; then
3934 # Optimization messes up debuggers, so turn it off for
3935 # debug builds.
3936 OPT="-g -Wall -Wstrict-prototypes"
3937 else
3938 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003939 fi
3940 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003941 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003942 OPT="-O3 -Wall -Wstrict-prototypes"
3943 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003944 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003945 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003946 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3947 ;;
3948 esac
Fred Drake109d9862001-07-11 06:27:56 +00003949 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003950
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003951 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003952 OPT="-O"
3953 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003954 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003955
3956 # The current (beta) Monterey compiler dies with optimizations
3957 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003958 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003959 Monterey*)
3960 OPT=""
3961 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003962 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003963
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003964fi
3965
Skip Montanarodecc6a42003-01-01 20:07:49 +00003966
3967# tweak BASECFLAGS based on compiler and platform
3968case $GCC in
3969yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003970 # Python violates C99 rules, by casting between incompatible
3971 # pointer types. GCC may generate bad code as a result of that,
3972 # so use -fno-strict-aliasing if supported.
3973 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3974echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3975 ac_save_cc="$CC"
3976 CC="$CC -fno-strict-aliasing"
3977 if test "$cross_compiling" = yes; then
3978 ac_cv_no_strict_aliasing_ok=no
3979else
3980 cat >conftest.$ac_ext <<_ACEOF
3981#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003982/* confdefs.h. */
3983_ACEOF
3984cat confdefs.h >>conftest.$ac_ext
3985cat >>conftest.$ac_ext <<_ACEOF
3986/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003987int main() { return 0; }
3988_ACEOF
3989rm -f conftest$ac_exeext
3990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3991 (eval $ac_link) 2>&5
3992 ac_status=$?
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3996 (eval $ac_try) 2>&5
3997 ac_status=$?
3998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999 (exit $ac_status); }; }; then
4000 ac_cv_no_strict_aliasing_ok=yes
4001else
4002 echo "$as_me: program exited with status $ac_status" >&5
4003echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004004sed 's/^/| /' conftest.$ac_ext >&5
4005
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004006( exit $ac_status )
4007ac_cv_no_strict_aliasing_ok=no
4008fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004009rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004010fi
4011 CC="$ac_save_cc"
4012 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4013echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
4014 if test $ac_cv_no_strict_aliasing_ok = yes
4015 then
4016 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4017 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004018 case $ac_sys_system in
4019 SCO_SV*)
4020 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4021 ;;
4022 # is there any other compiler on Darwin besides gcc?
4023 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004024 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004025 ;;
4026 esac
4027 ;;
4028
4029*)
4030 case $ac_sys_system in
4031 OpenUNIX*|UnixWare*)
4032 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4033 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004034 OSF*)
4035 BASECFLAGS="$BASECFLAGS -ieee -std"
4036 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004037 SCO_SV*)
4038 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4039 ;;
4040 esac
4041 ;;
4042esac
4043
Fred Drakee1ceaa02001-12-04 20:55:47 +00004044if test "$Py_DEBUG" = 'true'; then
4045 :
4046else
4047 OPT="-DNDEBUG $OPT"
4048fi
4049
Guido van Rossum563e7081996-09-10 18:20:48 +00004050if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004051then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004052 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004053fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004054
Martin v. Löwis11437992002-04-12 09:54:03 +00004055echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4056echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
4057if test "${ac_cv_opt_olimit_ok+set}" = set; then
4058 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004059else
4060 ac_save_cc="$CC"
4061CC="$CC -OPT:Olimit=0"
4062if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004063 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004064else
Martin v. Löwis11437992002-04-12 09:54:03 +00004065 cat >conftest.$ac_ext <<_ACEOF
4066#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004067/* confdefs.h. */
4068_ACEOF
4069cat confdefs.h >>conftest.$ac_ext
4070cat >>conftest.$ac_ext <<_ACEOF
4071/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004072int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004073_ACEOF
4074rm -f conftest$ac_exeext
4075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4076 (eval $ac_link) 2>&5
4077 ac_status=$?
4078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4079 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4081 (eval $ac_try) 2>&5
4082 ac_status=$?
4083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4084 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004085 ac_cv_opt_olimit_ok=yes
4086else
Martin v. Löwis11437992002-04-12 09:54:03 +00004087 echo "$as_me: program exited with status $ac_status" >&5
4088echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004089sed 's/^/| /' conftest.$ac_ext >&5
4090
Martin v. Löwis11437992002-04-12 09:54:03 +00004091( exit $ac_status )
4092ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004093fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004094rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00004095fi
Guido van Rossum91922671997-10-09 20:24:13 +00004096CC="$ac_save_cc"
4097fi
4098
Martin v. Löwis11437992002-04-12 09:54:03 +00004099echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4100echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004101if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004102 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004103 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4104 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4105 # environment?
4106 Darwin*)
4107 ;;
4108 *)
4109 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4110 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004111 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004112else
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4114echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
4115 if test "${ac_cv_olimit_ok+set}" = set; then
4116 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004117else
4118 ac_save_cc="$CC"
4119 CC="$CC -Olimit 1500"
4120 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004121 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004122else
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 cat >conftest.$ac_ext <<_ACEOF
4124#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004125/* confdefs.h. */
4126_ACEOF
4127cat confdefs.h >>conftest.$ac_ext
4128cat >>conftest.$ac_ext <<_ACEOF
4129/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004130int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004131_ACEOF
4132rm -f conftest$ac_exeext
4133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4134 (eval $ac_link) 2>&5
4135 ac_status=$?
4136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4137 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4139 (eval $ac_try) 2>&5
4140 ac_status=$?
4141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004143 ac_cv_olimit_ok=yes
4144else
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 echo "$as_me: program exited with status $ac_status" >&5
4146echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004147sed 's/^/| /' conftest.$ac_ext >&5
4148
Martin v. Löwis11437992002-04-12 09:54:03 +00004149( exit $ac_status )
4150ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004151fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004152rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004153fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004154 CC="$ac_save_cc"
4155fi
4156
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4158echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004159 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004160 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004161 fi
4162fi
4163
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004164# On some compilers, pthreads are available without further options
4165# (e.g. MacOS X). On some of these systems, the compiler will not
4166# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4167# So we have to see first whether pthreads are available without
4168# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004169echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4170echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4171if test "${ac_cv_pthread_is_default+set}" = set; then
4172 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004173else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004174 if test "$cross_compiling" = yes; then
4175 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004176else
Martin v. Löwis11437992002-04-12 09:54:03 +00004177 cat >conftest.$ac_ext <<_ACEOF
4178#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* confdefs.h. */
4180_ACEOF
4181cat confdefs.h >>conftest.$ac_ext
4182cat >>conftest.$ac_ext <<_ACEOF
4183/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004184
Martin v. Löwis130fb172001-07-19 11:00:41 +00004185#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004186
4187void* routine(void* p){return NULL;}
4188
4189int main(){
4190 pthread_t p;
4191 if(pthread_create(&p,NULL,routine,NULL)!=0)
4192 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004193 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004194 return 0;
4195}
4196
Martin v. Löwis11437992002-04-12 09:54:03 +00004197_ACEOF
4198rm -f conftest$ac_exeext
4199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4200 (eval $ac_link) 2>&5
4201 ac_status=$?
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4205 (eval $ac_try) 2>&5
4206 ac_status=$?
4207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004209
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004210 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004211 ac_cv_kthread=no
4212 ac_cv_pthread=no
4213
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004214else
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 echo "$as_me: program exited with status $ac_status" >&5
4216echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004217sed 's/^/| /' conftest.$ac_ext >&5
4218
Martin v. Löwis11437992002-04-12 09:54:03 +00004219( exit $ac_status )
4220ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004221fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004222rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004223fi
4224
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004225fi
4226
Martin v. Löwis11437992002-04-12 09:54:03 +00004227echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4228echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004229
Michael W. Hudson54241132001-12-07 15:38:26 +00004230
Martin v. Löwis11437992002-04-12 09:54:03 +00004231if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004232then
4233 ac_cv_kpthread=no
4234else
4235# -Kpthread, if available, provides the right #defines
4236# and linker options to make pthread_create available
4237# Some compilers won't report that they do not support -Kpthread,
4238# so we need to run a program to see whether it really made the
4239# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004240echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4241echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4242if test "${ac_cv_kpthread+set}" = set; then
4243 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004244else
4245 ac_save_cc="$CC"
4246CC="$CC -Kpthread"
4247if test "$cross_compiling" = yes; then
4248 ac_cv_kpthread=no
4249else
Martin v. Löwis11437992002-04-12 09:54:03 +00004250 cat >conftest.$ac_ext <<_ACEOF
4251#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004252/* confdefs.h. */
4253_ACEOF
4254cat confdefs.h >>conftest.$ac_ext
4255cat >>conftest.$ac_ext <<_ACEOF
4256/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004257
4258#include <pthread.h>
4259
4260void* routine(void* p){return NULL;}
4261
4262int main(){
4263 pthread_t p;
4264 if(pthread_create(&p,NULL,routine,NULL)!=0)
4265 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004266 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004267 return 0;
4268}
4269
Martin v. Löwis11437992002-04-12 09:54:03 +00004270_ACEOF
4271rm -f conftest$ac_exeext
4272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4273 (eval $ac_link) 2>&5
4274 ac_status=$?
4275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4276 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4278 (eval $ac_try) 2>&5
4279 ac_status=$?
4280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4281 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004282 ac_cv_kpthread=yes
4283else
Martin v. Löwis11437992002-04-12 09:54:03 +00004284 echo "$as_me: program exited with status $ac_status" >&5
4285echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004286sed 's/^/| /' conftest.$ac_ext >&5
4287
Martin v. Löwis11437992002-04-12 09:54:03 +00004288( exit $ac_status )
4289ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004290fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004291rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004292fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004293CC="$ac_save_cc"
4294fi
4295
Martin v. Löwis11437992002-04-12 09:54:03 +00004296echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4297echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004298fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004299
Skip Montanarod8d39a02003-07-10 20:44:10 +00004300if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004301then
4302# -Kthread, if available, provides the right #defines
4303# and linker options to make pthread_create available
4304# Some compilers won't report that they do not support -Kthread,
4305# so we need to run a program to see whether it really made the
4306# function available.
4307echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4308echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4309if test "${ac_cv_kthread+set}" = set; then
4310 echo $ECHO_N "(cached) $ECHO_C" >&6
4311else
4312 ac_save_cc="$CC"
4313CC="$CC -Kthread"
4314if test "$cross_compiling" = yes; then
4315 ac_cv_kthread=no
4316else
4317 cat >conftest.$ac_ext <<_ACEOF
4318#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004319/* confdefs.h. */
4320_ACEOF
4321cat confdefs.h >>conftest.$ac_ext
4322cat >>conftest.$ac_ext <<_ACEOF
4323/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004324
4325#include <pthread.h>
4326
4327void* routine(void* p){return NULL;}
4328
4329int main(){
4330 pthread_t p;
4331 if(pthread_create(&p,NULL,routine,NULL)!=0)
4332 return 1;
4333 (void)pthread_detach(p);
4334 return 0;
4335}
4336
4337_ACEOF
4338rm -f conftest$ac_exeext
4339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4340 (eval $ac_link) 2>&5
4341 ac_status=$?
4342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4343 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4345 (eval $ac_try) 2>&5
4346 ac_status=$?
4347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4348 (exit $ac_status); }; }; then
4349 ac_cv_kthread=yes
4350else
4351 echo "$as_me: program exited with status $ac_status" >&5
4352echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004353sed 's/^/| /' conftest.$ac_ext >&5
4354
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004355( exit $ac_status )
4356ac_cv_kthread=no
4357fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004358rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004359fi
4360CC="$ac_save_cc"
4361fi
4362
4363echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4364echo "${ECHO_T}$ac_cv_kthread" >&6
4365fi
4366
Skip Montanarod8d39a02003-07-10 20:44:10 +00004367if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004368then
4369# -pthread, if available, provides the right #defines
4370# and linker options to make pthread_create available
4371# Some compilers won't report that they do not support -pthread,
4372# so we need to run a program to see whether it really made the
4373# function available.
4374echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4375echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4376if test "${ac_cv_thread+set}" = set; then
4377 echo $ECHO_N "(cached) $ECHO_C" >&6
4378else
4379 ac_save_cc="$CC"
4380CC="$CC -pthread"
4381if test "$cross_compiling" = yes; then
4382 ac_cv_pthread=no
4383else
4384 cat >conftest.$ac_ext <<_ACEOF
4385#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004386/* confdefs.h. */
4387_ACEOF
4388cat confdefs.h >>conftest.$ac_ext
4389cat >>conftest.$ac_ext <<_ACEOF
4390/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004391
4392#include <pthread.h>
4393
4394void* routine(void* p){return NULL;}
4395
4396int main(){
4397 pthread_t p;
4398 if(pthread_create(&p,NULL,routine,NULL)!=0)
4399 return 1;
4400 (void)pthread_detach(p);
4401 return 0;
4402}
4403
4404_ACEOF
4405rm -f conftest$ac_exeext
4406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4407 (eval $ac_link) 2>&5
4408 ac_status=$?
4409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4412 (eval $ac_try) 2>&5
4413 ac_status=$?
4414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4415 (exit $ac_status); }; }; then
4416 ac_cv_pthread=yes
4417else
4418 echo "$as_me: program exited with status $ac_status" >&5
4419echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004420sed 's/^/| /' conftest.$ac_ext >&5
4421
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004422( exit $ac_status )
4423ac_cv_pthread=no
4424fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004425rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004426fi
4427CC="$ac_save_cc"
4428fi
4429
4430echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4431echo "${ECHO_T}$ac_cv_pthread" >&6
4432fi
4433
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004434# If we have set a CC compiler flag for thread support then
4435# check if it works for CXX, too.
4436ac_cv_cxx_thread=no
4437if test ! -z "$CXX"
4438then
4439echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4440echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4441ac_save_cxx="$CXX"
4442
4443if test "$ac_cv_kpthread" = "yes"
4444then
4445 CXX="$CXX -Kpthread"
4446 ac_cv_cxx_thread=yes
4447elif test "$ac_cv_kthread" = "yes"
4448then
4449 CXX="$CXX -Kthread"
4450 ac_cv_cxx_thread=yes
4451elif test "$ac_cv_pthread" = "yes"
4452then
4453 CXX="$CXX -pthread"
4454 ac_cv_cxx_thread=yes
4455fi
4456
4457if test $ac_cv_cxx_thread = yes
4458then
4459 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4460 $CXX -c conftest.$ac_ext 2>&5
4461 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4462 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4463 then
4464 ac_cv_cxx_thread=yes
4465 else
4466 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004467 fi
4468 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004469fi
4470fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004471CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004472echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4473echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4474
Michael W. Hudson54241132001-12-07 15:38:26 +00004475
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004476# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004477echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4478echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4479if test "${ac_cv_header_stdc+set}" = set; then
4480 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004481else
Martin v. Löwis11437992002-04-12 09:54:03 +00004482 cat >conftest.$ac_ext <<_ACEOF
4483#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004484/* confdefs.h. */
4485_ACEOF
4486cat confdefs.h >>conftest.$ac_ext
4487cat >>conftest.$ac_ext <<_ACEOF
4488/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004489#include <stdlib.h>
4490#include <stdarg.h>
4491#include <string.h>
4492#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004493
Skip Montanaro6dead952003-09-25 14:50:04 +00004494int
4495main ()
4496{
4497
4498 ;
4499 return 0;
4500}
Martin v. Löwis11437992002-04-12 09:54:03 +00004501_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004502rm -f conftest.$ac_objext
4503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4504 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004505 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004507 (exit $ac_status); } &&
4508 { ac_try='test -s conftest.$ac_objext'
4509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4510 (eval $ac_try) 2>&5
4511 ac_status=$?
4512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4513 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004514 ac_cv_header_stdc=yes
4515else
Martin v. Löwis11437992002-04-12 09:54:03 +00004516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004517sed 's/^/| /' conftest.$ac_ext >&5
4518
4519ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004520fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004521rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004522
4523if test $ac_cv_header_stdc = yes; then
4524 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004525 cat >conftest.$ac_ext <<_ACEOF
4526#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004527/* confdefs.h. */
4528_ACEOF
4529cat confdefs.h >>conftest.$ac_ext
4530cat >>conftest.$ac_ext <<_ACEOF
4531/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004532#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004533
4534_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004536 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004537 :
4538else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004539 ac_cv_header_stdc=no
4540fi
4541rm -f conftest*
4542
4543fi
4544
4545if test $ac_cv_header_stdc = yes; then
4546 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004547 cat >conftest.$ac_ext <<_ACEOF
4548#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004549/* confdefs.h. */
4550_ACEOF
4551cat confdefs.h >>conftest.$ac_ext
4552cat >>conftest.$ac_ext <<_ACEOF
4553/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004554#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004555
4556_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004558 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004559 :
4560else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561 ac_cv_header_stdc=no
4562fi
4563rm -f conftest*
4564
4565fi
4566
4567if test $ac_cv_header_stdc = yes; then
4568 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004569 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004570 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004571else
Martin v. Löwis11437992002-04-12 09:54:03 +00004572 cat >conftest.$ac_ext <<_ACEOF
4573#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004574/* confdefs.h. */
4575_ACEOF
4576cat confdefs.h >>conftest.$ac_ext
4577cat >>conftest.$ac_ext <<_ACEOF
4578/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004579#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004580#if ((' ' & 0x0FF) == 0x020)
4581# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4582# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4583#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004584# define ISLOWER(c) \
4585 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004586 || ('j' <= (c) && (c) <= 'r') \
4587 || ('s' <= (c) && (c) <= 'z'))
4588# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4589#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004590
Martin v. Löwis11437992002-04-12 09:54:03 +00004591#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4592int
4593main ()
4594{
4595 int i;
4596 for (i = 0; i < 256; i++)
4597 if (XOR (islower (i), ISLOWER (i))
4598 || toupper (i) != TOUPPER (i))
4599 exit(2);
4600 exit (0);
4601}
4602_ACEOF
4603rm -f conftest$ac_exeext
4604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4605 (eval $ac_link) 2>&5
4606 ac_status=$?
4607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4610 (eval $ac_try) 2>&5
4611 ac_status=$?
4612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4613 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614 :
4615else
Martin v. Löwis11437992002-04-12 09:54:03 +00004616 echo "$as_me: program exited with status $ac_status" >&5
4617echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004618sed 's/^/| /' conftest.$ac_ext >&5
4619
Martin v. Löwis11437992002-04-12 09:54:03 +00004620( exit $ac_status )
4621ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004622fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004623rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004624fi
4625fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004626fi
4627echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4628echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004629if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004630
4631cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004632#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004633_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004634
4635fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004636
Martin v. Löwis11437992002-04-12 09:54:03 +00004637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004674
Barry Warsawfe33b792003-01-07 22:42:49 +00004675
Neal Norwitz82251032003-05-23 14:35:24 +00004676
Martin v. Löwis11437992002-04-12 09:54:03 +00004677for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004678libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004679signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4680unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004681sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004682sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00004683sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004684sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004685do
Martin v. Löwis11437992002-04-12 09:54:03 +00004686as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4687if eval "test \"\${$as_ac_Header+set}\" = set"; then
4688 echo "$as_me:$LINENO: checking for $ac_header" >&5
4689echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4690if eval "test \"\${$as_ac_Header+set}\" = set"; then
4691 echo $ECHO_N "(cached) $ECHO_C" >&6
4692fi
4693echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4694echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004695else
Martin v. Löwis11437992002-04-12 09:54:03 +00004696 # Is the header compilable?
4697echo "$as_me:$LINENO: checking $ac_header usability" >&5
4698echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4699cat >conftest.$ac_ext <<_ACEOF
4700#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004701/* confdefs.h. */
4702_ACEOF
4703cat confdefs.h >>conftest.$ac_ext
4704cat >>conftest.$ac_ext <<_ACEOF
4705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004706$ac_includes_default
4707#include <$ac_header>
4708_ACEOF
4709rm -f conftest.$ac_objext
4710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4711 (eval $ac_compile) 2>&5
4712 ac_status=$?
4713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4714 (exit $ac_status); } &&
4715 { ac_try='test -s conftest.$ac_objext'
4716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4717 (eval $ac_try) 2>&5
4718 ac_status=$?
4719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4720 (exit $ac_status); }; }; then
4721 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004722else
Martin v. Löwis11437992002-04-12 09:54:03 +00004723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004724sed 's/^/| /' conftest.$ac_ext >&5
4725
Martin v. Löwis11437992002-04-12 09:54:03 +00004726ac_header_compiler=no
4727fi
4728rm -f conftest.$ac_objext conftest.$ac_ext
4729echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4730echo "${ECHO_T}$ac_header_compiler" >&6
4731
4732# Is the header present?
4733echo "$as_me:$LINENO: checking $ac_header presence" >&5
4734echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4735cat >conftest.$ac_ext <<_ACEOF
4736#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004737/* confdefs.h. */
4738_ACEOF
4739cat confdefs.h >>conftest.$ac_ext
4740cat >>conftest.$ac_ext <<_ACEOF
4741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004742#include <$ac_header>
4743_ACEOF
4744if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4745 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4746 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004747 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004748 rm -f conftest.er1
4749 cat conftest.err >&5
4750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4751 (exit $ac_status); } >/dev/null; then
4752 if test -s conftest.err; then
4753 ac_cpp_err=$ac_c_preproc_warn_flag
4754 else
4755 ac_cpp_err=
4756 fi
4757else
4758 ac_cpp_err=yes
4759fi
4760if test -z "$ac_cpp_err"; then
4761 ac_header_preproc=yes
4762else
4763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004764sed 's/^/| /' conftest.$ac_ext >&5
4765
Martin v. Löwis11437992002-04-12 09:54:03 +00004766 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004767fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004768rm -f conftest.err conftest.$ac_ext
4769echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4770echo "${ECHO_T}$ac_header_preproc" >&6
4771
4772# So? What about this header?
4773case $ac_header_compiler:$ac_header_preproc in
4774 yes:no )
4775 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4776echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4777 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004778echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4779 (
4780 cat <<\_ASBOX
4781## ------------------------------------ ##
4782## Report this to bug-autoconf@gnu.org. ##
4783## ------------------------------------ ##
4784_ASBOX
4785 ) |
4786 sed "s/^/$as_me: WARNING: /" >&2
4787 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004788 no:yes )
4789 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4790echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4791 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4792echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4793 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004794echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4795 (
4796 cat <<\_ASBOX
4797## ------------------------------------ ##
4798## Report this to bug-autoconf@gnu.org. ##
4799## ------------------------------------ ##
4800_ASBOX
4801 ) |
4802 sed "s/^/$as_me: WARNING: /" >&2
4803 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004804esac
4805echo "$as_me:$LINENO: checking for $ac_header" >&5
4806echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4807if eval "test \"\${$as_ac_Header+set}\" = set"; then
4808 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004809else
Martin v. Löwis11437992002-04-12 09:54:03 +00004810 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004812echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4813echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4814
4815fi
4816if test `eval echo '${'$as_ac_Header'}'` = yes; then
4817 cat >>confdefs.h <<_ACEOF
4818#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4819_ACEOF
4820
4821fi
4822
Guido van Rossum627b2d71993-12-24 10:39:16 +00004823done
4824
Martin v. Löwis11437992002-04-12 09:54:03 +00004825
4826
4827
4828
4829
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004830ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004831for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4832 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4833echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4834echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4835if eval "test \"\${$as_ac_Header+set}\" = set"; then
4836 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004837else
Martin v. Löwis11437992002-04-12 09:54:03 +00004838 cat >conftest.$ac_ext <<_ACEOF
4839#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004840/* confdefs.h. */
4841_ACEOF
4842cat confdefs.h >>conftest.$ac_ext
4843cat >>conftest.$ac_ext <<_ACEOF
4844/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004845#include <sys/types.h>
4846#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004847
Martin v. Löwis11437992002-04-12 09:54:03 +00004848int
4849main ()
4850{
4851if ((DIR *) 0)
4852return 0;
4853 ;
4854 return 0;
4855}
4856_ACEOF
4857rm -f conftest.$ac_objext
4858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4859 (eval $ac_compile) 2>&5
4860 ac_status=$?
4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862 (exit $ac_status); } &&
4863 { ac_try='test -s conftest.$ac_objext'
4864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4865 (eval $ac_try) 2>&5
4866 ac_status=$?
4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868 (exit $ac_status); }; }; then
4869 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004870else
Martin v. Löwis11437992002-04-12 09:54:03 +00004871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004872sed 's/^/| /' conftest.$ac_ext >&5
4873
Martin v. Löwis11437992002-04-12 09:54:03 +00004874eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004876rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004878echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4879echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4880if test `eval echo '${'$as_ac_Header'}'` = yes; then
4881 cat >>confdefs.h <<_ACEOF
4882#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4883_ACEOF
4884
4885ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004886fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004887
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004888done
4889# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4890if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004891 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4892echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4893if test "${ac_cv_search_opendir+set}" = set; then
4894 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004895else
Martin v. Löwis11437992002-04-12 09:54:03 +00004896 ac_func_search_save_LIBS=$LIBS
4897ac_cv_search_opendir=no
4898cat >conftest.$ac_ext <<_ACEOF
4899#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004900/* confdefs.h. */
4901_ACEOF
4902cat confdefs.h >>conftest.$ac_ext
4903cat >>conftest.$ac_ext <<_ACEOF
4904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004906/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004907#ifdef __cplusplus
4908extern "C"
4909#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004910/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004911 builtin and then its argument prototype would still apply. */
4912char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004913int
4914main ()
4915{
4916opendir ();
4917 ;
4918 return 0;
4919}
4920_ACEOF
4921rm -f conftest.$ac_objext conftest$ac_exeext
4922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4923 (eval $ac_link) 2>&5
4924 ac_status=$?
4925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926 (exit $ac_status); } &&
4927 { ac_try='test -s conftest$ac_exeext'
4928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4929 (eval $ac_try) 2>&5
4930 ac_status=$?
4931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4932 (exit $ac_status); }; }; then
4933 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004934else
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004936sed 's/^/| /' conftest.$ac_ext >&5
4937
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004938fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004939rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4940if test "$ac_cv_search_opendir" = no; then
4941 for ac_lib in dir; do
4942 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4943 cat >conftest.$ac_ext <<_ACEOF
4944#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004945/* confdefs.h. */
4946_ACEOF
4947cat confdefs.h >>conftest.$ac_ext
4948cat >>conftest.$ac_ext <<_ACEOF
4949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004951/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004952#ifdef __cplusplus
4953extern "C"
4954#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004955/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004956 builtin and then its argument prototype would still apply. */
4957char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004958int
4959main ()
4960{
4961opendir ();
4962 ;
4963 return 0;
4964}
4965_ACEOF
4966rm -f conftest.$ac_objext conftest$ac_exeext
4967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4968 (eval $ac_link) 2>&5
4969 ac_status=$?
4970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4971 (exit $ac_status); } &&
4972 { ac_try='test -s conftest$ac_exeext'
4973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4974 (eval $ac_try) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); }; }; then
4978 ac_cv_search_opendir="-l$ac_lib"
4979break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004980else
Martin v. Löwis11437992002-04-12 09:54:03 +00004981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004982sed 's/^/| /' conftest.$ac_ext >&5
4983
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004985rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4986 done
4987fi
4988LIBS=$ac_func_search_save_LIBS
4989fi
4990echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4991echo "${ECHO_T}$ac_cv_search_opendir" >&6
4992if test "$ac_cv_search_opendir" != no; then
4993 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004994
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004996
Michael W. Hudson54241132001-12-07 15:38:26 +00004997else
Martin v. Löwis11437992002-04-12 09:54:03 +00004998 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4999echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
5000if test "${ac_cv_search_opendir+set}" = set; then
5001 echo $ECHO_N "(cached) $ECHO_C" >&6
5002else
5003 ac_func_search_save_LIBS=$LIBS
5004ac_cv_search_opendir=no
5005cat >conftest.$ac_ext <<_ACEOF
5006#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005007/* confdefs.h. */
5008_ACEOF
5009cat confdefs.h >>conftest.$ac_ext
5010cat >>conftest.$ac_ext <<_ACEOF
5011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005012
5013/* Override any gcc2 internal prototype to avoid an error. */
5014#ifdef __cplusplus
5015extern "C"
5016#endif
5017/* We use char because int might match the return type of a gcc2
5018 builtin and then its argument prototype would still apply. */
5019char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005020int
5021main ()
5022{
5023opendir ();
5024 ;
5025 return 0;
5026}
5027_ACEOF
5028rm -f conftest.$ac_objext conftest$ac_exeext
5029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5030 (eval $ac_link) 2>&5
5031 ac_status=$?
5032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033 (exit $ac_status); } &&
5034 { ac_try='test -s conftest$ac_exeext'
5035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5036 (eval $ac_try) 2>&5
5037 ac_status=$?
5038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5039 (exit $ac_status); }; }; then
5040 ac_cv_search_opendir="none required"
5041else
5042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005043sed 's/^/| /' conftest.$ac_ext >&5
5044
Martin v. Löwis11437992002-04-12 09:54:03 +00005045fi
5046rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5047if test "$ac_cv_search_opendir" = no; then
5048 for ac_lib in x; do
5049 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5050 cat >conftest.$ac_ext <<_ACEOF
5051#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005052/* confdefs.h. */
5053_ACEOF
5054cat confdefs.h >>conftest.$ac_ext
5055cat >>conftest.$ac_ext <<_ACEOF
5056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005057
5058/* Override any gcc2 internal prototype to avoid an error. */
5059#ifdef __cplusplus
5060extern "C"
5061#endif
5062/* We use char because int might match the return type of a gcc2
5063 builtin and then its argument prototype would still apply. */
5064char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005065int
5066main ()
5067{
5068opendir ();
5069 ;
5070 return 0;
5071}
5072_ACEOF
5073rm -f conftest.$ac_objext conftest$ac_exeext
5074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5075 (eval $ac_link) 2>&5
5076 ac_status=$?
5077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078 (exit $ac_status); } &&
5079 { ac_try='test -s conftest$ac_exeext'
5080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5081 (eval $ac_try) 2>&5
5082 ac_status=$?
5083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5084 (exit $ac_status); }; }; then
5085 ac_cv_search_opendir="-l$ac_lib"
5086break
5087else
5088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005089sed 's/^/| /' conftest.$ac_ext >&5
5090
Martin v. Löwis11437992002-04-12 09:54:03 +00005091fi
5092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5093 done
5094fi
5095LIBS=$ac_func_search_save_LIBS
5096fi
5097echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5098echo "${ECHO_T}$ac_cv_search_opendir" >&6
5099if test "$ac_cv_search_opendir" != no; then
5100 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005102fi
5103
5104fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005105
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005106echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5107echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5108if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5109 echo $ECHO_N "(cached) $ECHO_C" >&6
5110else
5111 cat >conftest.$ac_ext <<_ACEOF
5112#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005113/* confdefs.h. */
5114_ACEOF
5115cat confdefs.h >>conftest.$ac_ext
5116cat >>conftest.$ac_ext <<_ACEOF
5117/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005118#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005119int
5120main ()
5121{
5122return makedev(0, 0);
5123 ;
5124 return 0;
5125}
5126_ACEOF
5127rm -f conftest.$ac_objext conftest$ac_exeext
5128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5129 (eval $ac_link) 2>&5
5130 ac_status=$?
5131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); } &&
5133 { ac_try='test -s conftest$ac_exeext'
5134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5135 (eval $ac_try) 2>&5
5136 ac_status=$?
5137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138 (exit $ac_status); }; }; then
5139 ac_cv_header_sys_types_h_makedev=yes
5140else
5141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005142sed 's/^/| /' conftest.$ac_ext >&5
5143
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005144ac_cv_header_sys_types_h_makedev=no
5145fi
5146rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5147
5148fi
5149echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5150echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5151
5152if test $ac_cv_header_sys_types_h_makedev = no; then
5153if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5154 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5155echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5156if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5157 echo $ECHO_N "(cached) $ECHO_C" >&6
5158fi
5159echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5160echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5161else
5162 # Is the header compilable?
5163echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5164echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5165cat >conftest.$ac_ext <<_ACEOF
5166#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005167/* confdefs.h. */
5168_ACEOF
5169cat confdefs.h >>conftest.$ac_ext
5170cat >>conftest.$ac_ext <<_ACEOF
5171/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005172$ac_includes_default
5173#include <sys/mkdev.h>
5174_ACEOF
5175rm -f conftest.$ac_objext
5176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5177 (eval $ac_compile) 2>&5
5178 ac_status=$?
5179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180 (exit $ac_status); } &&
5181 { ac_try='test -s conftest.$ac_objext'
5182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5183 (eval $ac_try) 2>&5
5184 ac_status=$?
5185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5186 (exit $ac_status); }; }; then
5187 ac_header_compiler=yes
5188else
5189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005190sed 's/^/| /' conftest.$ac_ext >&5
5191
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005192ac_header_compiler=no
5193fi
5194rm -f conftest.$ac_objext conftest.$ac_ext
5195echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5196echo "${ECHO_T}$ac_header_compiler" >&6
5197
5198# Is the header present?
5199echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5200echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5201cat >conftest.$ac_ext <<_ACEOF
5202#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005203/* confdefs.h. */
5204_ACEOF
5205cat confdefs.h >>conftest.$ac_ext
5206cat >>conftest.$ac_ext <<_ACEOF
5207/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005208#include <sys/mkdev.h>
5209_ACEOF
5210if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5211 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5212 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005213 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005214 rm -f conftest.er1
5215 cat conftest.err >&5
5216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5217 (exit $ac_status); } >/dev/null; then
5218 if test -s conftest.err; then
5219 ac_cpp_err=$ac_c_preproc_warn_flag
5220 else
5221 ac_cpp_err=
5222 fi
5223else
5224 ac_cpp_err=yes
5225fi
5226if test -z "$ac_cpp_err"; then
5227 ac_header_preproc=yes
5228else
5229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005230sed 's/^/| /' conftest.$ac_ext >&5
5231
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005232 ac_header_preproc=no
5233fi
5234rm -f conftest.err conftest.$ac_ext
5235echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5236echo "${ECHO_T}$ac_header_preproc" >&6
5237
5238# So? What about this header?
5239case $ac_header_compiler:$ac_header_preproc in
5240 yes:no )
5241 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5242echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5243 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005244echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5245 (
5246 cat <<\_ASBOX
5247## ------------------------------------ ##
5248## Report this to bug-autoconf@gnu.org. ##
5249## ------------------------------------ ##
5250_ASBOX
5251 ) |
5252 sed "s/^/$as_me: WARNING: /" >&2
5253 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005254 no:yes )
5255 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5256echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
5257 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5258echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5259 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005260echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5261 (
5262 cat <<\_ASBOX
5263## ------------------------------------ ##
5264## Report this to bug-autoconf@gnu.org. ##
5265## ------------------------------------ ##
5266_ASBOX
5267 ) |
5268 sed "s/^/$as_me: WARNING: /" >&2
5269 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005270esac
5271echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5272echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5273if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5274 echo $ECHO_N "(cached) $ECHO_C" >&6
5275else
5276 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5277fi
5278echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5279echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5280
5281fi
5282if test $ac_cv_header_sys_mkdev_h = yes; then
5283
5284cat >>confdefs.h <<\_ACEOF
5285#define MAJOR_IN_MKDEV 1
5286_ACEOF
5287
5288fi
5289
5290
5291
5292 if test $ac_cv_header_sys_mkdev_h = no; then
5293 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5294 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5295echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5296if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5297 echo $ECHO_N "(cached) $ECHO_C" >&6
5298fi
5299echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5300echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5301else
5302 # Is the header compilable?
5303echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5304echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5305cat >conftest.$ac_ext <<_ACEOF
5306#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005307/* confdefs.h. */
5308_ACEOF
5309cat confdefs.h >>conftest.$ac_ext
5310cat >>conftest.$ac_ext <<_ACEOF
5311/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005312$ac_includes_default
5313#include <sys/sysmacros.h>
5314_ACEOF
5315rm -f conftest.$ac_objext
5316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5317 (eval $ac_compile) 2>&5
5318 ac_status=$?
5319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5320 (exit $ac_status); } &&
5321 { ac_try='test -s conftest.$ac_objext'
5322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5323 (eval $ac_try) 2>&5
5324 ac_status=$?
5325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5326 (exit $ac_status); }; }; then
5327 ac_header_compiler=yes
5328else
5329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005330sed 's/^/| /' conftest.$ac_ext >&5
5331
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005332ac_header_compiler=no
5333fi
5334rm -f conftest.$ac_objext conftest.$ac_ext
5335echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5336echo "${ECHO_T}$ac_header_compiler" >&6
5337
5338# Is the header present?
5339echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5340echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5341cat >conftest.$ac_ext <<_ACEOF
5342#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005343/* confdefs.h. */
5344_ACEOF
5345cat confdefs.h >>conftest.$ac_ext
5346cat >>conftest.$ac_ext <<_ACEOF
5347/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005348#include <sys/sysmacros.h>
5349_ACEOF
5350if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5351 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5352 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005353 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005354 rm -f conftest.er1
5355 cat conftest.err >&5
5356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5357 (exit $ac_status); } >/dev/null; then
5358 if test -s conftest.err; then
5359 ac_cpp_err=$ac_c_preproc_warn_flag
5360 else
5361 ac_cpp_err=
5362 fi
5363else
5364 ac_cpp_err=yes
5365fi
5366if test -z "$ac_cpp_err"; then
5367 ac_header_preproc=yes
5368else
5369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005370sed 's/^/| /' conftest.$ac_ext >&5
5371
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005372 ac_header_preproc=no
5373fi
5374rm -f conftest.err conftest.$ac_ext
5375echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5376echo "${ECHO_T}$ac_header_preproc" >&6
5377
5378# So? What about this header?
5379case $ac_header_compiler:$ac_header_preproc in
5380 yes:no )
5381 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5382echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5383 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005384echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5385 (
5386 cat <<\_ASBOX
5387## ------------------------------------ ##
5388## Report this to bug-autoconf@gnu.org. ##
5389## ------------------------------------ ##
5390_ASBOX
5391 ) |
5392 sed "s/^/$as_me: WARNING: /" >&2
5393 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005394 no:yes )
5395 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5396echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5397 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5398echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5399 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005400echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5401 (
5402 cat <<\_ASBOX
5403## ------------------------------------ ##
5404## Report this to bug-autoconf@gnu.org. ##
5405## ------------------------------------ ##
5406_ASBOX
5407 ) |
5408 sed "s/^/$as_me: WARNING: /" >&2
5409 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005410esac
5411echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5412echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5413if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5414 echo $ECHO_N "(cached) $ECHO_C" >&6
5415else
5416 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5417fi
5418echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5419echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5420
5421fi
5422if test $ac_cv_header_sys_sysmacros_h = yes; then
5423
5424cat >>confdefs.h <<\_ACEOF
5425#define MAJOR_IN_SYSMACROS 1
5426_ACEOF
5427
5428fi
5429
5430
5431 fi
5432fi
5433
Michael W. Hudson54241132001-12-07 15:38:26 +00005434
Guido van Rossum627b2d71993-12-24 10:39:16 +00005435# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005436was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005437echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5438echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5439cat >conftest.$ac_ext <<_ACEOF
5440#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005441/* confdefs.h. */
5442_ACEOF
5443cat confdefs.h >>conftest.$ac_ext
5444cat >>conftest.$ac_ext <<_ACEOF
5445/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005446#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005447
5448_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005450 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005451 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005452else
Martin v. Löwis11437992002-04-12 09:54:03 +00005453
5454
5455cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005456#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005457_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005458
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005459
Guido van Rossum627b2d71993-12-24 10:39:16 +00005460fi
5461rm -f conftest*
5462
Martin v. Löwis11437992002-04-12 09:54:03 +00005463echo "$as_me:$LINENO: result: $was_it_defined" >&5
5464echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005465
Neal Norwitz11690112002-07-30 01:08:28 +00005466# Check whether using makedev requires defining _OSF_SOURCE
5467echo "$as_me:$LINENO: checking for makedev" >&5
5468echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5469cat >conftest.$ac_ext <<_ACEOF
5470#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005471/* confdefs.h. */
5472_ACEOF
5473cat confdefs.h >>conftest.$ac_ext
5474cat >>conftest.$ac_ext <<_ACEOF
5475/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005476#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005477int
5478main ()
5479{
5480 makedev(0, 0)
5481 ;
5482 return 0;
5483}
5484_ACEOF
5485rm -f conftest.$ac_objext conftest$ac_exeext
5486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5487 (eval $ac_link) 2>&5
5488 ac_status=$?
5489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490 (exit $ac_status); } &&
5491 { ac_try='test -s conftest$ac_exeext'
5492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5493 (eval $ac_try) 2>&5
5494 ac_status=$?
5495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496 (exit $ac_status); }; }; then
5497 ac_cv_has_makedev=yes
5498else
5499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005500sed 's/^/| /' conftest.$ac_ext >&5
5501
Neal Norwitz11690112002-07-30 01:08:28 +00005502ac_cv_has_makedev=no
5503fi
5504rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5505if test "$ac_cv_has_makedev" = "no"; then
5506 # we didn't link, try if _OSF_SOURCE will allow us to link
5507 cat >conftest.$ac_ext <<_ACEOF
5508#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005509/* confdefs.h. */
5510_ACEOF
5511cat confdefs.h >>conftest.$ac_ext
5512cat >>conftest.$ac_ext <<_ACEOF
5513/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005514
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005515#define _OSF_SOURCE 1
5516#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005517
Neal Norwitz11690112002-07-30 01:08:28 +00005518int
5519main ()
5520{
5521 makedev(0, 0)
5522 ;
5523 return 0;
5524}
5525_ACEOF
5526rm -f conftest.$ac_objext conftest$ac_exeext
5527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5528 (eval $ac_link) 2>&5
5529 ac_status=$?
5530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5531 (exit $ac_status); } &&
5532 { ac_try='test -s conftest$ac_exeext'
5533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5534 (eval $ac_try) 2>&5
5535 ac_status=$?
5536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5537 (exit $ac_status); }; }; then
5538 ac_cv_has_makedev=yes
5539else
5540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005541sed 's/^/| /' conftest.$ac_ext >&5
5542
Neal Norwitz11690112002-07-30 01:08:28 +00005543ac_cv_has_makedev=no
5544fi
5545rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5546 if test "$ac_cv_has_makedev" = "yes"; then
5547
5548cat >>confdefs.h <<\_ACEOF
5549#define _OSF_SOURCE 1
5550_ACEOF
5551
5552 fi
5553fi
5554echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5555echo "${ECHO_T}$ac_cv_has_makedev" >&6
5556if test "$ac_cv_has_makedev" = "yes"; then
5557
5558cat >>confdefs.h <<\_ACEOF
5559#define HAVE_MAKEDEV 1
5560_ACEOF
5561
5562fi
5563
Martin v. Löwis399a6892002-10-04 10:22:02 +00005564# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5565# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5566# defined, but the compiler does not support pragma redefine_extname,
5567# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5568# structures (such as rlimit64) without declaring them. As a
5569# work-around, disable LFS on such configurations
5570
5571use_lfs=yes
5572echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5573echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5574cat >conftest.$ac_ext <<_ACEOF
5575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005576/* confdefs.h. */
5577_ACEOF
5578cat confdefs.h >>conftest.$ac_ext
5579cat >>conftest.$ac_ext <<_ACEOF
5580/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005581
5582#define _LARGEFILE_SOURCE 1
5583#define _FILE_OFFSET_BITS 64
5584#include <sys/resource.h>
5585
Martin v. Löwis399a6892002-10-04 10:22:02 +00005586int
5587main ()
5588{
5589struct rlimit foo;
5590 ;
5591 return 0;
5592}
5593_ACEOF
5594rm -f conftest.$ac_objext
5595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5596 (eval $ac_compile) 2>&5
5597 ac_status=$?
5598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5599 (exit $ac_status); } &&
5600 { ac_try='test -s conftest.$ac_objext'
5601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5602 (eval $ac_try) 2>&5
5603 ac_status=$?
5604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5605 (exit $ac_status); }; }; then
5606 sol_lfs_bug=no
5607else
5608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005609sed 's/^/| /' conftest.$ac_ext >&5
5610
Martin v. Löwis399a6892002-10-04 10:22:02 +00005611sol_lfs_bug=yes
5612fi
5613rm -f conftest.$ac_objext conftest.$ac_ext
5614echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5615echo "${ECHO_T}$sol_lfs_bug" >&6
5616if test "$sol_lfs_bug" = "yes"; then
5617 use_lfs=no
5618fi
5619
5620if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005621# Two defines needed to enable largefile support on various platforms
5622# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005623
Martin v. Löwis11437992002-04-12 09:54:03 +00005624cat >>confdefs.h <<\_ACEOF
5625#define _LARGEFILE_SOURCE 1
5626_ACEOF
5627
5628
5629cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005630#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005631_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005632
Martin v. Löwis399a6892002-10-04 10:22:02 +00005633fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005634
Guido van Rossum84e7b241996-08-19 21:59:00 +00005635# Add some code to confdefs.h so that the test for off_t works on SCO
5636cat >> confdefs.h <<\EOF
5637#if defined(SCO_DS)
5638#undef _OFF_T
5639#endif
5640EOF
5641
Guido van Rossumef2255b2000-03-10 22:30:29 +00005642# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005643echo "$as_me:$LINENO: checking for mode_t" >&5
5644echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5645if test "${ac_cv_type_mode_t+set}" = set; then
5646 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005647else
Martin v. Löwis11437992002-04-12 09:54:03 +00005648 cat >conftest.$ac_ext <<_ACEOF
5649#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005650/* confdefs.h. */
5651_ACEOF
5652cat confdefs.h >>conftest.$ac_ext
5653cat >>conftest.$ac_ext <<_ACEOF
5654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005655$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005656int
5657main ()
5658{
5659if ((mode_t *) 0)
5660 return 0;
5661if (sizeof (mode_t))
5662 return 0;
5663 ;
5664 return 0;
5665}
5666_ACEOF
5667rm -f conftest.$ac_objext
5668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5669 (eval $ac_compile) 2>&5
5670 ac_status=$?
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); } &&
5673 { ac_try='test -s conftest.$ac_objext'
5674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5675 (eval $ac_try) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005679 ac_cv_type_mode_t=yes
5680else
Martin v. Löwis11437992002-04-12 09:54:03 +00005681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005682sed 's/^/| /' conftest.$ac_ext >&5
5683
Martin v. Löwis11437992002-04-12 09:54:03 +00005684ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005685fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005686rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005687fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005688echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5689echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5690if test $ac_cv_type_mode_t = yes; then
5691 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005692else
Martin v. Löwis11437992002-04-12 09:54:03 +00005693
5694cat >>confdefs.h <<_ACEOF
5695#define mode_t int
5696_ACEOF
5697
5698fi
5699
5700echo "$as_me:$LINENO: checking for off_t" >&5
5701echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5702if test "${ac_cv_type_off_t+set}" = set; then
5703 echo $ECHO_N "(cached) $ECHO_C" >&6
5704else
5705 cat >conftest.$ac_ext <<_ACEOF
5706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005707/* confdefs.h. */
5708_ACEOF
5709cat confdefs.h >>conftest.$ac_ext
5710cat >>conftest.$ac_ext <<_ACEOF
5711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005712$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005713int
5714main ()
5715{
5716if ((off_t *) 0)
5717 return 0;
5718if (sizeof (off_t))
5719 return 0;
5720 ;
5721 return 0;
5722}
5723_ACEOF
5724rm -f conftest.$ac_objext
5725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5726 (eval $ac_compile) 2>&5
5727 ac_status=$?
5728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5729 (exit $ac_status); } &&
5730 { ac_try='test -s conftest.$ac_objext'
5731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5732 (eval $ac_try) 2>&5
5733 ac_status=$?
5734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005736 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005737else
Martin v. Löwis11437992002-04-12 09:54:03 +00005738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005739sed 's/^/| /' conftest.$ac_ext >&5
5740
Martin v. Löwis11437992002-04-12 09:54:03 +00005741ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005742fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005743rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005744fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005745echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5746echo "${ECHO_T}$ac_cv_type_off_t" >&6
5747if test $ac_cv_type_off_t = yes; then
5748 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005749else
Martin v. Löwis11437992002-04-12 09:54:03 +00005750
5751cat >>confdefs.h <<_ACEOF
5752#define off_t long
5753_ACEOF
5754
5755fi
5756
5757echo "$as_me:$LINENO: checking for pid_t" >&5
5758echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5759if test "${ac_cv_type_pid_t+set}" = set; then
5760 echo $ECHO_N "(cached) $ECHO_C" >&6
5761else
5762 cat >conftest.$ac_ext <<_ACEOF
5763#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005764/* confdefs.h. */
5765_ACEOF
5766cat confdefs.h >>conftest.$ac_ext
5767cat >>conftest.$ac_ext <<_ACEOF
5768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005769$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005770int
5771main ()
5772{
5773if ((pid_t *) 0)
5774 return 0;
5775if (sizeof (pid_t))
5776 return 0;
5777 ;
5778 return 0;
5779}
5780_ACEOF
5781rm -f conftest.$ac_objext
5782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5783 (eval $ac_compile) 2>&5
5784 ac_status=$?
5785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5786 (exit $ac_status); } &&
5787 { ac_try='test -s conftest.$ac_objext'
5788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5789 (eval $ac_try) 2>&5
5790 ac_status=$?
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005793 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005794else
Martin v. Löwis11437992002-04-12 09:54:03 +00005795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005796sed 's/^/| /' conftest.$ac_ext >&5
5797
Martin v. Löwis11437992002-04-12 09:54:03 +00005798ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005799fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005800rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005802echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5803echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5804if test $ac_cv_type_pid_t = yes; then
5805 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005806else
Martin v. Löwis11437992002-04-12 09:54:03 +00005807
5808cat >>confdefs.h <<_ACEOF
5809#define pid_t int
5810_ACEOF
5811
5812fi
5813
5814echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5815echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5816if test "${ac_cv_type_signal+set}" = set; then
5817 echo $ECHO_N "(cached) $ECHO_C" >&6
5818else
5819 cat >conftest.$ac_ext <<_ACEOF
5820#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005821/* confdefs.h. */
5822_ACEOF
5823cat confdefs.h >>conftest.$ac_ext
5824cat >>conftest.$ac_ext <<_ACEOF
5825/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005826#include <sys/types.h>
5827#include <signal.h>
5828#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005829# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005830#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005831#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005832extern "C" void (*signal (int, void (*)(int)))(int);
5833#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005834void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005835#endif
5836
Martin v. Löwis11437992002-04-12 09:54:03 +00005837int
5838main ()
5839{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005840int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005841 ;
5842 return 0;
5843}
5844_ACEOF
5845rm -f conftest.$ac_objext
5846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5847 (eval $ac_compile) 2>&5
5848 ac_status=$?
5849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5850 (exit $ac_status); } &&
5851 { ac_try='test -s conftest.$ac_objext'
5852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5853 (eval $ac_try) 2>&5
5854 ac_status=$?
5855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5856 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005857 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005858else
Martin v. Löwis11437992002-04-12 09:54:03 +00005859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005860sed 's/^/| /' conftest.$ac_ext >&5
5861
Martin v. Löwis11437992002-04-12 09:54:03 +00005862ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005863fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005864rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005865fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005866echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5867echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005868
Martin v. Löwis11437992002-04-12 09:54:03 +00005869cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005870#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005871_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005872
Michael W. Hudson54241132001-12-07 15:38:26 +00005873
Martin v. Löwis11437992002-04-12 09:54:03 +00005874echo "$as_me:$LINENO: checking for size_t" >&5
5875echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5876if test "${ac_cv_type_size_t+set}" = set; then
5877 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878else
Martin v. Löwis11437992002-04-12 09:54:03 +00005879 cat >conftest.$ac_ext <<_ACEOF
5880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005881/* confdefs.h. */
5882_ACEOF
5883cat confdefs.h >>conftest.$ac_ext
5884cat >>conftest.$ac_ext <<_ACEOF
5885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005886$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005887int
5888main ()
5889{
5890if ((size_t *) 0)
5891 return 0;
5892if (sizeof (size_t))
5893 return 0;
5894 ;
5895 return 0;
5896}
5897_ACEOF
5898rm -f conftest.$ac_objext
5899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5900 (eval $ac_compile) 2>&5
5901 ac_status=$?
5902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5903 (exit $ac_status); } &&
5904 { ac_try='test -s conftest.$ac_objext'
5905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5906 (eval $ac_try) 2>&5
5907 ac_status=$?
5908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005910 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005911else
Martin v. Löwis11437992002-04-12 09:54:03 +00005912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005913sed 's/^/| /' conftest.$ac_ext >&5
5914
Martin v. Löwis11437992002-04-12 09:54:03 +00005915ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005916fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005917rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005918fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005919echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5920echo "${ECHO_T}$ac_cv_type_size_t" >&6
5921if test $ac_cv_type_size_t = yes; then
5922 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005923else
Martin v. Löwis11437992002-04-12 09:54:03 +00005924
5925cat >>confdefs.h <<_ACEOF
5926#define size_t unsigned
5927_ACEOF
5928
5929fi
5930
5931echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5932echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5933if test "${ac_cv_type_uid_t+set}" = set; then
5934 echo $ECHO_N "(cached) $ECHO_C" >&6
5935else
5936 cat >conftest.$ac_ext <<_ACEOF
5937#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005938/* confdefs.h. */
5939_ACEOF
5940cat confdefs.h >>conftest.$ac_ext
5941cat >>conftest.$ac_ext <<_ACEOF
5942/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005943#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005944
5945_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005947 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005948 ac_cv_type_uid_t=yes
5949else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005950 ac_cv_type_uid_t=no
5951fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005952rm -f conftest*
5953
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005954fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005955echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5956echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005957if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005958
Martin v. Löwis11437992002-04-12 09:54:03 +00005959cat >>confdefs.h <<\_ACEOF
5960#define uid_t int
5961_ACEOF
5962
5963
5964cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005965#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005966_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005967
5968fi
5969
Jack Jansendd19cf82001-12-06 22:36:17 +00005970
Michael W. Hudson54241132001-12-07 15:38:26 +00005971# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005972echo "$as_me:$LINENO: checking for int" >&5
5973echo $ECHO_N "checking for int... $ECHO_C" >&6
5974if test "${ac_cv_type_int+set}" = set; then
5975 echo $ECHO_N "(cached) $ECHO_C" >&6
5976else
5977 cat >conftest.$ac_ext <<_ACEOF
5978#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005979/* confdefs.h. */
5980_ACEOF
5981cat confdefs.h >>conftest.$ac_ext
5982cat >>conftest.$ac_ext <<_ACEOF
5983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005984$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005985int
5986main ()
5987{
5988if ((int *) 0)
5989 return 0;
5990if (sizeof (int))
5991 return 0;
5992 ;
5993 return 0;
5994}
5995_ACEOF
5996rm -f conftest.$ac_objext
5997if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5998 (eval $ac_compile) 2>&5
5999 ac_status=$?
6000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6001 (exit $ac_status); } &&
6002 { ac_try='test -s conftest.$ac_objext'
6003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6004 (eval $ac_try) 2>&5
6005 ac_status=$?
6006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007 (exit $ac_status); }; }; then
6008 ac_cv_type_int=yes
6009else
6010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006011sed 's/^/| /' conftest.$ac_ext >&5
6012
Martin v. Löwis11437992002-04-12 09:54:03 +00006013ac_cv_type_int=no
6014fi
6015rm -f conftest.$ac_objext conftest.$ac_ext
6016fi
6017echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6018echo "${ECHO_T}$ac_cv_type_int" >&6
6019
6020echo "$as_me:$LINENO: checking size of int" >&5
6021echo $ECHO_N "checking size of int... $ECHO_C" >&6
6022if test "${ac_cv_sizeof_int+set}" = set; then
6023 echo $ECHO_N "(cached) $ECHO_C" >&6
6024else
6025 if test "$ac_cv_type_int" = yes; then
6026 # The cast to unsigned long works around a bug in the HP C Compiler
6027 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6028 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6029 # This bug is HP SR number 8606223364.
6030 if test "$cross_compiling" = yes; then
6031 # Depending upon the size, compute the lo and hi bounds.
6032cat >conftest.$ac_ext <<_ACEOF
6033#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006034/* confdefs.h. */
6035_ACEOF
6036cat confdefs.h >>conftest.$ac_ext
6037cat >>conftest.$ac_ext <<_ACEOF
6038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006039$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006040int
6041main ()
6042{
6043static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6044test_array [0] = 0
6045
6046 ;
6047 return 0;
6048}
6049_ACEOF
6050rm -f conftest.$ac_objext
6051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6052 (eval $ac_compile) 2>&5
6053 ac_status=$?
6054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6055 (exit $ac_status); } &&
6056 { ac_try='test -s conftest.$ac_objext'
6057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6058 (eval $ac_try) 2>&5
6059 ac_status=$?
6060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6061 (exit $ac_status); }; }; then
6062 ac_lo=0 ac_mid=0
6063 while :; do
6064 cat >conftest.$ac_ext <<_ACEOF
6065#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006066/* confdefs.h. */
6067_ACEOF
6068cat confdefs.h >>conftest.$ac_ext
6069cat >>conftest.$ac_ext <<_ACEOF
6070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006071$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006072int
6073main ()
6074{
6075static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6076test_array [0] = 0
6077
6078 ;
6079 return 0;
6080}
6081_ACEOF
6082rm -f conftest.$ac_objext
6083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6084 (eval $ac_compile) 2>&5
6085 ac_status=$?
6086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6087 (exit $ac_status); } &&
6088 { ac_try='test -s conftest.$ac_objext'
6089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6090 (eval $ac_try) 2>&5
6091 ac_status=$?
6092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093 (exit $ac_status); }; }; then
6094 ac_hi=$ac_mid; break
6095else
6096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006097sed 's/^/| /' conftest.$ac_ext >&5
6098
Martin v. Löwis11437992002-04-12 09:54:03 +00006099ac_lo=`expr $ac_mid + 1`
6100 if test $ac_lo -le $ac_mid; then
6101 ac_lo= ac_hi=
6102 break
6103 fi
6104 ac_mid=`expr 2 '*' $ac_mid + 1`
6105fi
6106rm -f conftest.$ac_objext conftest.$ac_ext
6107 done
6108else
6109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006110sed 's/^/| /' conftest.$ac_ext >&5
6111
Martin v. Löwis11437992002-04-12 09:54:03 +00006112cat >conftest.$ac_ext <<_ACEOF
6113#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006114/* confdefs.h. */
6115_ACEOF
6116cat confdefs.h >>conftest.$ac_ext
6117cat >>conftest.$ac_ext <<_ACEOF
6118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006119$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006120int
6121main ()
6122{
6123static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6124test_array [0] = 0
6125
6126 ;
6127 return 0;
6128}
6129_ACEOF
6130rm -f conftest.$ac_objext
6131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6132 (eval $ac_compile) 2>&5
6133 ac_status=$?
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); } &&
6136 { ac_try='test -s conftest.$ac_objext'
6137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6138 (eval $ac_try) 2>&5
6139 ac_status=$?
6140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6141 (exit $ac_status); }; }; then
6142 ac_hi=-1 ac_mid=-1
6143 while :; do
6144 cat >conftest.$ac_ext <<_ACEOF
6145#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006146/* confdefs.h. */
6147_ACEOF
6148cat confdefs.h >>conftest.$ac_ext
6149cat >>conftest.$ac_ext <<_ACEOF
6150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006151$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006152int
6153main ()
6154{
6155static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6156test_array [0] = 0
6157
6158 ;
6159 return 0;
6160}
6161_ACEOF
6162rm -f conftest.$ac_objext
6163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6164 (eval $ac_compile) 2>&5
6165 ac_status=$?
6166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6167 (exit $ac_status); } &&
6168 { ac_try='test -s conftest.$ac_objext'
6169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6170 (eval $ac_try) 2>&5
6171 ac_status=$?
6172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173 (exit $ac_status); }; }; then
6174 ac_lo=$ac_mid; break
6175else
6176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006177sed 's/^/| /' conftest.$ac_ext >&5
6178
Martin v. Löwis11437992002-04-12 09:54:03 +00006179ac_hi=`expr '(' $ac_mid ')' - 1`
6180 if test $ac_mid -le $ac_hi; then
6181 ac_lo= ac_hi=
6182 break
6183 fi
6184 ac_mid=`expr 2 '*' $ac_mid`
6185fi
6186rm -f conftest.$ac_objext conftest.$ac_ext
6187 done
6188else
6189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006190sed 's/^/| /' conftest.$ac_ext >&5
6191
Martin v. Löwis11437992002-04-12 09:54:03 +00006192ac_lo= ac_hi=
6193fi
6194rm -f conftest.$ac_objext conftest.$ac_ext
6195fi
6196rm -f conftest.$ac_objext conftest.$ac_ext
6197# Binary search between lo and hi bounds.
6198while test "x$ac_lo" != "x$ac_hi"; do
6199 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6200 cat >conftest.$ac_ext <<_ACEOF
6201#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006202/* confdefs.h. */
6203_ACEOF
6204cat confdefs.h >>conftest.$ac_ext
6205cat >>conftest.$ac_ext <<_ACEOF
6206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006207$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006208int
6209main ()
6210{
6211static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6212test_array [0] = 0
6213
6214 ;
6215 return 0;
6216}
6217_ACEOF
6218rm -f conftest.$ac_objext
6219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6220 (eval $ac_compile) 2>&5
6221 ac_status=$?
6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223 (exit $ac_status); } &&
6224 { ac_try='test -s conftest.$ac_objext'
6225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6226 (eval $ac_try) 2>&5
6227 ac_status=$?
6228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6229 (exit $ac_status); }; }; then
6230 ac_hi=$ac_mid
6231else
6232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006233sed 's/^/| /' conftest.$ac_ext >&5
6234
Martin v. Löwis11437992002-04-12 09:54:03 +00006235ac_lo=`expr '(' $ac_mid ')' + 1`
6236fi
6237rm -f conftest.$ac_objext conftest.$ac_ext
6238done
6239case $ac_lo in
6240?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006241'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6242See \`config.log' for more details." >&5
6243echo "$as_me: error: cannot compute sizeof (int), 77
6244See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006245 { (exit 1); exit 1; }; } ;;
6246esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006247else
6248 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006249 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6250See \`config.log' for more details." >&5
6251echo "$as_me: error: cannot run test program while cross compiling
6252See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006253 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006254else
Martin v. Löwis11437992002-04-12 09:54:03 +00006255 cat >conftest.$ac_ext <<_ACEOF
6256#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006257/* confdefs.h. */
6258_ACEOF
6259cat confdefs.h >>conftest.$ac_ext
6260cat >>conftest.$ac_ext <<_ACEOF
6261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006262$ac_includes_default
6263long longval () { return (long) (sizeof (int)); }
6264unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006265#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006266#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006267int
6268main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006269{
Martin v. Löwis11437992002-04-12 09:54:03 +00006270
6271 FILE *f = fopen ("conftest.val", "w");
6272 if (! f)
6273 exit (1);
6274 if (((long) (sizeof (int))) < 0)
6275 {
6276 long i = longval ();
6277 if (i != ((long) (sizeof (int))))
6278 exit (1);
6279 fprintf (f, "%ld\n", i);
6280 }
6281 else
6282 {
6283 unsigned long i = ulongval ();
6284 if (i != ((long) (sizeof (int))))
6285 exit (1);
6286 fprintf (f, "%lu\n", i);
6287 }
6288 exit (ferror (f) || fclose (f) != 0);
6289
6290 ;
6291 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006292}
Martin v. Löwis11437992002-04-12 09:54:03 +00006293_ACEOF
6294rm -f conftest$ac_exeext
6295if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6296 (eval $ac_link) 2>&5
6297 ac_status=$?
6298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6301 (eval $ac_try) 2>&5
6302 ac_status=$?
6303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6304 (exit $ac_status); }; }; then
6305 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006306else
Martin v. Löwis11437992002-04-12 09:54:03 +00006307 echo "$as_me: program exited with status $ac_status" >&5
6308echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006309sed 's/^/| /' conftest.$ac_ext >&5
6310
Martin v. Löwis11437992002-04-12 09:54:03 +00006311( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006312{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6313See \`config.log' for more details." >&5
6314echo "$as_me: error: cannot compute sizeof (int), 77
6315See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006316 { (exit 1); exit 1; }; }
6317fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006318rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006319fi
6320fi
6321rm -f conftest.val
6322else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006323 ac_cv_sizeof_int=0
6324fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006325fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006326echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6327echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6328cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006329#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006330_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006331
6332
Martin v. Löwis11437992002-04-12 09:54:03 +00006333echo "$as_me:$LINENO: checking for long" >&5
6334echo $ECHO_N "checking for long... $ECHO_C" >&6
6335if test "${ac_cv_type_long+set}" = set; then
6336 echo $ECHO_N "(cached) $ECHO_C" >&6
6337else
6338 cat >conftest.$ac_ext <<_ACEOF
6339#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006340/* confdefs.h. */
6341_ACEOF
6342cat confdefs.h >>conftest.$ac_ext
6343cat >>conftest.$ac_ext <<_ACEOF
6344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006345$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006346int
6347main ()
6348{
6349if ((long *) 0)
6350 return 0;
6351if (sizeof (long))
6352 return 0;
6353 ;
6354 return 0;
6355}
6356_ACEOF
6357rm -f conftest.$ac_objext
6358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6359 (eval $ac_compile) 2>&5
6360 ac_status=$?
6361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362 (exit $ac_status); } &&
6363 { ac_try='test -s conftest.$ac_objext'
6364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6365 (eval $ac_try) 2>&5
6366 ac_status=$?
6367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6368 (exit $ac_status); }; }; then
6369 ac_cv_type_long=yes
6370else
6371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006372sed 's/^/| /' conftest.$ac_ext >&5
6373
Martin v. Löwis11437992002-04-12 09:54:03 +00006374ac_cv_type_long=no
6375fi
6376rm -f conftest.$ac_objext conftest.$ac_ext
6377fi
6378echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6379echo "${ECHO_T}$ac_cv_type_long" >&6
6380
6381echo "$as_me:$LINENO: checking size of long" >&5
6382echo $ECHO_N "checking size of long... $ECHO_C" >&6
6383if test "${ac_cv_sizeof_long+set}" = set; then
6384 echo $ECHO_N "(cached) $ECHO_C" >&6
6385else
6386 if test "$ac_cv_type_long" = yes; then
6387 # The cast to unsigned long works around a bug in the HP C Compiler
6388 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6389 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6390 # This bug is HP SR number 8606223364.
6391 if test "$cross_compiling" = yes; then
6392 # Depending upon the size, compute the lo and hi bounds.
6393cat >conftest.$ac_ext <<_ACEOF
6394#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006395/* confdefs.h. */
6396_ACEOF
6397cat confdefs.h >>conftest.$ac_ext
6398cat >>conftest.$ac_ext <<_ACEOF
6399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006400$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006401int
6402main ()
6403{
6404static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6405test_array [0] = 0
6406
6407 ;
6408 return 0;
6409}
6410_ACEOF
6411rm -f conftest.$ac_objext
6412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6413 (eval $ac_compile) 2>&5
6414 ac_status=$?
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); } &&
6417 { ac_try='test -s conftest.$ac_objext'
6418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6419 (eval $ac_try) 2>&5
6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); }; }; then
6423 ac_lo=0 ac_mid=0
6424 while :; do
6425 cat >conftest.$ac_ext <<_ACEOF
6426#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006427/* confdefs.h. */
6428_ACEOF
6429cat confdefs.h >>conftest.$ac_ext
6430cat >>conftest.$ac_ext <<_ACEOF
6431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006432$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006433int
6434main ()
6435{
6436static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6437test_array [0] = 0
6438
6439 ;
6440 return 0;
6441}
6442_ACEOF
6443rm -f conftest.$ac_objext
6444if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6445 (eval $ac_compile) 2>&5
6446 ac_status=$?
6447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6448 (exit $ac_status); } &&
6449 { ac_try='test -s conftest.$ac_objext'
6450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6451 (eval $ac_try) 2>&5
6452 ac_status=$?
6453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454 (exit $ac_status); }; }; then
6455 ac_hi=$ac_mid; break
6456else
6457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006458sed 's/^/| /' conftest.$ac_ext >&5
6459
Martin v. Löwis11437992002-04-12 09:54:03 +00006460ac_lo=`expr $ac_mid + 1`
6461 if test $ac_lo -le $ac_mid; then
6462 ac_lo= ac_hi=
6463 break
6464 fi
6465 ac_mid=`expr 2 '*' $ac_mid + 1`
6466fi
6467rm -f conftest.$ac_objext conftest.$ac_ext
6468 done
6469else
6470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006471sed 's/^/| /' conftest.$ac_ext >&5
6472
Martin v. Löwis11437992002-04-12 09:54:03 +00006473cat >conftest.$ac_ext <<_ACEOF
6474#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006475/* confdefs.h. */
6476_ACEOF
6477cat confdefs.h >>conftest.$ac_ext
6478cat >>conftest.$ac_ext <<_ACEOF
6479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006480$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006481int
6482main ()
6483{
6484static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6485test_array [0] = 0
6486
6487 ;
6488 return 0;
6489}
6490_ACEOF
6491rm -f conftest.$ac_objext
6492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6493 (eval $ac_compile) 2>&5
6494 ac_status=$?
6495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6496 (exit $ac_status); } &&
6497 { ac_try='test -s conftest.$ac_objext'
6498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6499 (eval $ac_try) 2>&5
6500 ac_status=$?
6501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6502 (exit $ac_status); }; }; then
6503 ac_hi=-1 ac_mid=-1
6504 while :; do
6505 cat >conftest.$ac_ext <<_ACEOF
6506#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006507/* confdefs.h. */
6508_ACEOF
6509cat confdefs.h >>conftest.$ac_ext
6510cat >>conftest.$ac_ext <<_ACEOF
6511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006512$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006513int
6514main ()
6515{
6516static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6517test_array [0] = 0
6518
6519 ;
6520 return 0;
6521}
6522_ACEOF
6523rm -f conftest.$ac_objext
6524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6525 (eval $ac_compile) 2>&5
6526 ac_status=$?
6527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6528 (exit $ac_status); } &&
6529 { ac_try='test -s conftest.$ac_objext'
6530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6531 (eval $ac_try) 2>&5
6532 ac_status=$?
6533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6534 (exit $ac_status); }; }; then
6535 ac_lo=$ac_mid; break
6536else
6537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006538sed 's/^/| /' conftest.$ac_ext >&5
6539
Martin v. Löwis11437992002-04-12 09:54:03 +00006540ac_hi=`expr '(' $ac_mid ')' - 1`
6541 if test $ac_mid -le $ac_hi; then
6542 ac_lo= ac_hi=
6543 break
6544 fi
6545 ac_mid=`expr 2 '*' $ac_mid`
6546fi
6547rm -f conftest.$ac_objext conftest.$ac_ext
6548 done
6549else
6550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006551sed 's/^/| /' conftest.$ac_ext >&5
6552
Martin v. Löwis11437992002-04-12 09:54:03 +00006553ac_lo= ac_hi=
6554fi
6555rm -f conftest.$ac_objext conftest.$ac_ext
6556fi
6557rm -f conftest.$ac_objext conftest.$ac_ext
6558# Binary search between lo and hi bounds.
6559while test "x$ac_lo" != "x$ac_hi"; do
6560 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6561 cat >conftest.$ac_ext <<_ACEOF
6562#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006563/* confdefs.h. */
6564_ACEOF
6565cat confdefs.h >>conftest.$ac_ext
6566cat >>conftest.$ac_ext <<_ACEOF
6567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006568$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006569int
6570main ()
6571{
6572static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6573test_array [0] = 0
6574
6575 ;
6576 return 0;
6577}
6578_ACEOF
6579rm -f conftest.$ac_objext
6580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6581 (eval $ac_compile) 2>&5
6582 ac_status=$?
6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584 (exit $ac_status); } &&
6585 { ac_try='test -s conftest.$ac_objext'
6586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6587 (eval $ac_try) 2>&5
6588 ac_status=$?
6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590 (exit $ac_status); }; }; then
6591 ac_hi=$ac_mid
6592else
6593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006594sed 's/^/| /' conftest.$ac_ext >&5
6595
Martin v. Löwis11437992002-04-12 09:54:03 +00006596ac_lo=`expr '(' $ac_mid ')' + 1`
6597fi
6598rm -f conftest.$ac_objext conftest.$ac_ext
6599done
6600case $ac_lo in
6601?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006602'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6603See \`config.log' for more details." >&5
6604echo "$as_me: error: cannot compute sizeof (long), 77
6605See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006606 { (exit 1); exit 1; }; } ;;
6607esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006608else
6609 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006610 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6611See \`config.log' for more details." >&5
6612echo "$as_me: error: cannot run test program while cross compiling
6613See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006614 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006615else
Martin v. Löwis11437992002-04-12 09:54:03 +00006616 cat >conftest.$ac_ext <<_ACEOF
6617#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006618/* confdefs.h. */
6619_ACEOF
6620cat confdefs.h >>conftest.$ac_ext
6621cat >>conftest.$ac_ext <<_ACEOF
6622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006623$ac_includes_default
6624long longval () { return (long) (sizeof (long)); }
6625unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006626#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006627#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006628int
6629main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006630{
Martin v. Löwis11437992002-04-12 09:54:03 +00006631
6632 FILE *f = fopen ("conftest.val", "w");
6633 if (! f)
6634 exit (1);
6635 if (((long) (sizeof (long))) < 0)
6636 {
6637 long i = longval ();
6638 if (i != ((long) (sizeof (long))))
6639 exit (1);
6640 fprintf (f, "%ld\n", i);
6641 }
6642 else
6643 {
6644 unsigned long i = ulongval ();
6645 if (i != ((long) (sizeof (long))))
6646 exit (1);
6647 fprintf (f, "%lu\n", i);
6648 }
6649 exit (ferror (f) || fclose (f) != 0);
6650
6651 ;
6652 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006653}
Martin v. Löwis11437992002-04-12 09:54:03 +00006654_ACEOF
6655rm -f conftest$ac_exeext
6656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6657 (eval $ac_link) 2>&5
6658 ac_status=$?
6659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6660 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6662 (eval $ac_try) 2>&5
6663 ac_status=$?
6664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6665 (exit $ac_status); }; }; then
6666 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006667else
Martin v. Löwis11437992002-04-12 09:54:03 +00006668 echo "$as_me: program exited with status $ac_status" >&5
6669echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006670sed 's/^/| /' conftest.$ac_ext >&5
6671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006673{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6674See \`config.log' for more details." >&5
6675echo "$as_me: error: cannot compute sizeof (long), 77
6676See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006677 { (exit 1); exit 1; }; }
6678fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006679rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006680fi
6681fi
6682rm -f conftest.val
6683else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006684 ac_cv_sizeof_long=0
6685fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006686fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006687echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6688echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6689cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006690#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006691_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006692
6693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694echo "$as_me:$LINENO: checking for void *" >&5
6695echo $ECHO_N "checking for void *... $ECHO_C" >&6
6696if test "${ac_cv_type_void_p+set}" = set; then
6697 echo $ECHO_N "(cached) $ECHO_C" >&6
6698else
6699 cat >conftest.$ac_ext <<_ACEOF
6700#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006701/* confdefs.h. */
6702_ACEOF
6703cat confdefs.h >>conftest.$ac_ext
6704cat >>conftest.$ac_ext <<_ACEOF
6705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006706$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006707int
6708main ()
6709{
6710if ((void * *) 0)
6711 return 0;
6712if (sizeof (void *))
6713 return 0;
6714 ;
6715 return 0;
6716}
6717_ACEOF
6718rm -f conftest.$ac_objext
6719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6720 (eval $ac_compile) 2>&5
6721 ac_status=$?
6722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723 (exit $ac_status); } &&
6724 { ac_try='test -s conftest.$ac_objext'
6725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6726 (eval $ac_try) 2>&5
6727 ac_status=$?
6728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6729 (exit $ac_status); }; }; then
6730 ac_cv_type_void_p=yes
6731else
6732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006733sed 's/^/| /' conftest.$ac_ext >&5
6734
Martin v. Löwis11437992002-04-12 09:54:03 +00006735ac_cv_type_void_p=no
6736fi
6737rm -f conftest.$ac_objext conftest.$ac_ext
6738fi
6739echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6740echo "${ECHO_T}$ac_cv_type_void_p" >&6
6741
6742echo "$as_me:$LINENO: checking size of void *" >&5
6743echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6744if test "${ac_cv_sizeof_void_p+set}" = set; then
6745 echo $ECHO_N "(cached) $ECHO_C" >&6
6746else
6747 if test "$ac_cv_type_void_p" = yes; then
6748 # The cast to unsigned long works around a bug in the HP C Compiler
6749 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6750 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6751 # This bug is HP SR number 8606223364.
6752 if test "$cross_compiling" = yes; then
6753 # Depending upon the size, compute the lo and hi bounds.
6754cat >conftest.$ac_ext <<_ACEOF
6755#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006756/* confdefs.h. */
6757_ACEOF
6758cat confdefs.h >>conftest.$ac_ext
6759cat >>conftest.$ac_ext <<_ACEOF
6760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006761$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006762int
6763main ()
6764{
6765static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6766test_array [0] = 0
6767
6768 ;
6769 return 0;
6770}
6771_ACEOF
6772rm -f conftest.$ac_objext
6773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6774 (eval $ac_compile) 2>&5
6775 ac_status=$?
6776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6777 (exit $ac_status); } &&
6778 { ac_try='test -s conftest.$ac_objext'
6779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6780 (eval $ac_try) 2>&5
6781 ac_status=$?
6782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6783 (exit $ac_status); }; }; then
6784 ac_lo=0 ac_mid=0
6785 while :; do
6786 cat >conftest.$ac_ext <<_ACEOF
6787#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006788/* confdefs.h. */
6789_ACEOF
6790cat confdefs.h >>conftest.$ac_ext
6791cat >>conftest.$ac_ext <<_ACEOF
6792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006793$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006794int
6795main ()
6796{
6797static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6798test_array [0] = 0
6799
6800 ;
6801 return 0;
6802}
6803_ACEOF
6804rm -f conftest.$ac_objext
6805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6806 (eval $ac_compile) 2>&5
6807 ac_status=$?
6808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6809 (exit $ac_status); } &&
6810 { ac_try='test -s conftest.$ac_objext'
6811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6812 (eval $ac_try) 2>&5
6813 ac_status=$?
6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815 (exit $ac_status); }; }; then
6816 ac_hi=$ac_mid; break
6817else
6818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006819sed 's/^/| /' conftest.$ac_ext >&5
6820
Martin v. Löwis11437992002-04-12 09:54:03 +00006821ac_lo=`expr $ac_mid + 1`
6822 if test $ac_lo -le $ac_mid; then
6823 ac_lo= ac_hi=
6824 break
6825 fi
6826 ac_mid=`expr 2 '*' $ac_mid + 1`
6827fi
6828rm -f conftest.$ac_objext conftest.$ac_ext
6829 done
6830else
6831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006832sed 's/^/| /' conftest.$ac_ext >&5
6833
Martin v. Löwis11437992002-04-12 09:54:03 +00006834cat >conftest.$ac_ext <<_ACEOF
6835#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006836/* confdefs.h. */
6837_ACEOF
6838cat confdefs.h >>conftest.$ac_ext
6839cat >>conftest.$ac_ext <<_ACEOF
6840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006841$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006842int
6843main ()
6844{
6845static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6846test_array [0] = 0
6847
6848 ;
6849 return 0;
6850}
6851_ACEOF
6852rm -f conftest.$ac_objext
6853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6854 (eval $ac_compile) 2>&5
6855 ac_status=$?
6856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6857 (exit $ac_status); } &&
6858 { ac_try='test -s conftest.$ac_objext'
6859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6860 (eval $ac_try) 2>&5
6861 ac_status=$?
6862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6863 (exit $ac_status); }; }; then
6864 ac_hi=-1 ac_mid=-1
6865 while :; do
6866 cat >conftest.$ac_ext <<_ACEOF
6867#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006873$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006874int
6875main ()
6876{
6877static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6878test_array [0] = 0
6879
6880 ;
6881 return 0;
6882}
6883_ACEOF
6884rm -f conftest.$ac_objext
6885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6886 (eval $ac_compile) 2>&5
6887 ac_status=$?
6888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889 (exit $ac_status); } &&
6890 { ac_try='test -s conftest.$ac_objext'
6891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6892 (eval $ac_try) 2>&5
6893 ac_status=$?
6894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6895 (exit $ac_status); }; }; then
6896 ac_lo=$ac_mid; break
6897else
6898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006899sed 's/^/| /' conftest.$ac_ext >&5
6900
Martin v. Löwis11437992002-04-12 09:54:03 +00006901ac_hi=`expr '(' $ac_mid ')' - 1`
6902 if test $ac_mid -le $ac_hi; then
6903 ac_lo= ac_hi=
6904 break
6905 fi
6906 ac_mid=`expr 2 '*' $ac_mid`
6907fi
6908rm -f conftest.$ac_objext conftest.$ac_ext
6909 done
6910else
6911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006912sed 's/^/| /' conftest.$ac_ext >&5
6913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914ac_lo= ac_hi=
6915fi
6916rm -f conftest.$ac_objext conftest.$ac_ext
6917fi
6918rm -f conftest.$ac_objext conftest.$ac_ext
6919# Binary search between lo and hi bounds.
6920while test "x$ac_lo" != "x$ac_hi"; do
6921 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6922 cat >conftest.$ac_ext <<_ACEOF
6923#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006924/* confdefs.h. */
6925_ACEOF
6926cat confdefs.h >>conftest.$ac_ext
6927cat >>conftest.$ac_ext <<_ACEOF
6928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006929$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006930int
6931main ()
6932{
6933static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6934test_array [0] = 0
6935
6936 ;
6937 return 0;
6938}
6939_ACEOF
6940rm -f conftest.$ac_objext
6941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6942 (eval $ac_compile) 2>&5
6943 ac_status=$?
6944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6945 (exit $ac_status); } &&
6946 { ac_try='test -s conftest.$ac_objext'
6947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6948 (eval $ac_try) 2>&5
6949 ac_status=$?
6950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6951 (exit $ac_status); }; }; then
6952 ac_hi=$ac_mid
6953else
6954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006955sed 's/^/| /' conftest.$ac_ext >&5
6956
Martin v. Löwis11437992002-04-12 09:54:03 +00006957ac_lo=`expr '(' $ac_mid ')' + 1`
6958fi
6959rm -f conftest.$ac_objext conftest.$ac_ext
6960done
6961case $ac_lo in
6962?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006963'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6964See \`config.log' for more details." >&5
6965echo "$as_me: error: cannot compute sizeof (void *), 77
6966See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006967 { (exit 1); exit 1; }; } ;;
6968esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006969else
6970 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006971 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6972See \`config.log' for more details." >&5
6973echo "$as_me: error: cannot run test program while cross compiling
6974See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006975 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006976else
Martin v. Löwis11437992002-04-12 09:54:03 +00006977 cat >conftest.$ac_ext <<_ACEOF
6978#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006979/* confdefs.h. */
6980_ACEOF
6981cat confdefs.h >>conftest.$ac_ext
6982cat >>conftest.$ac_ext <<_ACEOF
6983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006984$ac_includes_default
6985long longval () { return (long) (sizeof (void *)); }
6986unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006987#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006988#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006989int
6990main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006991{
Martin v. Löwis11437992002-04-12 09:54:03 +00006992
6993 FILE *f = fopen ("conftest.val", "w");
6994 if (! f)
6995 exit (1);
6996 if (((long) (sizeof (void *))) < 0)
6997 {
6998 long i = longval ();
6999 if (i != ((long) (sizeof (void *))))
7000 exit (1);
7001 fprintf (f, "%ld\n", i);
7002 }
7003 else
7004 {
7005 unsigned long i = ulongval ();
7006 if (i != ((long) (sizeof (void *))))
7007 exit (1);
7008 fprintf (f, "%lu\n", i);
7009 }
7010 exit (ferror (f) || fclose (f) != 0);
7011
7012 ;
7013 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007014}
Martin v. Löwis11437992002-04-12 09:54:03 +00007015_ACEOF
7016rm -f conftest$ac_exeext
7017if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7018 (eval $ac_link) 2>&5
7019 ac_status=$?
7020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7021 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7023 (eval $ac_try) 2>&5
7024 ac_status=$?
7025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7026 (exit $ac_status); }; }; then
7027 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007028else
Martin v. Löwis11437992002-04-12 09:54:03 +00007029 echo "$as_me: program exited with status $ac_status" >&5
7030echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007031sed 's/^/| /' conftest.$ac_ext >&5
7032
Martin v. Löwis11437992002-04-12 09:54:03 +00007033( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007034{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7035See \`config.log' for more details." >&5
7036echo "$as_me: error: cannot compute sizeof (void *), 77
7037See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007038 { (exit 1); exit 1; }; }
7039fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007040rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007041fi
7042fi
7043rm -f conftest.val
7044else
Guido van Rossumad678af1998-10-02 14:42:15 +00007045 ac_cv_sizeof_void_p=0
7046fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007047fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007048echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7049echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7050cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007051#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007052_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007053
7054
Martin v. Löwis11437992002-04-12 09:54:03 +00007055echo "$as_me:$LINENO: checking for char" >&5
7056echo $ECHO_N "checking for char... $ECHO_C" >&6
7057if test "${ac_cv_type_char+set}" = set; then
7058 echo $ECHO_N "(cached) $ECHO_C" >&6
7059else
7060 cat >conftest.$ac_ext <<_ACEOF
7061#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007062/* confdefs.h. */
7063_ACEOF
7064cat confdefs.h >>conftest.$ac_ext
7065cat >>conftest.$ac_ext <<_ACEOF
7066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007067$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007068int
7069main ()
7070{
7071if ((char *) 0)
7072 return 0;
7073if (sizeof (char))
7074 return 0;
7075 ;
7076 return 0;
7077}
7078_ACEOF
7079rm -f conftest.$ac_objext
7080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7081 (eval $ac_compile) 2>&5
7082 ac_status=$?
7083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7084 (exit $ac_status); } &&
7085 { ac_try='test -s conftest.$ac_objext'
7086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7087 (eval $ac_try) 2>&5
7088 ac_status=$?
7089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7090 (exit $ac_status); }; }; then
7091 ac_cv_type_char=yes
7092else
7093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007094sed 's/^/| /' conftest.$ac_ext >&5
7095
Martin v. Löwis11437992002-04-12 09:54:03 +00007096ac_cv_type_char=no
7097fi
7098rm -f conftest.$ac_objext conftest.$ac_ext
7099fi
7100echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
7101echo "${ECHO_T}$ac_cv_type_char" >&6
7102
7103echo "$as_me:$LINENO: checking size of char" >&5
7104echo $ECHO_N "checking size of char... $ECHO_C" >&6
7105if test "${ac_cv_sizeof_char+set}" = set; then
7106 echo $ECHO_N "(cached) $ECHO_C" >&6
7107else
7108 if test "$ac_cv_type_char" = yes; then
7109 # The cast to unsigned long works around a bug in the HP C Compiler
7110 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7111 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7112 # This bug is HP SR number 8606223364.
7113 if test "$cross_compiling" = yes; then
7114 # Depending upon the size, compute the lo and hi bounds.
7115cat >conftest.$ac_ext <<_ACEOF
7116#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007117/* confdefs.h. */
7118_ACEOF
7119cat confdefs.h >>conftest.$ac_ext
7120cat >>conftest.$ac_ext <<_ACEOF
7121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007122$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007123int
7124main ()
7125{
7126static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
7127test_array [0] = 0
7128
7129 ;
7130 return 0;
7131}
7132_ACEOF
7133rm -f conftest.$ac_objext
7134if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7135 (eval $ac_compile) 2>&5
7136 ac_status=$?
7137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7138 (exit $ac_status); } &&
7139 { ac_try='test -s conftest.$ac_objext'
7140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7141 (eval $ac_try) 2>&5
7142 ac_status=$?
7143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7144 (exit $ac_status); }; }; then
7145 ac_lo=0 ac_mid=0
7146 while :; do
7147 cat >conftest.$ac_ext <<_ACEOF
7148#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007149/* confdefs.h. */
7150_ACEOF
7151cat confdefs.h >>conftest.$ac_ext
7152cat >>conftest.$ac_ext <<_ACEOF
7153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007154$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007155int
7156main ()
7157{
7158static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
7159test_array [0] = 0
7160
7161 ;
7162 return 0;
7163}
7164_ACEOF
7165rm -f conftest.$ac_objext
7166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7167 (eval $ac_compile) 2>&5
7168 ac_status=$?
7169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7170 (exit $ac_status); } &&
7171 { ac_try='test -s conftest.$ac_objext'
7172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7173 (eval $ac_try) 2>&5
7174 ac_status=$?
7175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176 (exit $ac_status); }; }; then
7177 ac_hi=$ac_mid; break
7178else
7179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007180sed 's/^/| /' conftest.$ac_ext >&5
7181
Martin v. Löwis11437992002-04-12 09:54:03 +00007182ac_lo=`expr $ac_mid + 1`
7183 if test $ac_lo -le $ac_mid; then
7184 ac_lo= ac_hi=
7185 break
7186 fi
7187 ac_mid=`expr 2 '*' $ac_mid + 1`
7188fi
7189rm -f conftest.$ac_objext conftest.$ac_ext
7190 done
7191else
7192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007193sed 's/^/| /' conftest.$ac_ext >&5
7194
Martin v. Löwis11437992002-04-12 09:54:03 +00007195cat >conftest.$ac_ext <<_ACEOF
7196#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007197/* confdefs.h. */
7198_ACEOF
7199cat confdefs.h >>conftest.$ac_ext
7200cat >>conftest.$ac_ext <<_ACEOF
7201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007202$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007203int
7204main ()
7205{
7206static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
7207test_array [0] = 0
7208
7209 ;
7210 return 0;
7211}
7212_ACEOF
7213rm -f conftest.$ac_objext
7214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7215 (eval $ac_compile) 2>&5
7216 ac_status=$?
7217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7218 (exit $ac_status); } &&
7219 { ac_try='test -s conftest.$ac_objext'
7220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7221 (eval $ac_try) 2>&5
7222 ac_status=$?
7223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7224 (exit $ac_status); }; }; then
7225 ac_hi=-1 ac_mid=-1
7226 while :; do
7227 cat >conftest.$ac_ext <<_ACEOF
7228#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007229/* confdefs.h. */
7230_ACEOF
7231cat confdefs.h >>conftest.$ac_ext
7232cat >>conftest.$ac_ext <<_ACEOF
7233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007234$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007235int
7236main ()
7237{
7238static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
7239test_array [0] = 0
7240
7241 ;
7242 return 0;
7243}
7244_ACEOF
7245rm -f conftest.$ac_objext
7246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7247 (eval $ac_compile) 2>&5
7248 ac_status=$?
7249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250 (exit $ac_status); } &&
7251 { ac_try='test -s conftest.$ac_objext'
7252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7253 (eval $ac_try) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); }; }; then
7257 ac_lo=$ac_mid; break
7258else
7259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007260sed 's/^/| /' conftest.$ac_ext >&5
7261
Martin v. Löwis11437992002-04-12 09:54:03 +00007262ac_hi=`expr '(' $ac_mid ')' - 1`
7263 if test $ac_mid -le $ac_hi; then
7264 ac_lo= ac_hi=
7265 break
7266 fi
7267 ac_mid=`expr 2 '*' $ac_mid`
7268fi
7269rm -f conftest.$ac_objext conftest.$ac_ext
7270 done
7271else
7272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007273sed 's/^/| /' conftest.$ac_ext >&5
7274
Martin v. Löwis11437992002-04-12 09:54:03 +00007275ac_lo= ac_hi=
7276fi
7277rm -f conftest.$ac_objext conftest.$ac_ext
7278fi
7279rm -f conftest.$ac_objext conftest.$ac_ext
7280# Binary search between lo and hi bounds.
7281while test "x$ac_lo" != "x$ac_hi"; do
7282 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7283 cat >conftest.$ac_ext <<_ACEOF
7284#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007285/* confdefs.h. */
7286_ACEOF
7287cat confdefs.h >>conftest.$ac_ext
7288cat >>conftest.$ac_ext <<_ACEOF
7289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007290$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007291int
7292main ()
7293{
7294static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
7295test_array [0] = 0
7296
7297 ;
7298 return 0;
7299}
7300_ACEOF
7301rm -f conftest.$ac_objext
7302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7303 (eval $ac_compile) 2>&5
7304 ac_status=$?
7305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7306 (exit $ac_status); } &&
7307 { ac_try='test -s conftest.$ac_objext'
7308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7309 (eval $ac_try) 2>&5
7310 ac_status=$?
7311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7312 (exit $ac_status); }; }; then
7313 ac_hi=$ac_mid
7314else
7315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007316sed 's/^/| /' conftest.$ac_ext >&5
7317
Martin v. Löwis11437992002-04-12 09:54:03 +00007318ac_lo=`expr '(' $ac_mid ')' + 1`
7319fi
7320rm -f conftest.$ac_objext conftest.$ac_ext
7321done
7322case $ac_lo in
7323?*) ac_cv_sizeof_char=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007324'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
7325See \`config.log' for more details." >&5
7326echo "$as_me: error: cannot compute sizeof (char), 77
7327See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007328 { (exit 1); exit 1; }; } ;;
7329esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007330else
7331 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007332 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7333See \`config.log' for more details." >&5
7334echo "$as_me: error: cannot run test program while cross compiling
7335See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007336 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007337else
Martin v. Löwis11437992002-04-12 09:54:03 +00007338 cat >conftest.$ac_ext <<_ACEOF
7339#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007340/* confdefs.h. */
7341_ACEOF
7342cat confdefs.h >>conftest.$ac_ext
7343cat >>conftest.$ac_ext <<_ACEOF
7344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007345$ac_includes_default
7346long longval () { return (long) (sizeof (char)); }
7347unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007348#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007349#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007350int
7351main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007352{
Martin v. Löwis11437992002-04-12 09:54:03 +00007353
7354 FILE *f = fopen ("conftest.val", "w");
7355 if (! f)
7356 exit (1);
7357 if (((long) (sizeof (char))) < 0)
7358 {
7359 long i = longval ();
7360 if (i != ((long) (sizeof (char))))
7361 exit (1);
7362 fprintf (f, "%ld\n", i);
7363 }
7364 else
7365 {
7366 unsigned long i = ulongval ();
7367 if (i != ((long) (sizeof (char))))
7368 exit (1);
7369 fprintf (f, "%lu\n", i);
7370 }
7371 exit (ferror (f) || fclose (f) != 0);
7372
7373 ;
7374 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007375}
Martin v. Löwis11437992002-04-12 09:54:03 +00007376_ACEOF
7377rm -f conftest$ac_exeext
7378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7379 (eval $ac_link) 2>&5
7380 ac_status=$?
7381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7384 (eval $ac_try) 2>&5
7385 ac_status=$?
7386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7387 (exit $ac_status); }; }; then
7388 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007389else
Martin v. Löwis11437992002-04-12 09:54:03 +00007390 echo "$as_me: program exited with status $ac_status" >&5
7391echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007392sed 's/^/| /' conftest.$ac_ext >&5
7393
Martin v. Löwis11437992002-04-12 09:54:03 +00007394( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007395{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
7396See \`config.log' for more details." >&5
7397echo "$as_me: error: cannot compute sizeof (char), 77
7398See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007399 { (exit 1); exit 1; }; }
7400fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007401rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007402fi
7403fi
7404rm -f conftest.val
7405else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007406 ac_cv_sizeof_char=0
7407fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007408fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007409echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
7410echo "${ECHO_T}$ac_cv_sizeof_char" >&6
7411cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007412#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00007413_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007414
7415
Martin v. Löwis11437992002-04-12 09:54:03 +00007416echo "$as_me:$LINENO: checking for short" >&5
7417echo $ECHO_N "checking for short... $ECHO_C" >&6
7418if test "${ac_cv_type_short+set}" = set; then
7419 echo $ECHO_N "(cached) $ECHO_C" >&6
7420else
7421 cat >conftest.$ac_ext <<_ACEOF
7422#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007423/* confdefs.h. */
7424_ACEOF
7425cat confdefs.h >>conftest.$ac_ext
7426cat >>conftest.$ac_ext <<_ACEOF
7427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007428$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007429int
7430main ()
7431{
7432if ((short *) 0)
7433 return 0;
7434if (sizeof (short))
7435 return 0;
7436 ;
7437 return 0;
7438}
7439_ACEOF
7440rm -f conftest.$ac_objext
7441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7442 (eval $ac_compile) 2>&5
7443 ac_status=$?
7444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445 (exit $ac_status); } &&
7446 { ac_try='test -s conftest.$ac_objext'
7447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7448 (eval $ac_try) 2>&5
7449 ac_status=$?
7450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451 (exit $ac_status); }; }; then
7452 ac_cv_type_short=yes
7453else
7454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007455sed 's/^/| /' conftest.$ac_ext >&5
7456
Martin v. Löwis11437992002-04-12 09:54:03 +00007457ac_cv_type_short=no
7458fi
7459rm -f conftest.$ac_objext conftest.$ac_ext
7460fi
7461echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7462echo "${ECHO_T}$ac_cv_type_short" >&6
7463
7464echo "$as_me:$LINENO: checking size of short" >&5
7465echo $ECHO_N "checking size of short... $ECHO_C" >&6
7466if test "${ac_cv_sizeof_short+set}" = set; then
7467 echo $ECHO_N "(cached) $ECHO_C" >&6
7468else
7469 if test "$ac_cv_type_short" = yes; then
7470 # The cast to unsigned long works around a bug in the HP C Compiler
7471 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7472 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7473 # This bug is HP SR number 8606223364.
7474 if test "$cross_compiling" = yes; then
7475 # Depending upon the size, compute the lo and hi bounds.
7476cat >conftest.$ac_ext <<_ACEOF
7477#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007478/* confdefs.h. */
7479_ACEOF
7480cat confdefs.h >>conftest.$ac_ext
7481cat >>conftest.$ac_ext <<_ACEOF
7482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007483$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007484int
7485main ()
7486{
7487static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7488test_array [0] = 0
7489
7490 ;
7491 return 0;
7492}
7493_ACEOF
7494rm -f conftest.$ac_objext
7495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7496 (eval $ac_compile) 2>&5
7497 ac_status=$?
7498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7499 (exit $ac_status); } &&
7500 { ac_try='test -s conftest.$ac_objext'
7501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7502 (eval $ac_try) 2>&5
7503 ac_status=$?
7504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7505 (exit $ac_status); }; }; then
7506 ac_lo=0 ac_mid=0
7507 while :; do
7508 cat >conftest.$ac_ext <<_ACEOF
7509#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007510/* confdefs.h. */
7511_ACEOF
7512cat confdefs.h >>conftest.$ac_ext
7513cat >>conftest.$ac_ext <<_ACEOF
7514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007515$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007516int
7517main ()
7518{
7519static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7520test_array [0] = 0
7521
7522 ;
7523 return 0;
7524}
7525_ACEOF
7526rm -f conftest.$ac_objext
7527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7528 (eval $ac_compile) 2>&5
7529 ac_status=$?
7530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7531 (exit $ac_status); } &&
7532 { ac_try='test -s conftest.$ac_objext'
7533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7534 (eval $ac_try) 2>&5
7535 ac_status=$?
7536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7537 (exit $ac_status); }; }; then
7538 ac_hi=$ac_mid; break
7539else
7540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007541sed 's/^/| /' conftest.$ac_ext >&5
7542
Martin v. Löwis11437992002-04-12 09:54:03 +00007543ac_lo=`expr $ac_mid + 1`
7544 if test $ac_lo -le $ac_mid; then
7545 ac_lo= ac_hi=
7546 break
7547 fi
7548 ac_mid=`expr 2 '*' $ac_mid + 1`
7549fi
7550rm -f conftest.$ac_objext conftest.$ac_ext
7551 done
7552else
7553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007554sed 's/^/| /' conftest.$ac_ext >&5
7555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556cat >conftest.$ac_ext <<_ACEOF
7557#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007558/* confdefs.h. */
7559_ACEOF
7560cat confdefs.h >>conftest.$ac_ext
7561cat >>conftest.$ac_ext <<_ACEOF
7562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007563$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007564int
7565main ()
7566{
7567static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7568test_array [0] = 0
7569
7570 ;
7571 return 0;
7572}
7573_ACEOF
7574rm -f conftest.$ac_objext
7575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7576 (eval $ac_compile) 2>&5
7577 ac_status=$?
7578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7579 (exit $ac_status); } &&
7580 { ac_try='test -s conftest.$ac_objext'
7581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7582 (eval $ac_try) 2>&5
7583 ac_status=$?
7584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7585 (exit $ac_status); }; }; then
7586 ac_hi=-1 ac_mid=-1
7587 while :; do
7588 cat >conftest.$ac_ext <<_ACEOF
7589#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007590/* confdefs.h. */
7591_ACEOF
7592cat confdefs.h >>conftest.$ac_ext
7593cat >>conftest.$ac_ext <<_ACEOF
7594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007595$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007596int
7597main ()
7598{
7599static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7600test_array [0] = 0
7601
7602 ;
7603 return 0;
7604}
7605_ACEOF
7606rm -f conftest.$ac_objext
7607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7608 (eval $ac_compile) 2>&5
7609 ac_status=$?
7610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7611 (exit $ac_status); } &&
7612 { ac_try='test -s conftest.$ac_objext'
7613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7614 (eval $ac_try) 2>&5
7615 ac_status=$?
7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617 (exit $ac_status); }; }; then
7618 ac_lo=$ac_mid; break
7619else
7620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007621sed 's/^/| /' conftest.$ac_ext >&5
7622
Martin v. Löwis11437992002-04-12 09:54:03 +00007623ac_hi=`expr '(' $ac_mid ')' - 1`
7624 if test $ac_mid -le $ac_hi; then
7625 ac_lo= ac_hi=
7626 break
7627 fi
7628 ac_mid=`expr 2 '*' $ac_mid`
7629fi
7630rm -f conftest.$ac_objext conftest.$ac_ext
7631 done
7632else
7633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007634sed 's/^/| /' conftest.$ac_ext >&5
7635
Martin v. Löwis11437992002-04-12 09:54:03 +00007636ac_lo= ac_hi=
7637fi
7638rm -f conftest.$ac_objext conftest.$ac_ext
7639fi
7640rm -f conftest.$ac_objext conftest.$ac_ext
7641# Binary search between lo and hi bounds.
7642while test "x$ac_lo" != "x$ac_hi"; do
7643 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7644 cat >conftest.$ac_ext <<_ACEOF
7645#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007646/* confdefs.h. */
7647_ACEOF
7648cat confdefs.h >>conftest.$ac_ext
7649cat >>conftest.$ac_ext <<_ACEOF
7650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007651$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007652int
7653main ()
7654{
7655static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7656test_array [0] = 0
7657
7658 ;
7659 return 0;
7660}
7661_ACEOF
7662rm -f conftest.$ac_objext
7663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7664 (eval $ac_compile) 2>&5
7665 ac_status=$?
7666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7667 (exit $ac_status); } &&
7668 { ac_try='test -s conftest.$ac_objext'
7669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7670 (eval $ac_try) 2>&5
7671 ac_status=$?
7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673 (exit $ac_status); }; }; then
7674 ac_hi=$ac_mid
7675else
7676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007677sed 's/^/| /' conftest.$ac_ext >&5
7678
Martin v. Löwis11437992002-04-12 09:54:03 +00007679ac_lo=`expr '(' $ac_mid ')' + 1`
7680fi
7681rm -f conftest.$ac_objext conftest.$ac_ext
7682done
7683case $ac_lo in
7684?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007685'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7686See \`config.log' for more details." >&5
7687echo "$as_me: error: cannot compute sizeof (short), 77
7688See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007689 { (exit 1); exit 1; }; } ;;
7690esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007691else
7692 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007693 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7694See \`config.log' for more details." >&5
7695echo "$as_me: error: cannot run test program while cross compiling
7696See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007698else
Martin v. Löwis11437992002-04-12 09:54:03 +00007699 cat >conftest.$ac_ext <<_ACEOF
7700#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007701/* confdefs.h. */
7702_ACEOF
7703cat confdefs.h >>conftest.$ac_ext
7704cat >>conftest.$ac_ext <<_ACEOF
7705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007706$ac_includes_default
7707long longval () { return (long) (sizeof (short)); }
7708unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007709#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007710#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007711int
7712main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007713{
Martin v. Löwis11437992002-04-12 09:54:03 +00007714
7715 FILE *f = fopen ("conftest.val", "w");
7716 if (! f)
7717 exit (1);
7718 if (((long) (sizeof (short))) < 0)
7719 {
7720 long i = longval ();
7721 if (i != ((long) (sizeof (short))))
7722 exit (1);
7723 fprintf (f, "%ld\n", i);
7724 }
7725 else
7726 {
7727 unsigned long i = ulongval ();
7728 if (i != ((long) (sizeof (short))))
7729 exit (1);
7730 fprintf (f, "%lu\n", i);
7731 }
7732 exit (ferror (f) || fclose (f) != 0);
7733
7734 ;
7735 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007736}
Martin v. Löwis11437992002-04-12 09:54:03 +00007737_ACEOF
7738rm -f conftest$ac_exeext
7739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7740 (eval $ac_link) 2>&5
7741 ac_status=$?
7742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7743 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7745 (eval $ac_try) 2>&5
7746 ac_status=$?
7747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7748 (exit $ac_status); }; }; then
7749 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007750else
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 echo "$as_me: program exited with status $ac_status" >&5
7752echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007753sed 's/^/| /' conftest.$ac_ext >&5
7754
Martin v. Löwis11437992002-04-12 09:54:03 +00007755( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007756{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7757See \`config.log' for more details." >&5
7758echo "$as_me: error: cannot compute sizeof (short), 77
7759See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007760 { (exit 1); exit 1; }; }
7761fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007762rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007763fi
7764fi
7765rm -f conftest.val
7766else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007767 ac_cv_sizeof_short=0
7768fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007769fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007770echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7771echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7772cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007773#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007774_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007775
7776
Martin v. Löwis11437992002-04-12 09:54:03 +00007777echo "$as_me:$LINENO: checking for float" >&5
7778echo $ECHO_N "checking for float... $ECHO_C" >&6
7779if test "${ac_cv_type_float+set}" = set; then
7780 echo $ECHO_N "(cached) $ECHO_C" >&6
7781else
7782 cat >conftest.$ac_ext <<_ACEOF
7783#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007784/* confdefs.h. */
7785_ACEOF
7786cat confdefs.h >>conftest.$ac_ext
7787cat >>conftest.$ac_ext <<_ACEOF
7788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007789$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007790int
7791main ()
7792{
7793if ((float *) 0)
7794 return 0;
7795if (sizeof (float))
7796 return 0;
7797 ;
7798 return 0;
7799}
7800_ACEOF
7801rm -f conftest.$ac_objext
7802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7803 (eval $ac_compile) 2>&5
7804 ac_status=$?
7805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806 (exit $ac_status); } &&
7807 { ac_try='test -s conftest.$ac_objext'
7808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7809 (eval $ac_try) 2>&5
7810 ac_status=$?
7811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7812 (exit $ac_status); }; }; then
7813 ac_cv_type_float=yes
7814else
7815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007816sed 's/^/| /' conftest.$ac_ext >&5
7817
Martin v. Löwis11437992002-04-12 09:54:03 +00007818ac_cv_type_float=no
7819fi
7820rm -f conftest.$ac_objext conftest.$ac_ext
7821fi
7822echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7823echo "${ECHO_T}$ac_cv_type_float" >&6
7824
7825echo "$as_me:$LINENO: checking size of float" >&5
7826echo $ECHO_N "checking size of float... $ECHO_C" >&6
7827if test "${ac_cv_sizeof_float+set}" = set; then
7828 echo $ECHO_N "(cached) $ECHO_C" >&6
7829else
7830 if test "$ac_cv_type_float" = yes; then
7831 # The cast to unsigned long works around a bug in the HP C Compiler
7832 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7833 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7834 # This bug is HP SR number 8606223364.
7835 if test "$cross_compiling" = yes; then
7836 # Depending upon the size, compute the lo and hi bounds.
7837cat >conftest.$ac_ext <<_ACEOF
7838#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007839/* confdefs.h. */
7840_ACEOF
7841cat confdefs.h >>conftest.$ac_ext
7842cat >>conftest.$ac_ext <<_ACEOF
7843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007844$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007845int
7846main ()
7847{
7848static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7849test_array [0] = 0
7850
7851 ;
7852 return 0;
7853}
7854_ACEOF
7855rm -f conftest.$ac_objext
7856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7857 (eval $ac_compile) 2>&5
7858 ac_status=$?
7859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7860 (exit $ac_status); } &&
7861 { ac_try='test -s conftest.$ac_objext'
7862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7863 (eval $ac_try) 2>&5
7864 ac_status=$?
7865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7866 (exit $ac_status); }; }; then
7867 ac_lo=0 ac_mid=0
7868 while :; do
7869 cat >conftest.$ac_ext <<_ACEOF
7870#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007871/* confdefs.h. */
7872_ACEOF
7873cat confdefs.h >>conftest.$ac_ext
7874cat >>conftest.$ac_ext <<_ACEOF
7875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007876$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007877int
7878main ()
7879{
7880static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7881test_array [0] = 0
7882
7883 ;
7884 return 0;
7885}
7886_ACEOF
7887rm -f conftest.$ac_objext
7888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7889 (eval $ac_compile) 2>&5
7890 ac_status=$?
7891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7892 (exit $ac_status); } &&
7893 { ac_try='test -s conftest.$ac_objext'
7894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7895 (eval $ac_try) 2>&5
7896 ac_status=$?
7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898 (exit $ac_status); }; }; then
7899 ac_hi=$ac_mid; break
7900else
7901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007902sed 's/^/| /' conftest.$ac_ext >&5
7903
Martin v. Löwis11437992002-04-12 09:54:03 +00007904ac_lo=`expr $ac_mid + 1`
7905 if test $ac_lo -le $ac_mid; then
7906 ac_lo= ac_hi=
7907 break
7908 fi
7909 ac_mid=`expr 2 '*' $ac_mid + 1`
7910fi
7911rm -f conftest.$ac_objext conftest.$ac_ext
7912 done
7913else
7914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007915sed 's/^/| /' conftest.$ac_ext >&5
7916
Martin v. Löwis11437992002-04-12 09:54:03 +00007917cat >conftest.$ac_ext <<_ACEOF
7918#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007919/* confdefs.h. */
7920_ACEOF
7921cat confdefs.h >>conftest.$ac_ext
7922cat >>conftest.$ac_ext <<_ACEOF
7923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007924$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007925int
7926main ()
7927{
7928static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7929test_array [0] = 0
7930
7931 ;
7932 return 0;
7933}
7934_ACEOF
7935rm -f conftest.$ac_objext
7936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7937 (eval $ac_compile) 2>&5
7938 ac_status=$?
7939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7940 (exit $ac_status); } &&
7941 { ac_try='test -s conftest.$ac_objext'
7942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7943 (eval $ac_try) 2>&5
7944 ac_status=$?
7945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7946 (exit $ac_status); }; }; then
7947 ac_hi=-1 ac_mid=-1
7948 while :; do
7949 cat >conftest.$ac_ext <<_ACEOF
7950#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007951/* confdefs.h. */
7952_ACEOF
7953cat confdefs.h >>conftest.$ac_ext
7954cat >>conftest.$ac_ext <<_ACEOF
7955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007956$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007957int
7958main ()
7959{
7960static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7961test_array [0] = 0
7962
7963 ;
7964 return 0;
7965}
7966_ACEOF
7967rm -f conftest.$ac_objext
7968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7969 (eval $ac_compile) 2>&5
7970 ac_status=$?
7971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7972 (exit $ac_status); } &&
7973 { ac_try='test -s conftest.$ac_objext'
7974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7975 (eval $ac_try) 2>&5
7976 ac_status=$?
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); }; }; then
7979 ac_lo=$ac_mid; break
7980else
7981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007982sed 's/^/| /' conftest.$ac_ext >&5
7983
Martin v. Löwis11437992002-04-12 09:54:03 +00007984ac_hi=`expr '(' $ac_mid ')' - 1`
7985 if test $ac_mid -le $ac_hi; then
7986 ac_lo= ac_hi=
7987 break
7988 fi
7989 ac_mid=`expr 2 '*' $ac_mid`
7990fi
7991rm -f conftest.$ac_objext conftest.$ac_ext
7992 done
7993else
7994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007995sed 's/^/| /' conftest.$ac_ext >&5
7996
Martin v. Löwis11437992002-04-12 09:54:03 +00007997ac_lo= ac_hi=
7998fi
7999rm -f conftest.$ac_objext conftest.$ac_ext
8000fi
8001rm -f conftest.$ac_objext conftest.$ac_ext
8002# Binary search between lo and hi bounds.
8003while test "x$ac_lo" != "x$ac_hi"; do
8004 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8005 cat >conftest.$ac_ext <<_ACEOF
8006#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008007/* confdefs.h. */
8008_ACEOF
8009cat confdefs.h >>conftest.$ac_ext
8010cat >>conftest.$ac_ext <<_ACEOF
8011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008012$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008013int
8014main ()
8015{
8016static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8017test_array [0] = 0
8018
8019 ;
8020 return 0;
8021}
8022_ACEOF
8023rm -f conftest.$ac_objext
8024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8025 (eval $ac_compile) 2>&5
8026 ac_status=$?
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); } &&
8029 { ac_try='test -s conftest.$ac_objext'
8030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8031 (eval $ac_try) 2>&5
8032 ac_status=$?
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); }; }; then
8035 ac_hi=$ac_mid
8036else
8037 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008038sed 's/^/| /' conftest.$ac_ext >&5
8039
Martin v. Löwis11437992002-04-12 09:54:03 +00008040ac_lo=`expr '(' $ac_mid ')' + 1`
8041fi
8042rm -f conftest.$ac_objext conftest.$ac_ext
8043done
8044case $ac_lo in
8045?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008046'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8047See \`config.log' for more details." >&5
8048echo "$as_me: error: cannot compute sizeof (float), 77
8049See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 { (exit 1); exit 1; }; } ;;
8051esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008052else
8053 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008054 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8055See \`config.log' for more details." >&5
8056echo "$as_me: error: cannot run test program while cross compiling
8057See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008058 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008059else
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 cat >conftest.$ac_ext <<_ACEOF
8061#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008062/* confdefs.h. */
8063_ACEOF
8064cat confdefs.h >>conftest.$ac_ext
8065cat >>conftest.$ac_ext <<_ACEOF
8066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008067$ac_includes_default
8068long longval () { return (long) (sizeof (float)); }
8069unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008070#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008071#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008072int
8073main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008074{
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
8076 FILE *f = fopen ("conftest.val", "w");
8077 if (! f)
8078 exit (1);
8079 if (((long) (sizeof (float))) < 0)
8080 {
8081 long i = longval ();
8082 if (i != ((long) (sizeof (float))))
8083 exit (1);
8084 fprintf (f, "%ld\n", i);
8085 }
8086 else
8087 {
8088 unsigned long i = ulongval ();
8089 if (i != ((long) (sizeof (float))))
8090 exit (1);
8091 fprintf (f, "%lu\n", i);
8092 }
8093 exit (ferror (f) || fclose (f) != 0);
8094
8095 ;
8096 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008097}
Martin v. Löwis11437992002-04-12 09:54:03 +00008098_ACEOF
8099rm -f conftest$ac_exeext
8100if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8101 (eval $ac_link) 2>&5
8102 ac_status=$?
8103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8104 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8106 (eval $ac_try) 2>&5
8107 ac_status=$?
8108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8109 (exit $ac_status); }; }; then
8110 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008111else
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 echo "$as_me: program exited with status $ac_status" >&5
8113echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008114sed 's/^/| /' conftest.$ac_ext >&5
8115
Martin v. Löwis11437992002-04-12 09:54:03 +00008116( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008117{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8118See \`config.log' for more details." >&5
8119echo "$as_me: error: cannot compute sizeof (float), 77
8120See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 { (exit 1); exit 1; }; }
8122fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008123rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008124fi
8125fi
8126rm -f conftest.val
8127else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008128 ac_cv_sizeof_float=0
8129fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008130fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008131echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8132echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8133cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008134#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008135_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008136
8137
Martin v. Löwis11437992002-04-12 09:54:03 +00008138echo "$as_me:$LINENO: checking for double" >&5
8139echo $ECHO_N "checking for double... $ECHO_C" >&6
8140if test "${ac_cv_type_double+set}" = set; then
8141 echo $ECHO_N "(cached) $ECHO_C" >&6
8142else
8143 cat >conftest.$ac_ext <<_ACEOF
8144#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008145/* confdefs.h. */
8146_ACEOF
8147cat confdefs.h >>conftest.$ac_ext
8148cat >>conftest.$ac_ext <<_ACEOF
8149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008150$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008151int
8152main ()
8153{
8154if ((double *) 0)
8155 return 0;
8156if (sizeof (double))
8157 return 0;
8158 ;
8159 return 0;
8160}
8161_ACEOF
8162rm -f conftest.$ac_objext
8163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8164 (eval $ac_compile) 2>&5
8165 ac_status=$?
8166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8167 (exit $ac_status); } &&
8168 { ac_try='test -s conftest.$ac_objext'
8169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8170 (eval $ac_try) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); }; }; then
8174 ac_cv_type_double=yes
8175else
8176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008177sed 's/^/| /' conftest.$ac_ext >&5
8178
Martin v. Löwis11437992002-04-12 09:54:03 +00008179ac_cv_type_double=no
8180fi
8181rm -f conftest.$ac_objext conftest.$ac_ext
8182fi
8183echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8184echo "${ECHO_T}$ac_cv_type_double" >&6
8185
8186echo "$as_me:$LINENO: checking size of double" >&5
8187echo $ECHO_N "checking size of double... $ECHO_C" >&6
8188if test "${ac_cv_sizeof_double+set}" = set; then
8189 echo $ECHO_N "(cached) $ECHO_C" >&6
8190else
8191 if test "$ac_cv_type_double" = yes; then
8192 # The cast to unsigned long works around a bug in the HP C Compiler
8193 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8194 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8195 # This bug is HP SR number 8606223364.
8196 if test "$cross_compiling" = yes; then
8197 # Depending upon the size, compute the lo and hi bounds.
8198cat >conftest.$ac_ext <<_ACEOF
8199#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008200/* confdefs.h. */
8201_ACEOF
8202cat confdefs.h >>conftest.$ac_ext
8203cat >>conftest.$ac_ext <<_ACEOF
8204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008205$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
8207main ()
8208{
8209static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8210test_array [0] = 0
8211
8212 ;
8213 return 0;
8214}
8215_ACEOF
8216rm -f conftest.$ac_objext
8217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8218 (eval $ac_compile) 2>&5
8219 ac_status=$?
8220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8221 (exit $ac_status); } &&
8222 { ac_try='test -s conftest.$ac_objext'
8223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8224 (eval $ac_try) 2>&5
8225 ac_status=$?
8226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8227 (exit $ac_status); }; }; then
8228 ac_lo=0 ac_mid=0
8229 while :; do
8230 cat >conftest.$ac_ext <<_ACEOF
8231#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008232/* confdefs.h. */
8233_ACEOF
8234cat confdefs.h >>conftest.$ac_ext
8235cat >>conftest.$ac_ext <<_ACEOF
8236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008237$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008238int
8239main ()
8240{
8241static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8242test_array [0] = 0
8243
8244 ;
8245 return 0;
8246}
8247_ACEOF
8248rm -f conftest.$ac_objext
8249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8250 (eval $ac_compile) 2>&5
8251 ac_status=$?
8252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8253 (exit $ac_status); } &&
8254 { ac_try='test -s conftest.$ac_objext'
8255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8256 (eval $ac_try) 2>&5
8257 ac_status=$?
8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8259 (exit $ac_status); }; }; then
8260 ac_hi=$ac_mid; break
8261else
8262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008263sed 's/^/| /' conftest.$ac_ext >&5
8264
Martin v. Löwis11437992002-04-12 09:54:03 +00008265ac_lo=`expr $ac_mid + 1`
8266 if test $ac_lo -le $ac_mid; then
8267 ac_lo= ac_hi=
8268 break
8269 fi
8270 ac_mid=`expr 2 '*' $ac_mid + 1`
8271fi
8272rm -f conftest.$ac_objext conftest.$ac_ext
8273 done
8274else
8275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008276sed 's/^/| /' conftest.$ac_ext >&5
8277
Martin v. Löwis11437992002-04-12 09:54:03 +00008278cat >conftest.$ac_ext <<_ACEOF
8279#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008280/* confdefs.h. */
8281_ACEOF
8282cat confdefs.h >>conftest.$ac_ext
8283cat >>conftest.$ac_ext <<_ACEOF
8284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008285$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008286int
8287main ()
8288{
8289static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8290test_array [0] = 0
8291
8292 ;
8293 return 0;
8294}
8295_ACEOF
8296rm -f conftest.$ac_objext
8297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8298 (eval $ac_compile) 2>&5
8299 ac_status=$?
8300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8301 (exit $ac_status); } &&
8302 { ac_try='test -s conftest.$ac_objext'
8303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8304 (eval $ac_try) 2>&5
8305 ac_status=$?
8306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8307 (exit $ac_status); }; }; then
8308 ac_hi=-1 ac_mid=-1
8309 while :; do
8310 cat >conftest.$ac_ext <<_ACEOF
8311#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008312/* confdefs.h. */
8313_ACEOF
8314cat confdefs.h >>conftest.$ac_ext
8315cat >>conftest.$ac_ext <<_ACEOF
8316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008317$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008318int
8319main ()
8320{
8321static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8322test_array [0] = 0
8323
8324 ;
8325 return 0;
8326}
8327_ACEOF
8328rm -f conftest.$ac_objext
8329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8330 (eval $ac_compile) 2>&5
8331 ac_status=$?
8332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8333 (exit $ac_status); } &&
8334 { ac_try='test -s conftest.$ac_objext'
8335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8336 (eval $ac_try) 2>&5
8337 ac_status=$?
8338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8339 (exit $ac_status); }; }; then
8340 ac_lo=$ac_mid; break
8341else
8342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008343sed 's/^/| /' conftest.$ac_ext >&5
8344
Martin v. Löwis11437992002-04-12 09:54:03 +00008345ac_hi=`expr '(' $ac_mid ')' - 1`
8346 if test $ac_mid -le $ac_hi; then
8347 ac_lo= ac_hi=
8348 break
8349 fi
8350 ac_mid=`expr 2 '*' $ac_mid`
8351fi
8352rm -f conftest.$ac_objext conftest.$ac_ext
8353 done
8354else
8355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008356sed 's/^/| /' conftest.$ac_ext >&5
8357
Martin v. Löwis11437992002-04-12 09:54:03 +00008358ac_lo= ac_hi=
8359fi
8360rm -f conftest.$ac_objext conftest.$ac_ext
8361fi
8362rm -f conftest.$ac_objext conftest.$ac_ext
8363# Binary search between lo and hi bounds.
8364while test "x$ac_lo" != "x$ac_hi"; do
8365 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8366 cat >conftest.$ac_ext <<_ACEOF
8367#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008368/* confdefs.h. */
8369_ACEOF
8370cat confdefs.h >>conftest.$ac_ext
8371cat >>conftest.$ac_ext <<_ACEOF
8372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008373$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008374int
8375main ()
8376{
8377static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8378test_array [0] = 0
8379
8380 ;
8381 return 0;
8382}
8383_ACEOF
8384rm -f conftest.$ac_objext
8385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8386 (eval $ac_compile) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); } &&
8390 { ac_try='test -s conftest.$ac_objext'
8391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8392 (eval $ac_try) 2>&5
8393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); }; }; then
8396 ac_hi=$ac_mid
8397else
8398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008399sed 's/^/| /' conftest.$ac_ext >&5
8400
Martin v. Löwis11437992002-04-12 09:54:03 +00008401ac_lo=`expr '(' $ac_mid ')' + 1`
8402fi
8403rm -f conftest.$ac_objext conftest.$ac_ext
8404done
8405case $ac_lo in
8406?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008407'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8408See \`config.log' for more details." >&5
8409echo "$as_me: error: cannot compute sizeof (double), 77
8410See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 { (exit 1); exit 1; }; } ;;
8412esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008413else
8414 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008415 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8416See \`config.log' for more details." >&5
8417echo "$as_me: error: cannot run test program while cross compiling
8418See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008419 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008420else
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 cat >conftest.$ac_ext <<_ACEOF
8422#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008423/* confdefs.h. */
8424_ACEOF
8425cat confdefs.h >>conftest.$ac_ext
8426cat >>conftest.$ac_ext <<_ACEOF
8427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008428$ac_includes_default
8429long longval () { return (long) (sizeof (double)); }
8430unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008431#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008432#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008433int
8434main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008435{
Martin v. Löwis11437992002-04-12 09:54:03 +00008436
8437 FILE *f = fopen ("conftest.val", "w");
8438 if (! f)
8439 exit (1);
8440 if (((long) (sizeof (double))) < 0)
8441 {
8442 long i = longval ();
8443 if (i != ((long) (sizeof (double))))
8444 exit (1);
8445 fprintf (f, "%ld\n", i);
8446 }
8447 else
8448 {
8449 unsigned long i = ulongval ();
8450 if (i != ((long) (sizeof (double))))
8451 exit (1);
8452 fprintf (f, "%lu\n", i);
8453 }
8454 exit (ferror (f) || fclose (f) != 0);
8455
8456 ;
8457 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008458}
Martin v. Löwis11437992002-04-12 09:54:03 +00008459_ACEOF
8460rm -f conftest$ac_exeext
8461if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8462 (eval $ac_link) 2>&5
8463 ac_status=$?
8464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8465 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8467 (eval $ac_try) 2>&5
8468 ac_status=$?
8469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8470 (exit $ac_status); }; }; then
8471 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008472else
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 echo "$as_me: program exited with status $ac_status" >&5
8474echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008475sed 's/^/| /' conftest.$ac_ext >&5
8476
Martin v. Löwis11437992002-04-12 09:54:03 +00008477( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008478{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8479See \`config.log' for more details." >&5
8480echo "$as_me: error: cannot compute sizeof (double), 77
8481See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 { (exit 1); exit 1; }; }
8483fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008484rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008485fi
8486fi
8487rm -f conftest.val
8488else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008489 ac_cv_sizeof_double=0
8490fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008491fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008492echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8493echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8494cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008495#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008496_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008497
8498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499echo "$as_me:$LINENO: checking for fpos_t" >&5
8500echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8501if test "${ac_cv_type_fpos_t+set}" = set; then
8502 echo $ECHO_N "(cached) $ECHO_C" >&6
8503else
8504 cat >conftest.$ac_ext <<_ACEOF
8505#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008506/* confdefs.h. */
8507_ACEOF
8508cat confdefs.h >>conftest.$ac_ext
8509cat >>conftest.$ac_ext <<_ACEOF
8510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008511$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008512int
8513main ()
8514{
8515if ((fpos_t *) 0)
8516 return 0;
8517if (sizeof (fpos_t))
8518 return 0;
8519 ;
8520 return 0;
8521}
8522_ACEOF
8523rm -f conftest.$ac_objext
8524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8525 (eval $ac_compile) 2>&5
8526 ac_status=$?
8527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8528 (exit $ac_status); } &&
8529 { ac_try='test -s conftest.$ac_objext'
8530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8531 (eval $ac_try) 2>&5
8532 ac_status=$?
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); }; }; then
8535 ac_cv_type_fpos_t=yes
8536else
8537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008538sed 's/^/| /' conftest.$ac_ext >&5
8539
Martin v. Löwis11437992002-04-12 09:54:03 +00008540ac_cv_type_fpos_t=no
8541fi
8542rm -f conftest.$ac_objext conftest.$ac_ext
8543fi
8544echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8545echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8546
8547echo "$as_me:$LINENO: checking size of fpos_t" >&5
8548echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8549if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8550 echo $ECHO_N "(cached) $ECHO_C" >&6
8551else
8552 if test "$ac_cv_type_fpos_t" = yes; then
8553 # The cast to unsigned long works around a bug in the HP C Compiler
8554 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8555 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8556 # This bug is HP SR number 8606223364.
8557 if test "$cross_compiling" = yes; then
8558 # Depending upon the size, compute the lo and hi bounds.
8559cat >conftest.$ac_ext <<_ACEOF
8560#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008561/* confdefs.h. */
8562_ACEOF
8563cat confdefs.h >>conftest.$ac_ext
8564cat >>conftest.$ac_ext <<_ACEOF
8565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008566$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008567int
8568main ()
8569{
8570static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8571test_array [0] = 0
8572
8573 ;
8574 return 0;
8575}
8576_ACEOF
8577rm -f conftest.$ac_objext
8578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8579 (eval $ac_compile) 2>&5
8580 ac_status=$?
8581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8582 (exit $ac_status); } &&
8583 { ac_try='test -s conftest.$ac_objext'
8584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8585 (eval $ac_try) 2>&5
8586 ac_status=$?
8587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8588 (exit $ac_status); }; }; then
8589 ac_lo=0 ac_mid=0
8590 while :; do
8591 cat >conftest.$ac_ext <<_ACEOF
8592#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008593/* confdefs.h. */
8594_ACEOF
8595cat confdefs.h >>conftest.$ac_ext
8596cat >>conftest.$ac_ext <<_ACEOF
8597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008598$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008599int
8600main ()
8601{
8602static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8603test_array [0] = 0
8604
8605 ;
8606 return 0;
8607}
8608_ACEOF
8609rm -f conftest.$ac_objext
8610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8611 (eval $ac_compile) 2>&5
8612 ac_status=$?
8613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8614 (exit $ac_status); } &&
8615 { ac_try='test -s conftest.$ac_objext'
8616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8617 (eval $ac_try) 2>&5
8618 ac_status=$?
8619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620 (exit $ac_status); }; }; then
8621 ac_hi=$ac_mid; break
8622else
8623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008624sed 's/^/| /' conftest.$ac_ext >&5
8625
Martin v. Löwis11437992002-04-12 09:54:03 +00008626ac_lo=`expr $ac_mid + 1`
8627 if test $ac_lo -le $ac_mid; then
8628 ac_lo= ac_hi=
8629 break
8630 fi
8631 ac_mid=`expr 2 '*' $ac_mid + 1`
8632fi
8633rm -f conftest.$ac_objext conftest.$ac_ext
8634 done
8635else
8636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008637sed 's/^/| /' conftest.$ac_ext >&5
8638
Martin v. Löwis11437992002-04-12 09:54:03 +00008639cat >conftest.$ac_ext <<_ACEOF
8640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008641/* confdefs.h. */
8642_ACEOF
8643cat confdefs.h >>conftest.$ac_ext
8644cat >>conftest.$ac_ext <<_ACEOF
8645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008646$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008647int
8648main ()
8649{
8650static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8651test_array [0] = 0
8652
8653 ;
8654 return 0;
8655}
8656_ACEOF
8657rm -f conftest.$ac_objext
8658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8659 (eval $ac_compile) 2>&5
8660 ac_status=$?
8661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8662 (exit $ac_status); } &&
8663 { ac_try='test -s conftest.$ac_objext'
8664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8665 (eval $ac_try) 2>&5
8666 ac_status=$?
8667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8668 (exit $ac_status); }; }; then
8669 ac_hi=-1 ac_mid=-1
8670 while :; do
8671 cat >conftest.$ac_ext <<_ACEOF
8672#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008673/* confdefs.h. */
8674_ACEOF
8675cat confdefs.h >>conftest.$ac_ext
8676cat >>conftest.$ac_ext <<_ACEOF
8677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008678$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008679int
8680main ()
8681{
8682static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8683test_array [0] = 0
8684
8685 ;
8686 return 0;
8687}
8688_ACEOF
8689rm -f conftest.$ac_objext
8690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8691 (eval $ac_compile) 2>&5
8692 ac_status=$?
8693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8694 (exit $ac_status); } &&
8695 { ac_try='test -s conftest.$ac_objext'
8696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8697 (eval $ac_try) 2>&5
8698 ac_status=$?
8699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8700 (exit $ac_status); }; }; then
8701 ac_lo=$ac_mid; break
8702else
8703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008704sed 's/^/| /' conftest.$ac_ext >&5
8705
Martin v. Löwis11437992002-04-12 09:54:03 +00008706ac_hi=`expr '(' $ac_mid ')' - 1`
8707 if test $ac_mid -le $ac_hi; then
8708 ac_lo= ac_hi=
8709 break
8710 fi
8711 ac_mid=`expr 2 '*' $ac_mid`
8712fi
8713rm -f conftest.$ac_objext conftest.$ac_ext
8714 done
8715else
8716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008717sed 's/^/| /' conftest.$ac_ext >&5
8718
Martin v. Löwis11437992002-04-12 09:54:03 +00008719ac_lo= ac_hi=
8720fi
8721rm -f conftest.$ac_objext conftest.$ac_ext
8722fi
8723rm -f conftest.$ac_objext conftest.$ac_ext
8724# Binary search between lo and hi bounds.
8725while test "x$ac_lo" != "x$ac_hi"; do
8726 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8727 cat >conftest.$ac_ext <<_ACEOF
8728#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008729/* confdefs.h. */
8730_ACEOF
8731cat confdefs.h >>conftest.$ac_ext
8732cat >>conftest.$ac_ext <<_ACEOF
8733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008734$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008735int
8736main ()
8737{
8738static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8739test_array [0] = 0
8740
8741 ;
8742 return 0;
8743}
8744_ACEOF
8745rm -f conftest.$ac_objext
8746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8747 (eval $ac_compile) 2>&5
8748 ac_status=$?
8749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8750 (exit $ac_status); } &&
8751 { ac_try='test -s conftest.$ac_objext'
8752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8753 (eval $ac_try) 2>&5
8754 ac_status=$?
8755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8756 (exit $ac_status); }; }; then
8757 ac_hi=$ac_mid
8758else
8759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008760sed 's/^/| /' conftest.$ac_ext >&5
8761
Martin v. Löwis11437992002-04-12 09:54:03 +00008762ac_lo=`expr '(' $ac_mid ')' + 1`
8763fi
8764rm -f conftest.$ac_objext conftest.$ac_ext
8765done
8766case $ac_lo in
8767?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008768'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8769See \`config.log' for more details." >&5
8770echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8771See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 { (exit 1); exit 1; }; } ;;
8773esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008774else
8775 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008776 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8777See \`config.log' for more details." >&5
8778echo "$as_me: error: cannot run test program while cross compiling
8779See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008781else
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 cat >conftest.$ac_ext <<_ACEOF
8783#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008784/* confdefs.h. */
8785_ACEOF
8786cat confdefs.h >>conftest.$ac_ext
8787cat >>conftest.$ac_ext <<_ACEOF
8788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008789$ac_includes_default
8790long longval () { return (long) (sizeof (fpos_t)); }
8791unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008792#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008793#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008794int
8795main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008796{
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
8798 FILE *f = fopen ("conftest.val", "w");
8799 if (! f)
8800 exit (1);
8801 if (((long) (sizeof (fpos_t))) < 0)
8802 {
8803 long i = longval ();
8804 if (i != ((long) (sizeof (fpos_t))))
8805 exit (1);
8806 fprintf (f, "%ld\n", i);
8807 }
8808 else
8809 {
8810 unsigned long i = ulongval ();
8811 if (i != ((long) (sizeof (fpos_t))))
8812 exit (1);
8813 fprintf (f, "%lu\n", i);
8814 }
8815 exit (ferror (f) || fclose (f) != 0);
8816
8817 ;
8818 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008819}
Martin v. Löwis11437992002-04-12 09:54:03 +00008820_ACEOF
8821rm -f conftest$ac_exeext
8822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8823 (eval $ac_link) 2>&5
8824 ac_status=$?
8825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8828 (eval $ac_try) 2>&5
8829 ac_status=$?
8830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8831 (exit $ac_status); }; }; then
8832 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008833else
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 echo "$as_me: program exited with status $ac_status" >&5
8835echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008836sed 's/^/| /' conftest.$ac_ext >&5
8837
Martin v. Löwis11437992002-04-12 09:54:03 +00008838( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008839{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8840See \`config.log' for more details." >&5
8841echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8842See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 { (exit 1); exit 1; }; }
8844fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008845rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008846fi
8847fi
8848rm -f conftest.val
8849else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008850 ac_cv_sizeof_fpos_t=0
8851fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008852fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008853echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8854echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8855cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008856#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008857_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008858
Michael W. Hudson54241132001-12-07 15:38:26 +00008859
8860
Martin v. Löwis11437992002-04-12 09:54:03 +00008861echo "$as_me:$LINENO: checking for long long support" >&5
8862echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008863have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008864cat >conftest.$ac_ext <<_ACEOF
8865#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008866/* confdefs.h. */
8867_ACEOF
8868cat confdefs.h >>conftest.$ac_ext
8869cat >>conftest.$ac_ext <<_ACEOF
8870/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008871
Martin v. Löwis11437992002-04-12 09:54:03 +00008872int
8873main ()
8874{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008875long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ;
8877 return 0;
8878}
8879_ACEOF
8880rm -f conftest.$ac_objext
8881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8882 (eval $ac_compile) 2>&5
8883 ac_status=$?
8884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8885 (exit $ac_status); } &&
8886 { ac_try='test -s conftest.$ac_objext'
8887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8888 (eval $ac_try) 2>&5
8889 ac_status=$?
8890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891 (exit $ac_status); }; }; then
8892
8893
8894cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008895#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008896_ACEOF
8897
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008898 have_long_long=yes
8899
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008900else
Martin v. Löwis11437992002-04-12 09:54:03 +00008901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008902sed 's/^/| /' conftest.$ac_ext >&5
8903
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008904fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008905rm -f conftest.$ac_objext conftest.$ac_ext
8906echo "$as_me:$LINENO: result: $have_long_long" >&5
8907echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008908if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008909echo "$as_me:$LINENO: checking for long long" >&5
8910echo $ECHO_N "checking for long long... $ECHO_C" >&6
8911if test "${ac_cv_type_long_long+set}" = set; then
8912 echo $ECHO_N "(cached) $ECHO_C" >&6
8913else
8914 cat >conftest.$ac_ext <<_ACEOF
8915#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008916/* confdefs.h. */
8917_ACEOF
8918cat confdefs.h >>conftest.$ac_ext
8919cat >>conftest.$ac_ext <<_ACEOF
8920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008921$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008922int
8923main ()
8924{
8925if ((long long *) 0)
8926 return 0;
8927if (sizeof (long long))
8928 return 0;
8929 ;
8930 return 0;
8931}
8932_ACEOF
8933rm -f conftest.$ac_objext
8934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8935 (eval $ac_compile) 2>&5
8936 ac_status=$?
8937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8938 (exit $ac_status); } &&
8939 { ac_try='test -s conftest.$ac_objext'
8940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8941 (eval $ac_try) 2>&5
8942 ac_status=$?
8943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8944 (exit $ac_status); }; }; then
8945 ac_cv_type_long_long=yes
8946else
8947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008948sed 's/^/| /' conftest.$ac_ext >&5
8949
Martin v. Löwis11437992002-04-12 09:54:03 +00008950ac_cv_type_long_long=no
8951fi
8952rm -f conftest.$ac_objext conftest.$ac_ext
8953fi
8954echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8955echo "${ECHO_T}$ac_cv_type_long_long" >&6
8956
8957echo "$as_me:$LINENO: checking size of long long" >&5
8958echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8959if test "${ac_cv_sizeof_long_long+set}" = set; then
8960 echo $ECHO_N "(cached) $ECHO_C" >&6
8961else
8962 if test "$ac_cv_type_long_long" = yes; then
8963 # The cast to unsigned long works around a bug in the HP C Compiler
8964 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8965 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8966 # This bug is HP SR number 8606223364.
8967 if test "$cross_compiling" = yes; then
8968 # Depending upon the size, compute the lo and hi bounds.
8969cat >conftest.$ac_ext <<_ACEOF
8970#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008971/* confdefs.h. */
8972_ACEOF
8973cat confdefs.h >>conftest.$ac_ext
8974cat >>conftest.$ac_ext <<_ACEOF
8975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008976$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008977int
8978main ()
8979{
8980static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8981test_array [0] = 0
8982
8983 ;
8984 return 0;
8985}
8986_ACEOF
8987rm -f conftest.$ac_objext
8988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8989 (eval $ac_compile) 2>&5
8990 ac_status=$?
8991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8992 (exit $ac_status); } &&
8993 { ac_try='test -s conftest.$ac_objext'
8994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8995 (eval $ac_try) 2>&5
8996 ac_status=$?
8997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998 (exit $ac_status); }; }; then
8999 ac_lo=0 ac_mid=0
9000 while :; do
9001 cat >conftest.$ac_ext <<_ACEOF
9002#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009003/* confdefs.h. */
9004_ACEOF
9005cat confdefs.h >>conftest.$ac_ext
9006cat >>conftest.$ac_ext <<_ACEOF
9007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009008$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009009int
9010main ()
9011{
9012static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9013test_array [0] = 0
9014
9015 ;
9016 return 0;
9017}
9018_ACEOF
9019rm -f conftest.$ac_objext
9020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9021 (eval $ac_compile) 2>&5
9022 ac_status=$?
9023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9024 (exit $ac_status); } &&
9025 { ac_try='test -s conftest.$ac_objext'
9026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9027 (eval $ac_try) 2>&5
9028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); }; }; then
9031 ac_hi=$ac_mid; break
9032else
9033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009034sed 's/^/| /' conftest.$ac_ext >&5
9035
Martin v. Löwis11437992002-04-12 09:54:03 +00009036ac_lo=`expr $ac_mid + 1`
9037 if test $ac_lo -le $ac_mid; then
9038 ac_lo= ac_hi=
9039 break
9040 fi
9041 ac_mid=`expr 2 '*' $ac_mid + 1`
9042fi
9043rm -f conftest.$ac_objext conftest.$ac_ext
9044 done
9045else
9046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009047sed 's/^/| /' conftest.$ac_ext >&5
9048
Martin v. Löwis11437992002-04-12 09:54:03 +00009049cat >conftest.$ac_ext <<_ACEOF
9050#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009051/* confdefs.h. */
9052_ACEOF
9053cat confdefs.h >>conftest.$ac_ext
9054cat >>conftest.$ac_ext <<_ACEOF
9055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009056$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009057int
9058main ()
9059{
9060static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9061test_array [0] = 0
9062
9063 ;
9064 return 0;
9065}
9066_ACEOF
9067rm -f conftest.$ac_objext
9068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9069 (eval $ac_compile) 2>&5
9070 ac_status=$?
9071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9072 (exit $ac_status); } &&
9073 { ac_try='test -s conftest.$ac_objext'
9074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9075 (eval $ac_try) 2>&5
9076 ac_status=$?
9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); }; }; then
9079 ac_hi=-1 ac_mid=-1
9080 while :; do
9081 cat >conftest.$ac_ext <<_ACEOF
9082#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009083/* confdefs.h. */
9084_ACEOF
9085cat confdefs.h >>conftest.$ac_ext
9086cat >>conftest.$ac_ext <<_ACEOF
9087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009088$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009089int
9090main ()
9091{
9092static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9093test_array [0] = 0
9094
9095 ;
9096 return 0;
9097}
9098_ACEOF
9099rm -f conftest.$ac_objext
9100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9101 (eval $ac_compile) 2>&5
9102 ac_status=$?
9103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9104 (exit $ac_status); } &&
9105 { ac_try='test -s conftest.$ac_objext'
9106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9107 (eval $ac_try) 2>&5
9108 ac_status=$?
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); }; }; then
9111 ac_lo=$ac_mid; break
9112else
9113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009114sed 's/^/| /' conftest.$ac_ext >&5
9115
Martin v. Löwis11437992002-04-12 09:54:03 +00009116ac_hi=`expr '(' $ac_mid ')' - 1`
9117 if test $ac_mid -le $ac_hi; then
9118 ac_lo= ac_hi=
9119 break
9120 fi
9121 ac_mid=`expr 2 '*' $ac_mid`
9122fi
9123rm -f conftest.$ac_objext conftest.$ac_ext
9124 done
9125else
9126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009127sed 's/^/| /' conftest.$ac_ext >&5
9128
Martin v. Löwis11437992002-04-12 09:54:03 +00009129ac_lo= ac_hi=
9130fi
9131rm -f conftest.$ac_objext conftest.$ac_ext
9132fi
9133rm -f conftest.$ac_objext conftest.$ac_ext
9134# Binary search between lo and hi bounds.
9135while test "x$ac_lo" != "x$ac_hi"; do
9136 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9137 cat >conftest.$ac_ext <<_ACEOF
9138#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009139/* confdefs.h. */
9140_ACEOF
9141cat confdefs.h >>conftest.$ac_ext
9142cat >>conftest.$ac_ext <<_ACEOF
9143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009144$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009145int
9146main ()
9147{
9148static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9149test_array [0] = 0
9150
9151 ;
9152 return 0;
9153}
9154_ACEOF
9155rm -f conftest.$ac_objext
9156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9157 (eval $ac_compile) 2>&5
9158 ac_status=$?
9159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9160 (exit $ac_status); } &&
9161 { ac_try='test -s conftest.$ac_objext'
9162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9163 (eval $ac_try) 2>&5
9164 ac_status=$?
9165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9166 (exit $ac_status); }; }; then
9167 ac_hi=$ac_mid
9168else
9169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009170sed 's/^/| /' conftest.$ac_ext >&5
9171
Martin v. Löwis11437992002-04-12 09:54:03 +00009172ac_lo=`expr '(' $ac_mid ')' + 1`
9173fi
9174rm -f conftest.$ac_objext conftest.$ac_ext
9175done
9176case $ac_lo in
9177?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009178'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9179See \`config.log' for more details." >&5
9180echo "$as_me: error: cannot compute sizeof (long long), 77
9181See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 { (exit 1); exit 1; }; } ;;
9183esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009184else
9185 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00009186 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9187See \`config.log' for more details." >&5
9188echo "$as_me: error: cannot run test program while cross compiling
9189See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009191else
Martin v. Löwis11437992002-04-12 09:54:03 +00009192 cat >conftest.$ac_ext <<_ACEOF
9193#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009194/* confdefs.h. */
9195_ACEOF
9196cat confdefs.h >>conftest.$ac_ext
9197cat >>conftest.$ac_ext <<_ACEOF
9198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009199$ac_includes_default
9200long longval () { return (long) (sizeof (long long)); }
9201unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009202#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009203#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009204int
9205main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009206{
Martin v. Löwis11437992002-04-12 09:54:03 +00009207
9208 FILE *f = fopen ("conftest.val", "w");
9209 if (! f)
9210 exit (1);
9211 if (((long) (sizeof (long long))) < 0)
9212 {
9213 long i = longval ();
9214 if (i != ((long) (sizeof (long long))))
9215 exit (1);
9216 fprintf (f, "%ld\n", i);
9217 }
9218 else
9219 {
9220 unsigned long i = ulongval ();
9221 if (i != ((long) (sizeof (long long))))
9222 exit (1);
9223 fprintf (f, "%lu\n", i);
9224 }
9225 exit (ferror (f) || fclose (f) != 0);
9226
9227 ;
9228 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009229}
Martin v. Löwis11437992002-04-12 09:54:03 +00009230_ACEOF
9231rm -f conftest$ac_exeext
9232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9233 (eval $ac_link) 2>&5
9234 ac_status=$?
9235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9238 (eval $ac_try) 2>&5
9239 ac_status=$?
9240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241 (exit $ac_status); }; }; then
9242 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009243else
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 echo "$as_me: program exited with status $ac_status" >&5
9245echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009246sed 's/^/| /' conftest.$ac_ext >&5
9247
Martin v. Löwis11437992002-04-12 09:54:03 +00009248( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009249{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9250See \`config.log' for more details." >&5
9251echo "$as_me: error: cannot compute sizeof (long long), 77
9252See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 { (exit 1); exit 1; }; }
9254fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009255rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009256fi
9257fi
9258rm -f conftest.val
9259else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009260 ac_cv_sizeof_long_long=0
9261fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009263echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9264echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9265cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009266#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009267_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009268
Michael W. Hudson54241132001-12-07 15:38:26 +00009269
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009270fi
9271
Martin v. Löwis11437992002-04-12 09:54:03 +00009272echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9273echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009274have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009275cat >conftest.$ac_ext <<_ACEOF
9276#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009277/* confdefs.h. */
9278_ACEOF
9279cat confdefs.h >>conftest.$ac_ext
9280cat >>conftest.$ac_ext <<_ACEOF
9281/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009282
Martin v. Löwis11437992002-04-12 09:54:03 +00009283int
9284main ()
9285{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009286uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 ;
9288 return 0;
9289}
9290_ACEOF
9291rm -f conftest.$ac_objext
9292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9293 (eval $ac_compile) 2>&5
9294 ac_status=$?
9295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9296 (exit $ac_status); } &&
9297 { ac_try='test -s conftest.$ac_objext'
9298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9299 (eval $ac_try) 2>&5
9300 ac_status=$?
9301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9302 (exit $ac_status); }; }; then
9303
9304
9305cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009306#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009307_ACEOF
9308
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009309 have_uintptr_t=yes
9310
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009311else
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009313sed 's/^/| /' conftest.$ac_ext >&5
9314
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009315fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009316rm -f conftest.$ac_objext conftest.$ac_ext
9317echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9318echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009319if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009320echo "$as_me:$LINENO: checking for uintptr_t" >&5
9321echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9322if test "${ac_cv_type_uintptr_t+set}" = set; then
9323 echo $ECHO_N "(cached) $ECHO_C" >&6
9324else
9325 cat >conftest.$ac_ext <<_ACEOF
9326#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009327/* confdefs.h. */
9328_ACEOF
9329cat confdefs.h >>conftest.$ac_ext
9330cat >>conftest.$ac_ext <<_ACEOF
9331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009332$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009333int
9334main ()
9335{
9336if ((uintptr_t *) 0)
9337 return 0;
9338if (sizeof (uintptr_t))
9339 return 0;
9340 ;
9341 return 0;
9342}
9343_ACEOF
9344rm -f conftest.$ac_objext
9345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9346 (eval $ac_compile) 2>&5
9347 ac_status=$?
9348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9349 (exit $ac_status); } &&
9350 { ac_try='test -s conftest.$ac_objext'
9351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9352 (eval $ac_try) 2>&5
9353 ac_status=$?
9354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9355 (exit $ac_status); }; }; then
9356 ac_cv_type_uintptr_t=yes
9357else
9358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009359sed 's/^/| /' conftest.$ac_ext >&5
9360
Martin v. Löwis11437992002-04-12 09:54:03 +00009361ac_cv_type_uintptr_t=no
9362fi
9363rm -f conftest.$ac_objext conftest.$ac_ext
9364fi
9365echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9366echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9367
9368echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9369echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9370if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9371 echo $ECHO_N "(cached) $ECHO_C" >&6
9372else
9373 if test "$ac_cv_type_uintptr_t" = yes; then
9374 # The cast to unsigned long works around a bug in the HP C Compiler
9375 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9376 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9377 # This bug is HP SR number 8606223364.
9378 if test "$cross_compiling" = yes; then
9379 # Depending upon the size, compute the lo and hi bounds.
9380cat >conftest.$ac_ext <<_ACEOF
9381#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009382/* confdefs.h. */
9383_ACEOF
9384cat confdefs.h >>conftest.$ac_ext
9385cat >>conftest.$ac_ext <<_ACEOF
9386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009387$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009388int
9389main ()
9390{
9391static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9392test_array [0] = 0
9393
9394 ;
9395 return 0;
9396}
9397_ACEOF
9398rm -f conftest.$ac_objext
9399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9400 (eval $ac_compile) 2>&5
9401 ac_status=$?
9402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9403 (exit $ac_status); } &&
9404 { ac_try='test -s conftest.$ac_objext'
9405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9406 (eval $ac_try) 2>&5
9407 ac_status=$?
9408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9409 (exit $ac_status); }; }; then
9410 ac_lo=0 ac_mid=0
9411 while :; do
9412 cat >conftest.$ac_ext <<_ACEOF
9413#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009414/* confdefs.h. */
9415_ACEOF
9416cat confdefs.h >>conftest.$ac_ext
9417cat >>conftest.$ac_ext <<_ACEOF
9418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009419$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009420int
9421main ()
9422{
9423static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9424test_array [0] = 0
9425
9426 ;
9427 return 0;
9428}
9429_ACEOF
9430rm -f conftest.$ac_objext
9431if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9432 (eval $ac_compile) 2>&5
9433 ac_status=$?
9434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435 (exit $ac_status); } &&
9436 { ac_try='test -s conftest.$ac_objext'
9437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9438 (eval $ac_try) 2>&5
9439 ac_status=$?
9440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9441 (exit $ac_status); }; }; then
9442 ac_hi=$ac_mid; break
9443else
9444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009445sed 's/^/| /' conftest.$ac_ext >&5
9446
Martin v. Löwis11437992002-04-12 09:54:03 +00009447ac_lo=`expr $ac_mid + 1`
9448 if test $ac_lo -le $ac_mid; then
9449 ac_lo= ac_hi=
9450 break
9451 fi
9452 ac_mid=`expr 2 '*' $ac_mid + 1`
9453fi
9454rm -f conftest.$ac_objext conftest.$ac_ext
9455 done
9456else
9457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009458sed 's/^/| /' conftest.$ac_ext >&5
9459
Martin v. Löwis11437992002-04-12 09:54:03 +00009460cat >conftest.$ac_ext <<_ACEOF
9461#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009462/* confdefs.h. */
9463_ACEOF
9464cat confdefs.h >>conftest.$ac_ext
9465cat >>conftest.$ac_ext <<_ACEOF
9466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009467$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009468int
9469main ()
9470{
9471static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9472test_array [0] = 0
9473
9474 ;
9475 return 0;
9476}
9477_ACEOF
9478rm -f conftest.$ac_objext
9479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9480 (eval $ac_compile) 2>&5
9481 ac_status=$?
9482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483 (exit $ac_status); } &&
9484 { ac_try='test -s conftest.$ac_objext'
9485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9486 (eval $ac_try) 2>&5
9487 ac_status=$?
9488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9489 (exit $ac_status); }; }; then
9490 ac_hi=-1 ac_mid=-1
9491 while :; do
9492 cat >conftest.$ac_ext <<_ACEOF
9493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009494/* confdefs.h. */
9495_ACEOF
9496cat confdefs.h >>conftest.$ac_ext
9497cat >>conftest.$ac_ext <<_ACEOF
9498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009499$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009500int
9501main ()
9502{
9503static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9504test_array [0] = 0
9505
9506 ;
9507 return 0;
9508}
9509_ACEOF
9510rm -f conftest.$ac_objext
9511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9512 (eval $ac_compile) 2>&5
9513 ac_status=$?
9514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9515 (exit $ac_status); } &&
9516 { ac_try='test -s conftest.$ac_objext'
9517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9518 (eval $ac_try) 2>&5
9519 ac_status=$?
9520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9521 (exit $ac_status); }; }; then
9522 ac_lo=$ac_mid; break
9523else
9524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009525sed 's/^/| /' conftest.$ac_ext >&5
9526
Martin v. Löwis11437992002-04-12 09:54:03 +00009527ac_hi=`expr '(' $ac_mid ')' - 1`
9528 if test $ac_mid -le $ac_hi; then
9529 ac_lo= ac_hi=
9530 break
9531 fi
9532 ac_mid=`expr 2 '*' $ac_mid`
9533fi
9534rm -f conftest.$ac_objext conftest.$ac_ext
9535 done
9536else
9537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009538sed 's/^/| /' conftest.$ac_ext >&5
9539
Martin v. Löwis11437992002-04-12 09:54:03 +00009540ac_lo= ac_hi=
9541fi
9542rm -f conftest.$ac_objext conftest.$ac_ext
9543fi
9544rm -f conftest.$ac_objext conftest.$ac_ext
9545# Binary search between lo and hi bounds.
9546while test "x$ac_lo" != "x$ac_hi"; do
9547 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9548 cat >conftest.$ac_ext <<_ACEOF
9549#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009550/* confdefs.h. */
9551_ACEOF
9552cat confdefs.h >>conftest.$ac_ext
9553cat >>conftest.$ac_ext <<_ACEOF
9554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009555$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009556int
9557main ()
9558{
9559static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9560test_array [0] = 0
9561
9562 ;
9563 return 0;
9564}
9565_ACEOF
9566rm -f conftest.$ac_objext
9567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9568 (eval $ac_compile) 2>&5
9569 ac_status=$?
9570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9571 (exit $ac_status); } &&
9572 { ac_try='test -s conftest.$ac_objext'
9573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9574 (eval $ac_try) 2>&5
9575 ac_status=$?
9576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9577 (exit $ac_status); }; }; then
9578 ac_hi=$ac_mid
9579else
9580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009581sed 's/^/| /' conftest.$ac_ext >&5
9582
Martin v. Löwis11437992002-04-12 09:54:03 +00009583ac_lo=`expr '(' $ac_mid ')' + 1`
9584fi
9585rm -f conftest.$ac_objext conftest.$ac_ext
9586done
9587case $ac_lo in
9588?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009589'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9590See \`config.log' for more details." >&5
9591echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9592See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 { (exit 1); exit 1; }; } ;;
9594esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009595else
9596 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00009597 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9598See \`config.log' for more details." >&5
9599echo "$as_me: error: cannot run test program while cross compiling
9600See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009602else
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 cat >conftest.$ac_ext <<_ACEOF
9604#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009605/* confdefs.h. */
9606_ACEOF
9607cat confdefs.h >>conftest.$ac_ext
9608cat >>conftest.$ac_ext <<_ACEOF
9609/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009610$ac_includes_default
9611long longval () { return (long) (sizeof (uintptr_t)); }
9612unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009613#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009614#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009615int
9616main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009617{
Martin v. Löwis11437992002-04-12 09:54:03 +00009618
9619 FILE *f = fopen ("conftest.val", "w");
9620 if (! f)
9621 exit (1);
9622 if (((long) (sizeof (uintptr_t))) < 0)
9623 {
9624 long i = longval ();
9625 if (i != ((long) (sizeof (uintptr_t))))
9626 exit (1);
9627 fprintf (f, "%ld\n", i);
9628 }
9629 else
9630 {
9631 unsigned long i = ulongval ();
9632 if (i != ((long) (sizeof (uintptr_t))))
9633 exit (1);
9634 fprintf (f, "%lu\n", i);
9635 }
9636 exit (ferror (f) || fclose (f) != 0);
9637
9638 ;
9639 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009640}
Martin v. Löwis11437992002-04-12 09:54:03 +00009641_ACEOF
9642rm -f conftest$ac_exeext
9643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9644 (eval $ac_link) 2>&5
9645 ac_status=$?
9646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9647 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9649 (eval $ac_try) 2>&5
9650 ac_status=$?
9651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9652 (exit $ac_status); }; }; then
9653 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009654else
Martin v. Löwis11437992002-04-12 09:54:03 +00009655 echo "$as_me: program exited with status $ac_status" >&5
9656echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009657sed 's/^/| /' conftest.$ac_ext >&5
9658
Martin v. Löwis11437992002-04-12 09:54:03 +00009659( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009660{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9661See \`config.log' for more details." >&5
9662echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9663See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 { (exit 1); exit 1; }; }
9665fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009666rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009667fi
9668fi
9669rm -f conftest.val
9670else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009671 ac_cv_sizeof_uintptr_t=0
9672fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009673fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009674echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9675echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9676cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009677#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009678_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009679
Michael W. Hudson54241132001-12-07 15:38:26 +00009680
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009681fi
9682
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009683# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009684echo "$as_me:$LINENO: checking size of off_t" >&5
9685echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9686if test "${ac_cv_sizeof_off_t+set}" = set; then
9687 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009688else
9689 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009690 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009691else
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 cat >conftest.$ac_ext <<_ACEOF
9693#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009694/* confdefs.h. */
9695_ACEOF
9696cat confdefs.h >>conftest.$ac_ext
9697cat >>conftest.$ac_ext <<_ACEOF
9698/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009699#include <stdio.h>
9700#include <sys/types.h>
9701main()
9702{
9703 FILE *f=fopen("conftestval", "w");
9704 if (!f) exit(1);
9705 fprintf(f, "%d\n", sizeof(off_t));
9706 exit(0);
9707}
Martin v. Löwis11437992002-04-12 09:54:03 +00009708_ACEOF
9709rm -f conftest$ac_exeext
9710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9711 (eval $ac_link) 2>&5
9712 ac_status=$?
9713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9714 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9716 (eval $ac_try) 2>&5
9717 ac_status=$?
9718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9719 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009720 ac_cv_sizeof_off_t=`cat conftestval`
9721else
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 echo "$as_me: program exited with status $ac_status" >&5
9723echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009724sed 's/^/| /' conftest.$ac_ext >&5
9725
Martin v. Löwis11437992002-04-12 09:54:03 +00009726( exit $ac_status )
9727ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009728fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009729rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009730fi
9731
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009732fi
9733
Martin v. Löwis11437992002-04-12 09:54:03 +00009734echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9735echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9736
9737cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009738#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009739_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009740
Michael W. Hudson54241132001-12-07 15:38:26 +00009741
Martin v. Löwis11437992002-04-12 09:54:03 +00009742echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9743echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009744if test "$have_long_long" = yes -a \
9745 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9746 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009747
Martin v. Löwis11437992002-04-12 09:54:03 +00009748cat >>confdefs.h <<\_ACEOF
9749#define HAVE_LARGEFILE_SUPPORT 1
9750_ACEOF
9751
9752 echo "$as_me:$LINENO: result: yes" >&5
9753echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009754else
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 echo "$as_me:$LINENO: result: no" >&5
9756echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009757fi
9758
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009759# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009760echo "$as_me:$LINENO: checking size of time_t" >&5
9761echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9762if test "${ac_cv_sizeof_time_t+set}" = set; then
9763 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009764else
9765 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009766 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009767else
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 cat >conftest.$ac_ext <<_ACEOF
9769#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009770/* confdefs.h. */
9771_ACEOF
9772cat confdefs.h >>conftest.$ac_ext
9773cat >>conftest.$ac_ext <<_ACEOF
9774/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009775#include <stdio.h>
9776#include <time.h>
9777main()
9778{
9779 FILE *f=fopen("conftestval", "w");
9780 if (!f) exit(1);
9781 fprintf(f, "%d\n", sizeof(time_t));
9782 exit(0);
9783}
Martin v. Löwis11437992002-04-12 09:54:03 +00009784_ACEOF
9785rm -f conftest$ac_exeext
9786if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9787 (eval $ac_link) 2>&5
9788 ac_status=$?
9789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9790 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9792 (eval $ac_try) 2>&5
9793 ac_status=$?
9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9795 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009796 ac_cv_sizeof_time_t=`cat conftestval`
9797else
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 echo "$as_me: program exited with status $ac_status" >&5
9799echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009800sed 's/^/| /' conftest.$ac_ext >&5
9801
Martin v. Löwis11437992002-04-12 09:54:03 +00009802( exit $ac_status )
9803ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009804fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009805rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009806fi
9807
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009808fi
9809
Martin v. Löwis11437992002-04-12 09:54:03 +00009810echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9811echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9812
9813cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009814#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009815_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009816
Michael W. Hudson54241132001-12-07 15:38:26 +00009817
9818
Trent Mick635f6fb2000-08-23 21:33:05 +00009819# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009820ac_save_cc="$CC"
9821if test "$ac_cv_kpthread" = "yes"
9822then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009823elif test "$ac_cv_kthread" = "yes"
9824then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009825elif test "$ac_cv_pthread" = "yes"
9826then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009827fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009828echo "$as_me:$LINENO: checking for pthread_t" >&5
9829echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009830have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009831cat >conftest.$ac_ext <<_ACEOF
9832#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* confdefs.h. */
9834_ACEOF
9835cat confdefs.h >>conftest.$ac_ext
9836cat >>conftest.$ac_ext <<_ACEOF
9837/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009838#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009839int
9840main ()
9841{
Guido van Rossum12580492000-09-24 16:47:19 +00009842pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009843 ;
9844 return 0;
9845}
9846_ACEOF
9847rm -f conftest.$ac_objext
9848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9849 (eval $ac_compile) 2>&5
9850 ac_status=$?
9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852 (exit $ac_status); } &&
9853 { ac_try='test -s conftest.$ac_objext'
9854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9855 (eval $ac_try) 2>&5
9856 ac_status=$?
9857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009859 have_pthread_t=yes
9860else
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009862sed 's/^/| /' conftest.$ac_ext >&5
9863
Trent Mick635f6fb2000-08-23 21:33:05 +00009864fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009865rm -f conftest.$ac_objext conftest.$ac_ext
9866echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9867echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009868if test "$have_pthread_t" = yes ; then
9869 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9871echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9872 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9873 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009874else
9875 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009876 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009877else
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 cat >conftest.$ac_ext <<_ACEOF
9879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009880/* confdefs.h. */
9881_ACEOF
9882cat confdefs.h >>conftest.$ac_ext
9883cat >>conftest.$ac_ext <<_ACEOF
9884/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009885#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009886#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009887 main()
9888 {
9889 FILE *f=fopen("conftestval", "w");
9890 if (!f) exit(1);
9891 fprintf(f, "%d\n", sizeof(pthread_t));
9892 exit(0);
9893 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009894_ACEOF
9895rm -f conftest$ac_exeext
9896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9897 (eval $ac_link) 2>&5
9898 ac_status=$?
9899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9900 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9902 (eval $ac_try) 2>&5
9903 ac_status=$?
9904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9905 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009906 ac_cv_sizeof_pthread_t=`cat conftestval`
9907else
Martin v. Löwis11437992002-04-12 09:54:03 +00009908 echo "$as_me: program exited with status $ac_status" >&5
9909echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009910sed 's/^/| /' conftest.$ac_ext >&5
9911
Martin v. Löwis11437992002-04-12 09:54:03 +00009912( exit $ac_status )
9913ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009914fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009915rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009916fi
9917
Trent Mick635f6fb2000-08-23 21:33:05 +00009918fi
9919
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9921echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9922
9923cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009924#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009925_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009926
9927fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009928CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009929
Martin v. Löwis11437992002-04-12 09:54:03 +00009930echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9931echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009932# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9933if test "${enable_toolbox_glue+set}" = set; then
9934 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009935
Martin v. Löwis11437992002-04-12 09:54:03 +00009936fi;
Jack Jansene578a632001-08-15 01:27:14 +00009937
9938if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009939then
Jack Jansene578a632001-08-15 01:27:14 +00009940 case $ac_sys_system/$ac_sys_release in
9941 Darwin/*)
9942 enable_toolbox_glue="yes";;
9943 *)
9944 enable_toolbox_glue="no";;
9945 esac
9946fi
9947case "$enable_toolbox_glue" in
9948yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009949 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009950 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009951 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009952
9953cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009954#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009955_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009956
9957 ;;
9958*)
9959 extra_frameworks=""
9960 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009961 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009962 ;;
9963esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009964echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9965echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009966
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009967
9968case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009969 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009970 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009971 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009972 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009973 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009974 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009975 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009976 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009977 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009978 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009979esac
9980
Martin v. Löwis11437992002-04-12 09:54:03 +00009981echo "$as_me:$LINENO: checking for --enable-framework" >&5
9982echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009983if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009984then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009985 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009987 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009988 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009989
Martin v. Löwis11437992002-04-12 09:54:03 +00009990cat >>confdefs.h <<\_ACEOF
9991#define WITH_NEXT_FRAMEWORK 1
9992_ACEOF
9993
9994 echo "$as_me:$LINENO: result: yes" >&5
9995echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009996else
Martin v. Löwis11437992002-04-12 09:54:03 +00009997 echo "$as_me:$LINENO: result: no" >&5
9998echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009999fi
10000
Martin v. Löwis11437992002-04-12 09:54:03 +000010001echo "$as_me:$LINENO: checking for dyld" >&5
10002echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010003case $ac_sys_system/$ac_sys_release in
10004 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010005
Martin v. Löwis11437992002-04-12 09:54:03 +000010006cat >>confdefs.h <<\_ACEOF
10007#define WITH_DYLD 1
10008_ACEOF
10009
10010 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10011echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010012 ;;
10013 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010014 echo "$as_me:$LINENO: result: no" >&5
10015echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010016 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010017esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010018
Guido van Rossum0a516c91994-09-12 10:58:40 +000010019# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010020
Michael W. Hudson54241132001-12-07 15:38:26 +000010021
10022
10023
10024
Guido van Rossum0a516c91994-09-12 10:58:40 +000010025# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010026# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010027echo "$as_me:$LINENO: checking SO" >&5
10028echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010029if test -z "$SO"
10030then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010031 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010032 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010033 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010034 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010035 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010036else
10037 # this might also be a termcap variable, see #610332
10038 echo
10039 echo '====================================================================='
10040 echo '+ +'
10041 echo '+ WARNING: You have set SO in your environment. +'
10042 echo '+ Do you really mean to change the extension for shared libraries? +'
10043 echo '+ Continuing in 10 seconds to let you to ponder. +'
10044 echo '+ +'
10045 echo '====================================================================='
10046 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010048echo "$as_me:$LINENO: result: $SO" >&5
10049echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010050# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +000010051# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010052# (Shared libraries in this instance are shared modules to be loaded into
10053# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010054echo "$as_me:$LINENO: checking LDSHARED" >&5
10055echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010056if test -z "$LDSHARED"
10057then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010058 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010059 AIX*)
10060 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010061 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010062 ;;
10063 BeOS*)
10064 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010065 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010066 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010067 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010068 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010069 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010070 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010071 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010072 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010073 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010074 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010075 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010076 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
10077 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010078 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010079 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10080 if test "$enable_framework" ; then
10081 # Link against the framework. All externals should be defined.
10082 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
10083 else
10084 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010085 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010086 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +000010087 Darwin/*)
10088 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10089 if test "$enable_framework" ; then
10090 # Link against the framework. All externals should be defined.
10091 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
10092 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010093 # No framework, use the Python app as bundle-loader
10094 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010095 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010096 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010097 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +000010098 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010099 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010100 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010101 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010102 then
10103 LDSHARED="cc -shared ${LDFLAGS}"
10104 else
10105 LDSHARED="ld -Bshareable ${LDFLAGS}"
10106 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010107 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010108 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010109 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010110 then LDSHARED='$(CC) -shared'
10111 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010112 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010113 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010114 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010115 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010116 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010117 *) LDSHARED="ld";;
10118 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010119fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010120echo "$as_me:$LINENO: result: $LDSHARED" >&5
10121echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010122BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010123# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010124# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010125echo "$as_me:$LINENO: checking CCSHARED" >&5
10126echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010127if test -z "$CCSHARED"
10128then
Guido van Rossum07397971997-04-29 21:49:50 +000010129 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010130 SunOS*) if test "$GCC" = yes;
10131 then CCSHARED="-fPIC";
10132 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010133 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010134 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010135 else CCSHARED="+z";
10136 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010137 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010138 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010139 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010140 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010141 if test "$GCC" = "yes"
10142 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010143 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010144 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010145 SCO_SV*)
10146 if test "$GCC" = "yes"
10147 then CCSHARED="-fPIC"
10148 else CCSHARED="-Kpic -belf"
10149 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010150 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010151 IRIX*/6*) case $CC in
10152 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010153 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010154 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010155 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010156 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010157fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010158echo "$as_me:$LINENO: result: $CCSHARED" >&5
10159echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010160# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010161# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010162echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10163echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010164if test -z "$LINKFORSHARED"
10165then
Guido van Rossum07397971997-04-29 21:49:50 +000010166 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010167 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010168 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010169 LINKFORSHARED="-Wl,-E -Wl,+s";;
10170# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010171 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010172 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010173 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010174 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +000010175 # -u __dummy makes the linker aware of the objc runtime
10176 # in System.framework; otherwise, __objcInit (referenced in
10177 # crt1.o) gets erroneously defined as common, which breaks dynamic
10178 # loading of any modules which reference it in System.framework.
10179 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
10180 # not used by the core itself but which needs to be in the core so
10181 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010182 # -prebind is no longer used, because it actually seems to give a
10183 # slowdown in stead of a speedup, maybe due to the large number of
10184 # dynamic loads Python does.
10185 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +000010186 if test "$enable_framework"
10187 then
10188 LINKFORSHARED="$LINKFORSHARED -framework Python"
10189 fi
10190 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010191 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010192 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010193 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010195 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10196 then
10197 LINKFORSHARED="-Wl,--export-dynamic"
10198 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010199 SunOS/5*) case $CC in
10200 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010201 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010202 then
10203 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010204 fi;;
10205 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010206 CYGWIN*)
10207 if test $enable_shared = "no"
10208 then
10209 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10210 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010211 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010213echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10214echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010215
Michael W. Hudson54241132001-12-07 15:38:26 +000010216
Martin v. Löwis11437992002-04-12 09:54:03 +000010217echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10218echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010219if test ! "$LIBRARY" = "$LDLIBRARY"
10220then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010221 case $ac_sys_system in
10222 CYGWIN*)
10223 # Cygwin needs CCSHARED when building extension DLLs
10224 # but not when building the interpreter DLL.
10225 CFLAGSFORSHARED='';;
10226 *)
10227 CFLAGSFORSHARED='$(CCSHARED)'
10228 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010229fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010230echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10231echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010232
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010233# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10234# library (with --enable-shared).
10235# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010236# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10237# if it is not required, since it creates a dependency of the shared library
10238# to LIBS. This, in turn, means that applications linking the shared libpython
10239# don't need to link LIBS explicitly. The default should be only changed
10240# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010241
10242echo "$as_me:$LINENO: checking SHLIBS" >&5
10243echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10244case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010245 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010246 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010247esac
10248echo "$as_me:$LINENO: result: $SHLIBS" >&5
10249echo "${ECHO_T}$SHLIBS" >&6
10250
10251
Guido van Rossum627b2d71993-12-24 10:39:16 +000010252# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010253
10254echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10255echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10256if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010258else
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010260LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010261cat >conftest.$ac_ext <<_ACEOF
10262#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010263/* confdefs.h. */
10264_ACEOF
10265cat confdefs.h >>conftest.$ac_ext
10266cat >>conftest.$ac_ext <<_ACEOF
10267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010269/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010270#ifdef __cplusplus
10271extern "C"
10272#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010273/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 builtin and then its argument prototype would still apply. */
10275char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010276int
10277main ()
10278{
10279dlopen ();
10280 ;
10281 return 0;
10282}
10283_ACEOF
10284rm -f conftest.$ac_objext conftest$ac_exeext
10285if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10286 (eval $ac_link) 2>&5
10287 ac_status=$?
10288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10289 (exit $ac_status); } &&
10290 { ac_try='test -s conftest$ac_exeext'
10291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10292 (eval $ac_try) 2>&5
10293 ac_status=$?
10294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10295 (exit $ac_status); }; }; then
10296 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010297else
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010299sed 's/^/| /' conftest.$ac_ext >&5
10300
Martin v. Löwis11437992002-04-12 09:54:03 +000010301ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010303rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10304LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010305fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010306echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10307echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10308if test $ac_cv_lib_dl_dlopen = yes; then
10309 cat >>confdefs.h <<_ACEOF
10310#define HAVE_LIBDL 1
10311_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010312
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010313 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010314
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010315fi
10316 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010317
10318echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10319echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10320if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010322else
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010324LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010325cat >conftest.$ac_ext <<_ACEOF
10326#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010327/* confdefs.h. */
10328_ACEOF
10329cat confdefs.h >>conftest.$ac_ext
10330cat >>conftest.$ac_ext <<_ACEOF
10331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010332
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010333/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010334#ifdef __cplusplus
10335extern "C"
10336#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010337/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 builtin and then its argument prototype would still apply. */
10339char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010340int
10341main ()
10342{
10343shl_load ();
10344 ;
10345 return 0;
10346}
10347_ACEOF
10348rm -f conftest.$ac_objext conftest$ac_exeext
10349if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10350 (eval $ac_link) 2>&5
10351 ac_status=$?
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); } &&
10354 { ac_try='test -s conftest$ac_exeext'
10355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10356 (eval $ac_try) 2>&5
10357 ac_status=$?
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); }; }; then
10360 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010361else
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010363sed 's/^/| /' conftest.$ac_ext >&5
10364
Martin v. Löwis11437992002-04-12 09:54:03 +000010365ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010367rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10368LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010370echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10371echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10372if test $ac_cv_lib_dld_shl_load = yes; then
10373 cat >>confdefs.h <<_ACEOF
10374#define HAVE_LIBDLD 1
10375_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010376
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010377 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010378
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010379fi
10380 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010381
10382# only check for sem_ini if thread support is requested
10383if test "$with_threads" = "yes" -o -z "$with_threads"; then
10384 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010385echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10386if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010388else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010389 ac_func_search_save_LIBS=$LIBS
10390ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010391cat >conftest.$ac_ext <<_ACEOF
10392#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010393/* confdefs.h. */
10394_ACEOF
10395cat confdefs.h >>conftest.$ac_ext
10396cat >>conftest.$ac_ext <<_ACEOF
10397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010399/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010400#ifdef __cplusplus
10401extern "C"
10402#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010403/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 builtin and then its argument prototype would still apply. */
10405char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010406int
10407main ()
10408{
10409sem_init ();
10410 ;
10411 return 0;
10412}
10413_ACEOF
10414rm -f conftest.$ac_objext conftest$ac_exeext
10415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10416 (eval $ac_link) 2>&5
10417 ac_status=$?
10418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10419 (exit $ac_status); } &&
10420 { ac_try='test -s conftest$ac_exeext'
10421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10422 (eval $ac_try) 2>&5
10423 ac_status=$?
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010426 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010427else
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010429sed 's/^/| /' conftest.$ac_ext >&5
10430
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010433if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010434 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010435 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10436 cat >conftest.$ac_ext <<_ACEOF
10437#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010438/* confdefs.h. */
10439_ACEOF
10440cat confdefs.h >>conftest.$ac_ext
10441cat >>conftest.$ac_ext <<_ACEOF
10442/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010443
10444/* Override any gcc2 internal prototype to avoid an error. */
10445#ifdef __cplusplus
10446extern "C"
10447#endif
10448/* We use char because int might match the return type of a gcc2
10449 builtin and then its argument prototype would still apply. */
10450char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010451int
10452main ()
10453{
10454sem_init ();
10455 ;
10456 return 0;
10457}
Martin v. Löwis11437992002-04-12 09:54:03 +000010458_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010459rm -f conftest.$ac_objext conftest$ac_exeext
10460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10461 (eval $ac_link) 2>&5
10462 ac_status=$?
10463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10464 (exit $ac_status); } &&
10465 { ac_try='test -s conftest$ac_exeext'
10466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10467 (eval $ac_try) 2>&5
10468 ac_status=$?
10469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10470 (exit $ac_status); }; }; then
10471 ac_cv_search_sem_init="-l$ac_lib"
10472break
10473else
10474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010475sed 's/^/| /' conftest.$ac_ext >&5
10476
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010477fi
10478rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10479 done
10480fi
10481LIBS=$ac_func_search_save_LIBS
10482fi
10483echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10484echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10485if test "$ac_cv_search_sem_init" != no; then
10486 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010487
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010488fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010489 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010490 # posix4 on Solaris 2.6
10491 # pthread (first!) on Linux
10492fi
10493
Martin v. Löwis19d17342003-06-14 21:03:05 +000010494# check if we need libintl for locale functions
10495echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10496echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10497if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10498 echo $ECHO_N "(cached) $ECHO_C" >&6
10499else
10500 ac_check_lib_save_LIBS=$LIBS
10501LIBS="-lintl $LIBS"
10502cat >conftest.$ac_ext <<_ACEOF
10503#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010504/* confdefs.h. */
10505_ACEOF
10506cat confdefs.h >>conftest.$ac_ext
10507cat >>conftest.$ac_ext <<_ACEOF
10508/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010509
10510/* Override any gcc2 internal prototype to avoid an error. */
10511#ifdef __cplusplus
10512extern "C"
10513#endif
10514/* We use char because int might match the return type of a gcc2
10515 builtin and then its argument prototype would still apply. */
10516char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010517int
10518main ()
10519{
10520textdomain ();
10521 ;
10522 return 0;
10523}
10524_ACEOF
10525rm -f conftest.$ac_objext conftest$ac_exeext
10526if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10527 (eval $ac_link) 2>&5
10528 ac_status=$?
10529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10530 (exit $ac_status); } &&
10531 { ac_try='test -s conftest$ac_exeext'
10532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10533 (eval $ac_try) 2>&5
10534 ac_status=$?
10535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10536 (exit $ac_status); }; }; then
10537 ac_cv_lib_intl_textdomain=yes
10538else
10539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010540sed 's/^/| /' conftest.$ac_ext >&5
10541
Martin v. Löwis19d17342003-06-14 21:03:05 +000010542ac_cv_lib_intl_textdomain=no
10543fi
10544rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10545LIBS=$ac_check_lib_save_LIBS
10546fi
10547echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10548echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10549if test $ac_cv_lib_intl_textdomain = yes; then
10550
10551cat >>confdefs.h <<\_ACEOF
10552#define WITH_LIBINTL 1
10553_ACEOF
10554
10555fi
10556
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010557
10558# checks for system dependent C++ extensions support
10559case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10561echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10562 cat >conftest.$ac_ext <<_ACEOF
10563#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010564/* confdefs.h. */
10565_ACEOF
10566cat confdefs.h >>conftest.$ac_ext
10567cat >>conftest.$ac_ext <<_ACEOF
10568/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010569#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010570int
10571main ()
10572{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010573loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010574 ;
10575 return 0;
10576}
10577_ACEOF
10578rm -f conftest.$ac_objext conftest$ac_exeext
10579if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10580 (eval $ac_link) 2>&5
10581 ac_status=$?
10582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10583 (exit $ac_status); } &&
10584 { ac_try='test -s conftest$ac_exeext'
10585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10586 (eval $ac_try) 2>&5
10587 ac_status=$?
10588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10589 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010590
Martin v. Löwis11437992002-04-12 09:54:03 +000010591cat >>confdefs.h <<\_ACEOF
10592#define AIX_GENUINE_CPLUSPLUS 1
10593_ACEOF
10594
10595 echo "$as_me:$LINENO: result: yes" >&5
10596echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010597else
Martin v. Löwis11437992002-04-12 09:54:03 +000010598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010599sed 's/^/| /' conftest.$ac_ext >&5
10600
Martin v. Löwis11437992002-04-12 09:54:03 +000010601echo "$as_me:$LINENO: result: no" >&5
10602echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010603fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010604rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010605 *) ;;
10606esac
10607
Guido van Rossum70c7f481998-03-26 18:44:10 +000010608# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +000010609# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010610# BeOS' sockets are stashed in libnet.
10611case "$ac_sys_system" in
10612IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +000010613*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010614echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10615echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10616if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10617 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010618else
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010620LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010621cat >conftest.$ac_ext <<_ACEOF
10622#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010623/* confdefs.h. */
10624_ACEOF
10625cat confdefs.h >>conftest.$ac_ext
10626cat >>conftest.$ac_ext <<_ACEOF
10627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010628
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010629/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010630#ifdef __cplusplus
10631extern "C"
10632#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010633/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 builtin and then its argument prototype would still apply. */
10635char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010636int
10637main ()
10638{
10639t_open ();
10640 ;
10641 return 0;
10642}
10643_ACEOF
10644rm -f conftest.$ac_objext conftest$ac_exeext
10645if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10646 (eval $ac_link) 2>&5
10647 ac_status=$?
10648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10649 (exit $ac_status); } &&
10650 { ac_try='test -s conftest$ac_exeext'
10651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10652 (eval $ac_try) 2>&5
10653 ac_status=$?
10654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10655 (exit $ac_status); }; }; then
10656 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010657else
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010659sed 's/^/| /' conftest.$ac_ext >&5
10660
Martin v. Löwis11437992002-04-12 09:54:03 +000010661ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010662fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010663rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10664LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010665fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010666echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10667echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10668if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010669 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010670fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010671 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010672echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10673echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10674if test "${ac_cv_lib_socket_socket+set}" = set; then
10675 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010676else
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010678LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010679cat >conftest.$ac_ext <<_ACEOF
10680#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010681/* confdefs.h. */
10682_ACEOF
10683cat confdefs.h >>conftest.$ac_ext
10684cat >>conftest.$ac_ext <<_ACEOF
10685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010686
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010687/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010688#ifdef __cplusplus
10689extern "C"
10690#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010691/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 builtin and then its argument prototype would still apply. */
10693char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010694int
10695main ()
10696{
10697socket ();
10698 ;
10699 return 0;
10700}
10701_ACEOF
10702rm -f conftest.$ac_objext conftest$ac_exeext
10703if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10704 (eval $ac_link) 2>&5
10705 ac_status=$?
10706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10707 (exit $ac_status); } &&
10708 { ac_try='test -s conftest$ac_exeext'
10709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10710 (eval $ac_try) 2>&5
10711 ac_status=$?
10712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10713 (exit $ac_status); }; }; then
10714 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010715else
Martin v. Löwis11437992002-04-12 09:54:03 +000010716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010717sed 's/^/| /' conftest.$ac_ext >&5
10718
Martin v. Löwis11437992002-04-12 09:54:03 +000010719ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010721rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10722LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010723fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010724echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10725echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10726if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010727 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010728fi
10729 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010730;;
10731esac
10732case "$ac_sys_system" in
10733BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010734echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10735echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10736if test "${ac_cv_lib_net_socket+set}" = set; then
10737 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010738else
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010740LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010741cat >conftest.$ac_ext <<_ACEOF
10742#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010743/* confdefs.h. */
10744_ACEOF
10745cat confdefs.h >>conftest.$ac_ext
10746cat >>conftest.$ac_ext <<_ACEOF
10747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010748
Guido van Rossumad678af1998-10-02 14:42:15 +000010749/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010750#ifdef __cplusplus
10751extern "C"
10752#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010753/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010754 builtin and then its argument prototype would still apply. */
10755char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010756int
10757main ()
10758{
10759socket ();
10760 ;
10761 return 0;
10762}
10763_ACEOF
10764rm -f conftest.$ac_objext conftest$ac_exeext
10765if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10766 (eval $ac_link) 2>&5
10767 ac_status=$?
10768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10769 (exit $ac_status); } &&
10770 { ac_try='test -s conftest$ac_exeext'
10771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10772 (eval $ac_try) 2>&5
10773 ac_status=$?
10774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10775 (exit $ac_status); }; }; then
10776 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010777else
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010779sed 's/^/| /' conftest.$ac_ext >&5
10780
Martin v. Löwis11437992002-04-12 09:54:03 +000010781ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010782fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010783rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10784LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010785fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010786echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10787echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10788if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010789 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010790fi
10791 # BeOS
10792;;
10793esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010794
Martin v. Löwis11437992002-04-12 09:54:03 +000010795echo "$as_me:$LINENO: checking for --with-libs" >&5
10796echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10797
Guido van Rossuma68acba1996-07-31 17:36:39 +000010798# Check whether --with-libs or --without-libs was given.
10799if test "${with_libs+set}" = set; then
10800 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010801
10802echo "$as_me:$LINENO: result: $withval" >&5
10803echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010804LIBS="$withval $LIBS"
10805
10806else
Martin v. Löwis11437992002-04-12 09:54:03 +000010807 echo "$as_me:$LINENO: result: no" >&5
10808echo "${ECHO_T}no" >&6
10809fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010810
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010811# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010812
10813
Martin v. Löwis11437992002-04-12 09:54:03 +000010814echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10815echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10816
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010817# Check whether --with-signal-module or --without-signal-module was given.
10818if test "${with_signal_module+set}" = set; then
10819 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010820
Martin v. Löwis11437992002-04-12 09:54:03 +000010821fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010822
10823if test -z "$with_signal_module"
10824then with_signal_module="yes"
10825fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010826echo "$as_me:$LINENO: result: $with_signal_module" >&5
10827echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010828
10829if test "${with_signal_module}" = "yes"; then
10830 USE_SIGNAL_MODULE=""
10831 SIGNAL_OBJS=""
10832else
10833 USE_SIGNAL_MODULE="#"
10834 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10835fi
10836
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010837# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010838
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010839USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010840
Martin v. Löwis11437992002-04-12 09:54:03 +000010841echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10842echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10843
Guido van Rossumec2f0731997-01-22 20:54:01 +000010844
10845# Check whether --with-dec-threads or --without-dec-threads was given.
10846if test "${with_dec_threads+set}" = set; then
10847 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010848
10849echo "$as_me:$LINENO: result: $withval" >&5
10850echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010851LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010852if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010853 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010854fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010855else
Martin v. Löwis11437992002-04-12 09:54:03 +000010856 echo "$as_me:$LINENO: result: no" >&5
10857echo "${ECHO_T}no" >&6
10858fi;
10859
10860# Templates for things AC_DEFINEd more than once.
10861# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010862
10863
Martin v. Löwis11437992002-04-12 09:54:03 +000010864
10865
10866
10867
10868
10869echo "$as_me:$LINENO: checking for --with-threads" >&5
10870echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10871
Guido van Rossumec2f0731997-01-22 20:54:01 +000010872# Check whether --with-threads or --without-threads was given.
10873if test "${with_threads+set}" = set; then
10874 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010875
Martin v. Löwis11437992002-04-12 09:54:03 +000010876fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010877
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010878# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010879
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010880# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010881if test "${with_thread+set}" = set; then
10882 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010883 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010884fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010885
10886if test -z "$with_threads"
10887then with_threads="yes"
10888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010889echo "$as_me:$LINENO: result: $with_threads" >&5
10890echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010891
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010892
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010893if test "$with_threads" = "no"
10894then
10895 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010896elif test "$ac_cv_pthread_is_default" = yes
10897then
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010899#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010900_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010901
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010902 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010903 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010904#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010905_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010906
10907 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010908 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010909elif test "$ac_cv_kpthread" = "yes"
10910then
10911 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010912 if test "$ac_cv_cxx_thread" = "yes"; then
10913 CXX="$CXX -Kpthread"
10914 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010916#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010917_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010918
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010919 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010920 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010921elif test "$ac_cv_kthread" = "yes"
10922then
10923 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010924 if test "$ac_cv_cxx_thread" = "yes"; then
10925 CXX="$CXX -Kthread"
10926 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010927 cat >>confdefs.h <<\_ACEOF
10928#define WITH_THREAD 1
10929_ACEOF
10930
10931 posix_threads=yes
10932 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010933elif test "$ac_cv_pthread" = "yes"
10934then
10935 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010936 if test "$ac_cv_cxx_thread" = "yes"; then
10937 CXX="$CXX -pthread"
10938 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010939 cat >>confdefs.h <<\_ACEOF
10940#define WITH_THREAD 1
10941_ACEOF
10942
10943 posix_threads=yes
10944 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010945else
10946 if test ! -z "$with_threads" -a -d "$with_threads"
10947 then LDFLAGS="$LDFLAGS -L$with_threads"
10948 fi
10949 if test ! -z "$withval" -a -d "$withval"
10950 then LDFLAGS="$LDFLAGS -L$withval"
10951 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010952
10953 # According to the POSIX spec, a pthreads implementation must
10954 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10956echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10957 cat >conftest.$ac_ext <<_ACEOF
10958#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010959/* confdefs.h. */
10960_ACEOF
10961cat confdefs.h >>conftest.$ac_ext
10962cat >>conftest.$ac_ext <<_ACEOF
10963/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010964
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010965#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010966#ifdef _POSIX_THREADS
10967yes
10968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010969
10970_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010972 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010973 unistd_defines_pthreads=yes
10974else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010975 unistd_defines_pthreads=no
10976fi
10977rm -f conftest*
10978
Martin v. Löwis11437992002-04-12 09:54:03 +000010979 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10980echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010983#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010984_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010985
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 if test "${ac_cv_header_cthreads_h+set}" = set; then
10987 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10988echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10989if test "${ac_cv_header_cthreads_h+set}" = set; then
10990 echo $ECHO_N "(cached) $ECHO_C" >&6
10991fi
10992echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10993echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010994else
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 # Is the header compilable?
10996echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10997echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10998cat >conftest.$ac_ext <<_ACEOF
10999#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011000/* confdefs.h. */
11001_ACEOF
11002cat confdefs.h >>conftest.$ac_ext
11003cat >>conftest.$ac_ext <<_ACEOF
11004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011005$ac_includes_default
11006#include <cthreads.h>
11007_ACEOF
11008rm -f conftest.$ac_objext
11009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11010 (eval $ac_compile) 2>&5
11011 ac_status=$?
11012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11013 (exit $ac_status); } &&
11014 { ac_try='test -s conftest.$ac_objext'
11015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11016 (eval $ac_try) 2>&5
11017 ac_status=$?
11018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11019 (exit $ac_status); }; }; then
11020 ac_header_compiler=yes
11021else
11022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011023sed 's/^/| /' conftest.$ac_ext >&5
11024
Martin v. Löwis11437992002-04-12 09:54:03 +000011025ac_header_compiler=no
11026fi
11027rm -f conftest.$ac_objext conftest.$ac_ext
11028echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11029echo "${ECHO_T}$ac_header_compiler" >&6
11030
11031# Is the header present?
11032echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11033echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11034cat >conftest.$ac_ext <<_ACEOF
11035#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011036/* confdefs.h. */
11037_ACEOF
11038cat confdefs.h >>conftest.$ac_ext
11039cat >>conftest.$ac_ext <<_ACEOF
11040/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011041#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011042_ACEOF
11043if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11044 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11045 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011046 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 rm -f conftest.er1
11048 cat conftest.err >&5
11049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11050 (exit $ac_status); } >/dev/null; then
11051 if test -s conftest.err; then
11052 ac_cpp_err=$ac_c_preproc_warn_flag
11053 else
11054 ac_cpp_err=
11055 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011056else
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 ac_cpp_err=yes
11058fi
11059if test -z "$ac_cpp_err"; then
11060 ac_header_preproc=yes
11061else
11062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011063sed 's/^/| /' conftest.$ac_ext >&5
11064
Martin v. Löwis11437992002-04-12 09:54:03 +000011065 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011067rm -f conftest.err conftest.$ac_ext
11068echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11069echo "${ECHO_T}$ac_header_preproc" >&6
11070
11071# So? What about this header?
11072case $ac_header_compiler:$ac_header_preproc in
11073 yes:no )
11074 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11075echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11076 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011077echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
11078 (
11079 cat <<\_ASBOX
11080## ------------------------------------ ##
11081## Report this to bug-autoconf@gnu.org. ##
11082## ------------------------------------ ##
11083_ASBOX
11084 ) |
11085 sed "s/^/$as_me: WARNING: /" >&2
11086 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 no:yes )
11088 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11089echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
11090 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11091echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11092 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011093echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
11094 (
11095 cat <<\_ASBOX
11096## ------------------------------------ ##
11097## Report this to bug-autoconf@gnu.org. ##
11098## ------------------------------------ ##
11099_ASBOX
11100 ) |
11101 sed "s/^/$as_me: WARNING: /" >&2
11102 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011103esac
11104echo "$as_me:$LINENO: checking for cthreads.h" >&5
11105echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11106if test "${ac_cv_header_cthreads_h+set}" = set; then
11107 echo $ECHO_N "(cached) $ECHO_C" >&6
11108else
11109 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011110fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011111echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11112echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11113
11114fi
11115if test $ac_cv_header_cthreads_h = yes; then
11116 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011117#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011118_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011119
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011121#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011122_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011123
Martin v. Löwis11437992002-04-12 09:54:03 +000011124
11125cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011126#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011127_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011128
11129 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011130 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011131else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011132
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11134 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11135echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11136if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11137 echo $ECHO_N "(cached) $ECHO_C" >&6
11138fi
11139echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11140echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011141else
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 # Is the header compilable?
11143echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11144echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11145cat >conftest.$ac_ext <<_ACEOF
11146#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* confdefs.h. */
11148_ACEOF
11149cat confdefs.h >>conftest.$ac_ext
11150cat >>conftest.$ac_ext <<_ACEOF
11151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011152$ac_includes_default
11153#include <mach/cthreads.h>
11154_ACEOF
11155rm -f conftest.$ac_objext
11156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11157 (eval $ac_compile) 2>&5
11158 ac_status=$?
11159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11160 (exit $ac_status); } &&
11161 { ac_try='test -s conftest.$ac_objext'
11162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11163 (eval $ac_try) 2>&5
11164 ac_status=$?
11165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11166 (exit $ac_status); }; }; then
11167 ac_header_compiler=yes
11168else
11169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011170sed 's/^/| /' conftest.$ac_ext >&5
11171
Martin v. Löwis11437992002-04-12 09:54:03 +000011172ac_header_compiler=no
11173fi
11174rm -f conftest.$ac_objext conftest.$ac_ext
11175echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11176echo "${ECHO_T}$ac_header_compiler" >&6
11177
11178# Is the header present?
11179echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11180echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11181cat >conftest.$ac_ext <<_ACEOF
11182#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011183/* confdefs.h. */
11184_ACEOF
11185cat confdefs.h >>conftest.$ac_ext
11186cat >>conftest.$ac_ext <<_ACEOF
11187/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011188#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011189_ACEOF
11190if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11191 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11192 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011193 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 rm -f conftest.er1
11195 cat conftest.err >&5
11196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11197 (exit $ac_status); } >/dev/null; then
11198 if test -s conftest.err; then
11199 ac_cpp_err=$ac_c_preproc_warn_flag
11200 else
11201 ac_cpp_err=
11202 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011203else
Martin v. Löwis11437992002-04-12 09:54:03 +000011204 ac_cpp_err=yes
11205fi
11206if test -z "$ac_cpp_err"; then
11207 ac_header_preproc=yes
11208else
11209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011210sed 's/^/| /' conftest.$ac_ext >&5
11211
Martin v. Löwis11437992002-04-12 09:54:03 +000011212 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011213fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011214rm -f conftest.err conftest.$ac_ext
11215echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11216echo "${ECHO_T}$ac_header_preproc" >&6
11217
11218# So? What about this header?
11219case $ac_header_compiler:$ac_header_preproc in
11220 yes:no )
11221 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11222echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11223 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011224echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
11225 (
11226 cat <<\_ASBOX
11227## ------------------------------------ ##
11228## Report this to bug-autoconf@gnu.org. ##
11229## ------------------------------------ ##
11230_ASBOX
11231 ) |
11232 sed "s/^/$as_me: WARNING: /" >&2
11233 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011234 no:yes )
11235 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11236echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
11237 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11238echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11239 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011240echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
11241 (
11242 cat <<\_ASBOX
11243## ------------------------------------ ##
11244## Report this to bug-autoconf@gnu.org. ##
11245## ------------------------------------ ##
11246_ASBOX
11247 ) |
11248 sed "s/^/$as_me: WARNING: /" >&2
11249 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011250esac
11251echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11252echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11253if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11254 echo $ECHO_N "(cached) $ECHO_C" >&6
11255else
11256 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011257fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011258echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11259echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11260
11261fi
11262if test $ac_cv_header_mach_cthreads_h = yes; then
11263 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011264#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011265_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011266
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011268#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011269_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011270
Martin v. Löwis11437992002-04-12 09:54:03 +000011271
11272cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011273#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011274_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011275
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011276 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011277else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011278
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 echo "$as_me:$LINENO: checking for --with-pth" >&5
11280echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11281
11282# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011283if test "${with_pth+set}" = set; then
11284 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011285 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011286echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011287 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011288#define WITH_THREAD 1
11289_ACEOF
11290
11291
11292cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011293#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011294_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011295
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011296 LIBS="-lpth $LIBS"
11297 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011298else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011299 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011300echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011301
11302 # Just looking for pthread_create in libpthread is not enough:
11303 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11304 # So we really have to include pthread.h, and then link.
11305 _libs=$LIBS
11306 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11308echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11309 cat >conftest.$ac_ext <<_ACEOF
11310#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011311/* confdefs.h. */
11312_ACEOF
11313cat confdefs.h >>conftest.$ac_ext
11314cat >>conftest.$ac_ext <<_ACEOF
11315/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011316#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011317
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011318void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011319int
11320main ()
11321{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011322
11323pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 ;
11325 return 0;
11326}
11327_ACEOF
11328rm -f conftest.$ac_objext conftest$ac_exeext
11329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11330 (eval $ac_link) 2>&5
11331 ac_status=$?
11332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11333 (exit $ac_status); } &&
11334 { ac_try='test -s conftest$ac_exeext'
11335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11336 (eval $ac_try) 2>&5
11337 ac_status=$?
11338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11339 (exit $ac_status); }; }; then
11340
11341 echo "$as_me:$LINENO: result: yes" >&5
11342echo "${ECHO_T}yes" >&6
11343 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011344#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011345_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011346
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011347 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011348 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011349else
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011351sed 's/^/| /' conftest.$ac_ext >&5
11352
Martin v. Löwis11437992002-04-12 09:54:03 +000011353
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011354 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11356echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11357if test "${ac_cv_func_pthread_detach+set}" = set; then
11358 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011359else
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 cat >conftest.$ac_ext <<_ACEOF
11361#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011362/* confdefs.h. */
11363_ACEOF
11364cat confdefs.h >>conftest.$ac_ext
11365cat >>conftest.$ac_ext <<_ACEOF
11366/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011367/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011368 which can conflict with char pthread_detach (); below.
11369 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011370 <limits.h> exists even on freestanding compilers. Under hpux,
11371 including <limits.h> includes <sys/time.h> and causes problems
11372 checking for functions defined therein. */
11373#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011374# include <limits.h>
11375#else
11376# include <assert.h>
11377#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011378/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011379#ifdef __cplusplus
11380extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011381{
Martin v. Löwis11437992002-04-12 09:54:03 +000011382#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011383/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011384 builtin and then its argument prototype would still apply. */
11385char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011386/* The GNU C library defines this for functions which it implements
11387 to always fail with ENOSYS. Some functions are actually named
11388 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011389#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011390choke me
11391#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011392char (*f) () = pthread_detach;
11393#endif
11394#ifdef __cplusplus
11395}
Guido van Rossumad678af1998-10-02 14:42:15 +000011396#endif
11397
Skip Montanaro6dead952003-09-25 14:50:04 +000011398int
11399main ()
11400{
11401return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 ;
11403 return 0;
11404}
11405_ACEOF
11406rm -f conftest.$ac_objext conftest$ac_exeext
11407if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11408 (eval $ac_link) 2>&5
11409 ac_status=$?
11410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11411 (exit $ac_status); } &&
11412 { ac_try='test -s conftest$ac_exeext'
11413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11414 (eval $ac_try) 2>&5
11415 ac_status=$?
11416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11417 (exit $ac_status); }; }; then
11418 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011419else
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011421sed 's/^/| /' conftest.$ac_ext >&5
11422
Martin v. Löwis11437992002-04-12 09:54:03 +000011423ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011424fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011425rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011427echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11428echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11429if test $ac_cv_func_pthread_detach = yes; then
11430 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011431#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011432_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011433
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011434 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011435 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011436else
Guido van Rossumad678af1998-10-02 14:42:15 +000011437
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011438 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11439 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11440echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11441if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11442 echo $ECHO_N "(cached) $ECHO_C" >&6
11443fi
11444echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11445echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11446else
11447 # Is the header compilable?
11448echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11449echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11450cat >conftest.$ac_ext <<_ACEOF
11451#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011452/* confdefs.h. */
11453_ACEOF
11454cat confdefs.h >>conftest.$ac_ext
11455cat >>conftest.$ac_ext <<_ACEOF
11456/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011457$ac_includes_default
11458#include <atheos/threads.h>
11459_ACEOF
11460rm -f conftest.$ac_objext
11461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11462 (eval $ac_compile) 2>&5
11463 ac_status=$?
11464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11465 (exit $ac_status); } &&
11466 { ac_try='test -s conftest.$ac_objext'
11467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11468 (eval $ac_try) 2>&5
11469 ac_status=$?
11470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11471 (exit $ac_status); }; }; then
11472 ac_header_compiler=yes
11473else
11474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011475sed 's/^/| /' conftest.$ac_ext >&5
11476
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011477ac_header_compiler=no
11478fi
11479rm -f conftest.$ac_objext conftest.$ac_ext
11480echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11481echo "${ECHO_T}$ac_header_compiler" >&6
11482
11483# Is the header present?
11484echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11485echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11486cat >conftest.$ac_ext <<_ACEOF
11487#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011488/* confdefs.h. */
11489_ACEOF
11490cat confdefs.h >>conftest.$ac_ext
11491cat >>conftest.$ac_ext <<_ACEOF
11492/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011493#include <atheos/threads.h>
11494_ACEOF
11495if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11496 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11497 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011498 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011499 rm -f conftest.er1
11500 cat conftest.err >&5
11501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11502 (exit $ac_status); } >/dev/null; then
11503 if test -s conftest.err; then
11504 ac_cpp_err=$ac_c_preproc_warn_flag
11505 else
11506 ac_cpp_err=
11507 fi
11508else
11509 ac_cpp_err=yes
11510fi
11511if test -z "$ac_cpp_err"; then
11512 ac_header_preproc=yes
11513else
11514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011515sed 's/^/| /' conftest.$ac_ext >&5
11516
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011517 ac_header_preproc=no
11518fi
11519rm -f conftest.err conftest.$ac_ext
11520echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11521echo "${ECHO_T}$ac_header_preproc" >&6
11522
11523# So? What about this header?
11524case $ac_header_compiler:$ac_header_preproc in
11525 yes:no )
11526 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11527echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11528 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011529echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
11530 (
11531 cat <<\_ASBOX
11532## ------------------------------------ ##
11533## Report this to bug-autoconf@gnu.org. ##
11534## ------------------------------------ ##
11535_ASBOX
11536 ) |
11537 sed "s/^/$as_me: WARNING: /" >&2
11538 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011539 no:yes )
11540 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11541echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
11542 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11543echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11544 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011545echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
11546 (
11547 cat <<\_ASBOX
11548## ------------------------------------ ##
11549## Report this to bug-autoconf@gnu.org. ##
11550## ------------------------------------ ##
11551_ASBOX
11552 ) |
11553 sed "s/^/$as_me: WARNING: /" >&2
11554 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011555esac
11556echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11557echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11558if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11559 echo $ECHO_N "(cached) $ECHO_C" >&6
11560else
11561 ac_cv_header_atheos_threads_h=$ac_header_preproc
11562fi
11563echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11564echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11565
11566fi
11567if test $ac_cv_header_atheos_threads_h = yes; then
11568 cat >>confdefs.h <<\_ACEOF
11569#define WITH_THREAD 1
11570_ACEOF
11571
11572
11573cat >>confdefs.h <<\_ACEOF
11574#define ATHEOS_THREADS 1
11575_ACEOF
11576
11577 THREADOBJ="Python/thread.o"
11578else
11579
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11581 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11582echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11583if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11584 echo $ECHO_N "(cached) $ECHO_C" >&6
11585fi
11586echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11587echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011588else
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 # Is the header compilable?
11590echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11591echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11592cat >conftest.$ac_ext <<_ACEOF
11593#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011594/* confdefs.h. */
11595_ACEOF
11596cat confdefs.h >>conftest.$ac_ext
11597cat >>conftest.$ac_ext <<_ACEOF
11598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011599$ac_includes_default
11600#include <kernel/OS.h>
11601_ACEOF
11602rm -f conftest.$ac_objext
11603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11604 (eval $ac_compile) 2>&5
11605 ac_status=$?
11606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11607 (exit $ac_status); } &&
11608 { ac_try='test -s conftest.$ac_objext'
11609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11610 (eval $ac_try) 2>&5
11611 ac_status=$?
11612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11613 (exit $ac_status); }; }; then
11614 ac_header_compiler=yes
11615else
11616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011617sed 's/^/| /' conftest.$ac_ext >&5
11618
Martin v. Löwis11437992002-04-12 09:54:03 +000011619ac_header_compiler=no
11620fi
11621rm -f conftest.$ac_objext conftest.$ac_ext
11622echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11623echo "${ECHO_T}$ac_header_compiler" >&6
11624
11625# Is the header present?
11626echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
11627echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
11628cat >conftest.$ac_ext <<_ACEOF
11629#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011630/* confdefs.h. */
11631_ACEOF
11632cat confdefs.h >>conftest.$ac_ext
11633cat >>conftest.$ac_ext <<_ACEOF
11634/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011635#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011636_ACEOF
11637if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11638 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11639 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011640 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011641 rm -f conftest.er1
11642 cat conftest.err >&5
11643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11644 (exit $ac_status); } >/dev/null; then
11645 if test -s conftest.err; then
11646 ac_cpp_err=$ac_c_preproc_warn_flag
11647 else
11648 ac_cpp_err=
11649 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011650else
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 ac_cpp_err=yes
11652fi
11653if test -z "$ac_cpp_err"; then
11654 ac_header_preproc=yes
11655else
11656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011657sed 's/^/| /' conftest.$ac_ext >&5
11658
Martin v. Löwis11437992002-04-12 09:54:03 +000011659 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011661rm -f conftest.err conftest.$ac_ext
11662echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11663echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011664
Martin v. Löwis11437992002-04-12 09:54:03 +000011665# So? What about this header?
11666case $ac_header_compiler:$ac_header_preproc in
11667 yes:no )
11668 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11669echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11670 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011671echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11672 (
11673 cat <<\_ASBOX
11674## ------------------------------------ ##
11675## Report this to bug-autoconf@gnu.org. ##
11676## ------------------------------------ ##
11677_ASBOX
11678 ) |
11679 sed "s/^/$as_me: WARNING: /" >&2
11680 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011681 no:yes )
11682 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11683echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11684 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11685echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11686 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011687echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11688 (
11689 cat <<\_ASBOX
11690## ------------------------------------ ##
11691## Report this to bug-autoconf@gnu.org. ##
11692## ------------------------------------ ##
11693_ASBOX
11694 ) |
11695 sed "s/^/$as_me: WARNING: /" >&2
11696 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011697esac
11698echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11699echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11700if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11701 echo $ECHO_N "(cached) $ECHO_C" >&6
11702else
11703 ac_cv_header_kernel_OS_h=$ac_header_preproc
11704fi
11705echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11706echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11707
11708fi
11709if test $ac_cv_header_kernel_OS_h = yes; then
11710 cat >>confdefs.h <<\_ACEOF
11711#define WITH_THREAD 1
11712_ACEOF
11713
11714
11715cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011716#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011717_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011718
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011719 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011720else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011721
Martin v. Löwis11437992002-04-12 09:54:03 +000011722 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11723echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11724if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011726else
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011728LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011729cat >conftest.$ac_ext <<_ACEOF
11730#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011731/* confdefs.h. */
11732_ACEOF
11733cat confdefs.h >>conftest.$ac_ext
11734cat >>conftest.$ac_ext <<_ACEOF
11735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011736
Greg Steinadf63d62000-07-05 10:38:09 +000011737/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011738#ifdef __cplusplus
11739extern "C"
11740#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011741/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 builtin and then its argument prototype would still apply. */
11743char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011744int
11745main ()
11746{
11747pthread_create ();
11748 ;
11749 return 0;
11750}
11751_ACEOF
11752rm -f conftest.$ac_objext conftest$ac_exeext
11753if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11754 (eval $ac_link) 2>&5
11755 ac_status=$?
11756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11757 (exit $ac_status); } &&
11758 { ac_try='test -s conftest$ac_exeext'
11759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11760 (eval $ac_try) 2>&5
11761 ac_status=$?
11762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11763 (exit $ac_status); }; }; then
11764 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011765else
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011767sed 's/^/| /' conftest.$ac_ext >&5
11768
Martin v. Löwis11437992002-04-12 09:54:03 +000011769ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011770fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011771rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11772LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011773fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011774echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11775echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11776if test $ac_cv_lib_pthreads_pthread_create = yes; then
11777 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011778#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011779_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011781 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011782 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011783 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011784else
Greg Steinadf63d62000-07-05 10:38:09 +000011785
Martin v. Löwis11437992002-04-12 09:54:03 +000011786 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11787echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11788if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11789 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011790else
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011792LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011793cat >conftest.$ac_ext <<_ACEOF
11794#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011795/* confdefs.h. */
11796_ACEOF
11797cat confdefs.h >>conftest.$ac_ext
11798cat >>conftest.$ac_ext <<_ACEOF
11799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011800
Guido van Rossum49545951997-12-02 19:28:29 +000011801/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011802#ifdef __cplusplus
11803extern "C"
11804#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011805/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 builtin and then its argument prototype would still apply. */
11807char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011808int
11809main ()
11810{
11811pthread_create ();
11812 ;
11813 return 0;
11814}
11815_ACEOF
11816rm -f conftest.$ac_objext conftest$ac_exeext
11817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11818 (eval $ac_link) 2>&5
11819 ac_status=$?
11820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11821 (exit $ac_status); } &&
11822 { ac_try='test -s conftest$ac_exeext'
11823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11824 (eval $ac_try) 2>&5
11825 ac_status=$?
11826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11827 (exit $ac_status); }; }; then
11828 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011829else
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011831sed 's/^/| /' conftest.$ac_ext >&5
11832
Martin v. Löwis11437992002-04-12 09:54:03 +000011833ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011835rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11836LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011837fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011838echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11839echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11840if test $ac_cv_lib_c_r_pthread_create = yes; then
11841 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011842#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011843_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011844
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011845 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011846 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011847 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011848else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011849
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11851echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11852if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11853 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011854else
Martin v. Löwis11437992002-04-12 09:54:03 +000011855 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011856LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011857cat >conftest.$ac_ext <<_ACEOF
11858#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011859/* confdefs.h. */
11860_ACEOF
11861cat confdefs.h >>conftest.$ac_ext
11862cat >>conftest.$ac_ext <<_ACEOF
11863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011864
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011865/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011866#ifdef __cplusplus
11867extern "C"
11868#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011869/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011870 builtin and then its argument prototype would still apply. */
11871char __d6_pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011872int
11873main ()
11874{
11875__d6_pthread_create ();
11876 ;
11877 return 0;
11878}
11879_ACEOF
11880rm -f conftest.$ac_objext conftest$ac_exeext
11881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11882 (eval $ac_link) 2>&5
11883 ac_status=$?
11884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11885 (exit $ac_status); } &&
11886 { ac_try='test -s conftest$ac_exeext'
11887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11888 (eval $ac_try) 2>&5
11889 ac_status=$?
11890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11891 (exit $ac_status); }; }; then
11892 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011893else
Martin v. Löwis11437992002-04-12 09:54:03 +000011894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011895sed 's/^/| /' conftest.$ac_ext >&5
11896
Martin v. Löwis11437992002-04-12 09:54:03 +000011897ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011898fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011899rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11900LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011901fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011902echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11903echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11904if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11905 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011906#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011907_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011908
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011909 echo Systems with __d6_pthread_create are not supported anymore.
11910 echo See README
11911 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011912 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011913 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011914 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011915else
Guido van Rossum49545951997-12-02 19:28:29 +000011916
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11918echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11919if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011921else
Martin v. Löwis11437992002-04-12 09:54:03 +000011922 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011923LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011924cat >conftest.$ac_ext <<_ACEOF
11925#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011926/* confdefs.h. */
11927_ACEOF
11928cat confdefs.h >>conftest.$ac_ext
11929cat >>conftest.$ac_ext <<_ACEOF
11930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011931
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011932/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011933#ifdef __cplusplus
11934extern "C"
11935#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011936/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011937 builtin and then its argument prototype would still apply. */
11938char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011939int
11940main ()
11941{
11942__pthread_create_system ();
11943 ;
11944 return 0;
11945}
11946_ACEOF
11947rm -f conftest.$ac_objext conftest$ac_exeext
11948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11949 (eval $ac_link) 2>&5
11950 ac_status=$?
11951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11952 (exit $ac_status); } &&
11953 { ac_try='test -s conftest$ac_exeext'
11954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11955 (eval $ac_try) 2>&5
11956 ac_status=$?
11957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958 (exit $ac_status); }; }; then
11959 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011960else
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011962sed 's/^/| /' conftest.$ac_ext >&5
11963
Martin v. Löwis11437992002-04-12 09:54:03 +000011964ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011966rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11967LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011968fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011969echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11970echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11971if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11972 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011973#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011974_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011975
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011976 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011977 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011978 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011979else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011980
Martin v. Löwis11437992002-04-12 09:54:03 +000011981 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11982echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11983if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11984 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011985else
Martin v. Löwis11437992002-04-12 09:54:03 +000011986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011987LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011988cat >conftest.$ac_ext <<_ACEOF
11989#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011990/* confdefs.h. */
11991_ACEOF
11992cat confdefs.h >>conftest.$ac_ext
11993cat >>conftest.$ac_ext <<_ACEOF
11994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011995
Guido van Rossumb93a8621998-05-07 13:27:32 +000011996/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011997#ifdef __cplusplus
11998extern "C"
11999#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012000/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012001 builtin and then its argument prototype would still apply. */
12002char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012003int
12004main ()
12005{
12006pthread_create ();
12007 ;
12008 return 0;
12009}
12010_ACEOF
12011rm -f conftest.$ac_objext conftest$ac_exeext
12012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12013 (eval $ac_link) 2>&5
12014 ac_status=$?
12015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12016 (exit $ac_status); } &&
12017 { ac_try='test -s conftest$ac_exeext'
12018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12019 (eval $ac_try) 2>&5
12020 ac_status=$?
12021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12022 (exit $ac_status); }; }; then
12023 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012024else
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012026sed 's/^/| /' conftest.$ac_ext >&5
12027
Martin v. Löwis11437992002-04-12 09:54:03 +000012028ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12031LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012032fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012033echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12034echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12035if test $ac_cv_lib_cma_pthread_create = yes; then
12036 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012037#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012038_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012039
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012040 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012041 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012042 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012043else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012044
Martin v. Löwis130fb172001-07-19 11:00:41 +000012045 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012046fi
12047
Guido van Rossum627b2d71993-12-24 10:39:16 +000012048
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012049fi
12050
Guido van Rossum0be3e491997-05-22 20:33:33 +000012051fi
12052
Guido van Rossum49545951997-12-02 19:28:29 +000012053fi
12054
Guido van Rossumb93a8621998-05-07 13:27:32 +000012055fi
12056
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012057fi
12058
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012059
Michael W. Hudson54241132001-12-07 15:38:26 +000012060fi
12061
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012062
12063fi
12064
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012066rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12067fi;
12068fi
12069
12070
12071fi
12072
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012073
Michael W. Hudson54241132001-12-07 15:38:26 +000012074
Martin v. Löwis11437992002-04-12 09:54:03 +000012075 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12076echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12077if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12078 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012079else
Martin v. Löwis11437992002-04-12 09:54:03 +000012080 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012081LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012082cat >conftest.$ac_ext <<_ACEOF
12083#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012084/* confdefs.h. */
12085_ACEOF
12086cat confdefs.h >>conftest.$ac_ext
12087cat >>conftest.$ac_ext <<_ACEOF
12088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012090/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012091#ifdef __cplusplus
12092extern "C"
12093#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012094/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012095 builtin and then its argument prototype would still apply. */
12096char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012097int
12098main ()
12099{
12100usconfig ();
12101 ;
12102 return 0;
12103}
12104_ACEOF
12105rm -f conftest.$ac_objext conftest$ac_exeext
12106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12107 (eval $ac_link) 2>&5
12108 ac_status=$?
12109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110 (exit $ac_status); } &&
12111 { ac_try='test -s conftest$ac_exeext'
12112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12113 (eval $ac_try) 2>&5
12114 ac_status=$?
12115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12116 (exit $ac_status); }; }; then
12117 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012118else
Martin v. Löwis11437992002-04-12 09:54:03 +000012119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012120sed 's/^/| /' conftest.$ac_ext >&5
12121
Martin v. Löwis11437992002-04-12 09:54:03 +000012122ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012124rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12125LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012127echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12128echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12129if test $ac_cv_lib_mpc_usconfig = yes; then
12130 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012131#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012132_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012133
Martin v. Löwis130fb172001-07-19 11:00:41 +000012134 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012135 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012136 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012137fi
12138
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012139
Neal Norwitza978ab02002-11-02 16:58:05 +000012140 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012141 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12142echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12143if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012145else
Martin v. Löwis11437992002-04-12 09:54:03 +000012146 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012147LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012148cat >conftest.$ac_ext <<_ACEOF
12149#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012150/* confdefs.h. */
12151_ACEOF
12152cat confdefs.h >>conftest.$ac_ext
12153cat >>conftest.$ac_ext <<_ACEOF
12154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012156/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012157#ifdef __cplusplus
12158extern "C"
12159#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012160/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 builtin and then its argument prototype would still apply. */
12162char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012163int
12164main ()
12165{
12166thr_create ();
12167 ;
12168 return 0;
12169}
12170_ACEOF
12171rm -f conftest.$ac_objext conftest$ac_exeext
12172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12173 (eval $ac_link) 2>&5
12174 ac_status=$?
12175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12176 (exit $ac_status); } &&
12177 { ac_try='test -s conftest$ac_exeext'
12178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12179 (eval $ac_try) 2>&5
12180 ac_status=$?
12181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182 (exit $ac_status); }; }; then
12183 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012184else
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012186sed 's/^/| /' conftest.$ac_ext >&5
12187
Martin v. Löwis11437992002-04-12 09:54:03 +000012188ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012189fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012190rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12191LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012193echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12194echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12195if test $ac_cv_lib_thread_thr_create = yes; then
12196 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012197#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012198_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012199
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012200 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012201 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012202 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012203fi
12204
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012205 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012206
Martin v. Löwis130fb172001-07-19 11:00:41 +000012207 if test "$USE_THREAD_MODULE" != "#"
12208 then
12209 # If the above checks didn't disable threads, (at least) OSF1
12210 # needs this '-threads' argument during linking.
12211 case $ac_sys_system in
12212 OSF1) LDLAST=-threads;;
12213 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012214 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012215fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012216
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012217if test "$posix_threads" = "yes"; then
12218 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012219
12220cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012221#define _POSIX_THREADS 1
12222_ACEOF
12223
12224 fi
12225
12226 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12227 case $ac_sys_system/$ac_sys_release in
12228 SunOS/5.6)
12229cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012230#define HAVE_PTHREAD_DESTRUCTOR 1
12231_ACEOF
12232
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012233 ;;
12234 SunOS/5.8)
12235cat >>confdefs.h <<\_ACEOF
12236#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12237_ACEOF
12238
12239 ;;
12240 esac
12241
12242 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12243echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12244 if test "${ac_cv_pthread_system_supported+set}" = set; then
12245 echo $ECHO_N "(cached) $ECHO_C" >&6
12246else
12247 if test "$cross_compiling" = yes; then
12248 ac_cv_pthread_system_supported=no
12249else
12250 cat >conftest.$ac_ext <<_ACEOF
12251#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012252/* confdefs.h. */
12253_ACEOF
12254cat confdefs.h >>conftest.$ac_ext
12255cat >>conftest.$ac_ext <<_ACEOF
12256/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012257#include <pthread.h>
12258 void *foo(void *parm) {
12259 return NULL;
12260 }
12261 main() {
12262 pthread_attr_t attr;
12263 pthread_t id;
12264 if (pthread_attr_init(&attr)) exit(-1);
12265 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12266 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12267 exit(0);
12268 }
12269_ACEOF
12270rm -f conftest$ac_exeext
12271if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12272 (eval $ac_link) 2>&5
12273 ac_status=$?
12274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12275 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12277 (eval $ac_try) 2>&5
12278 ac_status=$?
12279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12280 (exit $ac_status); }; }; then
12281 ac_cv_pthread_system_supported=yes
12282else
12283 echo "$as_me: program exited with status $ac_status" >&5
12284echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012285sed 's/^/| /' conftest.$ac_ext >&5
12286
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012287( exit $ac_status )
12288ac_cv_pthread_system_supported=no
12289fi
Skip Montanaro6dead952003-09-25 14:50:04 +000012290rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012291fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012292
Guido van Rossum627b2d71993-12-24 10:39:16 +000012293fi
12294
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012295 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12296echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12297 if test "$ac_cv_pthread_system_supported" = "yes"; then
12298
12299cat >>confdefs.h <<\_ACEOF
12300#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12301_ACEOF
12302
12303 fi
12304
12305for ac_func in pthread_sigmask
12306do
12307as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12308echo "$as_me:$LINENO: checking for $ac_func" >&5
12309echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12310if eval "test \"\${$as_ac_var+set}\" = set"; then
12311 echo $ECHO_N "(cached) $ECHO_C" >&6
12312else
12313 cat >conftest.$ac_ext <<_ACEOF
12314#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* confdefs.h. */
12316_ACEOF
12317cat confdefs.h >>conftest.$ac_ext
12318cat >>conftest.$ac_ext <<_ACEOF
12319/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012320/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012321 which can conflict with char $ac_func (); below.
12322 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012323 <limits.h> exists even on freestanding compilers. Under hpux,
12324 including <limits.h> includes <sys/time.h> and causes problems
12325 checking for functions defined therein. */
12326#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012327# include <limits.h>
12328#else
12329# include <assert.h>
12330#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012331/* Override any gcc2 internal prototype to avoid an error. */
12332#ifdef __cplusplus
12333extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012334{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012335#endif
12336/* We use char because int might match the return type of a gcc2
12337 builtin and then its argument prototype would still apply. */
12338char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012339/* The GNU C library defines this for functions which it implements
12340 to always fail with ENOSYS. Some functions are actually named
12341 something starting with __ and the normal name is an alias. */
12342#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12343choke me
12344#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012345char (*f) () = $ac_func;
12346#endif
12347#ifdef __cplusplus
12348}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012349#endif
12350
Skip Montanaro6dead952003-09-25 14:50:04 +000012351int
12352main ()
12353{
12354return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012355 ;
12356 return 0;
12357}
12358_ACEOF
12359rm -f conftest.$ac_objext conftest$ac_exeext
12360if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12361 (eval $ac_link) 2>&5
12362 ac_status=$?
12363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12364 (exit $ac_status); } &&
12365 { ac_try='test -s conftest$ac_exeext'
12366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12367 (eval $ac_try) 2>&5
12368 ac_status=$?
12369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12370 (exit $ac_status); }; }; then
12371 eval "$as_ac_var=yes"
12372else
12373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012374sed 's/^/| /' conftest.$ac_ext >&5
12375
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012376eval "$as_ac_var=no"
12377fi
12378rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12379fi
12380echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12381echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12382if test `eval echo '${'$as_ac_var'}'` = yes; then
12383 cat >>confdefs.h <<_ACEOF
12384#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12385_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012386 case $ac_sys_system in
12387 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012388
Jason Tishlerfac083d2003-07-22 15:20:49 +000012389cat >>confdefs.h <<\_ACEOF
12390#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12391_ACEOF
12392
12393 ;;
12394 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012395fi
12396done
12397
12398fi
12399
12400
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012401# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012402
12403
12404echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12405echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012406# Check whether --enable-ipv6 or --disable-ipv6 was given.
12407if test "${enable_ipv6+set}" = set; then
12408 enableval="$enable_ipv6"
12409 case "$enableval" in
12410 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 echo "$as_me:$LINENO: result: no" >&5
12412echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012413 ipv6=no
12414 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012415 *) echo "$as_me:$LINENO: result: yes" >&5
12416echo "${ECHO_T}yes" >&6
12417 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012418#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012419_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012420
12421 ipv6=yes
12422 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012423 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012424else
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012426 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012427 echo "$as_me:$LINENO: result: no" >&5
12428echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012429 ipv6=no
12430
12431else
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 cat >conftest.$ac_ext <<_ACEOF
12433#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012434/* confdefs.h. */
12435_ACEOF
12436cat confdefs.h >>conftest.$ac_ext
12437cat >>conftest.$ac_ext <<_ACEOF
12438/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012439 /* AF_INET6 available check */
12440#include <sys/types.h>
12441#include <sys/socket.h>
12442main()
12443{
12444 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12445 exit(1);
12446 else
12447 exit(0);
12448}
12449
Martin v. Löwis11437992002-04-12 09:54:03 +000012450_ACEOF
12451rm -f conftest$ac_exeext
12452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12453 (eval $ac_link) 2>&5
12454 ac_status=$?
12455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12456 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12458 (eval $ac_try) 2>&5
12459 ac_status=$?
12460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12461 (exit $ac_status); }; }; then
12462 echo "$as_me:$LINENO: result: yes" >&5
12463echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012464 ipv6=yes
12465else
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 echo "$as_me: program exited with status $ac_status" >&5
12467echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012468sed 's/^/| /' conftest.$ac_ext >&5
12469
Martin v. Löwis11437992002-04-12 09:54:03 +000012470( exit $ac_status )
12471echo "$as_me:$LINENO: result: no" >&5
12472echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012473 ipv6=no
12474fi
Skip Montanaro6dead952003-09-25 14:50:04 +000012475rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012476fi
12477
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012478if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12480echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12481 cat >conftest.$ac_ext <<_ACEOF
12482#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012483/* confdefs.h. */
12484_ACEOF
12485cat confdefs.h >>conftest.$ac_ext
12486cat >>conftest.$ac_ext <<_ACEOF
12487/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012488#include <sys/types.h>
12489#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012490int
12491main ()
12492{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012493struct sockaddr_in6 x;
12494x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012495 ;
12496 return 0;
12497}
12498_ACEOF
12499rm -f conftest.$ac_objext
12500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12501 (eval $ac_compile) 2>&5
12502 ac_status=$?
12503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12504 (exit $ac_status); } &&
12505 { ac_try='test -s conftest.$ac_objext'
12506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12507 (eval $ac_try) 2>&5
12508 ac_status=$?
12509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12510 (exit $ac_status); }; }; then
12511 echo "$as_me:$LINENO: result: yes" >&5
12512echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012513 ipv6=yes
12514else
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012516sed 's/^/| /' conftest.$ac_ext >&5
12517
Martin v. Löwis11437992002-04-12 09:54:03 +000012518echo "$as_me:$LINENO: result: no" >&5
12519echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012520 ipv6=no
12521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012522rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012523fi
12524
12525if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012527#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012528_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012529
12530fi
12531
Martin v. Löwis11437992002-04-12 09:54:03 +000012532fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012533
12534ipv6type=unknown
12535ipv6lib=none
12536ipv6trylibc=no
12537
12538if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
12540echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000012541 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12542 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012543 case $i in
12544 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 cat >conftest.$ac_ext <<_ACEOF
12546#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* confdefs.h. */
12548_ACEOF
12549cat confdefs.h >>conftest.$ac_ext
12550cat >>conftest.$ac_ext <<_ACEOF
12551/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012552
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012553#include <netinet/in.h>
12554#ifdef IPV6_INRIA_VERSION
12555yes
12556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012557_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012559 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012560 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012561fi
12562rm -f conftest*
12563
12564 ;;
12565 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000012566 cat >conftest.$ac_ext <<_ACEOF
12567#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012568/* confdefs.h. */
12569_ACEOF
12570cat confdefs.h >>conftest.$ac_ext
12571cat >>conftest.$ac_ext <<_ACEOF
12572/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012573
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012574#include <netinet/in.h>
12575#ifdef __KAME__
12576yes
12577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012578_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012580 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012581 ipv6type=$i;
12582 ipv6lib=inet6
12583 ipv6libdir=/usr/local/v6/lib
12584 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012585fi
12586rm -f conftest*
12587
12588 ;;
12589 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 cat >conftest.$ac_ext <<_ACEOF
12591#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012592/* confdefs.h. */
12593_ACEOF
12594cat confdefs.h >>conftest.$ac_ext
12595cat >>conftest.$ac_ext <<_ACEOF
12596/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012597
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012598#include <features.h>
12599#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12600yes
12601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012602_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012603if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012604 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012605 ipv6type=$i;
12606 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012607fi
12608rm -f conftest*
12609
12610 ;;
12611 linux-inet6)
12612 if test -d /usr/inet6; then
12613 ipv6type=$i
12614 ipv6lib=inet6
12615 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012616 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012617 fi
12618 ;;
12619 solaris)
12620 if test -f /etc/netconfig; then
12621 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
12622 ipv6type=$i
12623 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012624 fi
12625 fi
12626 ;;
12627 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 cat >conftest.$ac_ext <<_ACEOF
12629#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012630/* confdefs.h. */
12631_ACEOF
12632cat confdefs.h >>conftest.$ac_ext
12633cat >>conftest.$ac_ext <<_ACEOF
12634/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012635
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012636#include <sys/param.h>
12637#ifdef _TOSHIBA_INET6
12638yes
12639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012640_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012642 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012643 ipv6type=$i;
12644 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012645 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012646fi
12647rm -f conftest*
12648
12649 ;;
12650 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 cat >conftest.$ac_ext <<_ACEOF
12652#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012653/* confdefs.h. */
12654_ACEOF
12655cat confdefs.h >>conftest.$ac_ext
12656cat >>conftest.$ac_ext <<_ACEOF
12657/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012658
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012659#include </usr/local/v6/include/sys/v6config.h>
12660#ifdef __V6D__
12661yes
12662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012663_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012664if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012665 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012666 ipv6type=$i;
12667 ipv6lib=v6;
12668 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012669 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012670fi
12671rm -f conftest*
12672
12673 ;;
12674 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 cat >conftest.$ac_ext <<_ACEOF
12676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012677/* confdefs.h. */
12678_ACEOF
12679cat confdefs.h >>conftest.$ac_ext
12680cat >>conftest.$ac_ext <<_ACEOF
12681/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012682
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012683#include <sys/param.h>
12684#ifdef _ZETA_MINAMI_INET6
12685yes
12686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012687_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012689 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012690 ipv6type=$i;
12691 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012692 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012693fi
12694rm -f conftest*
12695
12696 ;;
12697 esac
12698 if test "$ipv6type" != "unknown"; then
12699 break
12700 fi
12701 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 echo "$as_me:$LINENO: result: $ipv6type" >&5
12703echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012704fi
12705
12706if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12707 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12708 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12709 echo "using lib$ipv6lib"
12710 else
12711 if test $ipv6trylibc = "yes"; then
12712 echo "using libc"
12713 else
12714 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12715 echo "You need to fetch lib$ipv6lib.a from appropriate"
12716 echo 'ipv6 kit and compile beforehand.'
12717 exit 1
12718 fi
12719 fi
12720fi
12721
Jack Jansen7b8c7542002-04-14 20:12:41 +000012722# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000012723echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
12724echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000012725
12726# Check whether --with-universal-newlines or --without-universal-newlines was given.
12727if test "${with_universal_newlines+set}" = set; then
12728 withval="$with_universal_newlines"
12729
12730fi;
12731
12732if test -z "$with_universal_newlines"
12733then with_universal_newlines="yes"
12734fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012735if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012736then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012737 echo --without-universal-newlines is unsupported, see README
12738 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012739else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012740
12741cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012742#define WITH_UNIVERSAL_NEWLINES 1
12743_ACEOF
12744
12745fi
12746echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12747echo "${ECHO_T}$with_universal_newlines" >&6
12748
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012749# Check for --with-doc-strings
12750echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12751echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12752
12753# Check whether --with-doc-strings or --without-doc-strings was given.
12754if test "${with_doc_strings+set}" = set; then
12755 withval="$with_doc_strings"
12756
12757fi;
12758
12759if test -z "$with_doc_strings"
12760then with_doc_strings="yes"
12761fi
12762if test "$with_doc_strings" != "no"
12763then
12764
12765cat >>confdefs.h <<\_ACEOF
12766#define WITH_DOC_STRINGS 1
12767_ACEOF
12768
12769fi
12770echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12771echo "${ECHO_T}$with_doc_strings" >&6
12772
Neil Schemenauera35c6882001-02-27 04:45:05 +000012773# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012774echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12775echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12776
Neil Schemenauera35c6882001-02-27 04:45:05 +000012777# Check whether --with-pymalloc or --without-pymalloc was given.
12778if test "${with_pymalloc+set}" = set; then
12779 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012780
Martin v. Löwis11437992002-04-12 09:54:03 +000012781fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012782
Neil Schemenauer16c22972002-03-22 15:34:49 +000012783if test -z "$with_pymalloc"
12784then with_pymalloc="yes"
12785fi
12786if test "$with_pymalloc" != "no"
12787then
Martin v. Löwis11437992002-04-12 09:54:03 +000012788
12789cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012790#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012791_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012792
12793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012794echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12795echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012796
Barry Warsawef82cd72000-06-30 16:21:01 +000012797# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012798echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12799echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12800
Barry Warsawef82cd72000-06-30 16:21:01 +000012801# Check whether --with-wctype-functions or --without-wctype-functions was given.
12802if test "${with_wctype_functions+set}" = set; then
12803 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012804
Barry Warsawef82cd72000-06-30 16:21:01 +000012805if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012806then
12807
12808cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012809#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012810_ACEOF
12811
12812 echo "$as_me:$LINENO: result: yes" >&5
12813echo "${ECHO_T}yes" >&6
12814else echo "$as_me:$LINENO: result: no" >&5
12815echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012816fi
12817else
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 echo "$as_me:$LINENO: result: no" >&5
12819echo "${ECHO_T}no" >&6
12820fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012821
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012822# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012823
Guido van Rossum98935bf2001-09-05 19:13:16 +000012824DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012825
Martin v. Löwis11437992002-04-12 09:54:03 +000012826echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12827echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12828
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012829# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012830if test "${with_sgi_dl+set}" = set; then
12831 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012832
12833echo "$as_me:$LINENO: result: $withval" >&5
12834echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012835echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012836exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012837
12838cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012839#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012840_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012841
Guido van Rossume97ee181999-12-20 21:27:22 +000012842DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012843dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012844if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012845then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012846else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12847echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12848 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012849fi
12850DLINCLDIR=${dldir}
12851LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012852else
Martin v. Löwis11437992002-04-12 09:54:03 +000012853 echo "$as_me:$LINENO: result: no" >&5
12854echo "${ECHO_T}no" >&6
12855fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012856
Martin v. Löwis11437992002-04-12 09:54:03 +000012857echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12858echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012859
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012860# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012861if test "${with_dl_dld+set}" = set; then
12862 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012863
12864echo "$as_me:$LINENO: result: $withval" >&5
12865echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012866echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012867exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012868
12869cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012871_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012872
Guido van Rossume97ee181999-12-20 21:27:22 +000012873DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012874dldir=`echo "$withval" | sed 's/,.*//'`
12875dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012876if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012877then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012878else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12879echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12880 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012881fi
12882DLINCLDIR=${dldir}
12883LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012884else
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 echo "$as_me:$LINENO: result: no" >&5
12886echo "${ECHO_T}no" >&6
12887fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012888
Guido van Rossume97ee181999-12-20 21:27:22 +000012889# the dlopen() function means we might want to use dynload_shlib.o. some
12890# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
Thomas Wouters3a584202000-08-05 23:28:51 +000012892for ac_func in dlopen
12893do
Martin v. Löwis11437992002-04-12 09:54:03 +000012894as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12895echo "$as_me:$LINENO: checking for $ac_func" >&5
12896echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12897if eval "test \"\${$as_ac_var+set}\" = set"; then
12898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012899else
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 cat >conftest.$ac_ext <<_ACEOF
12901#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012902/* confdefs.h. */
12903_ACEOF
12904cat confdefs.h >>conftest.$ac_ext
12905cat >>conftest.$ac_ext <<_ACEOF
12906/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012907/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012908 which can conflict with char $ac_func (); below.
12909 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012910 <limits.h> exists even on freestanding compilers. Under hpux,
12911 including <limits.h> includes <sys/time.h> and causes problems
12912 checking for functions defined therein. */
12913#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012914# include <limits.h>
12915#else
12916# include <assert.h>
12917#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012918/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012919#ifdef __cplusplus
12920extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012921{
Martin v. Löwis11437992002-04-12 09:54:03 +000012922#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012923/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 builtin and then its argument prototype would still apply. */
12925char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012926/* The GNU C library defines this for functions which it implements
12927 to always fail with ENOSYS. Some functions are actually named
12928 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012929#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012930choke me
12931#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012932char (*f) () = $ac_func;
12933#endif
12934#ifdef __cplusplus
12935}
Guido van Rossume97ee181999-12-20 21:27:22 +000012936#endif
12937
Skip Montanaro6dead952003-09-25 14:50:04 +000012938int
12939main ()
12940{
12941return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 ;
12943 return 0;
12944}
12945_ACEOF
12946rm -f conftest.$ac_objext conftest$ac_exeext
12947if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12948 (eval $ac_link) 2>&5
12949 ac_status=$?
12950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12951 (exit $ac_status); } &&
12952 { ac_try='test -s conftest$ac_exeext'
12953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12954 (eval $ac_try) 2>&5
12955 ac_status=$?
12956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12957 (exit $ac_status); }; }; then
12958 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012959else
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012961sed 's/^/| /' conftest.$ac_ext >&5
12962
Martin v. Löwis11437992002-04-12 09:54:03 +000012963eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012965rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012967echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12968echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12969if test `eval echo '${'$as_ac_var'}'` = yes; then
12970 cat >>confdefs.h <<_ACEOF
12971#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12972_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012973
Guido van Rossume97ee181999-12-20 21:27:22 +000012974fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012975done
Guido van Rossume97ee181999-12-20 21:27:22 +000012976
Michael W. Hudson54241132001-12-07 15:38:26 +000012977
Guido van Rossume97ee181999-12-20 21:27:22 +000012978# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12979# loading of modules.
12980
Martin v. Löwis11437992002-04-12 09:54:03 +000012981echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12982echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012983if test -z "$DYNLOADFILE"
12984then
12985 case $ac_sys_system/$ac_sys_release in
12986 AIX*) DYNLOADFILE="dynload_aix.o";;
12987 BeOS*) DYNLOADFILE="dynload_beos.o";;
12988 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012989 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012990 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012991 *)
12992 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12993 # out any dynamic loading
12994 if test "$ac_cv_func_dlopen" = yes
12995 then DYNLOADFILE="dynload_shlib.o"
12996 else DYNLOADFILE="dynload_stub.o"
12997 fi
12998 ;;
12999 esac
13000fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013001echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13002echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013003if test "$DYNLOADFILE" != "dynload_stub.o"
13004then
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
13006cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013007#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013008_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013009
13010fi
13011
Neil Schemenauer4e425612001-06-19 15:44:15 +000013012# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13013
Michael W. Hudson54241132001-12-07 15:38:26 +000013014
Martin v. Löwis11437992002-04-12 09:54:03 +000013015echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13016echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013017if test -z "$MACHDEP_OBJS"
13018then
Jack Jansene578a632001-08-15 01:27:14 +000013019 MACHDEP_OBJS=$extra_machdep_objs
13020else
13021 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013023echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13024echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013025
Guido van Rossum627b2d71993-12-24 10:39:16 +000013026# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
Martin v. Löwisd5843682002-11-21 20:41:28 +000013098for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013099 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013100 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
13101 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013102 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013103 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013104 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013105 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013106 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013107 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013108 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013109 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013110do
Martin v. Löwis11437992002-04-12 09:54:03 +000013111as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13112echo "$as_me:$LINENO: checking for $ac_func" >&5
13113echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13114if eval "test \"\${$as_ac_var+set}\" = set"; then
13115 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013116else
Martin v. Löwis11437992002-04-12 09:54:03 +000013117 cat >conftest.$ac_ext <<_ACEOF
13118#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013119/* confdefs.h. */
13120_ACEOF
13121cat confdefs.h >>conftest.$ac_ext
13122cat >>conftest.$ac_ext <<_ACEOF
13123/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013124/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013125 which can conflict with char $ac_func (); below.
13126 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013127 <limits.h> exists even on freestanding compilers. Under hpux,
13128 including <limits.h> includes <sys/time.h> and causes problems
13129 checking for functions defined therein. */
13130#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013131# include <limits.h>
13132#else
13133# include <assert.h>
13134#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013135/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013136#ifdef __cplusplus
13137extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013138{
Martin v. Löwis11437992002-04-12 09:54:03 +000013139#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013140/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 builtin and then its argument prototype would still apply. */
13142char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013143/* The GNU C library defines this for functions which it implements
13144 to always fail with ENOSYS. Some functions are actually named
13145 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013146#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013147choke me
13148#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013149char (*f) () = $ac_func;
13150#endif
13151#ifdef __cplusplus
13152}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013153#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154
Skip Montanaro6dead952003-09-25 14:50:04 +000013155int
13156main ()
13157{
13158return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 ;
13160 return 0;
13161}
13162_ACEOF
13163rm -f conftest.$ac_objext conftest$ac_exeext
13164if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13165 (eval $ac_link) 2>&5
13166 ac_status=$?
13167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13168 (exit $ac_status); } &&
13169 { ac_try='test -s conftest$ac_exeext'
13170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13171 (eval $ac_try) 2>&5
13172 ac_status=$?
13173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13174 (exit $ac_status); }; }; then
13175 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013176else
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013178sed 's/^/| /' conftest.$ac_ext >&5
13179
Martin v. Löwis11437992002-04-12 09:54:03 +000013180eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013182rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013183fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013184echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13185echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13186if test `eval echo '${'$as_ac_var'}'` = yes; then
13187 cat >>confdefs.h <<_ACEOF
13188#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13189_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013190
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013191fi
13192done
13193
Michael W. Hudson54241132001-12-07 15:38:26 +000013194
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013195# For some functions, having a definition is not sufficient, since
13196# we want to take their address.
13197echo "$as_me:$LINENO: checking for chroot" >&5
13198echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13199cat >conftest.$ac_ext <<_ACEOF
13200#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013201/* confdefs.h. */
13202_ACEOF
13203cat confdefs.h >>conftest.$ac_ext
13204cat >>conftest.$ac_ext <<_ACEOF
13205/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013206#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013207int
13208main ()
13209{
13210void *x=chroot
13211 ;
13212 return 0;
13213}
13214_ACEOF
13215rm -f conftest.$ac_objext
13216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13217 (eval $ac_compile) 2>&5
13218 ac_status=$?
13219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13220 (exit $ac_status); } &&
13221 { ac_try='test -s conftest.$ac_objext'
13222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13223 (eval $ac_try) 2>&5
13224 ac_status=$?
13225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13226 (exit $ac_status); }; }; then
13227
13228cat >>confdefs.h <<\_ACEOF
13229#define HAVE_CHROOT 1
13230_ACEOF
13231
13232 echo "$as_me:$LINENO: result: yes" >&5
13233echo "${ECHO_T}yes" >&6
13234else
13235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013236sed 's/^/| /' conftest.$ac_ext >&5
13237
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013238echo "$as_me:$LINENO: result: no" >&5
13239echo "${ECHO_T}no" >&6
13240
13241fi
13242rm -f conftest.$ac_objext conftest.$ac_ext
13243echo "$as_me:$LINENO: checking for link" >&5
13244echo $ECHO_N "checking for link... $ECHO_C" >&6
13245cat >conftest.$ac_ext <<_ACEOF
13246#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013247/* confdefs.h. */
13248_ACEOF
13249cat confdefs.h >>conftest.$ac_ext
13250cat >>conftest.$ac_ext <<_ACEOF
13251/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013252#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013253int
13254main ()
13255{
13256void *x=link
13257 ;
13258 return 0;
13259}
13260_ACEOF
13261rm -f conftest.$ac_objext
13262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13263 (eval $ac_compile) 2>&5
13264 ac_status=$?
13265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13266 (exit $ac_status); } &&
13267 { ac_try='test -s conftest.$ac_objext'
13268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13269 (eval $ac_try) 2>&5
13270 ac_status=$?
13271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13272 (exit $ac_status); }; }; then
13273
13274cat >>confdefs.h <<\_ACEOF
13275#define HAVE_LINK 1
13276_ACEOF
13277
13278 echo "$as_me:$LINENO: result: yes" >&5
13279echo "${ECHO_T}yes" >&6
13280else
13281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013282sed 's/^/| /' conftest.$ac_ext >&5
13283
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013284echo "$as_me:$LINENO: result: no" >&5
13285echo "${ECHO_T}no" >&6
13286
13287fi
13288rm -f conftest.$ac_objext conftest.$ac_ext
13289echo "$as_me:$LINENO: checking for symlink" >&5
13290echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13291cat >conftest.$ac_ext <<_ACEOF
13292#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013293/* confdefs.h. */
13294_ACEOF
13295cat confdefs.h >>conftest.$ac_ext
13296cat >>conftest.$ac_ext <<_ACEOF
13297/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013298#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013299int
13300main ()
13301{
13302void *x=symlink
13303 ;
13304 return 0;
13305}
13306_ACEOF
13307rm -f conftest.$ac_objext
13308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13309 (eval $ac_compile) 2>&5
13310 ac_status=$?
13311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13312 (exit $ac_status); } &&
13313 { ac_try='test -s conftest.$ac_objext'
13314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13315 (eval $ac_try) 2>&5
13316 ac_status=$?
13317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13318 (exit $ac_status); }; }; then
13319
13320cat >>confdefs.h <<\_ACEOF
13321#define HAVE_SYMLINK 1
13322_ACEOF
13323
13324 echo "$as_me:$LINENO: result: yes" >&5
13325echo "${ECHO_T}yes" >&6
13326else
13327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013328sed 's/^/| /' conftest.$ac_ext >&5
13329
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013330echo "$as_me:$LINENO: result: no" >&5
13331echo "${ECHO_T}no" >&6
13332
13333fi
13334rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013335echo "$as_me:$LINENO: checking for fchdir" >&5
13336echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13337cat >conftest.$ac_ext <<_ACEOF
13338#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013339/* confdefs.h. */
13340_ACEOF
13341cat confdefs.h >>conftest.$ac_ext
13342cat >>conftest.$ac_ext <<_ACEOF
13343/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013344#include <unistd.h>
13345int
13346main ()
13347{
13348void *x=fchdir
13349 ;
13350 return 0;
13351}
13352_ACEOF
13353rm -f conftest.$ac_objext
13354if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13355 (eval $ac_compile) 2>&5
13356 ac_status=$?
13357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13358 (exit $ac_status); } &&
13359 { ac_try='test -s conftest.$ac_objext'
13360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13361 (eval $ac_try) 2>&5
13362 ac_status=$?
13363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13364 (exit $ac_status); }; }; then
13365
13366cat >>confdefs.h <<\_ACEOF
13367#define HAVE_FCHDIR 1
13368_ACEOF
13369
13370 echo "$as_me:$LINENO: result: yes" >&5
13371echo "${ECHO_T}yes" >&6
13372else
13373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013374sed 's/^/| /' conftest.$ac_ext >&5
13375
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013376echo "$as_me:$LINENO: result: no" >&5
13377echo "${ECHO_T}no" >&6
13378
13379fi
13380rm -f conftest.$ac_objext conftest.$ac_ext
13381echo "$as_me:$LINENO: checking for fsync" >&5
13382echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13383cat >conftest.$ac_ext <<_ACEOF
13384#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013385/* confdefs.h. */
13386_ACEOF
13387cat confdefs.h >>conftest.$ac_ext
13388cat >>conftest.$ac_ext <<_ACEOF
13389/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013390#include <unistd.h>
13391int
13392main ()
13393{
13394void *x=fsync
13395 ;
13396 return 0;
13397}
13398_ACEOF
13399rm -f conftest.$ac_objext
13400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13401 (eval $ac_compile) 2>&5
13402 ac_status=$?
13403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404 (exit $ac_status); } &&
13405 { ac_try='test -s conftest.$ac_objext'
13406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13407 (eval $ac_try) 2>&5
13408 ac_status=$?
13409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13410 (exit $ac_status); }; }; then
13411
13412cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013413#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013414_ACEOF
13415
13416 echo "$as_me:$LINENO: result: yes" >&5
13417echo "${ECHO_T}yes" >&6
13418else
13419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013420sed 's/^/| /' conftest.$ac_ext >&5
13421
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013422echo "$as_me:$LINENO: result: no" >&5
13423echo "${ECHO_T}no" >&6
13424
13425fi
13426rm -f conftest.$ac_objext conftest.$ac_ext
13427echo "$as_me:$LINENO: checking for fdatasync" >&5
13428echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13429cat >conftest.$ac_ext <<_ACEOF
13430#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013431/* confdefs.h. */
13432_ACEOF
13433cat confdefs.h >>conftest.$ac_ext
13434cat >>conftest.$ac_ext <<_ACEOF
13435/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013436#include <unistd.h>
13437int
13438main ()
13439{
13440void *x=fdatasync
13441 ;
13442 return 0;
13443}
13444_ACEOF
13445rm -f conftest.$ac_objext
13446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13447 (eval $ac_compile) 2>&5
13448 ac_status=$?
13449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13450 (exit $ac_status); } &&
13451 { ac_try='test -s conftest.$ac_objext'
13452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13453 (eval $ac_try) 2>&5
13454 ac_status=$?
13455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13456 (exit $ac_status); }; }; then
13457
13458cat >>confdefs.h <<\_ACEOF
13459#define HAVE_FDATASYNC 1
13460_ACEOF
13461
13462 echo "$as_me:$LINENO: result: yes" >&5
13463echo "${ECHO_T}yes" >&6
13464else
13465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013466sed 's/^/| /' conftest.$ac_ext >&5
13467
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013468echo "$as_me:$LINENO: result: no" >&5
13469echo "${ECHO_T}no" >&6
13470
13471fi
13472rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013473
Martin v. Löwisd5843682002-11-21 20:41:28 +000013474# On some systems (eg. FreeBSD 5), we would find a definition of the
13475# functions ctermid_r, setgroups in the library, but no prototype
13476# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13477# address to avoid compiler warnings and potential miscompilations
13478# because of the missing prototypes.
13479
13480echo "$as_me:$LINENO: checking for ctermid_r" >&5
13481echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13482cat >conftest.$ac_ext <<_ACEOF
13483#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013484/* confdefs.h. */
13485_ACEOF
13486cat confdefs.h >>conftest.$ac_ext
13487cat >>conftest.$ac_ext <<_ACEOF
13488/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013489
13490#include "confdefs.h"
13491#include <stdio.h>
13492
Martin v. Löwisd5843682002-11-21 20:41:28 +000013493int
13494main ()
13495{
13496void* p = ctermid_r
13497 ;
13498 return 0;
13499}
13500_ACEOF
13501rm -f conftest.$ac_objext
13502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13503 (eval $ac_compile) 2>&5
13504 ac_status=$?
13505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13506 (exit $ac_status); } &&
13507 { ac_try='test -s conftest.$ac_objext'
13508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13509 (eval $ac_try) 2>&5
13510 ac_status=$?
13511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13512 (exit $ac_status); }; }; then
13513
13514cat >>confdefs.h <<\_ACEOF
13515#define HAVE_CTERMID_R 1
13516_ACEOF
13517
13518 echo "$as_me:$LINENO: result: yes" >&5
13519echo "${ECHO_T}yes" >&6
13520else
13521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013522sed 's/^/| /' conftest.$ac_ext >&5
13523
Martin v. Löwisd5843682002-11-21 20:41:28 +000013524echo "$as_me:$LINENO: result: no" >&5
13525echo "${ECHO_T}no" >&6
13526
13527fi
13528rm -f conftest.$ac_objext conftest.$ac_ext
13529
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013530echo "$as_me:$LINENO: checking for flock" >&5
13531echo $ECHO_N "checking for flock... $ECHO_C" >&6
13532cat >conftest.$ac_ext <<_ACEOF
13533#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013534/* confdefs.h. */
13535_ACEOF
13536cat confdefs.h >>conftest.$ac_ext
13537cat >>conftest.$ac_ext <<_ACEOF
13538/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013539
13540#include "confdefs.h"
13541#include <sys/file.h>
13542
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013543int
13544main ()
13545{
13546void* p = flock
13547 ;
13548 return 0;
13549}
13550_ACEOF
13551rm -f conftest.$ac_objext
13552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13553 (eval $ac_compile) 2>&5
13554 ac_status=$?
13555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13556 (exit $ac_status); } &&
13557 { ac_try='test -s conftest.$ac_objext'
13558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13559 (eval $ac_try) 2>&5
13560 ac_status=$?
13561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13562 (exit $ac_status); }; }; then
13563
13564cat >>confdefs.h <<\_ACEOF
13565#define HAVE_FLOCK 1
13566_ACEOF
13567
13568 echo "$as_me:$LINENO: result: yes" >&5
13569echo "${ECHO_T}yes" >&6
13570else
13571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013572sed 's/^/| /' conftest.$ac_ext >&5
13573
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013574echo "$as_me:$LINENO: result: no" >&5
13575echo "${ECHO_T}no" >&6
13576
13577fi
13578rm -f conftest.$ac_objext conftest.$ac_ext
13579
13580echo "$as_me:$LINENO: checking for getpagesize" >&5
13581echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
13582cat >conftest.$ac_ext <<_ACEOF
13583#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013584/* confdefs.h. */
13585_ACEOF
13586cat confdefs.h >>conftest.$ac_ext
13587cat >>conftest.$ac_ext <<_ACEOF
13588/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013589
13590#include "confdefs.h"
13591#include <unistd.h>
13592
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013593int
13594main ()
13595{
13596void* p = getpagesize
13597 ;
13598 return 0;
13599}
13600_ACEOF
13601rm -f conftest.$ac_objext
13602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13603 (eval $ac_compile) 2>&5
13604 ac_status=$?
13605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13606 (exit $ac_status); } &&
13607 { ac_try='test -s conftest.$ac_objext'
13608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13609 (eval $ac_try) 2>&5
13610 ac_status=$?
13611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13612 (exit $ac_status); }; }; then
13613
13614cat >>confdefs.h <<\_ACEOF
13615#define HAVE_GETPAGESIZE 1
13616_ACEOF
13617
13618 echo "$as_me:$LINENO: result: yes" >&5
13619echo "${ECHO_T}yes" >&6
13620else
13621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013622sed 's/^/| /' conftest.$ac_ext >&5
13623
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013624echo "$as_me:$LINENO: result: no" >&5
13625echo "${ECHO_T}no" >&6
13626
13627fi
13628rm -f conftest.$ac_objext conftest.$ac_ext
13629
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013630for ac_prog in true
13631do
13632 # Extract the first word of "$ac_prog", so it can be a program name with args.
13633set dummy $ac_prog; ac_word=$2
13634echo "$as_me:$LINENO: checking for $ac_word" >&5
13635echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13636if test "${ac_cv_prog_TRUE+set}" = set; then
13637 echo $ECHO_N "(cached) $ECHO_C" >&6
13638else
13639 if test -n "$TRUE"; then
13640 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
13641else
13642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13643for as_dir in $PATH
13644do
13645 IFS=$as_save_IFS
13646 test -z "$as_dir" && as_dir=.
13647 for ac_exec_ext in '' $ac_executable_extensions; do
13648 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13649 ac_cv_prog_TRUE="$ac_prog"
13650 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13651 break 2
13652 fi
13653done
13654done
13655
13656fi
13657fi
13658TRUE=$ac_cv_prog_TRUE
13659if test -n "$TRUE"; then
13660 echo "$as_me:$LINENO: result: $TRUE" >&5
13661echo "${ECHO_T}$TRUE" >&6
13662else
13663 echo "$as_me:$LINENO: result: no" >&5
13664echo "${ECHO_T}no" >&6
13665fi
13666
13667 test -n "$TRUE" && break
13668done
13669test -n "$TRUE" || TRUE="/bin/true"
13670
13671
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013672echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
13673echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
13674if test "${ac_cv_lib_c_inet_aton+set}" = set; then
13675 echo $ECHO_N "(cached) $ECHO_C" >&6
13676else
13677 ac_check_lib_save_LIBS=$LIBS
13678LIBS="-lc $LIBS"
13679cat >conftest.$ac_ext <<_ACEOF
13680#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013681/* confdefs.h. */
13682_ACEOF
13683cat confdefs.h >>conftest.$ac_ext
13684cat >>conftest.$ac_ext <<_ACEOF
13685/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013686
13687/* Override any gcc2 internal prototype to avoid an error. */
13688#ifdef __cplusplus
13689extern "C"
13690#endif
13691/* We use char because int might match the return type of a gcc2
13692 builtin and then its argument prototype would still apply. */
13693char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013694int
13695main ()
13696{
13697inet_aton ();
13698 ;
13699 return 0;
13700}
13701_ACEOF
13702rm -f conftest.$ac_objext conftest$ac_exeext
13703if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13704 (eval $ac_link) 2>&5
13705 ac_status=$?
13706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707 (exit $ac_status); } &&
13708 { ac_try='test -s conftest$ac_exeext'
13709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13710 (eval $ac_try) 2>&5
13711 ac_status=$?
13712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713 (exit $ac_status); }; }; then
13714 ac_cv_lib_c_inet_aton=yes
13715else
13716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013717sed 's/^/| /' conftest.$ac_ext >&5
13718
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013719ac_cv_lib_c_inet_aton=no
13720fi
13721rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13722LIBS=$ac_check_lib_save_LIBS
13723fi
13724echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
13725echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
13726if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013727 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013728else
13729
13730echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
13731echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
13732if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
13733 echo $ECHO_N "(cached) $ECHO_C" >&6
13734else
13735 ac_check_lib_save_LIBS=$LIBS
13736LIBS="-lresolv $LIBS"
13737cat >conftest.$ac_ext <<_ACEOF
13738#line $LINENO "configure"
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öwis95c419b2003-05-03 12:10:48 +000013744
13745/* Override any gcc2 internal prototype to avoid an error. */
13746#ifdef __cplusplus
13747extern "C"
13748#endif
13749/* We use char because int might match the return type of a gcc2
13750 builtin and then its argument prototype would still apply. */
13751char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013752int
13753main ()
13754{
13755inet_aton ();
13756 ;
13757 return 0;
13758}
13759_ACEOF
13760rm -f conftest.$ac_objext conftest$ac_exeext
13761if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13762 (eval $ac_link) 2>&5
13763 ac_status=$?
13764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13765 (exit $ac_status); } &&
13766 { ac_try='test -s conftest$ac_exeext'
13767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13768 (eval $ac_try) 2>&5
13769 ac_status=$?
13770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13771 (exit $ac_status); }; }; then
13772 ac_cv_lib_resolv_inet_aton=yes
13773else
13774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013775sed 's/^/| /' conftest.$ac_ext >&5
13776
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013777ac_cv_lib_resolv_inet_aton=no
13778fi
13779rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13780LIBS=$ac_check_lib_save_LIBS
13781fi
13782echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13783echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13784if test $ac_cv_lib_resolv_inet_aton = yes; then
13785 cat >>confdefs.h <<_ACEOF
13786#define HAVE_LIBRESOLV 1
13787_ACEOF
13788
13789 LIBS="-lresolv $LIBS"
13790
13791fi
13792
13793
13794fi
13795
13796
Martin v. Löwise9416172003-05-03 10:12:45 +000013797echo "$as_me:$LINENO: checking for hstrerror" >&5
13798echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13799cat >conftest.$ac_ext <<_ACEOF
13800#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013801/* confdefs.h. */
13802_ACEOF
13803cat confdefs.h >>conftest.$ac_ext
13804cat >>conftest.$ac_ext <<_ACEOF
13805/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013806
13807#include "confdefs.h"
13808#include <netdb.h>
13809
Martin v. Löwise9416172003-05-03 10:12:45 +000013810int
13811main ()
13812{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013813void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013814 ;
13815 return 0;
13816}
13817_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013818rm -f conftest.$ac_objext conftest$ac_exeext
13819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13820 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013821 ac_status=$?
13822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13823 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013824 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13826 (eval $ac_try) 2>&5
13827 ac_status=$?
13828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13829 (exit $ac_status); }; }; then
13830
13831cat >>confdefs.h <<\_ACEOF
13832#define HAVE_HSTRERROR 1
13833_ACEOF
13834
13835 echo "$as_me:$LINENO: result: yes" >&5
13836echo "${ECHO_T}yes" >&6
13837else
13838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013839sed 's/^/| /' conftest.$ac_ext >&5
13840
Martin v. Löwise9416172003-05-03 10:12:45 +000013841echo "$as_me:$LINENO: result: no" >&5
13842echo "${ECHO_T}no" >&6
13843
13844fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013845rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013846
13847echo "$as_me:$LINENO: checking for inet_aton" >&5
13848echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13849cat >conftest.$ac_ext <<_ACEOF
13850#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013851/* confdefs.h. */
13852_ACEOF
13853cat confdefs.h >>conftest.$ac_ext
13854cat >>conftest.$ac_ext <<_ACEOF
13855/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013856
13857#include "confdefs.h"
13858#include <sys/socket.h>
13859#include <netinet/in.h>
13860#include <arpa/inet.h>
13861
Martin v. Löwise9416172003-05-03 10:12:45 +000013862int
13863main ()
13864{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013865void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013866 ;
13867 return 0;
13868}
13869_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013870rm -f conftest.$ac_objext conftest$ac_exeext
13871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13872 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013873 ac_status=$?
13874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013876 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13878 (eval $ac_try) 2>&5
13879 ac_status=$?
13880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881 (exit $ac_status); }; }; then
13882
13883cat >>confdefs.h <<\_ACEOF
13884#define HAVE_INET_ATON 1
13885_ACEOF
13886
13887 echo "$as_me:$LINENO: result: yes" >&5
13888echo "${ECHO_T}yes" >&6
13889else
13890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013891sed 's/^/| /' conftest.$ac_ext >&5
13892
Martin v. Löwise9416172003-05-03 10:12:45 +000013893echo "$as_me:$LINENO: result: no" >&5
13894echo "${ECHO_T}no" >&6
13895
13896fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013897rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013898
13899echo "$as_me:$LINENO: checking for inet_pton" >&5
13900echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13901cat >conftest.$ac_ext <<_ACEOF
13902#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013903/* confdefs.h. */
13904_ACEOF
13905cat confdefs.h >>conftest.$ac_ext
13906cat >>conftest.$ac_ext <<_ACEOF
13907/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013908
13909#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013910#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013911#include <sys/socket.h>
13912#include <netinet/in.h>
13913#include <arpa/inet.h>
13914
Martin v. Löwise9416172003-05-03 10:12:45 +000013915int
13916main ()
13917{
13918void* p = inet_pton
13919 ;
13920 return 0;
13921}
13922_ACEOF
13923rm -f conftest.$ac_objext
13924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13925 (eval $ac_compile) 2>&5
13926 ac_status=$?
13927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13928 (exit $ac_status); } &&
13929 { ac_try='test -s conftest.$ac_objext'
13930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13931 (eval $ac_try) 2>&5
13932 ac_status=$?
13933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13934 (exit $ac_status); }; }; then
13935
13936cat >>confdefs.h <<\_ACEOF
13937#define HAVE_INET_PTON 1
13938_ACEOF
13939
13940 echo "$as_me:$LINENO: result: yes" >&5
13941echo "${ECHO_T}yes" >&6
13942else
13943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013944sed 's/^/| /' conftest.$ac_ext >&5
13945
Martin v. Löwise9416172003-05-03 10:12:45 +000013946echo "$as_me:$LINENO: result: no" >&5
13947echo "${ECHO_T}no" >&6
13948
13949fi
13950rm -f conftest.$ac_objext conftest.$ac_ext
13951
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013952# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013953echo "$as_me:$LINENO: checking for setgroups" >&5
13954echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13955cat >conftest.$ac_ext <<_ACEOF
13956#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013957/* confdefs.h. */
13958_ACEOF
13959cat confdefs.h >>conftest.$ac_ext
13960cat >>conftest.$ac_ext <<_ACEOF
13961/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013962
13963#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013964#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013965#ifdef HAVE_GRP_H
13966#include <grp.h>
13967#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013968
Martin v. Löwisd5843682002-11-21 20:41:28 +000013969int
13970main ()
13971{
13972void* p = setgroups
13973 ;
13974 return 0;
13975}
13976_ACEOF
13977rm -f conftest.$ac_objext
13978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13979 (eval $ac_compile) 2>&5
13980 ac_status=$?
13981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13982 (exit $ac_status); } &&
13983 { ac_try='test -s conftest.$ac_objext'
13984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13985 (eval $ac_try) 2>&5
13986 ac_status=$?
13987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13988 (exit $ac_status); }; }; then
13989
13990cat >>confdefs.h <<\_ACEOF
13991#define HAVE_SETGROUPS 1
13992_ACEOF
13993
13994 echo "$as_me:$LINENO: result: yes" >&5
13995echo "${ECHO_T}yes" >&6
13996else
13997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013998sed 's/^/| /' conftest.$ac_ext >&5
13999
Martin v. Löwisd5843682002-11-21 20:41:28 +000014000echo "$as_me:$LINENO: result: no" >&5
14001echo "${ECHO_T}no" >&6
14002
14003fi
14004rm -f conftest.$ac_objext conftest.$ac_ext
14005
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014006# check for openpty and forkpty
14007
Martin v. Löwis11437992002-04-12 09:54:03 +000014008
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014009for ac_func in openpty
14010do
Martin v. Löwis11437992002-04-12 09:54:03 +000014011as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14012echo "$as_me:$LINENO: checking for $ac_func" >&5
14013echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14014if eval "test \"\${$as_ac_var+set}\" = set"; then
14015 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014016else
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 cat >conftest.$ac_ext <<_ACEOF
14018#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014019/* confdefs.h. */
14020_ACEOF
14021cat confdefs.h >>conftest.$ac_ext
14022cat >>conftest.$ac_ext <<_ACEOF
14023/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014024/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014025 which can conflict with char $ac_func (); below.
14026 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014027 <limits.h> exists even on freestanding compilers. Under hpux,
14028 including <limits.h> includes <sys/time.h> and causes problems
14029 checking for functions defined therein. */
14030#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014031# include <limits.h>
14032#else
14033# include <assert.h>
14034#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014035/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014036#ifdef __cplusplus
14037extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014038{
Martin v. Löwis11437992002-04-12 09:54:03 +000014039#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014040/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 builtin and then its argument prototype would still apply. */
14042char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014043/* The GNU C library defines this for functions which it implements
14044 to always fail with ENOSYS. Some functions are actually named
14045 something starting with __ and the normal name is an alias. */
14046#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14047choke me
14048#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014049char (*f) () = $ac_func;
14050#endif
14051#ifdef __cplusplus
14052}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014053#endif
14054
Skip Montanaro6dead952003-09-25 14:50:04 +000014055int
14056main ()
14057{
14058return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 ;
14060 return 0;
14061}
14062_ACEOF
14063rm -f conftest.$ac_objext conftest$ac_exeext
14064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14065 (eval $ac_link) 2>&5
14066 ac_status=$?
14067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068 (exit $ac_status); } &&
14069 { ac_try='test -s conftest$ac_exeext'
14070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14071 (eval $ac_try) 2>&5
14072 ac_status=$?
14073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14074 (exit $ac_status); }; }; then
14075 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014076else
Martin v. Löwis11437992002-04-12 09:54:03 +000014077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014078sed 's/^/| /' conftest.$ac_ext >&5
14079
Martin v. Löwis11437992002-04-12 09:54:03 +000014080eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014082rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014084echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14085echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14086if test `eval echo '${'$as_ac_var'}'` = yes; then
14087 cat >>confdefs.h <<_ACEOF
14088#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14089_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014090
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014091else
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14093echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14094if test "${ac_cv_lib_util_openpty+set}" = set; then
14095 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014096else
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014098LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014099cat >conftest.$ac_ext <<_ACEOF
14100#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014101/* confdefs.h. */
14102_ACEOF
14103cat confdefs.h >>conftest.$ac_ext
14104cat >>conftest.$ac_ext <<_ACEOF
14105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014106
Fred Drake8cef4cf2000-06-28 16:40:38 +000014107/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014108#ifdef __cplusplus
14109extern "C"
14110#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014111/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 builtin and then its argument prototype would still apply. */
14113char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014114int
14115main ()
14116{
14117openpty ();
14118 ;
14119 return 0;
14120}
14121_ACEOF
14122rm -f conftest.$ac_objext conftest$ac_exeext
14123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14124 (eval $ac_link) 2>&5
14125 ac_status=$?
14126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14127 (exit $ac_status); } &&
14128 { ac_try='test -s conftest$ac_exeext'
14129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14130 (eval $ac_try) 2>&5
14131 ac_status=$?
14132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14133 (exit $ac_status); }; }; then
14134 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014135else
Martin v. Löwis11437992002-04-12 09:54:03 +000014136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014137sed 's/^/| /' conftest.$ac_ext >&5
14138
Martin v. Löwis11437992002-04-12 09:54:03 +000014139ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014141rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14142LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014144echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14145echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14146if test $ac_cv_lib_util_openpty = yes; then
14147 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014148#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014149_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014150 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014151fi
14152
14153fi
14154done
14155
Martin v. Löwis11437992002-04-12 09:54:03 +000014156
Fred Drake8cef4cf2000-06-28 16:40:38 +000014157for ac_func in forkpty
14158do
Martin v. Löwis11437992002-04-12 09:54:03 +000014159as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14160echo "$as_me:$LINENO: checking for $ac_func" >&5
14161echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14162if eval "test \"\${$as_ac_var+set}\" = set"; then
14163 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014164else
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 cat >conftest.$ac_ext <<_ACEOF
14166#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014167/* confdefs.h. */
14168_ACEOF
14169cat confdefs.h >>conftest.$ac_ext
14170cat >>conftest.$ac_ext <<_ACEOF
14171/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014172/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014173 which can conflict with char $ac_func (); below.
14174 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014175 <limits.h> exists even on freestanding compilers. Under hpux,
14176 including <limits.h> includes <sys/time.h> and causes problems
14177 checking for functions defined therein. */
14178#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014179# include <limits.h>
14180#else
14181# include <assert.h>
14182#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014183/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014184#ifdef __cplusplus
14185extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014186{
Martin v. Löwis11437992002-04-12 09:54:03 +000014187#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014188/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 builtin and then its argument prototype would still apply. */
14190char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014191/* The GNU C library defines this for functions which it implements
14192 to always fail with ENOSYS. Some functions are actually named
14193 something starting with __ and the normal name is an alias. */
14194#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14195choke me
14196#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014197char (*f) () = $ac_func;
14198#endif
14199#ifdef __cplusplus
14200}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014201#endif
14202
Skip Montanaro6dead952003-09-25 14:50:04 +000014203int
14204main ()
14205{
14206return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 ;
14208 return 0;
14209}
14210_ACEOF
14211rm -f conftest.$ac_objext conftest$ac_exeext
14212if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14213 (eval $ac_link) 2>&5
14214 ac_status=$?
14215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14216 (exit $ac_status); } &&
14217 { ac_try='test -s conftest$ac_exeext'
14218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14219 (eval $ac_try) 2>&5
14220 ac_status=$?
14221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14222 (exit $ac_status); }; }; then
14223 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014224else
Martin v. Löwis11437992002-04-12 09:54:03 +000014225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014226sed 's/^/| /' conftest.$ac_ext >&5
14227
Martin v. Löwis11437992002-04-12 09:54:03 +000014228eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014229fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014232echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14233echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14234if test `eval echo '${'$as_ac_var'}'` = yes; then
14235 cat >>confdefs.h <<_ACEOF
14236#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14237_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014238
Fred Drake8cef4cf2000-06-28 16:40:38 +000014239else
Martin v. Löwis11437992002-04-12 09:54:03 +000014240 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14241echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14242if test "${ac_cv_lib_util_forkpty+set}" = set; then
14243 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014244else
Martin v. Löwis11437992002-04-12 09:54:03 +000014245 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014246LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014247cat >conftest.$ac_ext <<_ACEOF
14248#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014249/* confdefs.h. */
14250_ACEOF
14251cat confdefs.h >>conftest.$ac_ext
14252cat >>conftest.$ac_ext <<_ACEOF
14253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014254
Fred Drake8cef4cf2000-06-28 16:40:38 +000014255/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014256#ifdef __cplusplus
14257extern "C"
14258#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014259/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014260 builtin and then its argument prototype would still apply. */
14261char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014262int
14263main ()
14264{
14265forkpty ();
14266 ;
14267 return 0;
14268}
14269_ACEOF
14270rm -f conftest.$ac_objext conftest$ac_exeext
14271if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14272 (eval $ac_link) 2>&5
14273 ac_status=$?
14274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14275 (exit $ac_status); } &&
14276 { ac_try='test -s conftest$ac_exeext'
14277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14278 (eval $ac_try) 2>&5
14279 ac_status=$?
14280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14281 (exit $ac_status); }; }; then
14282 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014283else
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014285sed 's/^/| /' conftest.$ac_ext >&5
14286
Martin v. Löwis11437992002-04-12 09:54:03 +000014287ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014288fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014289rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14290LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014292echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14293echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14294if test $ac_cv_lib_util_forkpty = yes; then
14295 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014296#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014297_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014298 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014299fi
14300
14301fi
14302done
14303
Jack Jansendd19cf82001-12-06 22:36:17 +000014304
Michael W. Hudson54241132001-12-07 15:38:26 +000014305# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014306
14307
14308
14309
14310
14311
Fred Drake8cef4cf2000-06-28 16:40:38 +000014312for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14313do
Martin v. Löwis11437992002-04-12 09:54:03 +000014314as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14315echo "$as_me:$LINENO: checking for $ac_func" >&5
14316echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14317if eval "test \"\${$as_ac_var+set}\" = set"; then
14318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014319else
Martin v. Löwis11437992002-04-12 09:54:03 +000014320 cat >conftest.$ac_ext <<_ACEOF
14321#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014322/* confdefs.h. */
14323_ACEOF
14324cat confdefs.h >>conftest.$ac_ext
14325cat >>conftest.$ac_ext <<_ACEOF
14326/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014327/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014328 which can conflict with char $ac_func (); below.
14329 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014330 <limits.h> exists even on freestanding compilers. Under hpux,
14331 including <limits.h> includes <sys/time.h> and causes problems
14332 checking for functions defined therein. */
14333#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014334# include <limits.h>
14335#else
14336# include <assert.h>
14337#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014338/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014339#ifdef __cplusplus
14340extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014341{
Martin v. Löwis11437992002-04-12 09:54:03 +000014342#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014343/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 builtin and then its argument prototype would still apply. */
14345char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014346/* The GNU C library defines this for functions which it implements
14347 to always fail with ENOSYS. Some functions are actually named
14348 something starting with __ and the normal name is an alias. */
14349#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14350choke me
14351#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014352char (*f) () = $ac_func;
14353#endif
14354#ifdef __cplusplus
14355}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014356#endif
14357
Skip Montanaro6dead952003-09-25 14:50:04 +000014358int
14359main ()
14360{
14361return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014362 ;
14363 return 0;
14364}
14365_ACEOF
14366rm -f conftest.$ac_objext conftest$ac_exeext
14367if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14368 (eval $ac_link) 2>&5
14369 ac_status=$?
14370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14371 (exit $ac_status); } &&
14372 { ac_try='test -s conftest$ac_exeext'
14373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14374 (eval $ac_try) 2>&5
14375 ac_status=$?
14376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14377 (exit $ac_status); }; }; then
14378 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014379else
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014381sed 's/^/| /' conftest.$ac_ext >&5
14382
Martin v. Löwis11437992002-04-12 09:54:03 +000014383eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014385rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014387echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14388echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14389if test `eval echo '${'$as_ac_var'}'` = yes; then
14390 cat >>confdefs.h <<_ACEOF
14391#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14392_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014393
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014394fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014395done
14396
Michael W. Hudson54241132001-12-07 15:38:26 +000014397
Martin v. Löwis11437992002-04-12 09:54:03 +000014398
14399
14400
14401
14402
Martin v. Löwis1142de32002-03-29 16:28:31 +000014403for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014404do
Martin v. Löwis11437992002-04-12 09:54:03 +000014405as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14406echo "$as_me:$LINENO: checking for $ac_func" >&5
14407echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14408if eval "test \"\${$as_ac_var+set}\" = set"; then
14409 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014410else
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 cat >conftest.$ac_ext <<_ACEOF
14412#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014413/* confdefs.h. */
14414_ACEOF
14415cat confdefs.h >>conftest.$ac_ext
14416cat >>conftest.$ac_ext <<_ACEOF
14417/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014418/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014419 which can conflict with char $ac_func (); below.
14420 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014421 <limits.h> exists even on freestanding compilers. Under hpux,
14422 including <limits.h> includes <sys/time.h> and causes problems
14423 checking for functions defined therein. */
14424#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014425# include <limits.h>
14426#else
14427# include <assert.h>
14428#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014429/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014430#ifdef __cplusplus
14431extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014432{
Martin v. Löwis11437992002-04-12 09:54:03 +000014433#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014434/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 builtin and then its argument prototype would still apply. */
14436char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014437/* The GNU C library defines this for functions which it implements
14438 to always fail with ENOSYS. Some functions are actually named
14439 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014440#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014441choke me
14442#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014443char (*f) () = $ac_func;
14444#endif
14445#ifdef __cplusplus
14446}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014447#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014448
Skip Montanaro6dead952003-09-25 14:50:04 +000014449int
14450main ()
14451{
14452return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 ;
14454 return 0;
14455}
14456_ACEOF
14457rm -f conftest.$ac_objext conftest$ac_exeext
14458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14459 (eval $ac_link) 2>&5
14460 ac_status=$?
14461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14462 (exit $ac_status); } &&
14463 { ac_try='test -s conftest$ac_exeext'
14464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14465 (eval $ac_try) 2>&5
14466 ac_status=$?
14467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14468 (exit $ac_status); }; }; then
14469 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014470else
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014472sed 's/^/| /' conftest.$ac_ext >&5
14473
Martin v. Löwis11437992002-04-12 09:54:03 +000014474eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014476rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000014477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014478echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14479echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14480if test `eval echo '${'$as_ac_var'}'` = yes; then
14481 cat >>confdefs.h <<_ACEOF
14482#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14483_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000014484
Martin v. Löwis1142de32002-03-29 16:28:31 +000014485else
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014487fi
14488done
14489
14490
Martin v. Löwis11437992002-04-12 09:54:03 +000014491
Martin v. Löwis1142de32002-03-29 16:28:31 +000014492for ac_func in getpgrp
14493do
Martin v. Löwis11437992002-04-12 09:54:03 +000014494as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14495echo "$as_me:$LINENO: checking for $ac_func" >&5
14496echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14497if eval "test \"\${$as_ac_var+set}\" = set"; then
14498 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000014499else
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 cat >conftest.$ac_ext <<_ACEOF
14501#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014502/* confdefs.h. */
14503_ACEOF
14504cat confdefs.h >>conftest.$ac_ext
14505cat >>conftest.$ac_ext <<_ACEOF
14506/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000014507/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014508 which can conflict with char $ac_func (); below.
14509 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014510 <limits.h> exists even on freestanding compilers. Under hpux,
14511 including <limits.h> includes <sys/time.h> and causes problems
14512 checking for functions defined therein. */
14513#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014514# include <limits.h>
14515#else
14516# include <assert.h>
14517#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014518/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014519#ifdef __cplusplus
14520extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014521{
Martin v. Löwis11437992002-04-12 09:54:03 +000014522#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014523/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 builtin and then its argument prototype would still apply. */
14525char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000014526/* The GNU C library defines this for functions which it implements
14527 to always fail with ENOSYS. Some functions are actually named
14528 something starting with __ and the normal name is an alias. */
14529#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14530choke me
14531#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014532char (*f) () = $ac_func;
14533#endif
14534#ifdef __cplusplus
14535}
Martin v. Löwis1142de32002-03-29 16:28:31 +000014536#endif
14537
Skip Montanaro6dead952003-09-25 14:50:04 +000014538int
14539main ()
14540{
14541return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014542 ;
14543 return 0;
14544}
14545_ACEOF
14546rm -f conftest.$ac_objext conftest$ac_exeext
14547if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14548 (eval $ac_link) 2>&5
14549 ac_status=$?
14550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 (exit $ac_status); } &&
14552 { ac_try='test -s conftest$ac_exeext'
14553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14554 (eval $ac_try) 2>&5
14555 ac_status=$?
14556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14557 (exit $ac_status); }; }; then
14558 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014559else
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014561sed 's/^/| /' conftest.$ac_ext >&5
14562
Martin v. Löwis11437992002-04-12 09:54:03 +000014563eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014565rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014567echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14568echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14569if test `eval echo '${'$as_ac_var'}'` = yes; then
14570 cat >>confdefs.h <<_ACEOF
14571#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14572_ACEOF
14573 cat >conftest.$ac_ext <<_ACEOF
14574#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014575/* confdefs.h. */
14576_ACEOF
14577cat confdefs.h >>conftest.$ac_ext
14578cat >>conftest.$ac_ext <<_ACEOF
14579/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014580#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014581int
14582main ()
14583{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014584getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 ;
14586 return 0;
14587}
14588_ACEOF
14589rm -f conftest.$ac_objext
14590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14591 (eval $ac_compile) 2>&5
14592 ac_status=$?
14593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14594 (exit $ac_status); } &&
14595 { ac_try='test -s conftest.$ac_objext'
14596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14597 (eval $ac_try) 2>&5
14598 ac_status=$?
14599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14600 (exit $ac_status); }; }; then
14601
14602cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014603#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014604_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014605
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
Guido van Rossumf78abae1997-01-21 22:02:36 +000014607else
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014609sed 's/^/| /' conftest.$ac_ext >&5
14610
Guido van Rossum627b2d71993-12-24 10:39:16 +000014611fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014612rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014613
Guido van Rossum627b2d71993-12-24 10:39:16 +000014614fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014615done
Guido van Rossum627b2d71993-12-24 10:39:16 +000014616
Jack Jansen150753c2003-03-29 22:07:47 +000014617
14618for ac_func in setpgrp
14619do
14620as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14621echo "$as_me:$LINENO: checking for $ac_func" >&5
14622echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14623if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014625else
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 cat >conftest.$ac_ext <<_ACEOF
14627#line $LINENO "configure"
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. */
Jack Jansen150753c2003-03-29 22:07:47 +000014633/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014634 which can conflict with char $ac_func (); below.
14635 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014636 <limits.h> exists even on freestanding compilers. Under hpux,
14637 including <limits.h> includes <sys/time.h> and causes problems
14638 checking for functions defined therein. */
14639#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014640# include <limits.h>
14641#else
14642# include <assert.h>
14643#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014644/* Override any gcc2 internal prototype to avoid an error. */
14645#ifdef __cplusplus
14646extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014647{
Martin v. Löwis11437992002-04-12 09:54:03 +000014648#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014649/* We use char because int might match the return type of a gcc2
14650 builtin and then its argument prototype would still apply. */
14651char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000014652/* The GNU C library defines this for functions which it implements
14653 to always fail with ENOSYS. Some functions are actually named
14654 something starting with __ and the normal name is an alias. */
14655#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14656choke me
14657#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014658char (*f) () = $ac_func;
14659#endif
14660#ifdef __cplusplus
14661}
Jack Jansen150753c2003-03-29 22:07:47 +000014662#endif
14663
Skip Montanaro6dead952003-09-25 14:50:04 +000014664int
14665main ()
14666{
14667return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014668 ;
14669 return 0;
14670}
14671_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014672rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000014673if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14674 (eval $ac_link) 2>&5
14675 ac_status=$?
14676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000014677 (exit $ac_status); } &&
14678 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14680 (eval $ac_try) 2>&5
14681 ac_status=$?
14682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14683 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000014684 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014685else
Jack Jansen150753c2003-03-29 22:07:47 +000014686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014687sed 's/^/| /' conftest.$ac_ext >&5
14688
Jack Jansen150753c2003-03-29 22:07:47 +000014689eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014690fi
Jack Jansen150753c2003-03-29 22:07:47 +000014691rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014692fi
Jack Jansen150753c2003-03-29 22:07:47 +000014693echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14694echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14695if test `eval echo '${'$as_ac_var'}'` = yes; then
14696 cat >>confdefs.h <<_ACEOF
14697#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14698_ACEOF
14699 cat >conftest.$ac_ext <<_ACEOF
14700#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014701/* confdefs.h. */
14702_ACEOF
14703cat confdefs.h >>conftest.$ac_ext
14704cat >>conftest.$ac_ext <<_ACEOF
14705/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014706#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000014707int
14708main ()
14709{
14710setpgrp(0,0);
14711 ;
14712 return 0;
14713}
14714_ACEOF
14715rm -f conftest.$ac_objext
14716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14717 (eval $ac_compile) 2>&5
14718 ac_status=$?
14719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); } &&
14721 { ac_try='test -s conftest.$ac_objext'
14722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14723 (eval $ac_try) 2>&5
14724 ac_status=$?
14725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14726 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014727
14728cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014729#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014730_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014731
Jack Jansen150753c2003-03-29 22:07:47 +000014732
14733else
14734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014735sed 's/^/| /' conftest.$ac_ext >&5
14736
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014737fi
Jack Jansen150753c2003-03-29 22:07:47 +000014738rm -f conftest.$ac_objext conftest.$ac_ext
14739
14740fi
14741done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014742
Martin v. Löwis11437992002-04-12 09:54:03 +000014743
Thomas Wouters3a584202000-08-05 23:28:51 +000014744for ac_func in gettimeofday
14745do
Martin v. Löwis11437992002-04-12 09:54:03 +000014746as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14747echo "$as_me:$LINENO: checking for $ac_func" >&5
14748echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14749if eval "test \"\${$as_ac_var+set}\" = set"; then
14750 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014751else
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 cat >conftest.$ac_ext <<_ACEOF
14753#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014754/* confdefs.h. */
14755_ACEOF
14756cat confdefs.h >>conftest.$ac_ext
14757cat >>conftest.$ac_ext <<_ACEOF
14758/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014759/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014760 which can conflict with char $ac_func (); below.
14761 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014762 <limits.h> exists even on freestanding compilers. Under hpux,
14763 including <limits.h> includes <sys/time.h> and causes problems
14764 checking for functions defined therein. */
14765#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014766# include <limits.h>
14767#else
14768# include <assert.h>
14769#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014770/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014771#ifdef __cplusplus
14772extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014773{
Martin v. Löwis11437992002-04-12 09:54:03 +000014774#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014775/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014776 builtin and then its argument prototype would still apply. */
14777char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014778/* The GNU C library defines this for functions which it implements
14779 to always fail with ENOSYS. Some functions are actually named
14780 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014781#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014782choke me
14783#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014784char (*f) () = $ac_func;
14785#endif
14786#ifdef __cplusplus
14787}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014788#endif
14789
Skip Montanaro6dead952003-09-25 14:50:04 +000014790int
14791main ()
14792{
14793return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014794 ;
14795 return 0;
14796}
14797_ACEOF
14798rm -f conftest.$ac_objext conftest$ac_exeext
14799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14800 (eval $ac_link) 2>&5
14801 ac_status=$?
14802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14803 (exit $ac_status); } &&
14804 { ac_try='test -s conftest$ac_exeext'
14805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14806 (eval $ac_try) 2>&5
14807 ac_status=$?
14808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14809 (exit $ac_status); }; }; then
14810 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014811else
Martin v. Löwis11437992002-04-12 09:54:03 +000014812 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014813sed 's/^/| /' conftest.$ac_ext >&5
14814
Martin v. Löwis11437992002-04-12 09:54:03 +000014815eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014816fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014817rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014818fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014819echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14820echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14821if test `eval echo '${'$as_ac_var'}'` = yes; then
14822 cat >>confdefs.h <<_ACEOF
14823#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14824_ACEOF
14825 cat >conftest.$ac_ext <<_ACEOF
14826#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014827/* confdefs.h. */
14828_ACEOF
14829cat confdefs.h >>conftest.$ac_ext
14830cat >>conftest.$ac_ext <<_ACEOF
14831/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014832#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014833int
14834main ()
14835{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014836gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 ;
14838 return 0;
14839}
14840_ACEOF
14841rm -f conftest.$ac_objext
14842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14843 (eval $ac_compile) 2>&5
14844 ac_status=$?
14845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14846 (exit $ac_status); } &&
14847 { ac_try='test -s conftest.$ac_objext'
14848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14849 (eval $ac_try) 2>&5
14850 ac_status=$?
14851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14852 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014853 :
14854else
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014856sed 's/^/| /' conftest.$ac_ext >&5
14857
Martin v. Löwis11437992002-04-12 09:54:03 +000014858
14859cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014860#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014861_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014862
Martin v. Löwis11437992002-04-12 09:54:03 +000014863
Guido van Rossum627b2d71993-12-24 10:39:16 +000014864fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014865rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014866
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014867fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014868done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014869
Michael W. Hudson54241132001-12-07 15:38:26 +000014870
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014871echo "$as_me:$LINENO: checking for major" >&5
14872echo $ECHO_N "checking for major... $ECHO_C" >&6
14873cat >conftest.$ac_ext <<_ACEOF
14874#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014875/* confdefs.h. */
14876_ACEOF
14877cat confdefs.h >>conftest.$ac_ext
14878cat >>conftest.$ac_ext <<_ACEOF
14879/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014880
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014881#if defined(MAJOR_IN_MKDEV)
14882#include <sys/mkdev.h>
14883#elif defined(MAJOR_IN_SYSMACROS)
14884#include <sys/sysmacros.h>
14885#else
14886#include <sys/types.h>
14887#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014888
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014889int
14890main ()
14891{
14892
14893 makedev(major(0),minor(0));
14894
14895 ;
14896 return 0;
14897}
14898_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014899rm -f conftest.$ac_objext conftest$ac_exeext
14900if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14901 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014902 ac_status=$?
14903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14904 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014905 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14907 (eval $ac_try) 2>&5
14908 ac_status=$?
14909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14910 (exit $ac_status); }; }; then
14911
14912
14913cat >>confdefs.h <<\_ACEOF
14914#define HAVE_DEVICE_MACROS 1
14915_ACEOF
14916
14917 echo "$as_me:$LINENO: result: yes" >&5
14918echo "${ECHO_T}yes" >&6
14919
14920else
14921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014922sed 's/^/| /' conftest.$ac_ext >&5
14923
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014924
14925 echo "$as_me:$LINENO: result: no" >&5
14926echo "${ECHO_T}no" >&6
14927
14928fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014929rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014930
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014931# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014932# for [no]getaddrinfo in netdb.h.
14933echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14934echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14935cat >conftest.$ac_ext <<_ACEOF
14936#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014937/* confdefs.h. */
14938_ACEOF
14939cat confdefs.h >>conftest.$ac_ext
14940cat >>conftest.$ac_ext <<_ACEOF
14941/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014942
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014943#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014944#include <sys/socket.h>
14945#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014946#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014947
Martin v. Löwis11437992002-04-12 09:54:03 +000014948int
14949main ()
14950{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014951
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014952getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014953
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 ;
14955 return 0;
14956}
14957_ACEOF
14958rm -f conftest.$ac_objext conftest$ac_exeext
14959if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14960 (eval $ac_link) 2>&5
14961 ac_status=$?
14962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14963 (exit $ac_status); } &&
14964 { ac_try='test -s conftest$ac_exeext'
14965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14966 (eval $ac_try) 2>&5
14967 ac_status=$?
14968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969 (exit $ac_status); }; }; then
14970
14971echo "$as_me:$LINENO: result: yes" >&5
14972echo "${ECHO_T}yes" >&6
14973echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14974echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014975if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014976 echo "$as_me:$LINENO: result: buggy" >&5
14977echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014978buggygetaddrinfo=yes
14979else
Martin v. Löwis11437992002-04-12 09:54:03 +000014980 cat >conftest.$ac_ext <<_ACEOF
14981#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014982/* confdefs.h. */
14983_ACEOF
14984cat confdefs.h >>conftest.$ac_ext
14985cat >>conftest.$ac_ext <<_ACEOF
14986/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014987
14988#include <sys/types.h>
14989#include <netdb.h>
14990#include <string.h>
14991#include <sys/socket.h>
14992#include <netinet/in.h>
14993
14994main()
14995{
14996 int passive, gaierr, inet4 = 0, inet6 = 0;
14997 struct addrinfo hints, *ai, *aitop;
14998 char straddr[INET6_ADDRSTRLEN], strport[16];
14999
15000 for (passive = 0; passive <= 1; passive++) {
15001 memset(&hints, 0, sizeof(hints));
15002 hints.ai_family = AF_UNSPEC;
15003 hints.ai_flags = passive ? AI_PASSIVE : 0;
15004 hints.ai_socktype = SOCK_STREAM;
15005 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15006 (void)gai_strerror(gaierr);
15007 goto bad;
15008 }
15009 for (ai = aitop; ai; ai = ai->ai_next) {
15010 if (ai->ai_addr == NULL ||
15011 ai->ai_addrlen == 0 ||
15012 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15013 straddr, sizeof(straddr), strport, sizeof(strport),
15014 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15015 goto bad;
15016 }
15017 switch (ai->ai_family) {
15018 case AF_INET:
15019 if (strcmp(strport, "54321") != 0) {
15020 goto bad;
15021 }
15022 if (passive) {
15023 if (strcmp(straddr, "0.0.0.0") != 0) {
15024 goto bad;
15025 }
15026 } else {
15027 if (strcmp(straddr, "127.0.0.1") != 0) {
15028 goto bad;
15029 }
15030 }
15031 inet4++;
15032 break;
15033 case AF_INET6:
15034 if (strcmp(strport, "54321") != 0) {
15035 goto bad;
15036 }
15037 if (passive) {
15038 if (strcmp(straddr, "::") != 0) {
15039 goto bad;
15040 }
15041 } else {
15042 if (strcmp(straddr, "::1") != 0) {
15043 goto bad;
15044 }
15045 }
15046 inet6++;
15047 break;
15048 case AF_UNSPEC:
15049 goto bad;
15050 break;
15051 default:
15052 /* another family support? */
15053 break;
15054 }
15055 }
15056 }
15057
15058 if (!(inet4 == 0 || inet4 == 2))
15059 goto bad;
15060 if (!(inet6 == 0 || inet6 == 2))
15061 goto bad;
15062
15063 if (aitop)
15064 freeaddrinfo(aitop);
15065 exit(0);
15066
15067 bad:
15068 if (aitop)
15069 freeaddrinfo(aitop);
15070 exit(1);
15071}
15072
Martin v. Löwis11437992002-04-12 09:54:03 +000015073_ACEOF
15074rm -f conftest$ac_exeext
15075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15076 (eval $ac_link) 2>&5
15077 ac_status=$?
15078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15081 (eval $ac_try) 2>&5
15082 ac_status=$?
15083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084 (exit $ac_status); }; }; then
15085 echo "$as_me:$LINENO: result: good" >&5
15086echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015087buggygetaddrinfo=no
15088else
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 echo "$as_me: program exited with status $ac_status" >&5
15090echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015091sed 's/^/| /' conftest.$ac_ext >&5
15092
Martin v. Löwis11437992002-04-12 09:54:03 +000015093( exit $ac_status )
15094echo "$as_me:$LINENO: result: buggy" >&5
15095echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015096buggygetaddrinfo=yes
15097fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015098rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015099fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015100else
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015102sed 's/^/| /' conftest.$ac_ext >&5
15103
Martin v. Löwis11437992002-04-12 09:54:03 +000015104
15105echo "$as_me:$LINENO: result: no" >&5
15106echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015107buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015108
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015110rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015111
15112if test "$buggygetaddrinfo" = "yes"; then
15113 if test "$ipv6" = "yes"; then
15114 echo 'Fatal: You must get working getaddrinfo() function.'
15115 echo ' or you can specify "--disable-ipv6"'.
15116 exit 1
15117 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015118else
Martin v. Löwis11437992002-04-12 09:54:03 +000015119
15120cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015121#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015122_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015123
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015125
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015126for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015127do
Martin v. Löwis11437992002-04-12 09:54:03 +000015128as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15129echo "$as_me:$LINENO: checking for $ac_func" >&5
15130echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15131if eval "test \"\${$as_ac_var+set}\" = set"; then
15132 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015133else
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 cat >conftest.$ac_ext <<_ACEOF
15135#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015136/* confdefs.h. */
15137_ACEOF
15138cat confdefs.h >>conftest.$ac_ext
15139cat >>conftest.$ac_ext <<_ACEOF
15140/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015141/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015142 which can conflict with char $ac_func (); below.
15143 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015144 <limits.h> exists even on freestanding compilers. Under hpux,
15145 including <limits.h> includes <sys/time.h> and causes problems
15146 checking for functions defined therein. */
15147#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015148# include <limits.h>
15149#else
15150# include <assert.h>
15151#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015152/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015153#ifdef __cplusplus
15154extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015155{
Martin v. Löwis11437992002-04-12 09:54:03 +000015156#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015157/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015158 builtin and then its argument prototype would still apply. */
15159char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015160/* The GNU C library defines this for functions which it implements
15161 to always fail with ENOSYS. Some functions are actually named
15162 something starting with __ and the normal name is an alias. */
15163#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15164choke me
15165#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015166char (*f) () = $ac_func;
15167#endif
15168#ifdef __cplusplus
15169}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015170#endif
15171
Skip Montanaro6dead952003-09-25 14:50:04 +000015172int
15173main ()
15174{
15175return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 ;
15177 return 0;
15178}
15179_ACEOF
15180rm -f conftest.$ac_objext conftest$ac_exeext
15181if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15182 (eval $ac_link) 2>&5
15183 ac_status=$?
15184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15185 (exit $ac_status); } &&
15186 { ac_try='test -s conftest$ac_exeext'
15187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15188 (eval $ac_try) 2>&5
15189 ac_status=$?
15190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15191 (exit $ac_status); }; }; then
15192 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015193else
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015195sed 's/^/| /' conftest.$ac_ext >&5
15196
Martin v. Löwis11437992002-04-12 09:54:03 +000015197eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015198fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015199rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015201echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15202echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15203if test `eval echo '${'$as_ac_var'}'` = yes; then
15204 cat >>confdefs.h <<_ACEOF
15205#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15206_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015207
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015208fi
15209done
15210
Michael W. Hudson54241132001-12-07 15:38:26 +000015211
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015212# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015213echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15214echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15215if test "${ac_cv_header_time+set}" = set; then
15216 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015217else
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 cat >conftest.$ac_ext <<_ACEOF
15219#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015220/* confdefs.h. */
15221_ACEOF
15222cat confdefs.h >>conftest.$ac_ext
15223cat >>conftest.$ac_ext <<_ACEOF
15224/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015225#include <sys/types.h>
15226#include <sys/time.h>
15227#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015228
Martin v. Löwis11437992002-04-12 09:54:03 +000015229int
15230main ()
15231{
15232if ((struct tm *) 0)
15233return 0;
15234 ;
15235 return 0;
15236}
15237_ACEOF
15238rm -f conftest.$ac_objext
15239if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15240 (eval $ac_compile) 2>&5
15241 ac_status=$?
15242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15243 (exit $ac_status); } &&
15244 { ac_try='test -s conftest.$ac_objext'
15245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15246 (eval $ac_try) 2>&5
15247 ac_status=$?
15248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15249 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015250 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015251else
Martin v. Löwis11437992002-04-12 09:54:03 +000015252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015253sed 's/^/| /' conftest.$ac_ext >&5
15254
Martin v. Löwis11437992002-04-12 09:54:03 +000015255ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015256fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015257rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015259echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15260echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015261if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015262
15263cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015264#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015265_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015266
15267fi
15268
Martin v. Löwis11437992002-04-12 09:54:03 +000015269echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15270echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15271if test "${ac_cv_struct_tm+set}" = set; then
15272 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015273else
Martin v. Löwis11437992002-04-12 09:54:03 +000015274 cat >conftest.$ac_ext <<_ACEOF
15275#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015276/* confdefs.h. */
15277_ACEOF
15278cat confdefs.h >>conftest.$ac_ext
15279cat >>conftest.$ac_ext <<_ACEOF
15280/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015281#include <sys/types.h>
15282#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015283
Martin v. Löwis11437992002-04-12 09:54:03 +000015284int
15285main ()
15286{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015287struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 ;
15289 return 0;
15290}
15291_ACEOF
15292rm -f conftest.$ac_objext
15293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15294 (eval $ac_compile) 2>&5
15295 ac_status=$?
15296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15297 (exit $ac_status); } &&
15298 { ac_try='test -s conftest.$ac_objext'
15299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15300 (eval $ac_try) 2>&5
15301 ac_status=$?
15302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15303 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015304 ac_cv_struct_tm=time.h
15305else
Martin v. Löwis11437992002-04-12 09:54:03 +000015306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015307sed 's/^/| /' conftest.$ac_ext >&5
15308
Martin v. Löwis11437992002-04-12 09:54:03 +000015309ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015310fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015311rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015313echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15314echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015315if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015316
15317cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015318#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015319_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015320
15321fi
15322
Martin v. Löwis11437992002-04-12 09:54:03 +000015323echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15324echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
15325if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015327else
Martin v. Löwis11437992002-04-12 09:54:03 +000015328 cat >conftest.$ac_ext <<_ACEOF
15329#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015330/* confdefs.h. */
15331_ACEOF
15332cat confdefs.h >>conftest.$ac_ext
15333cat >>conftest.$ac_ext <<_ACEOF
15334/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015335#include <sys/types.h>
15336#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015337
15338
Martin v. Löwis11437992002-04-12 09:54:03 +000015339int
15340main ()
15341{
15342static struct tm ac_aggr;
15343if (ac_aggr.tm_zone)
15344return 0;
15345 ;
15346 return 0;
15347}
15348_ACEOF
15349rm -f conftest.$ac_objext
15350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15351 (eval $ac_compile) 2>&5
15352 ac_status=$?
15353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15354 (exit $ac_status); } &&
15355 { ac_try='test -s conftest.$ac_objext'
15356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15357 (eval $ac_try) 2>&5
15358 ac_status=$?
15359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15360 (exit $ac_status); }; }; then
15361 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015362else
Martin v. Löwis11437992002-04-12 09:54:03 +000015363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015364sed 's/^/| /' conftest.$ac_ext >&5
15365
15366cat >conftest.$ac_ext <<_ACEOF
15367#line $LINENO "configure"
15368/* confdefs.h. */
15369_ACEOF
15370cat confdefs.h >>conftest.$ac_ext
15371cat >>conftest.$ac_ext <<_ACEOF
15372/* end confdefs.h. */
15373#include <sys/types.h>
15374#include <$ac_cv_struct_tm>
15375
15376
15377int
15378main ()
15379{
15380static struct tm ac_aggr;
15381if (sizeof ac_aggr.tm_zone)
15382return 0;
15383 ;
15384 return 0;
15385}
15386_ACEOF
15387rm -f conftest.$ac_objext
15388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15389 (eval $ac_compile) 2>&5
15390 ac_status=$?
15391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15392 (exit $ac_status); } &&
15393 { ac_try='test -s conftest.$ac_objext'
15394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15395 (eval $ac_try) 2>&5
15396 ac_status=$?
15397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15398 (exit $ac_status); }; }; then
15399 ac_cv_member_struct_tm_tm_zone=yes
15400else
15401 echo "$as_me: failed program was:" >&5
15402sed 's/^/| /' conftest.$ac_ext >&5
15403
Martin v. Löwis11437992002-04-12 09:54:03 +000015404ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015406rm -f conftest.$ac_objext conftest.$ac_ext
15407fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015408rm -f conftest.$ac_objext conftest.$ac_ext
15409fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015410echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
15411echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
15412if test $ac_cv_member_struct_tm_tm_zone = yes; then
15413
15414cat >>confdefs.h <<_ACEOF
15415#define HAVE_STRUCT_TM_TM_ZONE 1
15416_ACEOF
15417
15418
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015419fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015420
Martin v. Löwis11437992002-04-12 09:54:03 +000015421if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15422
15423cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015424#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015425_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015426
15427else
Martin v. Löwis11437992002-04-12 09:54:03 +000015428 echo "$as_me:$LINENO: checking for tzname" >&5
15429echo $ECHO_N "checking for tzname... $ECHO_C" >&6
15430if test "${ac_cv_var_tzname+set}" = set; then
15431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015432else
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 cat >conftest.$ac_ext <<_ACEOF
15434#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015435/* confdefs.h. */
15436_ACEOF
15437cat confdefs.h >>conftest.$ac_ext
15438cat >>conftest.$ac_ext <<_ACEOF
15439/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015440#include <time.h>
15441#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015442extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015444
Martin v. Löwis11437992002-04-12 09:54:03 +000015445int
15446main ()
15447{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015448atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000015449 ;
15450 return 0;
15451}
15452_ACEOF
15453rm -f conftest.$ac_objext conftest$ac_exeext
15454if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15455 (eval $ac_link) 2>&5
15456 ac_status=$?
15457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15458 (exit $ac_status); } &&
15459 { ac_try='test -s conftest$ac_exeext'
15460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15461 (eval $ac_try) 2>&5
15462 ac_status=$?
15463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15464 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015465 ac_cv_var_tzname=yes
15466else
Martin v. Löwis11437992002-04-12 09:54:03 +000015467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015468sed 's/^/| /' conftest.$ac_ext >&5
15469
Martin v. Löwis11437992002-04-12 09:54:03 +000015470ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000015473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015474echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
15475echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015476 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015477
15478cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015479#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015480_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015481
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015482 fi
15483fi
15484
Martin v. Löwis11437992002-04-12 09:54:03 +000015485echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
15486echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
15487if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
15488 echo $ECHO_N "(cached) $ECHO_C" >&6
15489else
15490 cat >conftest.$ac_ext <<_ACEOF
15491#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015492/* confdefs.h. */
15493_ACEOF
15494cat confdefs.h >>conftest.$ac_ext
15495cat >>conftest.$ac_ext <<_ACEOF
15496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015497$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015498int
15499main ()
15500{
15501static struct stat ac_aggr;
15502if (ac_aggr.st_rdev)
15503return 0;
15504 ;
15505 return 0;
15506}
15507_ACEOF
15508rm -f conftest.$ac_objext
15509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15510 (eval $ac_compile) 2>&5
15511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); } &&
15514 { ac_try='test -s conftest.$ac_objext'
15515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15516 (eval $ac_try) 2>&5
15517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); }; }; then
15520 ac_cv_member_struct_stat_st_rdev=yes
15521else
15522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015523sed 's/^/| /' conftest.$ac_ext >&5
15524
15525cat >conftest.$ac_ext <<_ACEOF
15526#line $LINENO "configure"
15527/* confdefs.h. */
15528_ACEOF
15529cat confdefs.h >>conftest.$ac_ext
15530cat >>conftest.$ac_ext <<_ACEOF
15531/* end confdefs.h. */
15532$ac_includes_default
15533int
15534main ()
15535{
15536static struct stat ac_aggr;
15537if (sizeof ac_aggr.st_rdev)
15538return 0;
15539 ;
15540 return 0;
15541}
15542_ACEOF
15543rm -f conftest.$ac_objext
15544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15545 (eval $ac_compile) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); } &&
15549 { ac_try='test -s conftest.$ac_objext'
15550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15551 (eval $ac_try) 2>&5
15552 ac_status=$?
15553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15554 (exit $ac_status); }; }; then
15555 ac_cv_member_struct_stat_st_rdev=yes
15556else
15557 echo "$as_me: failed program was:" >&5
15558sed 's/^/| /' conftest.$ac_ext >&5
15559
Martin v. Löwis11437992002-04-12 09:54:03 +000015560ac_cv_member_struct_stat_st_rdev=no
15561fi
15562rm -f conftest.$ac_objext conftest.$ac_ext
15563fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015564rm -f conftest.$ac_objext conftest.$ac_ext
15565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015566echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
15567echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
15568if test $ac_cv_member_struct_stat_st_rdev = yes; then
15569
15570cat >>confdefs.h <<_ACEOF
15571#define HAVE_STRUCT_STAT_ST_RDEV 1
15572_ACEOF
15573
15574
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015575fi
15576
Martin v. Löwis11437992002-04-12 09:54:03 +000015577echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
15578echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
15579if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
15580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015581else
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 cat >conftest.$ac_ext <<_ACEOF
15583#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015584/* confdefs.h. */
15585_ACEOF
15586cat confdefs.h >>conftest.$ac_ext
15587cat >>conftest.$ac_ext <<_ACEOF
15588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015589$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015590int
15591main ()
15592{
15593static struct stat ac_aggr;
15594if (ac_aggr.st_blksize)
15595return 0;
15596 ;
15597 return 0;
15598}
15599_ACEOF
15600rm -f conftest.$ac_objext
15601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15602 (eval $ac_compile) 2>&5
15603 ac_status=$?
15604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15605 (exit $ac_status); } &&
15606 { ac_try='test -s conftest.$ac_objext'
15607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15608 (eval $ac_try) 2>&5
15609 ac_status=$?
15610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15611 (exit $ac_status); }; }; then
15612 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +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
15617cat >conftest.$ac_ext <<_ACEOF
15618#line $LINENO "configure"
15619/* confdefs.h. */
15620_ACEOF
15621cat confdefs.h >>conftest.$ac_ext
15622cat >>conftest.$ac_ext <<_ACEOF
15623/* end confdefs.h. */
15624$ac_includes_default
15625int
15626main ()
15627{
15628static struct stat ac_aggr;
15629if (sizeof ac_aggr.st_blksize)
15630return 0;
15631 ;
15632 return 0;
15633}
15634_ACEOF
15635rm -f conftest.$ac_objext
15636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15637 (eval $ac_compile) 2>&5
15638 ac_status=$?
15639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640 (exit $ac_status); } &&
15641 { ac_try='test -s conftest.$ac_objext'
15642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15643 (eval $ac_try) 2>&5
15644 ac_status=$?
15645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15646 (exit $ac_status); }; }; then
15647 ac_cv_member_struct_stat_st_blksize=yes
15648else
15649 echo "$as_me: failed program was:" >&5
15650sed 's/^/| /' conftest.$ac_ext >&5
15651
Martin v. Löwis11437992002-04-12 09:54:03 +000015652ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015653fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015654rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015655fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015656rm -f conftest.$ac_objext conftest.$ac_ext
15657fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015658echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
15659echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
15660if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015661
Martin v. Löwis11437992002-04-12 09:54:03 +000015662cat >>confdefs.h <<_ACEOF
15663#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
15664_ACEOF
15665
15666
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015667fi
15668
Martin v. Löwis11437992002-04-12 09:54:03 +000015669echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
15670echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
15671if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
15672 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015673else
Martin v. Löwis11437992002-04-12 09:54:03 +000015674 cat >conftest.$ac_ext <<_ACEOF
15675#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015676/* confdefs.h. */
15677_ACEOF
15678cat confdefs.h >>conftest.$ac_ext
15679cat >>conftest.$ac_ext <<_ACEOF
15680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015681$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015682int
15683main ()
15684{
15685static struct stat ac_aggr;
15686if (ac_aggr.st_blocks)
15687return 0;
15688 ;
15689 return 0;
15690}
15691_ACEOF
15692rm -f conftest.$ac_objext
15693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15694 (eval $ac_compile) 2>&5
15695 ac_status=$?
15696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697 (exit $ac_status); } &&
15698 { ac_try='test -s conftest.$ac_objext'
15699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15700 (eval $ac_try) 2>&5
15701 ac_status=$?
15702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15703 (exit $ac_status); }; }; then
15704 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015705else
Martin v. Löwis11437992002-04-12 09:54:03 +000015706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015707sed 's/^/| /' conftest.$ac_ext >&5
15708
15709cat >conftest.$ac_ext <<_ACEOF
15710#line $LINENO "configure"
15711/* confdefs.h. */
15712_ACEOF
15713cat confdefs.h >>conftest.$ac_ext
15714cat >>conftest.$ac_ext <<_ACEOF
15715/* end confdefs.h. */
15716$ac_includes_default
15717int
15718main ()
15719{
15720static struct stat ac_aggr;
15721if (sizeof ac_aggr.st_blocks)
15722return 0;
15723 ;
15724 return 0;
15725}
15726_ACEOF
15727rm -f conftest.$ac_objext
15728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15729 (eval $ac_compile) 2>&5
15730 ac_status=$?
15731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15732 (exit $ac_status); } &&
15733 { ac_try='test -s conftest.$ac_objext'
15734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15735 (eval $ac_try) 2>&5
15736 ac_status=$?
15737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15738 (exit $ac_status); }; }; then
15739 ac_cv_member_struct_stat_st_blocks=yes
15740else
15741 echo "$as_me: failed program was:" >&5
15742sed 's/^/| /' conftest.$ac_ext >&5
15743
Martin v. Löwis11437992002-04-12 09:54:03 +000015744ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015745fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015746rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015747fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015748rm -f conftest.$ac_objext conftest.$ac_ext
15749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015750echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15751echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15752if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015753
Martin v. Löwis11437992002-04-12 09:54:03 +000015754cat >>confdefs.h <<_ACEOF
15755#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15756_ACEOF
15757
15758
15759cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015760#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015761_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015762
15763else
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015765fi
15766
Michael W. Hudson54241132001-12-07 15:38:26 +000015767
Martin v. Löwis11437992002-04-12 09:54:03 +000015768
15769echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15770echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15771if test "${ac_cv_header_time_altzone+set}" = set; then
15772 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015773else
Martin v. Löwis11437992002-04-12 09:54:03 +000015774 cat >conftest.$ac_ext <<_ACEOF
15775#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015776/* confdefs.h. */
15777_ACEOF
15778cat confdefs.h >>conftest.$ac_ext
15779cat >>conftest.$ac_ext <<_ACEOF
15780/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015781#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015782int
15783main ()
15784{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015785return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015786 ;
15787 return 0;
15788}
15789_ACEOF
15790rm -f conftest.$ac_objext
15791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15792 (eval $ac_compile) 2>&5
15793 ac_status=$?
15794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15795 (exit $ac_status); } &&
15796 { ac_try='test -s conftest.$ac_objext'
15797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15798 (eval $ac_try) 2>&5
15799 ac_status=$?
15800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15801 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015802 ac_cv_header_time_altzone=yes
15803else
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015805sed 's/^/| /' conftest.$ac_ext >&5
15806
Martin v. Löwis11437992002-04-12 09:54:03 +000015807ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015808fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015809rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015810fi
15811
Martin v. Löwis11437992002-04-12 09:54:03 +000015812echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15813echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015814if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015815
15816cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015817#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015818_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015819
15820fi
15821
Guido van Rossumda88dad1995-01-26 00:46:29 +000015822was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015823echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15824echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15825cat >conftest.$ac_ext <<_ACEOF
15826#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015827/* confdefs.h. */
15828_ACEOF
15829cat confdefs.h >>conftest.$ac_ext
15830cat >>conftest.$ac_ext <<_ACEOF
15831/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015832
15833#include <sys/types.h>
15834#include <sys/select.h>
15835#include <sys/time.h>
15836
Martin v. Löwis11437992002-04-12 09:54:03 +000015837int
15838main ()
15839{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015840;
Martin v. Löwis11437992002-04-12 09:54:03 +000015841 ;
15842 return 0;
15843}
15844_ACEOF
15845rm -f conftest.$ac_objext
15846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15847 (eval $ac_compile) 2>&5
15848 ac_status=$?
15849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15850 (exit $ac_status); } &&
15851 { ac_try='test -s conftest.$ac_objext'
15852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15853 (eval $ac_try) 2>&5
15854 ac_status=$?
15855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15856 (exit $ac_status); }; }; then
15857
15858
15859cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015860#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015861_ACEOF
15862
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015863 was_it_defined=yes
15864
Guido van Rossumf78abae1997-01-21 22:02:36 +000015865else
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015867sed 's/^/| /' conftest.$ac_ext >&5
15868
Guido van Rossum7f43da71994-08-01 12:15:30 +000015869fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015870rm -f conftest.$ac_objext conftest.$ac_ext
15871echo "$as_me:$LINENO: result: $was_it_defined" >&5
15872echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015873
Martin v. Löwis11437992002-04-12 09:54:03 +000015874echo "$as_me:$LINENO: checking for addrinfo" >&5
15875echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15876if test "${ac_cv_struct_addrinfo+set}" = set; then
15877 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015878else
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 cat >conftest.$ac_ext <<_ACEOF
15880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015881/* confdefs.h. */
15882_ACEOF
15883cat confdefs.h >>conftest.$ac_ext
15884cat >>conftest.$ac_ext <<_ACEOF
15885/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015886
15887# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015888int
15889main ()
15890{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015891struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 ;
15893 return 0;
15894}
15895_ACEOF
15896rm -f conftest.$ac_objext
15897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15898 (eval $ac_compile) 2>&5
15899 ac_status=$?
15900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15901 (exit $ac_status); } &&
15902 { ac_try='test -s conftest.$ac_objext'
15903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15904 (eval $ac_try) 2>&5
15905 ac_status=$?
15906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15907 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015908 ac_cv_struct_addrinfo=yes
15909else
Martin v. Löwis11437992002-04-12 09:54:03 +000015910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015911sed 's/^/| /' conftest.$ac_ext >&5
15912
Martin v. Löwis11437992002-04-12 09:54:03 +000015913ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015915rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015916fi
15917
Martin v. Löwis11437992002-04-12 09:54:03 +000015918echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15919echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015920if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015921
15922cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015923#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015924_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015925
15926fi
15927
Martin v. Löwis11437992002-04-12 09:54:03 +000015928echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15929echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15930if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15931 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015932else
Martin v. Löwis11437992002-04-12 09:54:03 +000015933 cat >conftest.$ac_ext <<_ACEOF
15934#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015935/* confdefs.h. */
15936_ACEOF
15937cat confdefs.h >>conftest.$ac_ext
15938cat >>conftest.$ac_ext <<_ACEOF
15939/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015940
15941# include <sys/types.h>
15942# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015943int
15944main ()
15945{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015946struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015947 ;
15948 return 0;
15949}
15950_ACEOF
15951rm -f conftest.$ac_objext
15952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15953 (eval $ac_compile) 2>&5
15954 ac_status=$?
15955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15956 (exit $ac_status); } &&
15957 { ac_try='test -s conftest.$ac_objext'
15958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15959 (eval $ac_try) 2>&5
15960 ac_status=$?
15961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15962 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015963 ac_cv_struct_sockaddr_storage=yes
15964else
Martin v. Löwis11437992002-04-12 09:54:03 +000015965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015966sed 's/^/| /' conftest.$ac_ext >&5
15967
Martin v. Löwis11437992002-04-12 09:54:03 +000015968ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015970rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015971fi
15972
Martin v. Löwis11437992002-04-12 09:54:03 +000015973echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15974echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015975if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015976
15977cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015978#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015979_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015980
15981fi
15982
Guido van Rossum627b2d71993-12-24 10:39:16 +000015983# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015984
Michael W. Hudson54241132001-12-07 15:38:26 +000015985
Martin v. Löwis11437992002-04-12 09:54:03 +000015986echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15987echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15988if test "${ac_cv_c_char_unsigned+set}" = set; then
15989 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015990else
Martin v. Löwis11437992002-04-12 09:54:03 +000015991 cat >conftest.$ac_ext <<_ACEOF
15992#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015993/* confdefs.h. */
15994_ACEOF
15995cat confdefs.h >>conftest.$ac_ext
15996cat >>conftest.$ac_ext <<_ACEOF
15997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015998$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015999int
16000main ()
16001{
16002static int test_array [1 - 2 * !(((char) -1) < 0)];
16003test_array [0] = 0
16004
16005 ;
16006 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016007}
Martin v. Löwis11437992002-04-12 09:54:03 +000016008_ACEOF
16009rm -f conftest.$ac_objext
16010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16011 (eval $ac_compile) 2>&5
16012 ac_status=$?
16013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16014 (exit $ac_status); } &&
16015 { ac_try='test -s conftest.$ac_objext'
16016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16017 (eval $ac_try) 2>&5
16018 ac_status=$?
16019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16020 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016021 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016022else
16023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016024sed 's/^/| /' conftest.$ac_ext >&5
16025
Martin v. Löwis11437992002-04-12 09:54:03 +000016026ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016027fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016028rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016030echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16031echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016032if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016033 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016034#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016035_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016036
16037fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016038
Martin v. Löwis11437992002-04-12 09:54:03 +000016039echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16040echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16041if test "${ac_cv_c_const+set}" = set; then
16042 echo $ECHO_N "(cached) $ECHO_C" >&6
16043else
16044 cat >conftest.$ac_ext <<_ACEOF
16045#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016046/* confdefs.h. */
16047_ACEOF
16048cat confdefs.h >>conftest.$ac_ext
16049cat >>conftest.$ac_ext <<_ACEOF
16050/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016051
Martin v. Löwis11437992002-04-12 09:54:03 +000016052int
16053main ()
16054{
16055/* FIXME: Include the comments suggested by Paul. */
16056#ifndef __cplusplus
16057 /* Ultrix mips cc rejects this. */
16058 typedef int charset[2];
16059 const charset x;
16060 /* SunOS 4.1.1 cc rejects this. */
16061 char const *const *ccp;
16062 char **p;
16063 /* NEC SVR4.0.2 mips cc rejects this. */
16064 struct point {int x, y;};
16065 static struct point const zero = {0,0};
16066 /* AIX XL C 1.02.0.0 rejects this.
16067 It does not let you subtract one const X* pointer from another in
16068 an arm of an if-expression whose if-part is not a constant
16069 expression */
16070 const char *g = "string";
16071 ccp = &g + (g ? g-g : 0);
16072 /* HPUX 7.0 cc rejects these. */
16073 ++ccp;
16074 p = (char**) ccp;
16075 ccp = (char const *const *) p;
16076 { /* SCO 3.2v4 cc rejects this. */
16077 char *t;
16078 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016079
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 *t++ = 0;
16081 }
16082 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16083 int x[] = {25, 17};
16084 const int *foo = &x[0];
16085 ++foo;
16086 }
16087 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16088 typedef const int *iptr;
16089 iptr p = 0;
16090 ++p;
16091 }
16092 { /* AIX XL C 1.02.0.0 rejects this saying
16093 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16094 struct s { int j; const int *ap[3]; };
16095 struct s *b; b->j = 5;
16096 }
16097 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16098 const int foo = 10;
16099 }
16100#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016101
Martin v. Löwis11437992002-04-12 09:54:03 +000016102 ;
16103 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016104}
Martin v. Löwis11437992002-04-12 09:54:03 +000016105_ACEOF
16106rm -f conftest.$ac_objext
16107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16108 (eval $ac_compile) 2>&5
16109 ac_status=$?
16110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16111 (exit $ac_status); } &&
16112 { ac_try='test -s conftest.$ac_objext'
16113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16114 (eval $ac_try) 2>&5
16115 ac_status=$?
16116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16117 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016118 ac_cv_c_const=yes
16119else
Martin v. Löwis11437992002-04-12 09:54:03 +000016120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016121sed 's/^/| /' conftest.$ac_ext >&5
16122
Martin v. Löwis11437992002-04-12 09:54:03 +000016123ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016125rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016127echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
16128echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016129if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016130
16131cat >>confdefs.h <<\_ACEOF
16132#define const
16133_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016134
16135fi
16136
Michael W. Hudson54241132001-12-07 15:38:26 +000016137
Guido van Rossumda88dad1995-01-26 00:46:29 +000016138works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016139echo "$as_me:$LINENO: checking for working volatile" >&5
16140echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
16141cat >conftest.$ac_ext <<_ACEOF
16142#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016143/* confdefs.h. */
16144_ACEOF
16145cat confdefs.h >>conftest.$ac_ext
16146cat >>conftest.$ac_ext <<_ACEOF
16147/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016148
Martin v. Löwis11437992002-04-12 09:54:03 +000016149int
16150main ()
16151{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016152volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016153 ;
16154 return 0;
16155}
16156_ACEOF
16157rm -f conftest.$ac_objext
16158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16159 (eval $ac_compile) 2>&5
16160 ac_status=$?
16161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16162 (exit $ac_status); } &&
16163 { ac_try='test -s conftest.$ac_objext'
16164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16165 (eval $ac_try) 2>&5
16166 ac_status=$?
16167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16168 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016169 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016170else
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016172sed 's/^/| /' conftest.$ac_ext >&5
16173
Martin v. Löwis11437992002-04-12 09:54:03 +000016174
16175cat >>confdefs.h <<\_ACEOF
16176#define volatile
16177_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016178
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016179
Guido van Rossum627b2d71993-12-24 10:39:16 +000016180fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016181rm -f conftest.$ac_objext conftest.$ac_ext
16182echo "$as_me:$LINENO: result: $works" >&5
16183echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016184
Guido van Rossumda88dad1995-01-26 00:46:29 +000016185works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016186echo "$as_me:$LINENO: checking for working signed char" >&5
16187echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
16188cat >conftest.$ac_ext <<_ACEOF
16189#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016190/* confdefs.h. */
16191_ACEOF
16192cat confdefs.h >>conftest.$ac_ext
16193cat >>conftest.$ac_ext <<_ACEOF
16194/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016195
Martin v. Löwis11437992002-04-12 09:54:03 +000016196int
16197main ()
16198{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016199signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 ;
16201 return 0;
16202}
16203_ACEOF
16204rm -f conftest.$ac_objext
16205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16206 (eval $ac_compile) 2>&5
16207 ac_status=$?
16208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16209 (exit $ac_status); } &&
16210 { ac_try='test -s conftest.$ac_objext'
16211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16212 (eval $ac_try) 2>&5
16213 ac_status=$?
16214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16215 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016216 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016217else
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016219sed 's/^/| /' conftest.$ac_ext >&5
16220
Martin v. Löwis11437992002-04-12 09:54:03 +000016221
16222cat >>confdefs.h <<\_ACEOF
16223#define signed
16224_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016225
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016226
Guido van Rossum7f43da71994-08-01 12:15:30 +000016227fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016228rm -f conftest.$ac_objext conftest.$ac_ext
16229echo "$as_me:$LINENO: result: $works" >&5
16230echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016231
Guido van Rossumda88dad1995-01-26 00:46:29 +000016232have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016233echo "$as_me:$LINENO: checking for prototypes" >&5
16234echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
16235cat >conftest.$ac_ext <<_ACEOF
16236#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016237/* confdefs.h. */
16238_ACEOF
16239cat confdefs.h >>conftest.$ac_ext
16240cat >>conftest.$ac_ext <<_ACEOF
16241/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016242int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016243int
16244main ()
16245{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016246return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016247 ;
16248 return 0;
16249}
16250_ACEOF
16251rm -f conftest.$ac_objext
16252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16253 (eval $ac_compile) 2>&5
16254 ac_status=$?
16255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16256 (exit $ac_status); } &&
16257 { ac_try='test -s conftest.$ac_objext'
16258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16259 (eval $ac_try) 2>&5
16260 ac_status=$?
16261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16262 (exit $ac_status); }; }; then
16263
16264
16265cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016266#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016267_ACEOF
16268
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016269 have_prototypes=yes
16270
Guido van Rossumf78abae1997-01-21 22:02:36 +000016271else
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016273sed 's/^/| /' conftest.$ac_ext >&5
16274
Guido van Rossum7f43da71994-08-01 12:15:30 +000016275fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016276rm -f conftest.$ac_objext conftest.$ac_ext
16277echo "$as_me:$LINENO: result: $have_prototypes" >&5
16278echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016279
Guido van Rossumda88dad1995-01-26 00:46:29 +000016280works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016281echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
16282echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
16283cat >conftest.$ac_ext <<_ACEOF
16284#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016285/* confdefs.h. */
16286_ACEOF
16287cat confdefs.h >>conftest.$ac_ext
16288cat >>conftest.$ac_ext <<_ACEOF
16289/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016290
16291#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000016292int foo(int x, ...) {
16293 va_list va;
16294 va_start(va, x);
16295 va_arg(va, int);
16296 va_arg(va, char *);
16297 va_arg(va, double);
16298 return 0;
16299}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016300
Martin v. Löwis11437992002-04-12 09:54:03 +000016301int
16302main ()
16303{
Guido van Rossum90eea071996-08-30 20:58:57 +000016304return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000016305 ;
16306 return 0;
16307}
16308_ACEOF
16309rm -f conftest.$ac_objext
16310if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16311 (eval $ac_compile) 2>&5
16312 ac_status=$?
16313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16314 (exit $ac_status); } &&
16315 { ac_try='test -s conftest.$ac_objext'
16316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16317 (eval $ac_try) 2>&5
16318 ac_status=$?
16319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16320 (exit $ac_status); }; }; then
16321
16322
16323cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016324#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016325_ACEOF
16326
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016327 works=yes
16328
Guido van Rossumf78abae1997-01-21 22:02:36 +000016329else
Martin v. Löwis11437992002-04-12 09:54:03 +000016330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016331sed 's/^/| /' conftest.$ac_ext >&5
16332
Guido van Rossum627b2d71993-12-24 10:39:16 +000016333fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016334rm -f conftest.$ac_objext conftest.$ac_ext
16335echo "$as_me:$LINENO: result: $works" >&5
16336echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016337
Guido van Rossumda88dad1995-01-26 00:46:29 +000016338if test "$have_prototypes" = yes; then
16339bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016340echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
16341echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
16342cat >conftest.$ac_ext <<_ACEOF
16343#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016344/* confdefs.h. */
16345_ACEOF
16346cat confdefs.h >>conftest.$ac_ext
16347cat >>conftest.$ac_ext <<_ACEOF
16348/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016349#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016350int
16351main ()
16352{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016353char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000016354 ;
16355 return 0;
16356}
16357_ACEOF
16358rm -f conftest.$ac_objext
16359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16360 (eval $ac_compile) 2>&5
16361 ac_status=$?
16362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16363 (exit $ac_status); } &&
16364 { ac_try='test -s conftest.$ac_objext'
16365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16366 (eval $ac_try) 2>&5
16367 ac_status=$?
16368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16369 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016370 :
16371else
Martin v. Löwis11437992002-04-12 09:54:03 +000016372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016373sed 's/^/| /' conftest.$ac_ext >&5
16374
Martin v. Löwis11437992002-04-12 09:54:03 +000016375
16376cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016377#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016378_ACEOF
16379
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016380 bad_prototypes=yes
16381
Guido van Rossum627b2d71993-12-24 10:39:16 +000016382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016383rm -f conftest.$ac_objext conftest.$ac_ext
16384echo "$as_me:$LINENO: result: $bad_prototypes" >&5
16385echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016386fi
16387
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016388# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000016389echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
16390echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
16391cat >conftest.$ac_ext <<_ACEOF
16392#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016393/* confdefs.h. */
16394_ACEOF
16395cat confdefs.h >>conftest.$ac_ext
16396cat >>conftest.$ac_ext <<_ACEOF
16397/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016398#include <sys/types.h>
16399#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016400int
16401main ()
16402{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016403struct sockaddr x;
16404x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 ;
16406 return 0;
16407}
16408_ACEOF
16409rm -f conftest.$ac_objext
16410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16411 (eval $ac_compile) 2>&5
16412 ac_status=$?
16413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16414 (exit $ac_status); } &&
16415 { ac_try='test -s conftest.$ac_objext'
16416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16417 (eval $ac_try) 2>&5
16418 ac_status=$?
16419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16420 (exit $ac_status); }; }; then
16421 echo "$as_me:$LINENO: result: yes" >&5
16422echo "${ECHO_T}yes" >&6
16423
16424cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016425#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016426_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016427
16428else
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016430sed 's/^/| /' conftest.$ac_ext >&5
16431
Martin v. Löwis11437992002-04-12 09:54:03 +000016432echo "$as_me:$LINENO: result: no" >&5
16433echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016435rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016436
Guido van Rossumda88dad1995-01-26 00:46:29 +000016437va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016438echo "$as_me:$LINENO: checking whether va_list is an array" >&5
16439echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
16440cat >conftest.$ac_ext <<_ACEOF
16441#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016442/* confdefs.h. */
16443_ACEOF
16444cat confdefs.h >>conftest.$ac_ext
16445cat >>conftest.$ac_ext <<_ACEOF
16446/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016447
16448#ifdef HAVE_STDARG_PROTOTYPES
16449#include <stdarg.h>
16450#else
16451#include <varargs.h>
16452#endif
16453
Martin v. Löwis11437992002-04-12 09:54:03 +000016454int
16455main ()
16456{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016457va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000016458 ;
16459 return 0;
16460}
16461_ACEOF
16462rm -f conftest.$ac_objext
16463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16464 (eval $ac_compile) 2>&5
16465 ac_status=$?
16466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16467 (exit $ac_status); } &&
16468 { ac_try='test -s conftest.$ac_objext'
16469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16470 (eval $ac_try) 2>&5
16471 ac_status=$?
16472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16473 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016474 :
16475else
Martin v. Löwis11437992002-04-12 09:54:03 +000016476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016477sed 's/^/| /' conftest.$ac_ext >&5
16478
Martin v. Löwis11437992002-04-12 09:54:03 +000016479
16480
16481cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016482#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016483_ACEOF
16484
Guido van Rossumda88dad1995-01-26 00:46:29 +000016485 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016486
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016488rm -f conftest.$ac_objext conftest.$ac_ext
16489echo "$as_me:$LINENO: result: $va_list_is_array" >&5
16490echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016491
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016492# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000016493
16494
16495
16496echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
16497echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
16498if test "${ac_cv_func_gethostbyname_r+set}" = set; then
16499 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016500else
Martin v. Löwis11437992002-04-12 09:54:03 +000016501 cat >conftest.$ac_ext <<_ACEOF
16502#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016503/* confdefs.h. */
16504_ACEOF
16505cat confdefs.h >>conftest.$ac_ext
16506cat >>conftest.$ac_ext <<_ACEOF
16507/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016508/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016509 which can conflict with char gethostbyname_r (); below.
16510 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016511 <limits.h> exists even on freestanding compilers. Under hpux,
16512 including <limits.h> includes <sys/time.h> and causes problems
16513 checking for functions defined therein. */
16514#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016515# include <limits.h>
16516#else
16517# include <assert.h>
16518#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016519/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016520#ifdef __cplusplus
16521extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016522{
Martin v. Löwis11437992002-04-12 09:54:03 +000016523#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016524/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016525 builtin and then its argument prototype would still apply. */
16526char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016527/* The GNU C library defines this for functions which it implements
16528 to always fail with ENOSYS. Some functions are actually named
16529 something starting with __ and the normal name is an alias. */
16530#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
16531choke me
16532#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016533char (*f) () = gethostbyname_r;
16534#endif
16535#ifdef __cplusplus
16536}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016537#endif
16538
Skip Montanaro6dead952003-09-25 14:50:04 +000016539int
16540main ()
16541{
16542return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000016543 ;
16544 return 0;
16545}
16546_ACEOF
16547rm -f conftest.$ac_objext conftest$ac_exeext
16548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16549 (eval $ac_link) 2>&5
16550 ac_status=$?
16551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16552 (exit $ac_status); } &&
16553 { ac_try='test -s conftest$ac_exeext'
16554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16555 (eval $ac_try) 2>&5
16556 ac_status=$?
16557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16558 (exit $ac_status); }; }; then
16559 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016560else
Martin v. Löwis11437992002-04-12 09:54:03 +000016561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016562sed 's/^/| /' conftest.$ac_ext >&5
16563
Martin v. Löwis11437992002-04-12 09:54:03 +000016564ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016566rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016568echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
16569echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
16570if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016571
Martin v. Löwis11437992002-04-12 09:54:03 +000016572 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016573#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016574_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016575
Martin v. Löwis11437992002-04-12 09:54:03 +000016576 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
16577echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016578 OLD_CFLAGS=$CFLAGS
16579 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 cat >conftest.$ac_ext <<_ACEOF
16581#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016582/* confdefs.h. */
16583_ACEOF
16584cat confdefs.h >>conftest.$ac_ext
16585cat >>conftest.$ac_ext <<_ACEOF
16586/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016587
16588# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016589
Martin v. Löwis11437992002-04-12 09:54:03 +000016590int
16591main ()
16592{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016593
16594 char *name;
16595 struct hostent *he, *res;
16596 char buffer[2048];
16597 int buflen = 2048;
16598 int h_errnop;
16599
16600 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016601
16602 ;
16603 return 0;
16604}
16605_ACEOF
16606rm -f conftest.$ac_objext
16607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16608 (eval $ac_compile) 2>&5
16609 ac_status=$?
16610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16611 (exit $ac_status); } &&
16612 { ac_try='test -s conftest.$ac_objext'
16613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16614 (eval $ac_try) 2>&5
16615 ac_status=$?
16616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16617 (exit $ac_status); }; }; then
16618
16619 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016620#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016621_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016622
Martin v. Löwis11437992002-04-12 09:54:03 +000016623
16624cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016625#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016626_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016627
Martin v. Löwis11437992002-04-12 09:54:03 +000016628 echo "$as_me:$LINENO: result: yes" >&5
16629echo "${ECHO_T}yes" >&6
16630
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016631else
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016633sed 's/^/| /' conftest.$ac_ext >&5
16634
Martin v. Löwis11437992002-04-12 09:54:03 +000016635
16636 echo "$as_me:$LINENO: result: no" >&5
16637echo "${ECHO_T}no" >&6
16638 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
16639echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
16640 cat >conftest.$ac_ext <<_ACEOF
16641#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016642/* confdefs.h. */
16643_ACEOF
16644cat confdefs.h >>conftest.$ac_ext
16645cat >>conftest.$ac_ext <<_ACEOF
16646/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016647
16648# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016649
Martin v. Löwis11437992002-04-12 09:54:03 +000016650int
16651main ()
16652{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016653
16654 char *name;
16655 struct hostent *he;
16656 char buffer[2048];
16657 int buflen = 2048;
16658 int h_errnop;
16659
16660 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016661
16662 ;
16663 return 0;
16664}
16665_ACEOF
16666rm -f conftest.$ac_objext
16667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16668 (eval $ac_compile) 2>&5
16669 ac_status=$?
16670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16671 (exit $ac_status); } &&
16672 { ac_try='test -s conftest.$ac_objext'
16673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16674 (eval $ac_try) 2>&5
16675 ac_status=$?
16676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16677 (exit $ac_status); }; }; then
16678
16679 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016680#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016681_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016682
Martin v. Löwis11437992002-04-12 09:54:03 +000016683
16684cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016685#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016686_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016687
Martin v. Löwis11437992002-04-12 09:54:03 +000016688 echo "$as_me:$LINENO: result: yes" >&5
16689echo "${ECHO_T}yes" >&6
16690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016691else
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016693sed 's/^/| /' conftest.$ac_ext >&5
16694
Martin v. Löwis11437992002-04-12 09:54:03 +000016695
16696 echo "$as_me:$LINENO: result: no" >&5
16697echo "${ECHO_T}no" >&6
16698 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
16699echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
16700 cat >conftest.$ac_ext <<_ACEOF
16701#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016702/* confdefs.h. */
16703_ACEOF
16704cat confdefs.h >>conftest.$ac_ext
16705cat >>conftest.$ac_ext <<_ACEOF
16706/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016707
16708# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016709
Martin v. Löwis11437992002-04-12 09:54:03 +000016710int
16711main ()
16712{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016713
16714 char *name;
16715 struct hostent *he;
16716 struct hostent_data data;
16717
16718 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000016719
16720 ;
16721 return 0;
16722}
16723_ACEOF
16724rm -f conftest.$ac_objext
16725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16726 (eval $ac_compile) 2>&5
16727 ac_status=$?
16728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16729 (exit $ac_status); } &&
16730 { ac_try='test -s conftest.$ac_objext'
16731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16732 (eval $ac_try) 2>&5
16733 ac_status=$?
16734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16735 (exit $ac_status); }; }; then
16736
16737 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016738#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016739_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016740
Martin v. Löwis11437992002-04-12 09:54:03 +000016741
16742cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016743#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016744_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016745
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 echo "$as_me:$LINENO: result: yes" >&5
16747echo "${ECHO_T}yes" >&6
16748
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016749else
Martin v. Löwis11437992002-04-12 09:54:03 +000016750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016751sed 's/^/| /' conftest.$ac_ext >&5
16752
Martin v. Löwis11437992002-04-12 09:54:03 +000016753
16754 echo "$as_me:$LINENO: result: no" >&5
16755echo "${ECHO_T}no" >&6
16756
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016757fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016758rm -f conftest.$ac_objext conftest.$ac_ext
16759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016760fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016761rm -f conftest.$ac_objext conftest.$ac_ext
16762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016763fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016764rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016765 CFLAGS=$OLD_CFLAGS
16766
16767else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016768
Martin v. Löwis11437992002-04-12 09:54:03 +000016769
16770for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016771do
Martin v. Löwis11437992002-04-12 09:54:03 +000016772as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16773echo "$as_me:$LINENO: checking for $ac_func" >&5
16774echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16775if eval "test \"\${$as_ac_var+set}\" = set"; then
16776 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016777else
Martin v. Löwis11437992002-04-12 09:54:03 +000016778 cat >conftest.$ac_ext <<_ACEOF
16779#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016780/* confdefs.h. */
16781_ACEOF
16782cat confdefs.h >>conftest.$ac_ext
16783cat >>conftest.$ac_ext <<_ACEOF
16784/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016785/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016786 which can conflict with char $ac_func (); below.
16787 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016788 <limits.h> exists even on freestanding compilers. Under hpux,
16789 including <limits.h> includes <sys/time.h> and causes problems
16790 checking for functions defined therein. */
16791#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016792# include <limits.h>
16793#else
16794# include <assert.h>
16795#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016796/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016797#ifdef __cplusplus
16798extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016799{
Martin v. Löwis11437992002-04-12 09:54:03 +000016800#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016801/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016802 builtin and then its argument prototype would still apply. */
16803char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016804/* The GNU C library defines this for functions which it implements
16805 to always fail with ENOSYS. Some functions are actually named
16806 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016807#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016808choke me
16809#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016810char (*f) () = $ac_func;
16811#endif
16812#ifdef __cplusplus
16813}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016814#endif
16815
Skip Montanaro6dead952003-09-25 14:50:04 +000016816int
16817main ()
16818{
16819return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016820 ;
16821 return 0;
16822}
16823_ACEOF
16824rm -f conftest.$ac_objext conftest$ac_exeext
16825if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16826 (eval $ac_link) 2>&5
16827 ac_status=$?
16828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16829 (exit $ac_status); } &&
16830 { ac_try='test -s conftest$ac_exeext'
16831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16832 (eval $ac_try) 2>&5
16833 ac_status=$?
16834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16835 (exit $ac_status); }; }; then
16836 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016837else
Martin v. Löwis11437992002-04-12 09:54:03 +000016838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016839sed 's/^/| /' conftest.$ac_ext >&5
16840
Martin v. Löwis11437992002-04-12 09:54:03 +000016841eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016842fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016843rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016844fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016845echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16846echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16847if test `eval echo '${'$as_ac_var'}'` = yes; then
16848 cat >>confdefs.h <<_ACEOF
16849#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16850_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016851
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016852fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016853done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016854
Michael W. Hudson54241132001-12-07 15:38:26 +000016855
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016856fi
16857
Michael W. Hudson54241132001-12-07 15:38:26 +000016858
16859
16860
16861
16862
16863
Guido van Rossum627b2d71993-12-24 10:39:16 +000016864# checks for system services
16865# (none yet)
16866
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016867# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016868echo "$as_me:$LINENO: checking for __fpu_control" >&5
16869echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16870if test "${ac_cv_func___fpu_control+set}" = set; then
16871 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016872else
Martin v. Löwis11437992002-04-12 09:54:03 +000016873 cat >conftest.$ac_ext <<_ACEOF
16874#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016875/* confdefs.h. */
16876_ACEOF
16877cat confdefs.h >>conftest.$ac_ext
16878cat >>conftest.$ac_ext <<_ACEOF
16879/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016880/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016881 which can conflict with char __fpu_control (); below.
16882 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016883 <limits.h> exists even on freestanding compilers. Under hpux,
16884 including <limits.h> includes <sys/time.h> and causes problems
16885 checking for functions defined therein. */
16886#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016887# include <limits.h>
16888#else
16889# include <assert.h>
16890#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016891/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016892#ifdef __cplusplus
16893extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016894{
Martin v. Löwis11437992002-04-12 09:54:03 +000016895#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016896/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016897 builtin and then its argument prototype would still apply. */
16898char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016899/* The GNU C library defines this for functions which it implements
16900 to always fail with ENOSYS. Some functions are actually named
16901 something starting with __ and the normal name is an alias. */
16902#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16903choke me
16904#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016905char (*f) () = __fpu_control;
16906#endif
16907#ifdef __cplusplus
16908}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016909#endif
16910
Skip Montanaro6dead952003-09-25 14:50:04 +000016911int
16912main ()
16913{
16914return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 ;
16916 return 0;
16917}
16918_ACEOF
16919rm -f conftest.$ac_objext conftest$ac_exeext
16920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16921 (eval $ac_link) 2>&5
16922 ac_status=$?
16923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16924 (exit $ac_status); } &&
16925 { ac_try='test -s conftest$ac_exeext'
16926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16927 (eval $ac_try) 2>&5
16928 ac_status=$?
16929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16930 (exit $ac_status); }; }; then
16931 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016932else
Martin v. Löwis11437992002-04-12 09:54:03 +000016933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016934sed 's/^/| /' conftest.$ac_ext >&5
16935
Martin v. Löwis11437992002-04-12 09:54:03 +000016936ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016937fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016938rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016939fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016940echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16941echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16942if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016943 :
16944else
Martin v. Löwis11437992002-04-12 09:54:03 +000016945
16946echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16947echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16948if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016950else
Martin v. Löwis11437992002-04-12 09:54:03 +000016951 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016952LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016953cat >conftest.$ac_ext <<_ACEOF
16954#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016955/* confdefs.h. */
16956_ACEOF
16957cat confdefs.h >>conftest.$ac_ext
16958cat >>conftest.$ac_ext <<_ACEOF
16959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016961/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016962#ifdef __cplusplus
16963extern "C"
16964#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016965/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 builtin and then its argument prototype would still apply. */
16967char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016968int
16969main ()
16970{
16971__fpu_control ();
16972 ;
16973 return 0;
16974}
16975_ACEOF
16976rm -f conftest.$ac_objext conftest$ac_exeext
16977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16978 (eval $ac_link) 2>&5
16979 ac_status=$?
16980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16981 (exit $ac_status); } &&
16982 { ac_try='test -s conftest$ac_exeext'
16983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16984 (eval $ac_try) 2>&5
16985 ac_status=$?
16986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16987 (exit $ac_status); }; }; then
16988 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016989else
Martin v. Löwis11437992002-04-12 09:54:03 +000016990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016991sed 's/^/| /' conftest.$ac_ext >&5
16992
Martin v. Löwis11437992002-04-12 09:54:03 +000016993ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016994fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016995rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16996LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016998echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16999echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
17000if test $ac_cv_lib_ieee___fpu_control = yes; then
17001 cat >>confdefs.h <<_ACEOF
17002#define HAVE_LIBIEEE 1
17003_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017004
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017005 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017006
Guido van Rossum627b2d71993-12-24 10:39:16 +000017007fi
17008
Michael W. Hudson54241132001-12-07 15:38:26 +000017009
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017010fi
17011
Michael W. Hudson54241132001-12-07 15:38:26 +000017012
Guido van Rossum7f253911997-05-09 02:42:48 +000017013# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000017014echo "$as_me:$LINENO: checking for --with-fpectl" >&5
17015echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
17016
Guido van Rossum7f253911997-05-09 02:42:48 +000017017# Check whether --with-fpectl or --without-fpectl was given.
17018if test "${with_fpectl+set}" = set; then
17019 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000017020
Guido van Rossum7f253911997-05-09 02:42:48 +000017021if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017022then
17023
17024cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000017025#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017026_ACEOF
17027
17028 echo "$as_me:$LINENO: result: yes" >&5
17029echo "${ECHO_T}yes" >&6
17030else echo "$as_me:$LINENO: result: no" >&5
17031echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017032fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017033else
Martin v. Löwis11437992002-04-12 09:54:03 +000017034 echo "$as_me:$LINENO: result: no" >&5
17035echo "${ECHO_T}no" >&6
17036fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000017037
Guido van Rossum7f43da71994-08-01 12:15:30 +000017038# check for --with-libm=...
17039
Guido van Rossum563e7081996-09-10 18:20:48 +000017040case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000017041Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000017042BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000017043*) LIBM=-lm
17044esac
Martin v. Löwis11437992002-04-12 09:54:03 +000017045echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
17046echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
17047
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017048# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017049if test "${with_libm+set}" = set; then
17050 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000017051
Guido van Rossum7f253911997-05-09 02:42:48 +000017052if test "$withval" = no
17053then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 echo "$as_me:$LINENO: result: force LIBM empty" >&5
17055echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017056elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017057then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017058 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
17059echo "${ECHO_T}set LIBM=\"$withval\"" >&6
17060else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
17061echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
17062 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017063fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017064else
Martin v. Löwis11437992002-04-12 09:54:03 +000017065 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
17066echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
17067fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017068
17069# check for --with-libc=...
17070
Martin v. Löwis11437992002-04-12 09:54:03 +000017071echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
17072echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
17073
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017074# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017075if test "${with_libc+set}" = set; then
17076 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000017077
Guido van Rossum7f253911997-05-09 02:42:48 +000017078if test "$withval" = no
17079then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000017080 echo "$as_me:$LINENO: result: force LIBC empty" >&5
17081echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017082elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017083then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017084 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
17085echo "${ECHO_T}set LIBC=\"$withval\"" >&6
17086else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
17087echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
17088 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017089fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017090else
Martin v. Löwis11437992002-04-12 09:54:03 +000017091 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
17092echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
17093fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017094
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017095# check for hypot() in math library
17096LIBS_SAVE=$LIBS
17097LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000017098
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017099for ac_func in hypot
17100do
Martin v. Löwis11437992002-04-12 09:54:03 +000017101as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17102echo "$as_me:$LINENO: checking for $ac_func" >&5
17103echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17104if eval "test \"\${$as_ac_var+set}\" = set"; then
17105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017106else
Martin v. Löwis11437992002-04-12 09:54:03 +000017107 cat >conftest.$ac_ext <<_ACEOF
17108#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017109/* confdefs.h. */
17110_ACEOF
17111cat confdefs.h >>conftest.$ac_ext
17112cat >>conftest.$ac_ext <<_ACEOF
17113/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017114/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017115 which can conflict with char $ac_func (); below.
17116 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017117 <limits.h> exists even on freestanding compilers. Under hpux,
17118 including <limits.h> includes <sys/time.h> and causes problems
17119 checking for functions defined therein. */
17120#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017121# include <limits.h>
17122#else
17123# include <assert.h>
17124#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017125/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017126#ifdef __cplusplus
17127extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017128{
Martin v. Löwis11437992002-04-12 09:54:03 +000017129#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017130/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017131 builtin and then its argument prototype would still apply. */
17132char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017133/* The GNU C library defines this for functions which it implements
17134 to always fail with ENOSYS. Some functions are actually named
17135 something starting with __ and the normal name is an alias. */
17136#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17137choke me
17138#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017139char (*f) () = $ac_func;
17140#endif
17141#ifdef __cplusplus
17142}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017143#endif
17144
Skip Montanaro6dead952003-09-25 14:50:04 +000017145int
17146main ()
17147{
17148return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017149 ;
17150 return 0;
17151}
17152_ACEOF
17153rm -f conftest.$ac_objext conftest$ac_exeext
17154if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17155 (eval $ac_link) 2>&5
17156 ac_status=$?
17157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17158 (exit $ac_status); } &&
17159 { ac_try='test -s conftest$ac_exeext'
17160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17161 (eval $ac_try) 2>&5
17162 ac_status=$?
17163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17164 (exit $ac_status); }; }; then
17165 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017166else
Martin v. Löwis11437992002-04-12 09:54:03 +000017167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017168sed 's/^/| /' conftest.$ac_ext >&5
17169
Martin v. Löwis11437992002-04-12 09:54:03 +000017170eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017172rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017174echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17175echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17176if test `eval echo '${'$as_ac_var'}'` = yes; then
17177 cat >>confdefs.h <<_ACEOF
17178#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17179_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017180
Michael W. Hudson54241132001-12-07 15:38:26 +000017181else
Martin v. Löwis11437992002-04-12 09:54:03 +000017182 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017183fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017184done
17185
Michael W. Hudson54241132001-12-07 15:38:26 +000017186
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017187LIBS=$LIBS_SAVE
17188
Guido van Rossumef2255b2000-03-10 22:30:29 +000017189# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017190if test "${ac_cv_header_wchar_h+set}" = set; then
17191 echo "$as_me:$LINENO: checking for wchar.h" >&5
17192echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17193if test "${ac_cv_header_wchar_h+set}" = set; then
17194 echo $ECHO_N "(cached) $ECHO_C" >&6
17195fi
17196echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17197echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017198else
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 # Is the header compilable?
17200echo "$as_me:$LINENO: checking wchar.h usability" >&5
17201echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
17202cat >conftest.$ac_ext <<_ACEOF
17203#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017204/* confdefs.h. */
17205_ACEOF
17206cat confdefs.h >>conftest.$ac_ext
17207cat >>conftest.$ac_ext <<_ACEOF
17208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017209$ac_includes_default
17210#include <wchar.h>
17211_ACEOF
17212rm -f conftest.$ac_objext
17213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17214 (eval $ac_compile) 2>&5
17215 ac_status=$?
17216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17217 (exit $ac_status); } &&
17218 { ac_try='test -s conftest.$ac_objext'
17219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17220 (eval $ac_try) 2>&5
17221 ac_status=$?
17222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17223 (exit $ac_status); }; }; then
17224 ac_header_compiler=yes
17225else
17226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017227sed 's/^/| /' conftest.$ac_ext >&5
17228
Martin v. Löwis11437992002-04-12 09:54:03 +000017229ac_header_compiler=no
17230fi
17231rm -f conftest.$ac_objext conftest.$ac_ext
17232echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17233echo "${ECHO_T}$ac_header_compiler" >&6
17234
17235# Is the header present?
17236echo "$as_me:$LINENO: checking wchar.h presence" >&5
17237echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
17238cat >conftest.$ac_ext <<_ACEOF
17239#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017240/* confdefs.h. */
17241_ACEOF
17242cat confdefs.h >>conftest.$ac_ext
17243cat >>conftest.$ac_ext <<_ACEOF
17244/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017245#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017246_ACEOF
17247if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17248 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17249 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017250 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000017251 rm -f conftest.er1
17252 cat conftest.err >&5
17253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17254 (exit $ac_status); } >/dev/null; then
17255 if test -s conftest.err; then
17256 ac_cpp_err=$ac_c_preproc_warn_flag
17257 else
17258 ac_cpp_err=
17259 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017260else
Martin v. Löwis11437992002-04-12 09:54:03 +000017261 ac_cpp_err=yes
17262fi
17263if test -z "$ac_cpp_err"; then
17264 ac_header_preproc=yes
17265else
17266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017267sed 's/^/| /' conftest.$ac_ext >&5
17268
Martin v. Löwis11437992002-04-12 09:54:03 +000017269 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017271rm -f conftest.err conftest.$ac_ext
17272echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17273echo "${ECHO_T}$ac_header_preproc" >&6
17274
17275# So? What about this header?
17276case $ac_header_compiler:$ac_header_preproc in
17277 yes:no )
17278 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
17279echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17280 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017281echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17282 (
17283 cat <<\_ASBOX
17284## ------------------------------------ ##
17285## Report this to bug-autoconf@gnu.org. ##
17286## ------------------------------------ ##
17287_ASBOX
17288 ) |
17289 sed "s/^/$as_me: WARNING: /" >&2
17290 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017291 no:yes )
17292 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
17293echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
17294 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
17295echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
17296 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017297echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17298 (
17299 cat <<\_ASBOX
17300## ------------------------------------ ##
17301## Report this to bug-autoconf@gnu.org. ##
17302## ------------------------------------ ##
17303_ASBOX
17304 ) |
17305 sed "s/^/$as_me: WARNING: /" >&2
17306 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017307esac
17308echo "$as_me:$LINENO: checking for wchar.h" >&5
17309echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17310if test "${ac_cv_header_wchar_h+set}" = set; then
17311 echo $ECHO_N "(cached) $ECHO_C" >&6
17312else
17313 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000017314fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017315echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17316echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
17317
17318fi
17319if test $ac_cv_header_wchar_h = yes; then
17320
17321
17322cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017323#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017324_ACEOF
17325
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017326 wchar_h="yes"
17327
Guido van Rossumef2255b2000-03-10 22:30:29 +000017328else
Martin v. Löwis11437992002-04-12 09:54:03 +000017329 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017330
17331fi
17332
Michael W. Hudson54241132001-12-07 15:38:26 +000017333
Martin v. Löwis11437992002-04-12 09:54:03 +000017334
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017335# determine wchar_t size
17336if test "$wchar_h" = yes
17337then
Martin v. Löwis11437992002-04-12 09:54:03 +000017338 echo "$as_me:$LINENO: checking for wchar_t" >&5
17339echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
17340if test "${ac_cv_type_wchar_t+set}" = set; then
17341 echo $ECHO_N "(cached) $ECHO_C" >&6
17342else
17343 cat >conftest.$ac_ext <<_ACEOF
17344#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017345/* confdefs.h. */
17346_ACEOF
17347cat confdefs.h >>conftest.$ac_ext
17348cat >>conftest.$ac_ext <<_ACEOF
17349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017350#include <wchar.h>
17351
Martin v. Löwis11437992002-04-12 09:54:03 +000017352int
17353main ()
17354{
17355if ((wchar_t *) 0)
17356 return 0;
17357if (sizeof (wchar_t))
17358 return 0;
17359 ;
17360 return 0;
17361}
17362_ACEOF
17363rm -f conftest.$ac_objext
17364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17365 (eval $ac_compile) 2>&5
17366 ac_status=$?
17367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17368 (exit $ac_status); } &&
17369 { ac_try='test -s conftest.$ac_objext'
17370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17371 (eval $ac_try) 2>&5
17372 ac_status=$?
17373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17374 (exit $ac_status); }; }; then
17375 ac_cv_type_wchar_t=yes
17376else
17377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017378sed 's/^/| /' conftest.$ac_ext >&5
17379
Martin v. Löwis11437992002-04-12 09:54:03 +000017380ac_cv_type_wchar_t=no
17381fi
17382rm -f conftest.$ac_objext conftest.$ac_ext
17383fi
17384echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
17385echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
17386
17387echo "$as_me:$LINENO: checking size of wchar_t" >&5
17388echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
17389if test "${ac_cv_sizeof_wchar_t+set}" = set; then
17390 echo $ECHO_N "(cached) $ECHO_C" >&6
17391else
17392 if test "$ac_cv_type_wchar_t" = yes; then
17393 # The cast to unsigned long works around a bug in the HP C Compiler
17394 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17395 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17396 # This bug is HP SR number 8606223364.
17397 if test "$cross_compiling" = yes; then
17398 # Depending upon the size, compute the lo and hi bounds.
17399cat >conftest.$ac_ext <<_ACEOF
17400#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017401/* confdefs.h. */
17402_ACEOF
17403cat confdefs.h >>conftest.$ac_ext
17404cat >>conftest.$ac_ext <<_ACEOF
17405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017406#include <wchar.h>
17407
Martin v. Löwis11437992002-04-12 09:54:03 +000017408int
17409main ()
17410{
17411static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
17412test_array [0] = 0
17413
17414 ;
17415 return 0;
17416}
17417_ACEOF
17418rm -f conftest.$ac_objext
17419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17420 (eval $ac_compile) 2>&5
17421 ac_status=$?
17422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17423 (exit $ac_status); } &&
17424 { ac_try='test -s conftest.$ac_objext'
17425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17426 (eval $ac_try) 2>&5
17427 ac_status=$?
17428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17429 (exit $ac_status); }; }; then
17430 ac_lo=0 ac_mid=0
17431 while :; do
17432 cat >conftest.$ac_ext <<_ACEOF
17433#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017434/* confdefs.h. */
17435_ACEOF
17436cat confdefs.h >>conftest.$ac_ext
17437cat >>conftest.$ac_ext <<_ACEOF
17438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017439#include <wchar.h>
17440
Martin v. Löwis11437992002-04-12 09:54:03 +000017441int
17442main ()
17443{
17444static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17445test_array [0] = 0
17446
17447 ;
17448 return 0;
17449}
17450_ACEOF
17451rm -f conftest.$ac_objext
17452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17453 (eval $ac_compile) 2>&5
17454 ac_status=$?
17455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17456 (exit $ac_status); } &&
17457 { ac_try='test -s conftest.$ac_objext'
17458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17459 (eval $ac_try) 2>&5
17460 ac_status=$?
17461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17462 (exit $ac_status); }; }; then
17463 ac_hi=$ac_mid; break
17464else
17465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017466sed 's/^/| /' conftest.$ac_ext >&5
17467
Martin v. Löwis11437992002-04-12 09:54:03 +000017468ac_lo=`expr $ac_mid + 1`
17469 if test $ac_lo -le $ac_mid; then
17470 ac_lo= ac_hi=
17471 break
17472 fi
17473 ac_mid=`expr 2 '*' $ac_mid + 1`
17474fi
17475rm -f conftest.$ac_objext conftest.$ac_ext
17476 done
17477else
17478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017479sed 's/^/| /' conftest.$ac_ext >&5
17480
Martin v. Löwis11437992002-04-12 09:54:03 +000017481cat >conftest.$ac_ext <<_ACEOF
17482#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017483/* confdefs.h. */
17484_ACEOF
17485cat confdefs.h >>conftest.$ac_ext
17486cat >>conftest.$ac_ext <<_ACEOF
17487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017488#include <wchar.h>
17489
Martin v. Löwis11437992002-04-12 09:54:03 +000017490int
17491main ()
17492{
17493static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
17494test_array [0] = 0
17495
17496 ;
17497 return 0;
17498}
17499_ACEOF
17500rm -f conftest.$ac_objext
17501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17502 (eval $ac_compile) 2>&5
17503 ac_status=$?
17504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17505 (exit $ac_status); } &&
17506 { ac_try='test -s conftest.$ac_objext'
17507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17508 (eval $ac_try) 2>&5
17509 ac_status=$?
17510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17511 (exit $ac_status); }; }; then
17512 ac_hi=-1 ac_mid=-1
17513 while :; do
17514 cat >conftest.$ac_ext <<_ACEOF
17515#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017516/* confdefs.h. */
17517_ACEOF
17518cat confdefs.h >>conftest.$ac_ext
17519cat >>conftest.$ac_ext <<_ACEOF
17520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017521#include <wchar.h>
17522
Martin v. Löwis11437992002-04-12 09:54:03 +000017523int
17524main ()
17525{
17526static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
17527test_array [0] = 0
17528
17529 ;
17530 return 0;
17531}
17532_ACEOF
17533rm -f conftest.$ac_objext
17534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17535 (eval $ac_compile) 2>&5
17536 ac_status=$?
17537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17538 (exit $ac_status); } &&
17539 { ac_try='test -s conftest.$ac_objext'
17540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17541 (eval $ac_try) 2>&5
17542 ac_status=$?
17543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17544 (exit $ac_status); }; }; then
17545 ac_lo=$ac_mid; break
17546else
17547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017548sed 's/^/| /' conftest.$ac_ext >&5
17549
Martin v. Löwis11437992002-04-12 09:54:03 +000017550ac_hi=`expr '(' $ac_mid ')' - 1`
17551 if test $ac_mid -le $ac_hi; then
17552 ac_lo= ac_hi=
17553 break
17554 fi
17555 ac_mid=`expr 2 '*' $ac_mid`
17556fi
17557rm -f conftest.$ac_objext conftest.$ac_ext
17558 done
17559else
17560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017561sed 's/^/| /' conftest.$ac_ext >&5
17562
Martin v. Löwis11437992002-04-12 09:54:03 +000017563ac_lo= ac_hi=
17564fi
17565rm -f conftest.$ac_objext conftest.$ac_ext
17566fi
17567rm -f conftest.$ac_objext conftest.$ac_ext
17568# Binary search between lo and hi bounds.
17569while test "x$ac_lo" != "x$ac_hi"; do
17570 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17571 cat >conftest.$ac_ext <<_ACEOF
17572#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017573/* confdefs.h. */
17574_ACEOF
17575cat confdefs.h >>conftest.$ac_ext
17576cat >>conftest.$ac_ext <<_ACEOF
17577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017578#include <wchar.h>
17579
Martin v. Löwis11437992002-04-12 09:54:03 +000017580int
17581main ()
17582{
17583static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17584test_array [0] = 0
17585
17586 ;
17587 return 0;
17588}
17589_ACEOF
17590rm -f conftest.$ac_objext
17591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17592 (eval $ac_compile) 2>&5
17593 ac_status=$?
17594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17595 (exit $ac_status); } &&
17596 { ac_try='test -s conftest.$ac_objext'
17597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17598 (eval $ac_try) 2>&5
17599 ac_status=$?
17600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17601 (exit $ac_status); }; }; then
17602 ac_hi=$ac_mid
17603else
17604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017605sed 's/^/| /' conftest.$ac_ext >&5
17606
Martin v. Löwis11437992002-04-12 09:54:03 +000017607ac_lo=`expr '(' $ac_mid ')' + 1`
17608fi
17609rm -f conftest.$ac_objext conftest.$ac_ext
17610done
17611case $ac_lo in
17612?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017613'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17614See \`config.log' for more details." >&5
17615echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17616See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 { (exit 1); exit 1; }; } ;;
17618esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017619else
17620 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017621 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17622See \`config.log' for more details." >&5
17623echo "$as_me: error: cannot run test program while cross compiling
17624See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017625 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000017626else
Martin v. Löwis11437992002-04-12 09:54:03 +000017627 cat >conftest.$ac_ext <<_ACEOF
17628#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017629/* confdefs.h. */
17630_ACEOF
17631cat confdefs.h >>conftest.$ac_ext
17632cat >>conftest.$ac_ext <<_ACEOF
17633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017634#include <wchar.h>
17635
17636long longval () { return (long) (sizeof (wchar_t)); }
17637unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000017638#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017639#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017640int
17641main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017642{
Martin v. Löwis11437992002-04-12 09:54:03 +000017643
17644 FILE *f = fopen ("conftest.val", "w");
17645 if (! f)
17646 exit (1);
17647 if (((long) (sizeof (wchar_t))) < 0)
17648 {
17649 long i = longval ();
17650 if (i != ((long) (sizeof (wchar_t))))
17651 exit (1);
17652 fprintf (f, "%ld\n", i);
17653 }
17654 else
17655 {
17656 unsigned long i = ulongval ();
17657 if (i != ((long) (sizeof (wchar_t))))
17658 exit (1);
17659 fprintf (f, "%lu\n", i);
17660 }
17661 exit (ferror (f) || fclose (f) != 0);
17662
17663 ;
17664 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000017665}
Martin v. Löwis11437992002-04-12 09:54:03 +000017666_ACEOF
17667rm -f conftest$ac_exeext
17668if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17669 (eval $ac_link) 2>&5
17670 ac_status=$?
17671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17672 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17674 (eval $ac_try) 2>&5
17675 ac_status=$?
17676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17677 (exit $ac_status); }; }; then
17678 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000017679else
Martin v. Löwis11437992002-04-12 09:54:03 +000017680 echo "$as_me: program exited with status $ac_status" >&5
17681echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017682sed 's/^/| /' conftest.$ac_ext >&5
17683
Martin v. Löwis11437992002-04-12 09:54:03 +000017684( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000017685{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17686See \`config.log' for more details." >&5
17687echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17688See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017689 { (exit 1); exit 1; }; }
17690fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017691rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017692fi
17693fi
17694rm -f conftest.val
17695else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017696 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000017697fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017698fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017699echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
17700echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
17701cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017702#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017703_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017704
Michael W. Hudson54241132001-12-07 15:38:26 +000017705
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017706fi
17707
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017708echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
17709echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
17710have_ucs4_tcl=no
17711cat >conftest.$ac_ext <<_ACEOF
17712#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017713/* confdefs.h. */
17714_ACEOF
17715cat confdefs.h >>conftest.$ac_ext
17716cat >>conftest.$ac_ext <<_ACEOF
17717/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017718
17719#include <tcl.h>
17720#if TCL_UTF_MAX != 6
17721# error "NOT UCS4_TCL"
17722#endif
17723int
17724main ()
17725{
17726
17727 ;
17728 return 0;
17729}
17730_ACEOF
17731rm -f conftest.$ac_objext
17732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17733 (eval $ac_compile) 2>&5
17734 ac_status=$?
17735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17736 (exit $ac_status); } &&
17737 { ac_try='test -s conftest.$ac_objext'
17738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17739 (eval $ac_try) 2>&5
17740 ac_status=$?
17741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17742 (exit $ac_status); }; }; then
17743
17744
17745cat >>confdefs.h <<\_ACEOF
17746#define HAVE_UCS4_TCL 1
17747_ACEOF
17748
17749 have_ucs4_tcl=yes
17750
17751else
17752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017753sed 's/^/| /' conftest.$ac_ext >&5
17754
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017755fi
17756rm -f conftest.$ac_objext conftest.$ac_ext
17757echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
17758echo "${ECHO_T}$have_ucs4_tcl" >&6
17759
Skip Montanaro6dead952003-09-25 14:50:04 +000017760# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017761if test "$wchar_h" = yes
17762then
17763 # check whether wchar_t is signed or not
17764 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
17765echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
17766 if test "${ac_cv_wchar_t_signed+set}" = set; then
17767 echo $ECHO_N "(cached) $ECHO_C" >&6
17768else
17769
17770 if test "$cross_compiling" = yes; then
17771 ac_cv_wchar_t_signed=yes
17772else
17773 cat >conftest.$ac_ext <<_ACEOF
17774#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017775/* confdefs.h. */
17776_ACEOF
17777cat confdefs.h >>conftest.$ac_ext
17778cat >>conftest.$ac_ext <<_ACEOF
17779/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017780
17781 #include <wchar.h>
17782 int main()
17783 {
17784 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
17785 }
17786
17787_ACEOF
17788rm -f conftest$ac_exeext
17789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17790 (eval $ac_link) 2>&5
17791 ac_status=$?
17792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17795 (eval $ac_try) 2>&5
17796 ac_status=$?
17797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17798 (exit $ac_status); }; }; then
17799 ac_cv_wchar_t_signed=yes
17800else
17801 echo "$as_me: program exited with status $ac_status" >&5
17802echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017803sed 's/^/| /' conftest.$ac_ext >&5
17804
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017805( exit $ac_status )
17806ac_cv_wchar_t_signed=no
17807fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017808rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017809fi
17810fi
17811
17812 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17813echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17814fi
17815
Martin v. Löwis11437992002-04-12 09:54:03 +000017816echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17817echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017818# Check whether --enable-unicode or --disable-unicode was given.
17819if test "${enable_unicode+set}" = set; then
17820 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017821
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017822else
17823 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017824fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017825
17826if test $enable_unicode = yes
17827then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017828 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017829 case "$have_ucs4_tcl" in
17830 yes) enable_unicode="ucs4"
17831 ;;
17832 *) enable_unicode="ucs2"
17833 ;;
17834 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017835fi
17836
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017837
17838
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017839case "$enable_unicode" in
17840ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017841 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017842#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017843_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017844
17845 ;;
17846ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017847 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017848#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017849_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017850
17851 ;;
17852esac
17853
Michael W. Hudson54241132001-12-07 15:38:26 +000017854
Martin v. Löwis11437992002-04-12 09:54:03 +000017855
17856
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017857
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017858if test "$enable_unicode" = "no"
17859then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017860 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017861 echo "$as_me:$LINENO: result: not used" >&5
17862echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017863else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017864 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017865
17866cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017867#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017868_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017869
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017870
17871 # wchar_t is only usable if it maps to an unsigned type
17872 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17873 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017874 then
17875 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017876
Martin v. Löwis11437992002-04-12 09:54:03 +000017877cat >>confdefs.h <<\_ACEOF
17878#define HAVE_USABLE_WCHAR_T 1
17879_ACEOF
17880
17881 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017882#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017883_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017884
17885 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17886 then
17887 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017888 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017889#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017890_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017891
17892 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17893 then
17894 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017895 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017896#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017897_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017898
17899 else
17900 PY_UNICODE_TYPE="no type found"
17901 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017902 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17903echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017904fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017905
17906# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017907echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17908echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17909if test "${ac_cv_c_bigendian+set}" = set; then
17910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017911else
Martin v. Löwis11437992002-04-12 09:54:03 +000017912 # See if sys/param.h defines the BYTE_ORDER macro.
17913cat >conftest.$ac_ext <<_ACEOF
17914#line $LINENO "configure"
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. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017920#include <sys/types.h>
17921#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017922
Martin v. Löwis11437992002-04-12 09:54:03 +000017923int
17924main ()
17925{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017926#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17927 bogus endian macros
17928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017929
17930 ;
17931 return 0;
17932}
17933_ACEOF
17934rm -f conftest.$ac_objext
17935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17936 (eval $ac_compile) 2>&5
17937 ac_status=$?
17938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17939 (exit $ac_status); } &&
17940 { ac_try='test -s conftest.$ac_objext'
17941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17942 (eval $ac_try) 2>&5
17943 ac_status=$?
17944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17945 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017946 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017947cat >conftest.$ac_ext <<_ACEOF
17948#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017949/* confdefs.h. */
17950_ACEOF
17951cat confdefs.h >>conftest.$ac_ext
17952cat >>conftest.$ac_ext <<_ACEOF
17953/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017954#include <sys/types.h>
17955#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017956
Martin v. Löwis11437992002-04-12 09:54:03 +000017957int
17958main ()
17959{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017960#if BYTE_ORDER != BIG_ENDIAN
17961 not big endian
17962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017963
17964 ;
17965 return 0;
17966}
17967_ACEOF
17968rm -f conftest.$ac_objext
17969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17970 (eval $ac_compile) 2>&5
17971 ac_status=$?
17972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17973 (exit $ac_status); } &&
17974 { ac_try='test -s conftest.$ac_objext'
17975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17976 (eval $ac_try) 2>&5
17977 ac_status=$?
17978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17979 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017980 ac_cv_c_bigendian=yes
17981else
Martin v. Löwis11437992002-04-12 09:54:03 +000017982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017983sed 's/^/| /' conftest.$ac_ext >&5
17984
Martin v. Löwis11437992002-04-12 09:54:03 +000017985ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017986fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017987rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017988else
Martin v. Löwis11437992002-04-12 09:54:03 +000017989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017990sed 's/^/| /' conftest.$ac_ext >&5
17991
Martin v. Löwis11437992002-04-12 09:54:03 +000017992# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017993if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017994 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017995 ac_cv_c_bigendian=unknown
17996 cat >conftest.$ac_ext <<_ACEOF
17997#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017998/* confdefs.h. */
17999_ACEOF
18000cat confdefs.h >>conftest.$ac_ext
18001cat >>conftest.$ac_ext <<_ACEOF
18002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018003short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
18004short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
18005void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
18006short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18007short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18008void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018009int
18010main ()
18011{
18012 _ascii (); _ebcdic ();
18013 ;
18014 return 0;
18015}
18016_ACEOF
18017rm -f conftest.$ac_objext
18018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18019 (eval $ac_compile) 2>&5
18020 ac_status=$?
18021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18022 (exit $ac_status); } &&
18023 { ac_try='test -s conftest.$ac_objext'
18024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18025 (eval $ac_try) 2>&5
18026 ac_status=$?
18027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18028 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018029 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018030 ac_cv_c_bigendian=yes
18031fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018032if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018033 if test "$ac_cv_c_bigendian" = unknown; then
18034 ac_cv_c_bigendian=no
18035 else
18036 # finding both strings is unlikely to happen, but who knows?
18037 ac_cv_c_bigendian=unknown
18038 fi
18039fi
18040else
18041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018042sed 's/^/| /' conftest.$ac_ext >&5
18043
Martin v. Löwis11437992002-04-12 09:54:03 +000018044fi
18045rm -f conftest.$ac_objext conftest.$ac_ext
18046else
18047 cat >conftest.$ac_ext <<_ACEOF
18048#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018049/* confdefs.h. */
18050_ACEOF
18051cat confdefs.h >>conftest.$ac_ext
18052cat >>conftest.$ac_ext <<_ACEOF
18053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018054int
18055main ()
18056{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018057 /* Are we little or big endian? From Harbison&Steele. */
18058 union
18059 {
18060 long l;
18061 char c[sizeof (long)];
18062 } u;
18063 u.l = 1;
18064 exit (u.c[sizeof (long) - 1] == 1);
18065}
Martin v. Löwis11437992002-04-12 09:54:03 +000018066_ACEOF
18067rm -f conftest$ac_exeext
18068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18069 (eval $ac_link) 2>&5
18070 ac_status=$?
18071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18074 (eval $ac_try) 2>&5
18075 ac_status=$?
18076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18077 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018078 ac_cv_c_bigendian=no
18079else
Martin v. Löwis11437992002-04-12 09:54:03 +000018080 echo "$as_me: program exited with status $ac_status" >&5
18081echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018082sed 's/^/| /' conftest.$ac_ext >&5
18083
Martin v. Löwis11437992002-04-12 09:54:03 +000018084( exit $ac_status )
18085ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000018086fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018087rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000018088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018089fi
18090rm -f conftest.$ac_objext conftest.$ac_ext
18091fi
18092echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
18093echo "${ECHO_T}$ac_cv_c_bigendian" >&6
18094case $ac_cv_c_bigendian in
18095 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000018096
Martin v. Löwis11437992002-04-12 09:54:03 +000018097cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018098#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018099_ACEOF
18100 ;;
18101 no)
18102 ;;
18103 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018104 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018105presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018106echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018107presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
18108 { (exit 1); exit 1; }; } ;;
18109esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000018110
Michael W. Hudson54241132001-12-07 15:38:26 +000018111
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018112# Check whether right shifting a negative integer extends the sign bit
18113# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000018114echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
18115echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
18116if test "${ac_cv_rshift_extends_sign+set}" = set; then
18117 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018118else
Martin v. Löwis11437992002-04-12 09:54:03 +000018119
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018120if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018121 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018122else
Martin v. Löwis11437992002-04-12 09:54:03 +000018123 cat >conftest.$ac_ext <<_ACEOF
18124#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018125/* confdefs.h. */
18126_ACEOF
18127cat confdefs.h >>conftest.$ac_ext
18128cat >>conftest.$ac_ext <<_ACEOF
18129/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018130
18131int main()
18132{
Vladimir Marangozova6180282000-07-12 05:05:06 +000018133 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018134}
18135
Martin v. Löwis11437992002-04-12 09:54:03 +000018136_ACEOF
18137rm -f conftest$ac_exeext
18138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18139 (eval $ac_link) 2>&5
18140 ac_status=$?
18141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18144 (eval $ac_try) 2>&5
18145 ac_status=$?
18146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18147 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000018148 ac_cv_rshift_extends_sign=yes
18149else
Martin v. Löwis11437992002-04-12 09:54:03 +000018150 echo "$as_me: program exited with status $ac_status" >&5
18151echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018152sed 's/^/| /' conftest.$ac_ext >&5
18153
Martin v. Löwis11437992002-04-12 09:54:03 +000018154( exit $ac_status )
18155ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000018156fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018157rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018158fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000018159fi
18160
Martin v. Löwis11437992002-04-12 09:54:03 +000018161echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
18162echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018163if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018164then
Martin v. Löwis11437992002-04-12 09:54:03 +000018165
18166cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018167#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018168_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018169
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018170fi
18171
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018172# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018173echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
18174echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
18175if test "${ac_cv_have_getc_unlocked+set}" = set; then
18176 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018177else
Martin v. Löwis11437992002-04-12 09:54:03 +000018178
18179cat >conftest.$ac_ext <<_ACEOF
18180#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018181/* confdefs.h. */
18182_ACEOF
18183cat confdefs.h >>conftest.$ac_ext
18184cat >>conftest.$ac_ext <<_ACEOF
18185/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018186#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018187int
18188main ()
18189{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018190
18191 FILE *f = fopen("/dev/null", "r");
18192 flockfile(f);
18193 getc_unlocked(f);
18194 funlockfile(f);
18195
Martin v. Löwis11437992002-04-12 09:54:03 +000018196 ;
18197 return 0;
18198}
18199_ACEOF
18200rm -f conftest.$ac_objext conftest$ac_exeext
18201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18202 (eval $ac_link) 2>&5
18203 ac_status=$?
18204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18205 (exit $ac_status); } &&
18206 { ac_try='test -s conftest$ac_exeext'
18207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18208 (eval $ac_try) 2>&5
18209 ac_status=$?
18210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18211 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018212 ac_cv_have_getc_unlocked=yes
18213else
Martin v. Löwis11437992002-04-12 09:54:03 +000018214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018215sed 's/^/| /' conftest.$ac_ext >&5
18216
Martin v. Löwis11437992002-04-12 09:54:03 +000018217ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018219rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018220fi
18221
Martin v. Löwis11437992002-04-12 09:54:03 +000018222echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
18223echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018224if test "$ac_cv_have_getc_unlocked" = yes
18225then
Martin v. Löwis11437992002-04-12 09:54:03 +000018226
18227cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018228#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018229_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018230
18231fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018232
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018233# check for readline 2.2
18234cat >conftest.$ac_ext <<_ACEOF
18235#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018236/* confdefs.h. */
18237_ACEOF
18238cat confdefs.h >>conftest.$ac_ext
18239cat >>conftest.$ac_ext <<_ACEOF
18240/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018241#include <readline/readline.h>
18242_ACEOF
18243if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18244 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18245 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018246 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018247 rm -f conftest.er1
18248 cat conftest.err >&5
18249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18250 (exit $ac_status); } >/dev/null; then
18251 if test -s conftest.err; then
18252 ac_cpp_err=$ac_c_preproc_warn_flag
18253 else
18254 ac_cpp_err=
18255 fi
18256else
18257 ac_cpp_err=yes
18258fi
18259if test -z "$ac_cpp_err"; then
18260 have_readline=yes
18261else
18262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018263sed 's/^/| /' conftest.$ac_ext >&5
18264
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018265 have_readline=no
18266fi
18267rm -f conftest.err conftest.$ac_ext
18268if test $have_readline = yes
18269then
18270 cat >conftest.$ac_ext <<_ACEOF
18271#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018272/* confdefs.h. */
18273_ACEOF
18274cat confdefs.h >>conftest.$ac_ext
18275cat >>conftest.$ac_ext <<_ACEOF
18276/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018277#include <readline/readline.h>
18278
18279_ACEOF
18280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000018281 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018282
18283cat >>confdefs.h <<\_ACEOF
18284#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
18285_ACEOF
18286
18287fi
18288rm -f conftest*
18289
18290fi
18291
Martin v. Löwis0daad592001-09-30 21:09:59 +000018292# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000018293echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
18294echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
18295if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
18296 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000018297else
Martin v. Löwis11437992002-04-12 09:54:03 +000018298 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000018299LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018300cat >conftest.$ac_ext <<_ACEOF
18301#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018302/* confdefs.h. */
18303_ACEOF
18304cat confdefs.h >>conftest.$ac_ext
18305cat >>conftest.$ac_ext <<_ACEOF
18306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018307
Guido van Rossum353ae582001-07-10 16:45:32 +000018308/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018309#ifdef __cplusplus
18310extern "C"
18311#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000018312/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018313 builtin and then its argument prototype would still apply. */
18314char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018315int
18316main ()
18317{
18318rl_pre_input_hook ();
18319 ;
18320 return 0;
18321}
18322_ACEOF
18323rm -f conftest.$ac_objext conftest$ac_exeext
18324if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18325 (eval $ac_link) 2>&5
18326 ac_status=$?
18327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18328 (exit $ac_status); } &&
18329 { ac_try='test -s conftest$ac_exeext'
18330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18331 (eval $ac_try) 2>&5
18332 ac_status=$?
18333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18334 (exit $ac_status); }; }; then
18335 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000018336else
Martin v. Löwis11437992002-04-12 09:54:03 +000018337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018338sed 's/^/| /' conftest.$ac_ext >&5
18339
Martin v. Löwis11437992002-04-12 09:54:03 +000018340ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000018341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018342rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18343LIBS=$ac_check_lib_save_LIBS
18344fi
18345echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
18346echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
18347if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018348
Martin v. Löwis11437992002-04-12 09:54:03 +000018349cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018350#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018351_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018352
Martin v. Löwis0daad592001-09-30 21:09:59 +000018353fi
18354
Michael W. Hudson54241132001-12-07 15:38:26 +000018355
Martin v. Löwis0daad592001-09-30 21:09:59 +000018356# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000018357echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
18358echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
18359if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
18360 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000018361else
Martin v. Löwis11437992002-04-12 09:54:03 +000018362 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000018363LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018364cat >conftest.$ac_ext <<_ACEOF
18365#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018366/* confdefs.h. */
18367_ACEOF
18368cat confdefs.h >>conftest.$ac_ext
18369cat >>conftest.$ac_ext <<_ACEOF
18370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018371
Martin v. Löwis0daad592001-09-30 21:09:59 +000018372/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018373#ifdef __cplusplus
18374extern "C"
18375#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000018376/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018377 builtin and then its argument prototype would still apply. */
18378char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018379int
18380main ()
18381{
18382rl_completion_matches ();
18383 ;
18384 return 0;
18385}
18386_ACEOF
18387rm -f conftest.$ac_objext conftest$ac_exeext
18388if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18389 (eval $ac_link) 2>&5
18390 ac_status=$?
18391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18392 (exit $ac_status); } &&
18393 { ac_try='test -s conftest$ac_exeext'
18394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18395 (eval $ac_try) 2>&5
18396 ac_status=$?
18397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18398 (exit $ac_status); }; }; then
18399 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000018400else
Martin v. Löwis11437992002-04-12 09:54:03 +000018401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018402sed 's/^/| /' conftest.$ac_ext >&5
18403
Martin v. Löwis11437992002-04-12 09:54:03 +000018404ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000018405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018406rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18407LIBS=$ac_check_lib_save_LIBS
18408fi
18409echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
18410echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
18411if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018412
Martin v. Löwis11437992002-04-12 09:54:03 +000018413cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018414#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018415_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018416
Guido van Rossum353ae582001-07-10 16:45:32 +000018417fi
18418
Jack Jansendd19cf82001-12-06 22:36:17 +000018419
Martin v. Löwis11437992002-04-12 09:54:03 +000018420echo "$as_me:$LINENO: checking for broken nice()" >&5
18421echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
18422if test "${ac_cv_broken_nice+set}" = set; then
18423 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018424else
Martin v. Löwis11437992002-04-12 09:54:03 +000018425
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018426if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018427 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018428else
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 cat >conftest.$ac_ext <<_ACEOF
18430#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018431/* confdefs.h. */
18432_ACEOF
18433cat confdefs.h >>conftest.$ac_ext
18434cat >>conftest.$ac_ext <<_ACEOF
18435/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018436
18437int main()
18438{
18439 int val1 = nice(1);
18440 if (val1 != -1 && val1 == nice(2))
18441 exit(0);
18442 exit(1);
18443}
18444
Martin v. Löwis11437992002-04-12 09:54:03 +000018445_ACEOF
18446rm -f conftest$ac_exeext
18447if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18448 (eval $ac_link) 2>&5
18449 ac_status=$?
18450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18453 (eval $ac_try) 2>&5
18454 ac_status=$?
18455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18456 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018457 ac_cv_broken_nice=yes
18458else
Martin v. Löwis11437992002-04-12 09:54:03 +000018459 echo "$as_me: program exited with status $ac_status" >&5
18460echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018461sed 's/^/| /' conftest.$ac_ext >&5
18462
Martin v. Löwis11437992002-04-12 09:54:03 +000018463( exit $ac_status )
18464ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018465fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018466rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018467fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018468fi
18469
Martin v. Löwis11437992002-04-12 09:54:03 +000018470echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
18471echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018472if test "$ac_cv_broken_nice" = yes
18473then
Martin v. Löwis11437992002-04-12 09:54:03 +000018474
18475cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018476#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018477_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018478
18479fi
18480
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018481# tzset(3) exists and works like we expect it to
18482echo "$as_me:$LINENO: checking for working tzset()" >&5
18483echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
18484if test "${ac_cv_working_tzset+set}" = set; then
18485 echo $ECHO_N "(cached) $ECHO_C" >&6
18486else
18487
18488if test "$cross_compiling" = yes; then
18489 ac_cv_working_tzset=no
18490else
18491 cat >conftest.$ac_ext <<_ACEOF
18492#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018493/* confdefs.h. */
18494_ACEOF
18495cat confdefs.h >>conftest.$ac_ext
18496cat >>conftest.$ac_ext <<_ACEOF
18497/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018498
18499#include <stdlib.h>
18500#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000018501#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018502int main()
18503{
Brett Cannon18367812003-09-19 00:59:16 +000018504 /* Note that we need to ensure that not only does tzset(3)
18505 do 'something' with localtime, but it works as documented
18506 in the library reference and as expected by the test suite.
18507
18508 Red Hat 6.2 doesn't understand the southern hemisphere
18509 after New Year's Day; it thinks swaps on that day.
18510 */
18511
18512 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
18513 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
18514
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018515 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018516 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018517 if (localtime(&groundhogday)->tm_hour != 0)
18518 exit(1);
18519
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018520 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018521 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018522 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018523 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000018524
18525 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
18526 tzset();
18527 if (localtime(&groundhogday)->tm_hour != 11)
18528 exit(1);
18529 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
18530 exit(1);
18531 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
18532 exit(1);
18533
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018534 exit(0);
18535}
18536
18537_ACEOF
18538rm -f conftest$ac_exeext
18539if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18540 (eval $ac_link) 2>&5
18541 ac_status=$?
18542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18545 (eval $ac_try) 2>&5
18546 ac_status=$?
18547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18548 (exit $ac_status); }; }; then
18549 ac_cv_working_tzset=yes
18550else
18551 echo "$as_me: program exited with status $ac_status" >&5
18552echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018553sed 's/^/| /' conftest.$ac_ext >&5
18554
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018555( exit $ac_status )
18556ac_cv_working_tzset=no
18557fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018558rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018559fi
18560fi
18561
18562echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
18563echo "${ECHO_T}$ac_cv_working_tzset" >&6
18564if test "$ac_cv_working_tzset" = yes
18565then
18566
18567cat >>confdefs.h <<\_ACEOF
18568#define HAVE_WORKING_TZSET 1
18569_ACEOF
18570
18571fi
18572
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018573# Look for subsecond timestamps in struct stat
18574echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
18575echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
18576if test "${ac_cv_stat_tv_nsec+set}" = set; then
18577 echo $ECHO_N "(cached) $ECHO_C" >&6
18578else
18579 cat >conftest.$ac_ext <<_ACEOF
18580#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018581/* confdefs.h. */
18582_ACEOF
18583cat confdefs.h >>conftest.$ac_ext
18584cat >>conftest.$ac_ext <<_ACEOF
18585/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018586#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018587int
18588main ()
18589{
18590
18591struct stat st;
18592st.st_mtim.tv_nsec = 1;
18593
18594 ;
18595 return 0;
18596}
18597_ACEOF
18598rm -f conftest.$ac_objext
18599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18600 (eval $ac_compile) 2>&5
18601 ac_status=$?
18602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18603 (exit $ac_status); } &&
18604 { ac_try='test -s conftest.$ac_objext'
18605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18606 (eval $ac_try) 2>&5
18607 ac_status=$?
18608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18609 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018610 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018611else
18612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018613sed 's/^/| /' conftest.$ac_ext >&5
18614
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018615ac_cv_stat_tv_nsec=no
18616fi
18617rm -f conftest.$ac_objext conftest.$ac_ext
18618fi
18619
18620echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
18621echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
18622if test "$ac_cv_stat_tv_nsec" = yes
18623then
18624
18625cat >>confdefs.h <<\_ACEOF
18626#define HAVE_STAT_TV_NSEC 1
18627_ACEOF
18628
18629fi
18630
Jack Jansen666b1e72001-10-31 12:11:48 +000018631# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000018632echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
18633echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
18634if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
18635 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018636else
Martin v. Löwis11437992002-04-12 09:54:03 +000018637 cat >conftest.$ac_ext <<_ACEOF
18638#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018639/* confdefs.h. */
18640_ACEOF
18641cat confdefs.h >>conftest.$ac_ext
18642cat >>conftest.$ac_ext <<_ACEOF
18643/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018644#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018645int
18646main ()
18647{
Jack Jansen666b1e72001-10-31 12:11:48 +000018648
18649 int rtn;
18650 rtn = mvwdelch(0,0,0);
18651
Martin v. Löwis11437992002-04-12 09:54:03 +000018652 ;
18653 return 0;
18654}
18655_ACEOF
18656rm -f conftest.$ac_objext
18657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18658 (eval $ac_compile) 2>&5
18659 ac_status=$?
18660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18661 (exit $ac_status); } &&
18662 { ac_try='test -s conftest.$ac_objext'
18663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18664 (eval $ac_try) 2>&5
18665 ac_status=$?
18666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18667 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018668 ac_cv_mvwdelch_is_expression=yes
18669else
Martin v. Löwis11437992002-04-12 09:54:03 +000018670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018671sed 's/^/| /' conftest.$ac_ext >&5
18672
Martin v. Löwis11437992002-04-12 09:54:03 +000018673ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018674fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018675rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018676fi
18677
Martin v. Löwis11437992002-04-12 09:54:03 +000018678echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
18679echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018680
18681if test "$ac_cv_mvwdelch_is_expression" = yes
18682then
Martin v. Löwis11437992002-04-12 09:54:03 +000018683
18684cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018685#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018686_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018687
18688fi
18689
Martin v. Löwis11437992002-04-12 09:54:03 +000018690echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
18691echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
18692if test "${ac_cv_window_has_flags+set}" = set; then
18693 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018694else
Martin v. Löwis11437992002-04-12 09:54:03 +000018695 cat >conftest.$ac_ext <<_ACEOF
18696#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018697/* confdefs.h. */
18698_ACEOF
18699cat confdefs.h >>conftest.$ac_ext
18700cat >>conftest.$ac_ext <<_ACEOF
18701/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018702#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018703int
18704main ()
18705{
Jack Jansen666b1e72001-10-31 12:11:48 +000018706
18707 WINDOW *w;
18708 w->_flags = 0;
18709
Martin v. Löwis11437992002-04-12 09:54:03 +000018710 ;
18711 return 0;
18712}
18713_ACEOF
18714rm -f conftest.$ac_objext
18715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18716 (eval $ac_compile) 2>&5
18717 ac_status=$?
18718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18719 (exit $ac_status); } &&
18720 { ac_try='test -s conftest.$ac_objext'
18721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18722 (eval $ac_try) 2>&5
18723 ac_status=$?
18724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18725 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018726 ac_cv_window_has_flags=yes
18727else
Martin v. Löwis11437992002-04-12 09:54:03 +000018728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018729sed 's/^/| /' conftest.$ac_ext >&5
18730
Martin v. Löwis11437992002-04-12 09:54:03 +000018731ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018732fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018733rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018734fi
18735
Martin v. Löwis11437992002-04-12 09:54:03 +000018736echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
18737echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018738
Jack Jansen666b1e72001-10-31 12:11:48 +000018739
18740if test "$ac_cv_window_has_flags" = yes
18741then
Martin v. Löwis11437992002-04-12 09:54:03 +000018742
18743cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018744#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018745_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018746
18747fi
18748
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018749echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18750echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18751
18752if test -e /dev/ptmx
18753then
18754 echo "$as_me:$LINENO: result: yes" >&5
18755echo "${ECHO_T}yes" >&6
18756
18757cat >>confdefs.h <<\_ACEOF
18758#define HAVE_DEV_PTMX 1
18759_ACEOF
18760
18761else
18762 echo "$as_me:$LINENO: result: no" >&5
18763echo "${ECHO_T}no" >&6
18764fi
18765
Neal Norwitz865400f2003-03-21 01:42:58 +000018766echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18767echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18768
18769if test -e /dev/ptc
18770then
18771 echo "$as_me:$LINENO: result: yes" >&5
18772echo "${ECHO_T}yes" >&6
18773
18774cat >>confdefs.h <<\_ACEOF
18775#define HAVE_DEV_PTC 1
18776_ACEOF
18777
18778else
18779 echo "$as_me:$LINENO: result: no" >&5
18780echo "${ECHO_T}no" >&6
18781fi
18782
Martin v. Löwis11437992002-04-12 09:54:03 +000018783echo "$as_me:$LINENO: checking for socklen_t" >&5
18784echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18785if test "${ac_cv_type_socklen_t+set}" = set; then
18786 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018787else
Martin v. Löwis11437992002-04-12 09:54:03 +000018788 cat >conftest.$ac_ext <<_ACEOF
18789#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018790/* confdefs.h. */
18791_ACEOF
18792cat confdefs.h >>conftest.$ac_ext
18793cat >>conftest.$ac_ext <<_ACEOF
18794/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018795
18796#ifdef HAVE_SYS_TYPES_H
18797#include <sys/types.h>
18798#endif
18799#ifdef HAVE_SYS_SOCKET_H
18800#include <sys/socket.h>
18801#endif
18802
18803
Martin v. Löwis11437992002-04-12 09:54:03 +000018804int
18805main ()
18806{
18807if ((socklen_t *) 0)
18808 return 0;
18809if (sizeof (socklen_t))
18810 return 0;
18811 ;
18812 return 0;
18813}
18814_ACEOF
18815rm -f conftest.$ac_objext
18816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18817 (eval $ac_compile) 2>&5
18818 ac_status=$?
18819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18820 (exit $ac_status); } &&
18821 { ac_try='test -s conftest.$ac_objext'
18822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18823 (eval $ac_try) 2>&5
18824 ac_status=$?
18825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18826 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018827 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018828else
Martin v. Löwis11437992002-04-12 09:54:03 +000018829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018830sed 's/^/| /' conftest.$ac_ext >&5
18831
Martin v. Löwis11437992002-04-12 09:54:03 +000018832ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018834rm -f conftest.$ac_objext conftest.$ac_ext
18835fi
18836echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18837echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18838if test $ac_cv_type_socklen_t = yes; then
18839 :
18840else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018841
Martin v. Löwis01c04012002-11-11 14:58:44 +000018842cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018843#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018844_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018845
18846fi
18847
Michael W. Hudson54241132001-12-07 15:38:26 +000018848
Michael W. Hudson54241132001-12-07 15:38:26 +000018849
18850
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018851for h in `(cd $srcdir;echo Python/thread_*.h)`
18852do
18853 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18854done
18855
Michael W. Hudson54241132001-12-07 15:38:26 +000018856
Jack Jansen0b06be72002-06-21 14:48:38 +000018857SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018858echo "$as_me:$LINENO: checking for build directories" >&5
18859echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018860for dir in $SRCDIRS; do
18861 if test ! -d $dir; then
18862 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018863 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018864done
Martin v. Löwis11437992002-04-12 09:54:03 +000018865echo "$as_me:$LINENO: result: done" >&5
18866echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018867
Guido van Rossum627b2d71993-12-24 10:39:16 +000018868# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018869 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018870
Martin v. Löwis11437992002-04-12 09:54:03 +000018871cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018872# This file is a shell script that caches the results of configure
18873# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018874# scripts and configure runs, see configure's option --config-cache.
18875# It is not useful on other systems. If it contains results you don't
18876# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018877#
Martin v. Löwis11437992002-04-12 09:54:03 +000018878# config.status only pays attention to the cache file if you give it
18879# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018880#
Skip Montanaro6dead952003-09-25 14:50:04 +000018881# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018882# loading this file, other *unset* `ac_cv_foo' will be assigned the
18883# following values.
18884
18885_ACEOF
18886
Guido van Rossumf78abae1997-01-21 22:02:36 +000018887# The following way of writing the cache mishandles newlines in values,
18888# but we know of no workaround that is simple, portable, and efficient.
18889# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018890# Ultrix sh set writes to stderr and can't be redirected directly,
18891# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018892{
18893 (set) 2>&1 |
18894 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18895 *ac_space=\ *)
18896 # `set' does not quote correctly, so add quotes (double-quote
18897 # substitution turns \\\\ into \\, and sed turns \\ into \).
18898 sed -n \
18899 "s/'/'\\\\''/g;
18900 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18901 ;;
18902 *)
18903 # `set' quotes correctly as required by POSIX, so do not add quotes.
18904 sed -n \
18905 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18906 ;;
18907 esac;
18908} |
18909 sed '
18910 t clear
18911 : clear
18912 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18913 t end
18914 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18915 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018916if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018917 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018918 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18919 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018920 else
18921 echo "not updating unwritable cache $cache_file"
18922 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018923fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018924rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018925
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018926test "x$prefix" = xNONE && prefix=$ac_default_prefix
18927# Let make expand exec_prefix.
18928test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018929
Martin v. Löwis11437992002-04-12 09:54:03 +000018930# VPATH may cause trouble with some makes, so we remove $(srcdir),
18931# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18932# trailing colons and then remove the whole line if VPATH becomes empty
18933# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018934if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018935 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18936s/:*\$(srcdir):*/:/;
18937s/:*\${srcdir}:*/:/;
18938s/:*@srcdir@:*/:/;
18939s/^\([^=]*=[ ]*\):*/\1/;
18940s/:*$//;
18941s/^[^=]*=[ ]*$//;
18942}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018943fi
18944
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018945DEFS=-DHAVE_CONFIG_H
18946
Skip Montanaro6dead952003-09-25 14:50:04 +000018947ac_libobjs=
18948ac_ltlibobjs=
18949for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18950 # 1. Remove the extension, and $U if already installed.
18951 ac_i=`echo "$ac_i" |
18952 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18953 # 2. Add them.
18954 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18955 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18956done
18957LIBOBJS=$ac_libobjs
18958
18959LTLIBOBJS=$ac_ltlibobjs
18960
18961
Martin v. Löwis11437992002-04-12 09:54:03 +000018962
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018963: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018964ac_clean_files_save=$ac_clean_files
18965ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18966{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18967echo "$as_me: creating $CONFIG_STATUS" >&6;}
18968cat >$CONFIG_STATUS <<_ACEOF
18969#! $SHELL
18970# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018971# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018972# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018973# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018974
Martin v. Löwis11437992002-04-12 09:54:03 +000018975debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018976ac_cs_recheck=false
18977ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018978SHELL=\${CONFIG_SHELL-$SHELL}
18979_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018980
Martin v. Löwis11437992002-04-12 09:54:03 +000018981cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018982## --------------------- ##
18983## M4sh Initialization. ##
18984## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018985
Martin v. Löwis11437992002-04-12 09:54:03 +000018986# Be Bourne compatible
18987if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18988 emulate sh
18989 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018990 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18991 # is contrary to our usage. Disable this feature.
18992 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018993elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18994 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018995fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018996
Martin v. Löwis11437992002-04-12 09:54:03 +000018997# Support unset when possible.
18998if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18999 as_unset=unset
19000else
19001 as_unset=false
19002fi
Michael W. Hudson54241132001-12-07 15:38:26 +000019003
Skip Montanaro6dead952003-09-25 14:50:04 +000019004
19005# Work around bugs in pre-3.0 UWIN ksh.
19006$as_unset ENV MAIL MAILPATH
19007PS1='$ '
19008PS2='> '
19009PS4='+ '
19010
19011# NLS nuisances.
19012for as_var in \
19013 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19014 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19015 LC_TELEPHONE LC_TIME
19016do
19017 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
19018 eval $as_var=C; export $as_var
19019 else
19020 $as_unset $as_var
19021 fi
19022done
19023
19024# Required to use basename.
19025if expr a : '\(a\)' >/dev/null 2>&1; then
19026 as_expr=expr
19027else
19028 as_expr=false
19029fi
19030
19031if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19032 as_basename=basename
19033else
19034 as_basename=false
19035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019036
19037
19038# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000019039as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019040$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19041 X"$0" : 'X\(//\)$' \| \
19042 X"$0" : 'X\(/\)$' \| \
19043 . : '\(.\)' 2>/dev/null ||
19044echo X/"$0" |
19045 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19046 /^X\/\(\/\/\)$/{ s//\1/; q; }
19047 /^X\/\(\/\).*/{ s//\1/; q; }
19048 s/.*/./; q'`
19049
Skip Montanaro6dead952003-09-25 14:50:04 +000019050
Martin v. Löwis11437992002-04-12 09:54:03 +000019051# PATH needs CR, and LINENO needs CR and PATH.
19052# Avoid depending upon Character Ranges.
19053as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19054as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19055as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19056as_cr_digits='0123456789'
19057as_cr_alnum=$as_cr_Letters$as_cr_digits
19058
19059# The user is always right.
19060if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019061 echo "#! /bin/sh" >conf$$.sh
19062 echo "exit 0" >>conf$$.sh
19063 chmod +x conf$$.sh
19064 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019065 PATH_SEPARATOR=';'
19066 else
19067 PATH_SEPARATOR=:
19068 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019069 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000019070fi
19071
19072
19073 as_lineno_1=$LINENO
19074 as_lineno_2=$LINENO
19075 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19076 test "x$as_lineno_1" != "x$as_lineno_2" &&
19077 test "x$as_lineno_3" = "x$as_lineno_2" || {
19078 # Find who we are. Look in the path if we contain no path at all
19079 # relative or not.
19080 case $0 in
19081 *[\\/]* ) as_myself=$0 ;;
19082 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19083for as_dir in $PATH
19084do
19085 IFS=$as_save_IFS
19086 test -z "$as_dir" && as_dir=.
19087 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19088done
19089
19090 ;;
19091 esac
19092 # We did not find ourselves, most probably we were run as `sh COMMAND'
19093 # in which case we are not to be found in the path.
19094 if test "x$as_myself" = x; then
19095 as_myself=$0
19096 fi
19097 if test ! -f "$as_myself"; then
19098 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19099echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19100 { (exit 1); exit 1; }; }
19101 fi
19102 case $CONFIG_SHELL in
19103 '')
19104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19105for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19106do
19107 IFS=$as_save_IFS
19108 test -z "$as_dir" && as_dir=.
19109 for as_base in sh bash ksh sh5; do
19110 case $as_dir in
19111 /*)
19112 if ("$as_dir/$as_base" -c '
19113 as_lineno_1=$LINENO
19114 as_lineno_2=$LINENO
19115 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19116 test "x$as_lineno_1" != "x$as_lineno_2" &&
19117 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019118 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19119 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019120 CONFIG_SHELL=$as_dir/$as_base
19121 export CONFIG_SHELL
19122 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19123 fi;;
19124 esac
19125 done
19126done
19127;;
Jack Jansendd19cf82001-12-06 22:36:17 +000019128 esac
19129
Martin v. Löwis11437992002-04-12 09:54:03 +000019130 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19131 # uniformly replaced by the line number. The first 'sed' inserts a
19132 # line-number line before each line; the second 'sed' does the real
19133 # work. The second script uses 'N' to pair each line-number line
19134 # with the numbered line, and appends trailing '-' during
19135 # substitution so that $LINENO is not a special case at line end.
19136 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19137 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
19138 sed '=' <$as_myself |
19139 sed '
19140 N
19141 s,$,-,
19142 : loop
19143 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19144 t loop
19145 s,-$,,
19146 s,^['$as_cr_digits']*\n,,
19147 ' >$as_me.lineno &&
19148 chmod +x $as_me.lineno ||
19149 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19150echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19151 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019152
Martin v. Löwis11437992002-04-12 09:54:03 +000019153 # Don't try to exec as it changes $[0], causing all sort of problems
19154 # (the dirname of $[0] is not the place where we might find the
19155 # original and so on. Autoconf is especially sensible to this).
19156 . ./$as_me.lineno
19157 # Exit status is that of the last command.
19158 exit
19159}
19160
19161
19162case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19163 *c*,-n*) ECHO_N= ECHO_C='
19164' ECHO_T=' ' ;;
19165 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19166 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
19167esac
19168
19169if expr a : '\(a\)' >/dev/null 2>&1; then
19170 as_expr=expr
19171else
19172 as_expr=false
19173fi
19174
19175rm -f conf$$ conf$$.exe conf$$.file
19176echo >conf$$.file
19177if ln -s conf$$.file conf$$ 2>/dev/null; then
19178 # We could just check for DJGPP; but this test a) works b) is more generic
19179 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19180 if test -f conf$$.exe; then
19181 # Don't use ln at all; we don't have any links
19182 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019183 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019184 as_ln_s='ln -s'
19185 fi
19186elif ln conf$$.file conf$$ 2>/dev/null; then
19187 as_ln_s=ln
19188else
19189 as_ln_s='cp -p'
19190fi
19191rm -f conf$$ conf$$.exe conf$$.file
19192
Skip Montanaro6dead952003-09-25 14:50:04 +000019193if mkdir -p . 2>/dev/null; then
19194 as_mkdir_p=:
19195else
19196 as_mkdir_p=false
19197fi
19198
Martin v. Löwis11437992002-04-12 09:54:03 +000019199as_executable_p="test -f"
19200
19201# Sed expression to map a string onto a valid CPP name.
19202as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
19203
19204# Sed expression to map a string onto a valid variable name.
19205as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19206
19207
19208# IFS
19209# We need space, tab and new line, in precisely that order.
19210as_nl='
19211'
19212IFS=" $as_nl"
19213
19214# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000019215$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000019216
19217exec 6>&1
19218
19219# Open the log real soon, to keep \$[0] and so on meaningful, and to
19220# report actual input values of CONFIG_FILES etc. instead of their
19221# values after options handling. Logging --version etc. is OK.
19222exec 5>>config.log
19223{
19224 echo
19225 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19226## Running $as_me. ##
19227_ASBOX
19228} >&5
19229cat >&5 <<_CSEOF
19230
Fred Drake9bd44622003-07-30 17:39:48 +000019231This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000019232generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000019233
19234 CONFIG_FILES = $CONFIG_FILES
19235 CONFIG_HEADERS = $CONFIG_HEADERS
19236 CONFIG_LINKS = $CONFIG_LINKS
19237 CONFIG_COMMANDS = $CONFIG_COMMANDS
19238 $ $0 $@
19239
19240_CSEOF
19241echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19242echo >&5
19243_ACEOF
19244
19245# Files that config.status was made for.
19246if test -n "$ac_config_files"; then
19247 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19248fi
19249
19250if test -n "$ac_config_headers"; then
19251 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19252fi
19253
19254if test -n "$ac_config_links"; then
19255 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19256fi
19257
19258if test -n "$ac_config_commands"; then
19259 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19260fi
19261
19262cat >>$CONFIG_STATUS <<\_ACEOF
19263
19264ac_cs_usage="\
19265\`$as_me' instantiates files from templates according to the
19266current configuration.
19267
19268Usage: $0 [OPTIONS] [FILE]...
19269
19270 -h, --help print this help, then exit
19271 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000019272 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000019273 -d, --debug don't remove temporary files
19274 --recheck update $as_me by reconfiguring in the same conditions
19275 --file=FILE[:TEMPLATE]
19276 instantiate the configuration file FILE
19277 --header=FILE[:TEMPLATE]
19278 instantiate the configuration header FILE
19279
19280Configuration files:
19281$config_files
19282
19283Configuration headers:
19284$config_headers
19285
19286Report bugs to <bug-autoconf@gnu.org>."
19287_ACEOF
19288
19289cat >>$CONFIG_STATUS <<_ACEOF
19290ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000019291python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000019292configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000019293 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19294
19295Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19296Free Software Foundation, Inc.
19297This config.status script is free software; the Free Software Foundation
19298gives unlimited permission to copy, distribute and modify it."
19299srcdir=$srcdir
19300INSTALL="$INSTALL"
19301_ACEOF
19302
19303cat >>$CONFIG_STATUS <<\_ACEOF
19304# If no file are specified by the user, then we need to provide default
19305# value. By we need to know if files were specified by the user.
19306ac_need_defaults=:
19307while test $# != 0
19308do
19309 case $1 in
19310 --*=*)
19311 ac_option=`expr "x$1" : 'x\([^=]*\)='`
19312 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019313 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000019314 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019315 -*)
19316 ac_option=$1
19317 ac_optarg=$2
19318 ac_shift=shift
19319 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019320 *) # This is not an option, so the user has probably given explicit
19321 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000019322 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000019323 ac_need_defaults=false;;
19324 esac
19325
Skip Montanaro6dead952003-09-25 14:50:04 +000019326 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000019327 # Handling of the options.
19328_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019329cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019330 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19331 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019332 --version | --vers* | -V )
19333 echo "$ac_cs_version"; exit 0 ;;
19334 --he | --h)
19335 # Conflict between --help and --header
19336 { { echo "$as_me:$LINENO: error: ambiguous option: $1
19337Try \`$0 --help' for more information." >&5
19338echo "$as_me: error: ambiguous option: $1
19339Try \`$0 --help' for more information." >&2;}
19340 { (exit 1); exit 1; }; };;
19341 --help | --hel | -h )
19342 echo "$ac_cs_usage"; exit 0 ;;
19343 --debug | --d* | -d )
19344 debug=: ;;
19345 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000019346 $ac_shift
19347 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019348 ac_need_defaults=false;;
19349 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000019350 $ac_shift
19351 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019352 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019353 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19354 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19355 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019356
19357 # This is an error.
19358 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19359Try \`$0 --help' for more information." >&5
19360echo "$as_me: error: unrecognized option: $1
19361Try \`$0 --help' for more information." >&2;}
19362 { (exit 1); exit 1; }; } ;;
19363
19364 *) ac_config_targets="$ac_config_targets $1" ;;
19365
19366 esac
19367 shift
19368done
19369
Skip Montanaro6dead952003-09-25 14:50:04 +000019370ac_configure_extra_args=
19371
19372if $ac_cs_silent; then
19373 exec 6>/dev/null
19374 ac_configure_extra_args="$ac_configure_extra_args --silent"
19375fi
19376
19377_ACEOF
19378cat >>$CONFIG_STATUS <<_ACEOF
19379if \$ac_cs_recheck; then
19380 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19381 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19382fi
19383
Martin v. Löwis11437992002-04-12 09:54:03 +000019384_ACEOF
19385
19386
19387
19388
19389
19390cat >>$CONFIG_STATUS <<\_ACEOF
19391for ac_config_target in $ac_config_targets
19392do
19393 case "$ac_config_target" in
19394 # Handling of arguments.
19395 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
19396 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
19397 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
19398 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19399echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19400 { (exit 1); exit 1; }; };;
19401 esac
19402done
19403
19404# If the user did not use the arguments to specify the items to instantiate,
19405# then the envvar interface is used. Set only those that are not.
19406# We use the long form for the default assignment because of an extremely
19407# bizarre bug on SunOS 4.1.3.
19408if $ac_need_defaults; then
19409 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19410 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19411fi
19412
Skip Montanaro6dead952003-09-25 14:50:04 +000019413# Have a temporary directory for convenience. Make it in the build tree
19414# simply because there is no reason to put it here, and in addition,
19415# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000019416# Create a temporary directory, and hook for its removal unless debugging.
19417$debug ||
19418{
19419 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19420 trap '{ (exit 1); exit 1; }' 1 2 13 15
19421}
19422
19423# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000019424
Martin v. Löwis11437992002-04-12 09:54:03 +000019425{
Skip Montanaro6dead952003-09-25 14:50:04 +000019426 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000019427 test -n "$tmp" && test -d "$tmp"
19428} ||
19429{
Skip Montanaro6dead952003-09-25 14:50:04 +000019430 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000019431 (umask 077 && mkdir $tmp)
19432} ||
19433{
Skip Montanaro6dead952003-09-25 14:50:04 +000019434 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000019435 { (exit 1); exit 1; }
19436}
19437
19438_ACEOF
19439
19440cat >>$CONFIG_STATUS <<_ACEOF
19441
19442#
19443# CONFIG_FILES section.
19444#
19445
19446# No need to generate the scripts if there are no CONFIG_FILES.
19447# This happens for instance when ./config.status config.h
19448if test -n "\$CONFIG_FILES"; then
19449 # Protect against being on the right side of a sed subst in config.status.
19450 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19451 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19452s,@SHELL@,$SHELL,;t t
19453s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19454s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19455s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19456s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19457s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19458s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19459s,@exec_prefix@,$exec_prefix,;t t
19460s,@prefix@,$prefix,;t t
19461s,@program_transform_name@,$program_transform_name,;t t
19462s,@bindir@,$bindir,;t t
19463s,@sbindir@,$sbindir,;t t
19464s,@libexecdir@,$libexecdir,;t t
19465s,@datadir@,$datadir,;t t
19466s,@sysconfdir@,$sysconfdir,;t t
19467s,@sharedstatedir@,$sharedstatedir,;t t
19468s,@localstatedir@,$localstatedir,;t t
19469s,@libdir@,$libdir,;t t
19470s,@includedir@,$includedir,;t t
19471s,@oldincludedir@,$oldincludedir,;t t
19472s,@infodir@,$infodir,;t t
19473s,@mandir@,$mandir,;t t
19474s,@build_alias@,$build_alias,;t t
19475s,@host_alias@,$host_alias,;t t
19476s,@target_alias@,$target_alias,;t t
19477s,@DEFS@,$DEFS,;t t
19478s,@ECHO_C@,$ECHO_C,;t t
19479s,@ECHO_N@,$ECHO_N,;t t
19480s,@ECHO_T@,$ECHO_T,;t t
19481s,@LIBS@,$LIBS,;t t
19482s,@VERSION@,$VERSION,;t t
19483s,@SOVERSION@,$SOVERSION,;t t
19484s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
19485s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
19486s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
19487s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
19488s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
19489s,@MACHDEP@,$MACHDEP,;t t
19490s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000019491s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000019492s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019493s,@CXX@,$CXX,;t t
19494s,@MAINOBJ@,$MAINOBJ,;t t
19495s,@EXEEXT@,$EXEEXT,;t t
19496s,@CC@,$CC,;t t
19497s,@CFLAGS@,$CFLAGS,;t t
19498s,@LDFLAGS@,$LDFLAGS,;t t
19499s,@CPPFLAGS@,$CPPFLAGS,;t t
19500s,@ac_ct_CC@,$ac_ct_CC,;t t
19501s,@OBJEXT@,$OBJEXT,;t t
19502s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019503s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019504s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
19505s,@LIBRARY@,$LIBRARY,;t t
19506s,@LDLIBRARY@,$LDLIBRARY,;t t
19507s,@DLLLIBRARY@,$DLLLIBRARY,;t t
19508s,@BLDLIBRARY@,$BLDLIBRARY,;t t
19509s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
19510s,@INSTSONAME@,$INSTSONAME,;t t
19511s,@RUNSHARED@,$RUNSHARED,;t t
19512s,@LINKCC@,$LINKCC,;t t
19513s,@RANLIB@,$RANLIB,;t t
19514s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19515s,@AR@,$AR,;t t
19516s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19517s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19518s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19519s,@LN@,$LN,;t t
19520s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000019521s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019522s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
19523s,@SO@,$SO,;t t
19524s,@LDSHARED@,$LDSHARED,;t t
19525s,@BLDSHARED@,$BLDSHARED,;t t
19526s,@CCSHARED@,$CCSHARED,;t t
19527s,@LINKFORSHARED@,$LINKFORSHARED,;t t
19528s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000019529s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019530s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
19531s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
19532s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
19533s,@LDLAST@,$LDLAST,;t t
19534s,@THREADOBJ@,$THREADOBJ,;t t
19535s,@DLINCLDIR@,$DLINCLDIR,;t t
19536s,@DYNLOADFILE@,$DYNLOADFILE,;t t
19537s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019538s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019539s,@LIBOBJS@,$LIBOBJS,;t t
19540s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
19541s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
19542s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
19543s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
19544s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
19545s,@LIBM@,$LIBM,;t t
19546s,@LIBC@,$LIBC,;t t
19547s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
19548s,@THREADHEADERS@,$THREADHEADERS,;t t
19549s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019550s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019551CEOF
19552
19553_ACEOF
19554
19555 cat >>$CONFIG_STATUS <<\_ACEOF
19556 # Split the substitutions into bite-sized pieces for seds with
19557 # small command number limits, like on Digital OSF/1 and HP-UX.
19558 ac_max_sed_lines=48
19559 ac_sed_frag=1 # Number of current file.
19560 ac_beg=1 # First line for current file.
19561 ac_end=$ac_max_sed_lines # Line after last line for current file.
19562 ac_more_lines=:
19563 ac_sed_cmds=
19564 while $ac_more_lines; do
19565 if test $ac_beg -gt 1; then
19566 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19567 else
19568 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19569 fi
19570 if test ! -s $tmp/subs.frag; then
19571 ac_more_lines=false
19572 else
19573 # The purpose of the label and of the branching condition is to
19574 # speed up the sed processing (if there are no `@' at all, there
19575 # is no need to browse any of the substitutions).
19576 # These are the two extra sed commands mentioned above.
19577 (echo ':t
19578 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19579 if test -z "$ac_sed_cmds"; then
19580 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19581 else
19582 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19583 fi
19584 ac_sed_frag=`expr $ac_sed_frag + 1`
19585 ac_beg=$ac_end
19586 ac_end=`expr $ac_end + $ac_max_sed_lines`
19587 fi
19588 done
19589 if test -z "$ac_sed_cmds"; then
19590 ac_sed_cmds=cat
19591 fi
19592fi # test -n "$CONFIG_FILES"
19593
19594_ACEOF
19595cat >>$CONFIG_STATUS <<\_ACEOF
19596for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19597 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19598 case $ac_file in
19599 - | *:- | *:-:* ) # input from stdin
19600 cat >$tmp/stdin
19601 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19602 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19603 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19604 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19605 * ) ac_file_in=$ac_file.in ;;
19606 esac
19607
19608 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19609 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19610$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19611 X"$ac_file" : 'X\(//\)[^/]' \| \
19612 X"$ac_file" : 'X\(//\)$' \| \
19613 X"$ac_file" : 'X\(/\)' \| \
19614 . : '\(.\)' 2>/dev/null ||
19615echo X"$ac_file" |
19616 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19617 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19618 /^X\(\/\/\)$/{ s//\1/; q; }
19619 /^X\(\/\).*/{ s//\1/; q; }
19620 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019621 { if $as_mkdir_p; then
19622 mkdir -p "$ac_dir"
19623 else
19624 as_dir="$ac_dir"
19625 as_dirs=
19626 while test ! -d "$as_dir"; do
19627 as_dirs="$as_dir $as_dirs"
19628 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19629$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19630 X"$as_dir" : 'X\(//\)[^/]' \| \
19631 X"$as_dir" : 'X\(//\)$' \| \
19632 X"$as_dir" : 'X\(/\)' \| \
19633 . : '\(.\)' 2>/dev/null ||
19634echo X"$as_dir" |
19635 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19636 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19637 /^X\(\/\/\)$/{ s//\1/; q; }
19638 /^X\(\/\).*/{ s//\1/; q; }
19639 s/.*/./; q'`
19640 done
19641 test ! -n "$as_dirs" || mkdir $as_dirs
19642 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19643echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19644 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019645
19646 ac_builddir=.
19647
19648if test "$ac_dir" != .; then
19649 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19650 # A "../" for each directory in $ac_dir_suffix.
19651 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19652else
19653 ac_dir_suffix= ac_top_builddir=
19654fi
19655
19656case $srcdir in
19657 .) # No --srcdir option. We are building in place.
19658 ac_srcdir=.
19659 if test -z "$ac_top_builddir"; then
19660 ac_top_srcdir=.
19661 else
19662 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19663 fi ;;
19664 [\\/]* | ?:[\\/]* ) # Absolute path.
19665 ac_srcdir=$srcdir$ac_dir_suffix;
19666 ac_top_srcdir=$srcdir ;;
19667 *) # Relative path.
19668 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19669 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19670esac
19671# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19672# absolute.
19673ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000019674ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000019675ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19676ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19677
19678
19679 case $INSTALL in
19680 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19681 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19682 esac
19683
19684 if test x"$ac_file" != x-; then
19685 { echo "$as_me:$LINENO: creating $ac_file" >&5
19686echo "$as_me: creating $ac_file" >&6;}
19687 rm -f "$ac_file"
19688 fi
19689 # Let's still pretend it is `configure' which instantiates (i.e., don't
19690 # use $as_me), people would be surprised to read:
19691 # /* config.h. Generated by config.status. */
19692 if test x"$ac_file" = x-; then
19693 configure_input=
19694 else
19695 configure_input="$ac_file. "
19696 fi
19697 configure_input=$configure_input"Generated from `echo $ac_file_in |
19698 sed 's,.*/,,'` by configure."
19699
19700 # First look for the input files in the build tree, otherwise in the
19701 # src tree.
19702 ac_file_inputs=`IFS=:
19703 for f in $ac_file_in; do
19704 case $f in
19705 -) echo $tmp/stdin ;;
19706 [\\/$]*)
19707 # Absolute (can't be DOS-style, as IFS=:)
19708 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19709echo "$as_me: error: cannot find input file: $f" >&2;}
19710 { (exit 1); exit 1; }; }
19711 echo $f;;
19712 *) # Relative
19713 if test -f "$f"; then
19714 # Build tree
19715 echo $f
19716 elif test -f "$srcdir/$f"; then
19717 # Source tree
19718 echo $srcdir/$f
19719 else
19720 # /dev/null tree
19721 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19722echo "$as_me: error: cannot find input file: $f" >&2;}
19723 { (exit 1); exit 1; }; }
19724 fi;;
19725 esac
19726 done` || { (exit 1); exit 1; }
19727_ACEOF
19728cat >>$CONFIG_STATUS <<_ACEOF
19729 sed "$ac_vpsub
19730$extrasub
19731_ACEOF
19732cat >>$CONFIG_STATUS <<\_ACEOF
19733:t
19734/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19735s,@configure_input@,$configure_input,;t t
19736s,@srcdir@,$ac_srcdir,;t t
19737s,@abs_srcdir@,$ac_abs_srcdir,;t t
19738s,@top_srcdir@,$ac_top_srcdir,;t t
19739s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19740s,@builddir@,$ac_builddir,;t t
19741s,@abs_builddir@,$ac_abs_builddir,;t t
19742s,@top_builddir@,$ac_top_builddir,;t t
19743s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19744s,@INSTALL@,$ac_INSTALL,;t t
19745" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19746 rm -f $tmp/stdin
19747 if test x"$ac_file" != x-; then
19748 mv $tmp/out $ac_file
19749 else
19750 cat $tmp/out
19751 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019752 fi
19753
Martin v. Löwis11437992002-04-12 09:54:03 +000019754done
19755_ACEOF
19756cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019757
Martin v. Löwis11437992002-04-12 09:54:03 +000019758#
19759# CONFIG_HEADER section.
19760#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019762# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19763# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019764#
19765# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000019766ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19767ac_dB='[ ].*$,\1#\2'
19768ac_dC=' '
19769ac_dD=',;t'
19770# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19771ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19772ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019773ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019774ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019775
Martin v. Löwis11437992002-04-12 09:54:03 +000019776for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019777 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019778 case $ac_file in
19779 - | *:- | *:-:* ) # input from stdin
19780 cat >$tmp/stdin
19781 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19782 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19783 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19784 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19785 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019786 esac
19787
Martin v. Löwis11437992002-04-12 09:54:03 +000019788 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19789echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019790
Martin v. Löwis11437992002-04-12 09:54:03 +000019791 # First look for the input files in the build tree, otherwise in the
19792 # src tree.
19793 ac_file_inputs=`IFS=:
19794 for f in $ac_file_in; do
19795 case $f in
19796 -) echo $tmp/stdin ;;
19797 [\\/$]*)
19798 # Absolute (can't be DOS-style, as IFS=:)
19799 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19800echo "$as_me: error: cannot find input file: $f" >&2;}
19801 { (exit 1); exit 1; }; }
19802 echo $f;;
19803 *) # Relative
19804 if test -f "$f"; then
19805 # Build tree
19806 echo $f
19807 elif test -f "$srcdir/$f"; then
19808 # Source tree
19809 echo $srcdir/$f
19810 else
19811 # /dev/null tree
19812 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19813echo "$as_me: error: cannot find input file: $f" >&2;}
19814 { (exit 1); exit 1; }; }
19815 fi;;
19816 esac
19817 done` || { (exit 1); exit 1; }
19818 # Remove the trailing spaces.
19819 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019820
Martin v. Löwis11437992002-04-12 09:54:03 +000019821_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019822
Martin v. Löwis11437992002-04-12 09:54:03 +000019823# Transform confdefs.h into two sed scripts, `conftest.defines' and
19824# `conftest.undefs', that substitutes the proper values into
19825# config.h.in to produce config.h. The first handles `#define'
19826# templates, and the second `#undef' templates.
19827# And first: Protect against being on the right side of a sed subst in
19828# config.status. Protect against being in an unquoted here document
19829# in config.status.
19830rm -f conftest.defines conftest.undefs
19831# Using a here document instead of a string reduces the quoting nightmare.
19832# Putting comments in sed scripts is not portable.
19833#
19834# `end' is used to avoid that the second main sed command (meant for
19835# 0-ary CPP macros) applies to n-ary macro definitions.
19836# See the Autoconf documentation for `clear'.
19837cat >confdef2sed.sed <<\_ACEOF
19838s/[\\&,]/\\&/g
19839s,[\\$`],\\&,g
19840t clear
19841: clear
19842s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19843t end
19844s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19845: end
19846_ACEOF
19847# If some macros were called several times there might be several times
19848# the same #defines, which is useless. Nevertheless, we may not want to
19849# sort them, since we want the *last* AC-DEFINE to be honored.
19850uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19851sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19852rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019853
19854# This sed command replaces #undef with comments. This is necessary, for
19855# example, in the case of _POSIX_SOURCE, which is predefined and required
19856# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019857cat >>conftest.undefs <<\_ACEOF
19858s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19859_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019860
Martin v. Löwis11437992002-04-12 09:54:03 +000019861# Break up conftest.defines because some shells have a limit on the size
19862# of here documents, and old seds have small limits too (100 cmds).
19863echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019864echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019865echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19866echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019867rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019868while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019869do
Martin v. Löwis11437992002-04-12 09:54:03 +000019870 # Write a limited-size here document to $tmp/defines.sed.
19871 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19872 # Speed up: don't consider the non `#define' lines.
19873 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19874 # Work around the forget-to-reset-the-flag bug.
19875 echo 't clr' >>$CONFIG_STATUS
19876 echo ': clr' >>$CONFIG_STATUS
19877 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019878 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019879 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19880 rm -f $tmp/in
19881 mv $tmp/out $tmp/in
19882' >>$CONFIG_STATUS
19883 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19884 rm -f conftest.defines
19885 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019886done
Martin v. Löwis11437992002-04-12 09:54:03 +000019887rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019888echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019889echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019890
Martin v. Löwis11437992002-04-12 09:54:03 +000019891# Break up conftest.undefs because some shells have a limit on the size
19892# of here documents, and old seds have small limits too (100 cmds).
19893echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19894rm -f conftest.tail
19895while grep . conftest.undefs >/dev/null
19896do
19897 # Write a limited-size here document to $tmp/undefs.sed.
19898 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19899 # Speed up: don't consider the non `#undef'
19900 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19901 # Work around the forget-to-reset-the-flag bug.
19902 echo 't clr' >>$CONFIG_STATUS
19903 echo ': clr' >>$CONFIG_STATUS
19904 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19905 echo 'CEOF
19906 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19907 rm -f $tmp/in
19908 mv $tmp/out $tmp/in
19909' >>$CONFIG_STATUS
19910 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19911 rm -f conftest.undefs
19912 mv conftest.tail conftest.undefs
19913done
19914rm -f conftest.undefs
19915
19916cat >>$CONFIG_STATUS <<\_ACEOF
19917 # Let's still pretend it is `configure' which instantiates (i.e., don't
19918 # use $as_me), people would be surprised to read:
19919 # /* config.h. Generated by config.status. */
19920 if test x"$ac_file" = x-; then
19921 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019922 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019923 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019924 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019925 cat $tmp/in >>$tmp/config.h
19926 rm -f $tmp/in
19927 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019928 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019929 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19930echo "$as_me: $ac_file is unchanged" >&6;}
19931 else
19932 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19933$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19934 X"$ac_file" : 'X\(//\)[^/]' \| \
19935 X"$ac_file" : 'X\(//\)$' \| \
19936 X"$ac_file" : 'X\(/\)' \| \
19937 . : '\(.\)' 2>/dev/null ||
19938echo X"$ac_file" |
19939 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19940 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19941 /^X\(\/\/\)$/{ s//\1/; q; }
19942 /^X\(\/\).*/{ s//\1/; q; }
19943 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019944 { if $as_mkdir_p; then
19945 mkdir -p "$ac_dir"
19946 else
19947 as_dir="$ac_dir"
19948 as_dirs=
19949 while test ! -d "$as_dir"; do
19950 as_dirs="$as_dir $as_dirs"
19951 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19952$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19953 X"$as_dir" : 'X\(//\)[^/]' \| \
19954 X"$as_dir" : 'X\(//\)$' \| \
19955 X"$as_dir" : 'X\(/\)' \| \
19956 . : '\(.\)' 2>/dev/null ||
19957echo X"$as_dir" |
19958 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19959 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19960 /^X\(\/\/\)$/{ s//\1/; q; }
19961 /^X\(\/\).*/{ s//\1/; q; }
19962 s/.*/./; q'`
19963 done
19964 test ! -n "$as_dirs" || mkdir $as_dirs
19965 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19966echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19967 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019968
Martin v. Löwis11437992002-04-12 09:54:03 +000019969 rm -f $ac_file
19970 mv $tmp/config.h $ac_file
19971 fi
19972 else
19973 cat $tmp/config.h
19974 rm -f $tmp/config.h
19975 fi
19976done
19977_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019978
Martin v. Löwis11437992002-04-12 09:54:03 +000019979cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019980
Martin v. Löwis11437992002-04-12 09:54:03 +000019981{ (exit 0); exit 0; }
19982_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019983chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019984ac_clean_files=$ac_clean_files_save
19985
19986
19987# configure is writing to config.log, and then calls config.status.
19988# config.status does its own redirection, appending to config.log.
19989# Unfortunately, on DOS this fails, as config.log is still kept open
19990# by configure, so config.status won't be able to write to it; its
19991# output is simply discarded. So we exec the FD to /dev/null,
19992# effectively closing config.log, so it can be properly (re)opened and
19993# appended to by config.status. When coming back to configure, we
19994# need to make the FD available again.
19995if test "$no_create" != yes; then
19996 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019997 ac_config_status_args=
19998 test "$silent" = yes &&
19999 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000020000 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000020001 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020002 exec 5>>config.log
20003 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20004 # would make configure fail if this is the last instruction.
20005 $ac_cs_success || { (exit 1); exit 1; }
20006fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020007
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000020008
20009echo "creating Setup"
20010if test ! -f Modules/Setup
20011then
20012 cp $srcdir/Modules/Setup.dist Modules/Setup
20013fi
20014
20015echo "creating Setup.local"
20016if test ! -f Modules/Setup.local
20017then
20018 echo "# Edit this file for local setup changes" >Modules/Setup.local
20019fi
20020
20021echo "creating Makefile"
20022$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
20023 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000020024 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000020025mv config.c Modules