blob: 60ec87f59174e519e42c2e37e5fac4660e8bbd27 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002# From configure.in Revision: 1.454 .
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
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000869 --with(out)-doc-strings disable/enable documentation strings
870 --with(out)-pymalloc disable/enable specialized mallocs
871 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000872 --with-fpectl enable SIGFPE catching
873 --with-libm=STRING math library
874 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000875
876Some influential environment variables:
877 CC C compiler command
878 CFLAGS C compiler flags
879 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
880 nonstandard directory <lib dir>
881 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
882 headers in a nonstandard directory <include dir>
883 CPP C preprocessor
884
885Use these variables to override the choices made by `configure' or to help
886it to find libraries and programs with nonstandard names/locations.
887
888_ACEOF
889fi
890
891if test "$ac_init_help" = "recursive"; then
892 # If there are subdirs, report their specific --help.
893 ac_popdir=`pwd`
894 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
895 test -d $ac_dir || continue
896 ac_builddir=.
897
898if test "$ac_dir" != .; then
899 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
900 # A "../" for each directory in $ac_dir_suffix.
901 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
902else
903 ac_dir_suffix= ac_top_builddir=
904fi
905
906case $srcdir in
907 .) # No --srcdir option. We are building in place.
908 ac_srcdir=.
909 if test -z "$ac_top_builddir"; then
910 ac_top_srcdir=.
911 else
912 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
913 fi ;;
914 [\\/]* | ?:[\\/]* ) # Absolute path.
915 ac_srcdir=$srcdir$ac_dir_suffix;
916 ac_top_srcdir=$srcdir ;;
917 *) # Relative path.
918 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
919 ac_top_srcdir=$ac_top_builddir$srcdir ;;
920esac
921# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
922# absolute.
923ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000924ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000925ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
926ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
927
928 cd $ac_dir
929 # Check for guested configure; otherwise get Cygnus style configure.
930 if test -f $ac_srcdir/configure.gnu; then
931 echo
932 $SHELL $ac_srcdir/configure.gnu --help=recursive
933 elif test -f $ac_srcdir/configure; then
934 echo
935 $SHELL $ac_srcdir/configure --help=recursive
936 elif test -f $ac_srcdir/configure.ac ||
937 test -f $ac_srcdir/configure.in; then
938 echo
939 $ac_configure --help
940 else
941 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
942 fi
943 cd $ac_popdir
944 done
945fi
946
947test -n "$ac_init_help" && exit 0
948if $ac_init_version; then
949 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000950python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000951generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000952
953Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
954Free Software Foundation, Inc.
955This configure script is free software; the Free Software Foundation
956gives unlimited permission to copy, distribute and modify it.
957_ACEOF
958 exit 0
959fi
960exec 5>config.log
961cat >&5 <<_ACEOF
962This file contains any messages produced by compilers while
963running configure, to aid debugging if configure makes a mistake.
964
Fred Drake9bd44622003-07-30 17:39:48 +0000965It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000966generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000967
968 $ $0 $@
969
970_ACEOF
971{
972cat <<_ASUNAME
973## --------- ##
974## Platform. ##
975## --------- ##
976
977hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
978uname -m = `(uname -m) 2>/dev/null || echo unknown`
979uname -r = `(uname -r) 2>/dev/null || echo unknown`
980uname -s = `(uname -s) 2>/dev/null || echo unknown`
981uname -v = `(uname -v) 2>/dev/null || echo unknown`
982
983/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
984/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
985
986/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
987/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
988/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
989hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
990/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
991/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
992/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
993
994_ASUNAME
995
996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
997for as_dir in $PATH
998do
999 IFS=$as_save_IFS
1000 test -z "$as_dir" && as_dir=.
1001 echo "PATH: $as_dir"
1002done
1003
1004} >&5
1005
1006cat >&5 <<_ACEOF
1007
1008
1009## ----------- ##
1010## Core tests. ##
1011## ----------- ##
1012
1013_ACEOF
1014
1015
1016# Keep a trace of the command line.
1017# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001018# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001019# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001020# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001021ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001022ac_configure_args0=
1023ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001024ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001025ac_must_keep_next=false
1026for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001027do
Skip Montanaro6dead952003-09-25 14:50:04 +00001028 for ac_arg
1029 do
1030 case $ac_arg in
1031 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1032 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1033 | -silent | --silent | --silen | --sile | --sil)
1034 continue ;;
1035 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1036 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1037 esac
1038 case $ac_pass in
1039 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1040 2)
1041 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1042 if test $ac_must_keep_next = true; then
1043 ac_must_keep_next=false # Got value, back to normal.
1044 else
1045 case $ac_arg in
1046 *=* | --config-cache | -C | -disable-* | --disable-* \
1047 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1048 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1049 | -with-* | --with-* | -without-* | --without-* | --x)
1050 case "$ac_configure_args0 " in
1051 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1052 esac
1053 ;;
1054 -* ) ac_must_keep_next=true ;;
1055 esac
1056 fi
1057 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1058 # Get rid of the leading space.
1059 ac_sep=" "
1060 ;;
1061 esac
1062 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001063done
Skip Montanaro6dead952003-09-25 14:50:04 +00001064$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1065$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 +00001066
1067# When interrupted or exit'd, cleanup temporary files, and complete
1068# config.log. We remove comments because anyway the quotes in there
1069# would cause problems or look ugly.
1070# WARNING: Be sure not to use single quotes in there, as some shells,
1071# such as our DU 5.0 friend, will then `close' the trap.
1072trap 'exit_status=$?
1073 # Save into config.log some information that might help in debugging.
1074 {
1075 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001076
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 cat <<\_ASBOX
1078## ---------------- ##
1079## Cache variables. ##
1080## ---------------- ##
1081_ASBOX
1082 echo
1083 # The following way of writing the cache mishandles newlines in values,
1084{
1085 (set) 2>&1 |
1086 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1087 *ac_space=\ *)
1088 sed -n \
1089 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1090 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1091 ;;
1092 *)
1093 sed -n \
1094 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1095 ;;
1096 esac;
1097}
1098 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001099
1100 cat <<\_ASBOX
1101## ----------------- ##
1102## Output variables. ##
1103## ----------------- ##
1104_ASBOX
1105 echo
1106 for ac_var in $ac_subst_vars
1107 do
1108 eval ac_val=$`echo $ac_var`
1109 echo "$ac_var='"'"'$ac_val'"'"'"
1110 done | sort
1111 echo
1112
1113 if test -n "$ac_subst_files"; then
1114 cat <<\_ASBOX
1115## ------------- ##
1116## Output files. ##
1117## ------------- ##
1118_ASBOX
1119 echo
1120 for ac_var in $ac_subst_files
1121 do
1122 eval ac_val=$`echo $ac_var`
1123 echo "$ac_var='"'"'$ac_val'"'"'"
1124 done | sort
1125 echo
1126 fi
1127
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 if test -s confdefs.h; then
1129 cat <<\_ASBOX
1130## ----------- ##
1131## confdefs.h. ##
1132## ----------- ##
1133_ASBOX
1134 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001135 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 echo
1137 fi
1138 test "$ac_signal" != 0 &&
1139 echo "$as_me: caught signal $ac_signal"
1140 echo "$as_me: exit $exit_status"
1141 } >&5
1142 rm -f core core.* *.core &&
1143 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1144 exit $exit_status
1145 ' 0
1146for ac_signal in 1 2 13 15; do
1147 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1148done
1149ac_signal=0
1150
1151# confdefs.h avoids OS command line length limits that DEFS can exceed.
1152rm -rf conftest* confdefs.h
1153# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1154echo >confdefs.h
1155
1156# Predefined preprocessor variables.
1157
1158cat >>confdefs.h <<_ACEOF
1159#define PACKAGE_NAME "$PACKAGE_NAME"
1160_ACEOF
1161
1162
1163cat >>confdefs.h <<_ACEOF
1164#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1165_ACEOF
1166
1167
1168cat >>confdefs.h <<_ACEOF
1169#define PACKAGE_VERSION "$PACKAGE_VERSION"
1170_ACEOF
1171
1172
1173cat >>confdefs.h <<_ACEOF
1174#define PACKAGE_STRING "$PACKAGE_STRING"
1175_ACEOF
1176
1177
1178cat >>confdefs.h <<_ACEOF
1179#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1180_ACEOF
1181
1182
1183# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001184# Prefer explicitly selected file to automatically selected ones.
1185if test -z "$CONFIG_SITE"; then
1186 if test "x$prefix" != xNONE; then
1187 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1188 else
1189 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1190 fi
1191fi
1192for ac_site_file in $CONFIG_SITE; do
1193 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1195echo "$as_me: loading site script $ac_site_file" >&6;}
1196 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 . "$ac_site_file"
1198 fi
1199done
1200
1201if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 # Some versions of bash will fail to source /dev/null (special
1203 # files actually), so we avoid doing that.
1204 if test -f "$cache_file"; then
1205 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1206echo "$as_me: loading cache $cache_file" >&6;}
1207 case $cache_file in
1208 [\\/]* | ?:[\\/]* ) . $cache_file;;
1209 *) . ./$cache_file;;
1210 esac
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1214echo "$as_me: creating cache $cache_file" >&6;}
1215 >$cache_file
1216fi
1217
1218# Check that the precious variables saved in the cache have kept the same
1219# value.
1220ac_cache_corrupted=false
1221for ac_var in `(set) 2>&1 |
1222 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1223 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1224 eval ac_new_set=\$ac_env_${ac_var}_set
1225 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1226 eval ac_new_val="\$ac_env_${ac_var}_value"
1227 case $ac_old_set,$ac_new_set in
1228 set,)
1229 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1230echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1231 ac_cache_corrupted=: ;;
1232 ,set)
1233 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1234echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1235 ac_cache_corrupted=: ;;
1236 ,);;
1237 *)
1238 if test "x$ac_old_val" != "x$ac_new_val"; then
1239 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1240echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1241 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1242echo "$as_me: former value: $ac_old_val" >&2;}
1243 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1244echo "$as_me: current value: $ac_new_val" >&2;}
1245 ac_cache_corrupted=:
1246 fi;;
1247 esac
1248 # Pass precious variables to config.status.
1249 if test "$ac_new_set" = set; then
1250 case $ac_new_val in
1251 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1252 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1253 *) ac_arg=$ac_var=$ac_new_val ;;
1254 esac
1255 case " $ac_configure_args " in
1256 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1257 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1258 esac
1259 fi
1260done
1261if $ac_cache_corrupted; then
1262 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1263echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1264 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1265echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1266 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267fi
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001271ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1272ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1273ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275
Michael W. Hudson54241132001-12-07 15:38:26 +00001276
1277
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278
Martin v. Löwis11437992002-04-12 09:54:03 +00001279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
Martin v. Löwis88afe662002-10-26 13:47:44 +00001292
1293
1294
1295
1296
1297
1298
1299
1300
Skip Montanaro6dead952003-09-25 14:50:04 +00001301
1302 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303
1304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305
1306
1307
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001308
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001309
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001310# We don't use PACKAGE_ variables, and they cause conflicts
1311# with other autoconf-based packages that include Python.h
1312grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1313rm confdefs.h
1314mv confdefs.h.new confdefs.h
1315
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001316
Fred Drake9bd44622003-07-30 17:39:48 +00001317VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001318
Martin v. Löwis1142de32002-03-29 16:28:31 +00001319
1320SOVERSION=1.0
1321
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001322# The later defininition of _XOPEN_SOURCE disables certain features
1323# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1324
1325cat >>confdefs.h <<\_ACEOF
1326#define _GNU_SOURCE 1
1327_ACEOF
1328
1329
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001330# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1331# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1332# them.
1333
1334cat >>confdefs.h <<\_ACEOF
1335#define _NETBSD_SOURCE 1
1336_ACEOF
1337
1338
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001339# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1340# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1341# them.
1342
1343cat >>confdefs.h <<\_ACEOF
1344#define __BSD_VISIBLE 1
1345_ACEOF
1346
1347
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001348define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001349
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001350# Arguments passed to configure.
1351
1352CONFIG_ARGS="$ac_configure_args"
1353
Jack Jansene578a632001-08-15 01:27:14 +00001354# Check whether --enable-framework or --disable-framework was given.
1355if test "${enable_framework+set}" = set; then
1356 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001357
Jack Jansene578a632001-08-15 01:27:14 +00001358 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001359 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001360 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001361 esac
1362 case $enableval in
1363 no)
1364 PYTHONFRAMEWORK=
1365 PYTHONFRAMEWORKDIR=no-framework
1366 PYTHONFRAMEWORKPREFIX=
1367 PYTHONFRAMEWORKINSTALLDIR=
1368 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001369 ;;
1370 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001371 PYTHONFRAMEWORK=Python
1372 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001373 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001374 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1375 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001376 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001377
Guido van Rossum563e7081996-09-10 18:20:48 +00001378else
Martin v. Löwis11437992002-04-12 09:54:03 +00001379
Jack Jansene578a632001-08-15 01:27:14 +00001380 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001381 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001382 PYTHONFRAMEWORKPREFIX=
1383 PYTHONFRAMEWORKINSTALLDIR=
1384 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001385
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001387
1388
1389
1390
Jack Jansene578a632001-08-15 01:27:14 +00001391
1392##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001393## AC_HELP_STRING(--with-dyld,
1394## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001395##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001396# Set name for machine-dependent library files
1397
Martin v. Löwis11437992002-04-12 09:54:03 +00001398echo "$as_me:$LINENO: checking MACHDEP" >&5
1399echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001400if test -z "$MACHDEP"
1401then
Guido van Rossum563e7081996-09-10 18:20:48 +00001402 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001403 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1404 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001405 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001406 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001407 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001408 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_md_system=`echo $ac_sys_system |
1410 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1411 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001412 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001413 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001414
Guido van Rossum07397971997-04-29 21:49:50 +00001415 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001416 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001417 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001418 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001419 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001420 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001421 esac
1422fi
Guido van Rossum91922671997-10-09 20:24:13 +00001423
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001424# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1425# disable features if it is defined, without any means to access these
1426# features as extensions. For these systems, we skip the definition of
1427# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1428# some feature, make sure there is no alternative way to access this
1429# feature. Also, when using wildcards, make sure you have verified the
1430# need for not defining _XOPEN_SOURCE on all systems matching the
1431# wildcard, and that the wildcard does not include future systems
1432# (which may remove their limitations).
1433case $ac_sys_system/$ac_sys_release in
1434 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1435 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001436 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1437 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001438 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001439 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1440 # of union __?sigval. Reported by Stuart Bishop.
1441 SunOS/5.6)
1442 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001443 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1444 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001445 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001446 define_xopen_source=no;;
1447 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001448 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001449 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001450 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001451 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1452 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1453 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1454 # This should hopefully be fixed in FreeBSD 4.9
1455 FreeBSD/4.8* | Darwin/6* )
1456 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001457 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1458 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1459 # has another value. By not (re)defining it, the defaults come in place.
1460 AIX/4)
1461 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001462esac
1463
1464if test $define_xopen_source = yes
1465then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001466
1467cat >>confdefs.h <<\_ACEOF
1468#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001469_ACEOF
1470
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001471
1472 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1473 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1474 # several APIs are not declared. Since this is also needed in some
1475 # cases for HP-UX, we define it globally.
1476
1477
1478cat >>confdefs.h <<\_ACEOF
1479#define _XOPEN_SOURCE_EXTENDED 1
1480_ACEOF
1481
1482
1483cat >>confdefs.h <<\_ACEOF
1484#define _POSIX_C_SOURCE 200112L
1485_ACEOF
1486
1487
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001488fi
1489
Guido van Rossum91922671997-10-09 20:24:13 +00001490#
1491# SGI compilers allow the specification of the both the ABI and the
1492# ISA on the command line. Depending on the values of these switches,
1493# different and often incompatable code will be generated.
1494#
1495# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1496# thus supply support for various ABI/ISA combinations. The MACHDEP
1497# variable is also adjusted.
1498#
1499
1500if test ! -z "$SGI_ABI"
1501then
1502 CC="cc $SGI_ABI"
1503 LDFLAGS="$SGI_ABI $LDFLAGS"
1504 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001506echo "$as_me:$LINENO: result: $MACHDEP" >&5
1507echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001508
Jack Jansen83f898c2002-12-30 22:23:40 +00001509# And add extra plat-mac for darwin
1510
Jack Jansen7b59b422003-03-17 15:44:10 +00001511
Jack Jansen83f898c2002-12-30 22:23:40 +00001512echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1513echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1514if test -z "$EXTRAPLATDIR"
1515then
1516 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001517 darwin)
1518 EXTRAPLATDIR="\$(PLATMACDIRS)"
1519 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1520 ;;
1521 *)
1522 EXTRAPLATDIR=""
1523 EXTRAMACHDEPPATH=""
1524 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001525 esac
1526fi
1527echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1528echo "${ECHO_T}$EXTRAPLATDIR" >&6
1529
Guido van Rossum627b2d71993-12-24 10:39:16 +00001530# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001531
1532# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1533# for debug/optimization stuff. BASECFLAGS is for flags that are required
1534# just to get things to compile and link. Users are free to override OPT
1535# when running configure or make. The build should not break if they do.
1536# BASECFLAGS should generally not be messed with, however.
1537
1538# XXX shouldn't some/most/all of this code be merged with the stuff later
1539# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001540echo "$as_me:$LINENO: checking for --without-gcc" >&5
1541echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1542
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001543# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001544if test "${with_gcc+set}" = set; then
1545 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
Guido van Rossum7f43da71994-08-01 12:15:30 +00001547 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001548 no) CC=cc
1549 without_gcc=yes;;
1550 yes) CC=gcc
1551 without_gcc=no;;
1552 *) CC=$withval
1553 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001554 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001555else
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001557 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001558 AIX*) CC=cc_r
1559 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001560 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001561 case $BE_HOST_CPU in
1562 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001563 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001564 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001565 BASECFLAGS="$BASECFLAGS -export pragma"
1566 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001567 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001568 ;;
1569 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001570 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001571 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001572 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001573 ;;
1574 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1576echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1577 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001578 ;;
1579 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001580 AR="\$(srcdir)/Modules/ar_beos"
1581 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001582 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001583 Monterey*)
1584 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001585 without_gcc=;;
1586 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001587 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001588fi;
1589echo "$as_me:$LINENO: result: $without_gcc" >&5
1590echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001591
1592
Guido van Rossum95012191999-12-16 17:50:52 +00001593
Fred Drakea1a84e72001-03-06 05:52:16 +00001594MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001595echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1596echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1597
Guido van Rossum95012191999-12-16 17:50:52 +00001598# Check whether --with-cxx or --without-cxx was given.
1599if test "${with_cxx+set}" = set; then
1600 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001601
Martin v. Löwis22352952000-12-13 17:37:02 +00001602 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001603 case $withval in
1604 no) CXX=
1605 with_cxx=no;;
1606 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001607 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001608 with_cxx=$withval;;
1609 esac
1610else
Martin v. Löwis11437992002-04-12 09:54:03 +00001611
Guido van Rossum95012191999-12-16 17:50:52 +00001612 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001613 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001614
Martin v. Löwis11437992002-04-12 09:54:03 +00001615fi;
1616echo "$as_me:$LINENO: result: $with_cxx" >&5
1617echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001618
1619if test "$with_cxx" = "yes"
1620then
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1622echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1623 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001624fi
1625
1626
1627
1628
Martin v. Löwis11437992002-04-12 09:54:03 +00001629if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001630then
1631 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1632do
Martin v. Löwis11437992002-04-12 09:54:03 +00001633 # 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 +00001634set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001635echo "$as_me:$LINENO: checking for $ac_word" >&5
1636echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1637if test "${ac_cv_prog_CXX+set}" = set; then
1638 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001639else
1640 if test -n "$CXX"; then
1641 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1642else
Martin v. Löwis11437992002-04-12 09:54:03 +00001643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1644for as_dir in $PATH
1645do
1646 IFS=$as_save_IFS
1647 test -z "$as_dir" && as_dir=.
1648 for ac_exec_ext in '' $ac_executable_extensions; do
1649 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1650 ac_cv_prog_CXX="$ac_prog"
1651 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1652 break 2
1653 fi
1654done
1655done
1656
Martin v. Löwis22352952000-12-13 17:37:02 +00001657fi
1658fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001659CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001660if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 echo "$as_me:$LINENO: result: $CXX" >&5
1662echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001663else
Martin v. Löwis11437992002-04-12 09:54:03 +00001664 echo "$as_me:$LINENO: result: no" >&5
1665echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001666fi
1667
Martin v. Löwis11437992002-04-12 09:54:03 +00001668 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001669done
1670test -n "$CXX" || CXX="notfound"
1671
1672 if test "$CXX" = "notfound"
1673 then
1674 CXX=
1675 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001676 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001677ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1681 cat >conftest.$ac_ext <<_ACEOF
1682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001683/* confdefs.h. */
1684_ACEOF
1685cat confdefs.h >>conftest.$ac_ext
1686cat >>conftest.$ac_ext <<_ACEOF
1687/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001688
Martin v. Löwis11437992002-04-12 09:54:03 +00001689int
1690main ()
1691{
Michael W. Hudson54241132001-12-07 15:38:26 +00001692
Martin v. Löwis11437992002-04-12 09:54:03 +00001693 ;
1694 return 0;
1695}
1696_ACEOF
1697ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001698ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001699# Try to create an executable without -o first, disregard a.out.
1700# It will help us diagnose broken compilers, and finding out an intuition
1701# of exeext.
1702echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1703echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1704ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1705if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1706 (eval $ac_link_default) 2>&5
1707 ac_status=$?
1708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1709 (exit $ac_status); }; then
1710 # Find the output, starting from the most likely. This scheme is
1711# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1712# resort.
1713
1714# Be careful to initialize this variable, since it used to be cached.
1715# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1716ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001717# b.out is created by i960 compilers.
1718for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1719do
1720 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001722 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1723 ;;
1724 conftest.$ac_ext )
1725 # This is the source file.
1726 ;;
1727 [ab].out )
1728 # We found the default executable, but exeext='' is most
1729 # certainly right.
1730 break;;
1731 *.* )
1732 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1733 # FIXME: I believe we export ac_cv_exeext for Libtool,
1734 # but it would be cool to find out if it's true. Does anybody
1735 # maintain Libtool? --akim.
1736 export ac_cv_exeext
1737 break;;
1738 * )
1739 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 esac
1741done
1742else
1743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001744sed 's/^/| /' conftest.$ac_ext >&5
1745
1746{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1747See \`config.log' for more details." >&5
1748echo "$as_me: error: C++ compiler cannot create executables
1749See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001752
1753ac_exeext=$ac_cv_exeext
1754echo "$as_me:$LINENO: result: $ac_file" >&5
1755echo "${ECHO_T}$ac_file" >&6
1756
1757# Check the compiler produces executables we can run. If not, either
1758# the compiler is broken, or we cross compile.
1759echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1760echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1761# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1762# If not cross compiling, check that we can run a simple program.
1763if test "$cross_compiling" != yes; then
1764 if { ac_try='./$ac_file'
1765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1766 (eval $ac_try) 2>&5
1767 ac_status=$?
1768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1769 (exit $ac_status); }; }; then
1770 cross_compiling=no
1771 else
1772 if test "$cross_compiling" = maybe; then
1773 cross_compiling=yes
1774 else
1775 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001776If you meant to cross compile, use \`--host'.
1777See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001778echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001779If you meant to cross compile, use \`--host'.
1780See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001781 { (exit 1); exit 1; }; }
1782 fi
1783 fi
1784fi
1785echo "$as_me:$LINENO: result: yes" >&5
1786echo "${ECHO_T}yes" >&6
1787
Skip Montanaro6dead952003-09-25 14:50:04 +00001788rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001789ac_clean_files=$ac_clean_files_save
1790# Check the compiler produces executables we can run. If not, either
1791# the compiler is broken, or we cross compile.
1792echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1793echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1794echo "$as_me:$LINENO: result: $cross_compiling" >&5
1795echo "${ECHO_T}$cross_compiling" >&6
1796
1797echo "$as_me:$LINENO: checking for suffix of executables" >&5
1798echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1800 (eval $ac_link) 2>&5
1801 ac_status=$?
1802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1803 (exit $ac_status); }; then
1804 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1805# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1806# work properly (i.e., refer to `conftest.exe'), while it won't with
1807# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001808for ac_file in conftest.exe conftest conftest.*; do
1809 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001810 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001811 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001812 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1813 export ac_cv_exeext
1814 break;;
1815 * ) break;;
1816 esac
1817done
1818else
Skip Montanaro6dead952003-09-25 14:50:04 +00001819 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1820See \`config.log' for more details." >&5
1821echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1822See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 { (exit 1); exit 1; }; }
1824fi
1825
1826rm -f conftest$ac_cv_exeext
1827echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1828echo "${ECHO_T}$ac_cv_exeext" >&6
1829
1830rm -f conftest.$ac_ext
1831EXEEXT=$ac_cv_exeext
1832ac_exeext=$EXEEXT
1833
1834 ac_ext=c
1835ac_cpp='$CPP $CPPFLAGS'
1836ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1837ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1838ac_compiler_gnu=$ac_cv_c_compiler_gnu
1839
1840
Martin v. Löwis22352952000-12-13 17:37:02 +00001841
1842 fi
1843fi
1844
Guido van Rossum8b131c51995-03-09 14:10:13 +00001845# If the user switches compilers, we can't believe the cache
1846if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1847then
Martin v. Löwis11437992002-04-12 09:54:03 +00001848 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1849(it is also a good idea to do 'make clean' before compiling)" >&5
1850echo "$as_me: error: cached CC is different -- throw away $cache_file
1851(it is also a good idea to do 'make clean' before compiling)" >&2;}
1852 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001853fi
1854
Martin v. Löwis11437992002-04-12 09:54:03 +00001855ac_ext=c
1856ac_cpp='$CPP $CPPFLAGS'
1857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1859ac_compiler_gnu=$ac_cv_c_compiler_gnu
1860if test -n "$ac_tool_prefix"; then
1861 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1862set dummy ${ac_tool_prefix}gcc; ac_word=$2
1863echo "$as_me:$LINENO: checking for $ac_word" >&5
1864echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1865if test "${ac_cv_prog_CC+set}" = set; then
1866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001867else
1868 if test -n "$CC"; then
1869 ac_cv_prog_CC="$CC" # Let the user override the test.
1870else
Martin v. Löwis11437992002-04-12 09:54:03 +00001871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1872for as_dir in $PATH
1873do
1874 IFS=$as_save_IFS
1875 test -z "$as_dir" && as_dir=.
1876 for ac_exec_ext in '' $ac_executable_extensions; do
1877 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1878 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1879 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1880 break 2
1881 fi
1882done
1883done
1884
Jack Jansendd19cf82001-12-06 22:36:17 +00001885fi
1886fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001887CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001888if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001889 echo "$as_me:$LINENO: result: $CC" >&5
1890echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001891else
Martin v. Löwis11437992002-04-12 09:54:03 +00001892 echo "$as_me:$LINENO: result: no" >&5
1893echo "${ECHO_T}no" >&6
1894fi
1895
1896fi
1897if test -z "$ac_cv_prog_CC"; then
1898 ac_ct_CC=$CC
1899 # Extract the first word of "gcc", so it can be a program name with args.
1900set dummy gcc; ac_word=$2
1901echo "$as_me:$LINENO: checking for $ac_word" >&5
1902echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1903if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1904 echo $ECHO_N "(cached) $ECHO_C" >&6
1905else
1906 if test -n "$ac_ct_CC"; then
1907 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1908else
1909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1910for as_dir in $PATH
1911do
1912 IFS=$as_save_IFS
1913 test -z "$as_dir" && as_dir=.
1914 for ac_exec_ext in '' $ac_executable_extensions; do
1915 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1916 ac_cv_prog_ac_ct_CC="gcc"
1917 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1918 break 2
1919 fi
1920done
1921done
1922
1923fi
1924fi
1925ac_ct_CC=$ac_cv_prog_ac_ct_CC
1926if test -n "$ac_ct_CC"; then
1927 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1928echo "${ECHO_T}$ac_ct_CC" >&6
1929else
1930 echo "$as_me:$LINENO: result: no" >&5
1931echo "${ECHO_T}no" >&6
1932fi
1933
1934 CC=$ac_ct_CC
1935else
1936 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001937fi
1938
Jack Jansendd19cf82001-12-06 22:36:17 +00001939if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001940 if test -n "$ac_tool_prefix"; then
1941 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1942set dummy ${ac_tool_prefix}cc; ac_word=$2
1943echo "$as_me:$LINENO: checking for $ac_word" >&5
1944echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1945if test "${ac_cv_prog_CC+set}" = set; then
1946 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001947else
1948 if test -n "$CC"; then
1949 ac_cv_prog_CC="$CC" # Let the user override the test.
1950else
Martin v. Löwis11437992002-04-12 09:54:03 +00001951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1952for as_dir in $PATH
1953do
1954 IFS=$as_save_IFS
1955 test -z "$as_dir" && as_dir=.
1956 for ac_exec_ext in '' $ac_executable_extensions; do
1957 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1958 ac_cv_prog_CC="${ac_tool_prefix}cc"
1959 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1960 break 2
1961 fi
1962done
1963done
1964
1965fi
1966fi
1967CC=$ac_cv_prog_CC
1968if test -n "$CC"; then
1969 echo "$as_me:$LINENO: result: $CC" >&5
1970echo "${ECHO_T}$CC" >&6
1971else
1972 echo "$as_me:$LINENO: result: no" >&5
1973echo "${ECHO_T}no" >&6
1974fi
1975
1976fi
1977if test -z "$ac_cv_prog_CC"; then
1978 ac_ct_CC=$CC
1979 # Extract the first word of "cc", so it can be a program name with args.
1980set dummy cc; ac_word=$2
1981echo "$as_me:$LINENO: checking for $ac_word" >&5
1982echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1983if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1984 echo $ECHO_N "(cached) $ECHO_C" >&6
1985else
1986 if test -n "$ac_ct_CC"; then
1987 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1988else
1989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1990for as_dir in $PATH
1991do
1992 IFS=$as_save_IFS
1993 test -z "$as_dir" && as_dir=.
1994 for ac_exec_ext in '' $ac_executable_extensions; do
1995 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1996 ac_cv_prog_ac_ct_CC="cc"
1997 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1998 break 2
1999 fi
2000done
2001done
2002
2003fi
2004fi
2005ac_ct_CC=$ac_cv_prog_ac_ct_CC
2006if test -n "$ac_ct_CC"; then
2007 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2008echo "${ECHO_T}$ac_ct_CC" >&6
2009else
2010 echo "$as_me:$LINENO: result: no" >&5
2011echo "${ECHO_T}no" >&6
2012fi
2013
2014 CC=$ac_ct_CC
2015else
2016 CC="$ac_cv_prog_CC"
2017fi
2018
2019fi
2020if test -z "$CC"; then
2021 # Extract the first word of "cc", so it can be a program name with args.
2022set dummy cc; ac_word=$2
2023echo "$as_me:$LINENO: checking for $ac_word" >&5
2024echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2025if test "${ac_cv_prog_CC+set}" = set; then
2026 echo $ECHO_N "(cached) $ECHO_C" >&6
2027else
2028 if test -n "$CC"; then
2029 ac_cv_prog_CC="$CC" # Let the user override the test.
2030else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002031 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2033for as_dir in $PATH
2034do
2035 IFS=$as_save_IFS
2036 test -z "$as_dir" && as_dir=.
2037 for ac_exec_ext in '' $ac_executable_extensions; do
2038 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2039 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2040 ac_prog_rejected=yes
2041 continue
2042 fi
2043 ac_cv_prog_CC="cc"
2044 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2045 break 2
2046 fi
2047done
2048done
2049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002050if test $ac_prog_rejected = yes; then
2051 # We found a bogon in the path, so make sure we never use it.
2052 set dummy $ac_cv_prog_CC
2053 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002054 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002055 # We chose a different compiler from the bogus one.
2056 # However, it has the same basename, so the bogon will be chosen
2057 # first if we set CC to just the basename; use the full file name.
2058 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002059 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002060 fi
2061fi
2062fi
2063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002064CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002065if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002066 echo "$as_me:$LINENO: result: $CC" >&5
2067echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002068else
Martin v. Löwis11437992002-04-12 09:54:03 +00002069 echo "$as_me:$LINENO: result: no" >&5
2070echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002071fi
2072
Martin v. Löwis11437992002-04-12 09:54:03 +00002073fi
2074if test -z "$CC"; then
2075 if test -n "$ac_tool_prefix"; then
2076 for ac_prog in cl
2077 do
2078 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2079set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2080echo "$as_me:$LINENO: checking for $ac_word" >&5
2081echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2082if test "${ac_cv_prog_CC+set}" = set; then
2083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002084else
2085 if test -n "$CC"; then
2086 ac_cv_prog_CC="$CC" # Let the user override the test.
2087else
Martin v. Löwis11437992002-04-12 09:54:03 +00002088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2089for as_dir in $PATH
2090do
2091 IFS=$as_save_IFS
2092 test -z "$as_dir" && as_dir=.
2093 for ac_exec_ext in '' $ac_executable_extensions; do
2094 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2095 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2096 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2097 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002098 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002099done
2100done
2101
2102fi
2103fi
2104CC=$ac_cv_prog_CC
2105if test -n "$CC"; then
2106 echo "$as_me:$LINENO: result: $CC" >&5
2107echo "${ECHO_T}$CC" >&6
2108else
2109 echo "$as_me:$LINENO: result: no" >&5
2110echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002111fi
2112
Martin v. Löwis11437992002-04-12 09:54:03 +00002113 test -n "$CC" && break
2114 done
2115fi
2116if test -z "$CC"; then
2117 ac_ct_CC=$CC
2118 for ac_prog in cl
2119do
2120 # Extract the first word of "$ac_prog", so it can be a program name with args.
2121set dummy $ac_prog; ac_word=$2
2122echo "$as_me:$LINENO: checking for $ac_word" >&5
2123echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2124if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2125 echo $ECHO_N "(cached) $ECHO_C" >&6
2126else
2127 if test -n "$ac_ct_CC"; then
2128 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2129else
2130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2131for as_dir in $PATH
2132do
2133 IFS=$as_save_IFS
2134 test -z "$as_dir" && as_dir=.
2135 for ac_exec_ext in '' $ac_executable_extensions; do
2136 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2137 ac_cv_prog_ac_ct_CC="$ac_prog"
2138 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2139 break 2
2140 fi
2141done
2142done
Jack Jansendd19cf82001-12-06 22:36:17 +00002143
Martin v. Löwis11437992002-04-12 09:54:03 +00002144fi
2145fi
2146ac_ct_CC=$ac_cv_prog_ac_ct_CC
2147if test -n "$ac_ct_CC"; then
2148 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2149echo "${ECHO_T}$ac_ct_CC" >&6
2150else
2151 echo "$as_me:$LINENO: result: no" >&5
2152echo "${ECHO_T}no" >&6
2153fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002154
Martin v. Löwis11437992002-04-12 09:54:03 +00002155 test -n "$ac_ct_CC" && break
2156done
Michael W. Hudson54241132001-12-07 15:38:26 +00002157
Martin v. Löwis11437992002-04-12 09:54:03 +00002158 CC=$ac_ct_CC
2159fi
2160
2161fi
2162
2163
Skip Montanaro6dead952003-09-25 14:50:04 +00002164test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2165See \`config.log' for more details." >&5
2166echo "$as_me: error: no acceptable C compiler found in \$PATH
2167See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002168 { (exit 1); exit 1; }; }
2169
2170# Provide some information about the compiler.
2171echo "$as_me:$LINENO:" \
2172 "checking for C compiler version" >&5
2173ac_compiler=`set X $ac_compile; echo $2`
2174{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2175 (eval $ac_compiler --version </dev/null >&5) 2>&5
2176 ac_status=$?
2177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178 (exit $ac_status); }
2179{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2180 (eval $ac_compiler -v </dev/null >&5) 2>&5
2181 ac_status=$?
2182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2183 (exit $ac_status); }
2184{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2185 (eval $ac_compiler -V </dev/null >&5) 2>&5
2186 ac_status=$?
2187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188 (exit $ac_status); }
2189
2190cat >conftest.$ac_ext <<_ACEOF
2191#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002192/* confdefs.h. */
2193_ACEOF
2194cat confdefs.h >>conftest.$ac_ext
2195cat >>conftest.$ac_ext <<_ACEOF
2196/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002197
Martin v. Löwis11437992002-04-12 09:54:03 +00002198int
2199main ()
2200{
2201
2202 ;
2203 return 0;
2204}
2205_ACEOF
2206ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002207ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002208# Try to create an executable without -o first, disregard a.out.
2209# It will help us diagnose broken compilers, and finding out an intuition
2210# of exeext.
2211echo "$as_me:$LINENO: checking for C compiler default output" >&5
2212echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2213ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2214if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2215 (eval $ac_link_default) 2>&5
2216 ac_status=$?
2217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2218 (exit $ac_status); }; then
2219 # Find the output, starting from the most likely. This scheme is
2220# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2221# resort.
2222
2223# Be careful to initialize this variable, since it used to be cached.
2224# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2225ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002226# b.out is created by i960 compilers.
2227for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2228do
2229 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002230 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002231 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2232 ;;
2233 conftest.$ac_ext )
2234 # This is the source file.
2235 ;;
2236 [ab].out )
2237 # We found the default executable, but exeext='' is most
2238 # certainly right.
2239 break;;
2240 *.* )
2241 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2242 # FIXME: I believe we export ac_cv_exeext for Libtool,
2243 # but it would be cool to find out if it's true. Does anybody
2244 # maintain Libtool? --akim.
2245 export ac_cv_exeext
2246 break;;
2247 * )
2248 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002249 esac
2250done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002251else
Martin v. Löwis11437992002-04-12 09:54:03 +00002252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002253sed 's/^/| /' conftest.$ac_ext >&5
2254
2255{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2256See \`config.log' for more details." >&5
2257echo "$as_me: error: C compiler cannot create executables
2258See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002259 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002260fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002261
Martin v. Löwis11437992002-04-12 09:54:03 +00002262ac_exeext=$ac_cv_exeext
2263echo "$as_me:$LINENO: result: $ac_file" >&5
2264echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002265
Martin v. Löwis11437992002-04-12 09:54:03 +00002266# Check the compiler produces executables we can run. If not, either
2267# the compiler is broken, or we cross compile.
2268echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2269echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2270# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2271# If not cross compiling, check that we can run a simple program.
2272if test "$cross_compiling" != yes; then
2273 if { ac_try='./$ac_file'
2274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2275 (eval $ac_try) 2>&5
2276 ac_status=$?
2277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2278 (exit $ac_status); }; }; then
2279 cross_compiling=no
2280 else
2281 if test "$cross_compiling" = maybe; then
2282 cross_compiling=yes
2283 else
2284 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002285If you meant to cross compile, use \`--host'.
2286See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002287echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002288If you meant to cross compile, use \`--host'.
2289See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002290 { (exit 1); exit 1; }; }
2291 fi
2292 fi
2293fi
2294echo "$as_me:$LINENO: result: yes" >&5
2295echo "${ECHO_T}yes" >&6
2296
Skip Montanaro6dead952003-09-25 14:50:04 +00002297rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002298ac_clean_files=$ac_clean_files_save
2299# Check the compiler produces executables we can run. If not, either
2300# the compiler is broken, or we cross compile.
2301echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2302echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2303echo "$as_me:$LINENO: result: $cross_compiling" >&5
2304echo "${ECHO_T}$cross_compiling" >&6
2305
2306echo "$as_me:$LINENO: checking for suffix of executables" >&5
2307echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2309 (eval $ac_link) 2>&5
2310 ac_status=$?
2311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2312 (exit $ac_status); }; then
2313 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2314# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2315# work properly (i.e., refer to `conftest.exe'), while it won't with
2316# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002317for ac_file in conftest.exe conftest conftest.*; do
2318 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002319 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002320 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002321 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2322 export ac_cv_exeext
2323 break;;
2324 * ) break;;
2325 esac
2326done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002327else
Skip Montanaro6dead952003-09-25 14:50:04 +00002328 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2329See \`config.log' for more details." >&5
2330echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2331See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002332 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002333fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002334
Martin v. Löwis11437992002-04-12 09:54:03 +00002335rm -f conftest$ac_cv_exeext
2336echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2337echo "${ECHO_T}$ac_cv_exeext" >&6
2338
2339rm -f conftest.$ac_ext
2340EXEEXT=$ac_cv_exeext
2341ac_exeext=$EXEEXT
2342echo "$as_me:$LINENO: checking for suffix of object files" >&5
2343echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2344if test "${ac_cv_objext+set}" = set; then
2345 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002346else
Martin v. Löwis11437992002-04-12 09:54:03 +00002347 cat >conftest.$ac_ext <<_ACEOF
2348#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002349/* confdefs.h. */
2350_ACEOF
2351cat confdefs.h >>conftest.$ac_ext
2352cat >>conftest.$ac_ext <<_ACEOF
2353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
Martin v. Löwis11437992002-04-12 09:54:03 +00002355int
2356main ()
2357{
2358
2359 ;
2360 return 0;
2361}
2362_ACEOF
2363rm -f conftest.o conftest.obj
2364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2365 (eval $ac_compile) 2>&5
2366 ac_status=$?
2367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2368 (exit $ac_status); }; then
2369 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2370 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002371 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002372 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2373 break;;
2374 esac
2375done
2376else
2377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002378sed 's/^/| /' conftest.$ac_ext >&5
2379
2380{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2381See \`config.log' for more details." >&5
2382echo "$as_me: error: cannot compute suffix of object files: cannot compile
2383See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002384 { (exit 1); exit 1; }; }
2385fi
2386
2387rm -f conftest.$ac_cv_objext conftest.$ac_ext
2388fi
2389echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2390echo "${ECHO_T}$ac_cv_objext" >&6
2391OBJEXT=$ac_cv_objext
2392ac_objext=$OBJEXT
2393echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2394echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2395if test "${ac_cv_c_compiler_gnu+set}" = set; then
2396 echo $ECHO_N "(cached) $ECHO_C" >&6
2397else
2398 cat >conftest.$ac_ext <<_ACEOF
2399#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002400/* confdefs.h. */
2401_ACEOF
2402cat confdefs.h >>conftest.$ac_ext
2403cat >>conftest.$ac_ext <<_ACEOF
2404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002405
Martin v. Löwis11437992002-04-12 09:54:03 +00002406int
2407main ()
2408{
2409#ifndef __GNUC__
2410 choke me
2411#endif
2412
2413 ;
2414 return 0;
2415}
2416_ACEOF
2417rm -f conftest.$ac_objext
2418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2419 (eval $ac_compile) 2>&5
2420 ac_status=$?
2421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2422 (exit $ac_status); } &&
2423 { ac_try='test -s conftest.$ac_objext'
2424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2425 (eval $ac_try) 2>&5
2426 ac_status=$?
2427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2428 (exit $ac_status); }; }; then
2429 ac_compiler_gnu=yes
2430else
2431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002432sed 's/^/| /' conftest.$ac_ext >&5
2433
Martin v. Löwis11437992002-04-12 09:54:03 +00002434ac_compiler_gnu=no
2435fi
2436rm -f conftest.$ac_objext conftest.$ac_ext
2437ac_cv_c_compiler_gnu=$ac_compiler_gnu
2438
2439fi
2440echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2441echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2442GCC=`test $ac_compiler_gnu = yes && echo yes`
2443ac_test_CFLAGS=${CFLAGS+set}
2444ac_save_CFLAGS=$CFLAGS
2445CFLAGS="-g"
2446echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2447echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2448if test "${ac_cv_prog_cc_g+set}" = set; then
2449 echo $ECHO_N "(cached) $ECHO_C" >&6
2450else
2451 cat >conftest.$ac_ext <<_ACEOF
2452#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002453/* confdefs.h. */
2454_ACEOF
2455cat confdefs.h >>conftest.$ac_ext
2456cat >>conftest.$ac_ext <<_ACEOF
2457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002458
Martin v. Löwis11437992002-04-12 09:54:03 +00002459int
2460main ()
2461{
2462
2463 ;
2464 return 0;
2465}
2466_ACEOF
2467rm -f conftest.$ac_objext
2468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2469 (eval $ac_compile) 2>&5
2470 ac_status=$?
2471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2472 (exit $ac_status); } &&
2473 { ac_try='test -s conftest.$ac_objext'
2474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2475 (eval $ac_try) 2>&5
2476 ac_status=$?
2477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2478 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002479 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002480else
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002482sed 's/^/| /' conftest.$ac_ext >&5
2483
Martin v. Löwis11437992002-04-12 09:54:03 +00002484ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002485fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002486rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002488echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2489echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002490if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002492elif test $ac_cv_prog_cc_g = yes; then
2493 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002494 CFLAGS="-g -O2"
2495 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002496 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002497 fi
2498else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002499 if test "$GCC" = yes; then
2500 CFLAGS="-O2"
2501 else
2502 CFLAGS=
2503 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002504fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002505echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2506echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2507if test "${ac_cv_prog_cc_stdc+set}" = set; then
2508 echo $ECHO_N "(cached) $ECHO_C" >&6
2509else
2510 ac_cv_prog_cc_stdc=no
2511ac_save_CC=$CC
2512cat >conftest.$ac_ext <<_ACEOF
2513#line $LINENO "configure"
2514/* confdefs.h. */
2515_ACEOF
2516cat confdefs.h >>conftest.$ac_ext
2517cat >>conftest.$ac_ext <<_ACEOF
2518/* end confdefs.h. */
2519#include <stdarg.h>
2520#include <stdio.h>
2521#include <sys/types.h>
2522#include <sys/stat.h>
2523/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2524struct buf { int x; };
2525FILE * (*rcsopen) (struct buf *, struct stat *, int);
2526static char *e (p, i)
2527 char **p;
2528 int i;
2529{
2530 return p[i];
2531}
2532static char *f (char * (*g) (char **, int), char **p, ...)
2533{
2534 char *s;
2535 va_list v;
2536 va_start (v,p);
2537 s = g (p, va_arg (v,int));
2538 va_end (v);
2539 return s;
2540}
2541int test (int i, double x);
2542struct s1 {int (*f) (int a);};
2543struct s2 {int (*f) (double a);};
2544int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2545int argc;
2546char **argv;
2547int
2548main ()
2549{
2550return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2551 ;
2552 return 0;
2553}
2554_ACEOF
2555# Don't try gcc -ansi; that turns off useful extensions and
2556# breaks some systems' header files.
2557# AIX -qlanglvl=ansi
2558# Ultrix and OSF/1 -std1
2559# HP-UX 10.20 and later -Ae
2560# HP-UX older versions -Aa -D_HPUX_SOURCE
2561# SVR4 -Xc -D__EXTENSIONS__
2562for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2563do
2564 CC="$ac_save_CC $ac_arg"
2565 rm -f conftest.$ac_objext
2566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2567 (eval $ac_compile) 2>&5
2568 ac_status=$?
2569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570 (exit $ac_status); } &&
2571 { ac_try='test -s conftest.$ac_objext'
2572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2573 (eval $ac_try) 2>&5
2574 ac_status=$?
2575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2576 (exit $ac_status); }; }; then
2577 ac_cv_prog_cc_stdc=$ac_arg
2578break
2579else
2580 echo "$as_me: failed program was:" >&5
2581sed 's/^/| /' conftest.$ac_ext >&5
2582
2583fi
2584rm -f conftest.$ac_objext
2585done
2586rm -f conftest.$ac_ext conftest.$ac_objext
2587CC=$ac_save_CC
2588
2589fi
2590
2591case "x$ac_cv_prog_cc_stdc" in
2592 x|xno)
2593 echo "$as_me:$LINENO: result: none needed" >&5
2594echo "${ECHO_T}none needed" >&6 ;;
2595 *)
2596 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2597echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2598 CC="$CC $ac_cv_prog_cc_stdc" ;;
2599esac
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601# Some people use a C++ compiler to compile C. Since we use `exit',
2602# in C++ we need to declare it. In case someone uses the same compiler
2603# for both compiling C and C++ we need to have the C++ compiler decide
2604# the declaration of exit, since it's the most demanding environment.
2605cat >conftest.$ac_ext <<_ACEOF
2606#ifndef __cplusplus
2607 choke me
2608#endif
2609_ACEOF
2610rm -f conftest.$ac_objext
2611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2612 (eval $ac_compile) 2>&5
2613 ac_status=$?
2614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2615 (exit $ac_status); } &&
2616 { ac_try='test -s conftest.$ac_objext'
2617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2618 (eval $ac_try) 2>&5
2619 ac_status=$?
2620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2621 (exit $ac_status); }; }; then
2622 for ac_declaration in \
2623 ''\
2624 '#include <stdlib.h>' \
2625 'extern "C" void std::exit (int) throw (); using std::exit;' \
2626 'extern "C" void std::exit (int); using std::exit;' \
2627 'extern "C" void exit (int) throw ();' \
2628 'extern "C" void exit (int);' \
2629 'void exit (int);'
2630do
2631 cat >conftest.$ac_ext <<_ACEOF
2632#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002633/* confdefs.h. */
2634_ACEOF
2635cat confdefs.h >>conftest.$ac_ext
2636cat >>conftest.$ac_ext <<_ACEOF
2637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002638#include <stdlib.h>
2639$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002640int
2641main ()
2642{
2643exit (42);
2644 ;
2645 return 0;
2646}
2647_ACEOF
2648rm -f conftest.$ac_objext
2649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2650 (eval $ac_compile) 2>&5
2651 ac_status=$?
2652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2653 (exit $ac_status); } &&
2654 { ac_try='test -s conftest.$ac_objext'
2655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2656 (eval $ac_try) 2>&5
2657 ac_status=$?
2658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2659 (exit $ac_status); }; }; then
2660 :
2661else
2662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002663sed 's/^/| /' conftest.$ac_ext >&5
2664
Martin v. Löwis11437992002-04-12 09:54:03 +00002665continue
2666fi
2667rm -f conftest.$ac_objext conftest.$ac_ext
2668 cat >conftest.$ac_ext <<_ACEOF
2669#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002670/* confdefs.h. */
2671_ACEOF
2672cat confdefs.h >>conftest.$ac_ext
2673cat >>conftest.$ac_ext <<_ACEOF
2674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002675$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002676int
2677main ()
2678{
2679exit (42);
2680 ;
2681 return 0;
2682}
2683_ACEOF
2684rm -f conftest.$ac_objext
2685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2686 (eval $ac_compile) 2>&5
2687 ac_status=$?
2688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2689 (exit $ac_status); } &&
2690 { ac_try='test -s conftest.$ac_objext'
2691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2692 (eval $ac_try) 2>&5
2693 ac_status=$?
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); }; }; then
2696 break
2697else
2698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002699sed 's/^/| /' conftest.$ac_ext >&5
2700
Martin v. Löwis11437992002-04-12 09:54:03 +00002701fi
2702rm -f conftest.$ac_objext conftest.$ac_ext
2703done
2704rm -f conftest*
2705if test -n "$ac_declaration"; then
2706 echo '#ifdef __cplusplus' >>confdefs.h
2707 echo $ac_declaration >>confdefs.h
2708 echo '#endif' >>confdefs.h
2709fi
2710
2711else
2712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002713sed 's/^/| /' conftest.$ac_ext >&5
2714
Martin v. Löwis11437992002-04-12 09:54:03 +00002715fi
2716rm -f conftest.$ac_objext conftest.$ac_ext
2717ac_ext=c
2718ac_cpp='$CPP $CPPFLAGS'
2719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2721ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002723
2724# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002725
2726ac_ext=c
2727ac_cpp='$CPP $CPPFLAGS'
2728ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2729ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2730ac_compiler_gnu=$ac_cv_c_compiler_gnu
2731echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2732echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002733# On Suns, sometimes $CPP names a directory.
2734if test -n "$CPP" && test -d "$CPP"; then
2735 CPP=
2736fi
2737if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 if test "${ac_cv_prog_CPP+set}" = set; then
2739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002740else
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 # Double quotes because CPP needs to be expanded
2742 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2743 do
2744 ac_preproc_ok=false
2745for ac_c_preproc_warn_flag in '' yes
2746do
2747 # Use a header file that comes with gcc, so configuring glibc
2748 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2750 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002751 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 # not just through cpp. "Syntax error" is here to catch this case.
2753 cat >conftest.$ac_ext <<_ACEOF
2754#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002755/* confdefs.h. */
2756_ACEOF
2757cat confdefs.h >>conftest.$ac_ext
2758cat >>conftest.$ac_ext <<_ACEOF
2759/* end confdefs.h. */
2760#ifdef __STDC__
2761# include <limits.h>
2762#else
2763# include <assert.h>
2764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 Syntax error
2766_ACEOF
2767if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2768 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2769 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002770 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 rm -f conftest.er1
2772 cat conftest.err >&5
2773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2774 (exit $ac_status); } >/dev/null; then
2775 if test -s conftest.err; then
2776 ac_cpp_err=$ac_c_preproc_warn_flag
2777 else
2778 ac_cpp_err=
2779 fi
2780else
2781 ac_cpp_err=yes
2782fi
2783if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002784 :
2785else
Martin v. Löwis11437992002-04-12 09:54:03 +00002786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002787sed 's/^/| /' conftest.$ac_ext >&5
2788
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 # Broken: fails on valid input.
2790continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002791fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002792rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002793
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 # OK, works on sane cases. Now check whether non-existent headers
2795 # can be detected and how.
2796 cat >conftest.$ac_ext <<_ACEOF
2797#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002798/* confdefs.h. */
2799_ACEOF
2800cat confdefs.h >>conftest.$ac_ext
2801cat >>conftest.$ac_ext <<_ACEOF
2802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002803#include <ac_nonexistent.h>
2804_ACEOF
2805if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2806 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2807 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002808 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002809 rm -f conftest.er1
2810 cat conftest.err >&5
2811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812 (exit $ac_status); } >/dev/null; then
2813 if test -s conftest.err; then
2814 ac_cpp_err=$ac_c_preproc_warn_flag
2815 else
2816 ac_cpp_err=
2817 fi
2818else
2819 ac_cpp_err=yes
2820fi
2821if test -z "$ac_cpp_err"; then
2822 # Broken: success on invalid input.
2823continue
2824else
2825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002826sed 's/^/| /' conftest.$ac_ext >&5
2827
Martin v. Löwis11437992002-04-12 09:54:03 +00002828 # Passes both tests.
2829ac_preproc_ok=:
2830break
2831fi
2832rm -f conftest.err conftest.$ac_ext
2833
2834done
2835# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2836rm -f conftest.err conftest.$ac_ext
2837if $ac_preproc_ok; then
2838 break
2839fi
2840
2841 done
2842 ac_cv_prog_CPP=$CPP
2843
2844fi
2845 CPP=$ac_cv_prog_CPP
2846else
2847 ac_cv_prog_CPP=$CPP
2848fi
2849echo "$as_me:$LINENO: result: $CPP" >&5
2850echo "${ECHO_T}$CPP" >&6
2851ac_preproc_ok=false
2852for ac_c_preproc_warn_flag in '' yes
2853do
2854 # Use a header file that comes with gcc, so configuring glibc
2855 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002856 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2857 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002858 # On the NeXT, cc -E runs the code through the compiler's parser,
2859 # not just through cpp. "Syntax error" is here to catch this case.
2860 cat >conftest.$ac_ext <<_ACEOF
2861#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002862/* confdefs.h. */
2863_ACEOF
2864cat confdefs.h >>conftest.$ac_ext
2865cat >>conftest.$ac_ext <<_ACEOF
2866/* end confdefs.h. */
2867#ifdef __STDC__
2868# include <limits.h>
2869#else
2870# include <assert.h>
2871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 Syntax error
2873_ACEOF
2874if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2875 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2876 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002877 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 rm -f conftest.er1
2879 cat conftest.err >&5
2880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881 (exit $ac_status); } >/dev/null; then
2882 if test -s conftest.err; then
2883 ac_cpp_err=$ac_c_preproc_warn_flag
2884 else
2885 ac_cpp_err=
2886 fi
2887else
2888 ac_cpp_err=yes
2889fi
2890if test -z "$ac_cpp_err"; then
2891 :
2892else
2893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002894sed 's/^/| /' conftest.$ac_ext >&5
2895
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 # Broken: fails on valid input.
2897continue
2898fi
2899rm -f conftest.err conftest.$ac_ext
2900
2901 # OK, works on sane cases. Now check whether non-existent headers
2902 # can be detected and how.
2903 cat >conftest.$ac_ext <<_ACEOF
2904#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002905/* confdefs.h. */
2906_ACEOF
2907cat confdefs.h >>conftest.$ac_ext
2908cat >>conftest.$ac_ext <<_ACEOF
2909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002910#include <ac_nonexistent.h>
2911_ACEOF
2912if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2913 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2914 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002915 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002916 rm -f conftest.er1
2917 cat conftest.err >&5
2918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2919 (exit $ac_status); } >/dev/null; then
2920 if test -s conftest.err; then
2921 ac_cpp_err=$ac_c_preproc_warn_flag
2922 else
2923 ac_cpp_err=
2924 fi
2925else
2926 ac_cpp_err=yes
2927fi
2928if test -z "$ac_cpp_err"; then
2929 # Broken: success on invalid input.
2930continue
2931else
2932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002933sed 's/^/| /' conftest.$ac_ext >&5
2934
Martin v. Löwis11437992002-04-12 09:54:03 +00002935 # Passes both tests.
2936ac_preproc_ok=:
2937break
2938fi
2939rm -f conftest.err conftest.$ac_ext
2940
2941done
2942# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2943rm -f conftest.err conftest.$ac_ext
2944if $ac_preproc_ok; then
2945 :
2946else
Skip Montanaro6dead952003-09-25 14:50:04 +00002947 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2948See \`config.log' for more details." >&5
2949echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2950See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002951 { (exit 1); exit 1; }; }
2952fi
2953
2954ac_ext=c
2955ac_cpp='$CPP $CPPFLAGS'
2956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2958ac_compiler_gnu=$ac_cv_c_compiler_gnu
2959
2960
Skip Montanaro6dead952003-09-25 14:50:04 +00002961echo "$as_me:$LINENO: checking for egrep" >&5
2962echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2963if test "${ac_cv_prog_egrep+set}" = set; then
2964 echo $ECHO_N "(cached) $ECHO_C" >&6
2965else
2966 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2967 then ac_cv_prog_egrep='grep -E'
2968 else ac_cv_prog_egrep='egrep'
2969 fi
2970fi
2971echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2972echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2973 EGREP=$ac_cv_prog_egrep
2974
2975
Martin v. Löwis11437992002-04-12 09:54:03 +00002976
2977echo "$as_me:$LINENO: checking for AIX" >&5
2978echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2979cat >conftest.$ac_ext <<_ACEOF
2980#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002981/* confdefs.h. */
2982_ACEOF
2983cat confdefs.h >>conftest.$ac_ext
2984cat >>conftest.$ac_ext <<_ACEOF
2985/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002986#ifdef _AIX
2987 yes
2988#endif
2989
Martin v. Löwis11437992002-04-12 09:54:03 +00002990_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002992 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002993 echo "$as_me:$LINENO: result: yes" >&5
2994echo "${ECHO_T}yes" >&6
2995cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002996#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002997_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998
2999else
Martin v. Löwis11437992002-04-12 09:54:03 +00003000 echo "$as_me:$LINENO: result: no" >&5
3001echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002fi
3003rm -f conftest*
3004
Michael W. Hudson54241132001-12-07 15:38:26 +00003005
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003006
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003007# Check for unsupported systems
3008case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003009Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003010 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3011 echo See README for details.
3012 exit 1;;
3013esac
3014
Michael W. Hudson54241132001-12-07 15:38:26 +00003015
Martin v. Löwis11437992002-04-12 09:54:03 +00003016echo "$as_me:$LINENO: checking for --with-suffix" >&5
3017echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003018
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003019# Check whether --with-suffix or --without-suffix was given.
3020if test "${with_suffix+set}" = set; then
3021 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003022
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003023 case $withval in
3024 no) EXEEXT=;;
3025 yes) EXEEXT=.exe;;
3026 *) EXEEXT=$withval;;
3027 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003028fi;
3029echo "$as_me:$LINENO: result: $EXEEXT" >&5
3030echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003031
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003032# Test whether we're running on a non-case-sensitive system, in which
3033# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003034
Martin v. Löwis11437992002-04-12 09:54:03 +00003035echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3036echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003037if test ! -d CaseSensitiveTestDir; then
3038mkdir CaseSensitiveTestDir
3039fi
3040
3041if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003042then
Martin v. Löwis11437992002-04-12 09:54:03 +00003043 echo "$as_me:$LINENO: result: yes" >&5
3044echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003045 BUILDEXEEXT=.exe
3046else
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 echo "$as_me:$LINENO: result: no" >&5
3048echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003049 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003050fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003051rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003052
Guido van Rossumdd997f71998-10-07 19:58:26 +00003053case $MACHDEP in
3054bsdos*)
3055 case $CC in
3056 gcc) CC="$CC -D_HAVE_BSDI";;
3057 esac;;
3058esac
3059
Guido van Rossum24b1e751997-08-21 02:29:16 +00003060case $ac_sys_system in
3061hp*|HP*)
3062 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003063 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003064 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003065Monterey*)
3066 case $CC in
3067 cc) CC="$CC -Wl,-Bexport";;
3068 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003069SunOS*)
3070 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003071
3072cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003073#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003074_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003075
3076 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003077esac
3078
Michael W. Hudson54241132001-12-07 15:38:26 +00003079
3080
Martin v. Löwis11437992002-04-12 09:54:03 +00003081echo "$as_me:$LINENO: checking LIBRARY" >&5
3082echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003083if test -z "$LIBRARY"
3084then
3085 LIBRARY='libpython$(VERSION).a'
3086fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003087echo "$as_me:$LINENO: result: $LIBRARY" >&5
3088echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003089
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003090# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003091# name of the library into which to insert object files). BLDLIBRARY is also
3092# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3093# is blank as the main program is not linked directly against LDLIBRARY.
3094# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3095# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3096# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3097# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003098#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003099# RUNSHARED is used to run shared python without installed libraries
3100#
3101# INSTSONAME is the name of the shared library that will be use to install
3102# on the system - some systems like version suffix, others don't
3103
3104
Michael W. Hudson54241132001-12-07 15:38:26 +00003105
3106
3107
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003108
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003109LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003110BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003111INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003112DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003113LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003114RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003115
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003116# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003117# If CXX is set, and if it is needed to link a main function that was
3118# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3119# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003120# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003121# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003122
Martin v. Löwis11437992002-04-12 09:54:03 +00003123echo "$as_me:$LINENO: checking LINKCC" >&5
3124echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003125if test -z "$LINKCC"
3126then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003127 if test -z "$CXX"; then
3128 LINKCC="\$(PURIFY) \$(CC)"
3129 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003130 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003131 $CXX -c conftest.$ac_ext 2>&5
3132 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3133 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3134 then
3135 LINKCC="\$(PURIFY) \$(CC)"
3136 else
3137 LINKCC="\$(PURIFY) \$(CXX)"
3138 fi
3139 rm -fr conftest*
3140 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003141 case $ac_sys_system in
3142 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003143 exp_extra="\"\""
3144 if test $ac_sys_release -ge 5 -o \
3145 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3146 exp_extra="."
3147 fi
3148 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003149 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003150 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003151 esac
3152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003153echo "$as_me:$LINENO: result: $LINKCC" >&5
3154echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003155
Martin v. Löwis11437992002-04-12 09:54:03 +00003156echo "$as_me:$LINENO: checking for --enable-shared" >&5
3157echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003158# Check whether --enable-shared or --disable-shared was given.
3159if test "${enable_shared+set}" = set; then
3160 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003161
Martin v. Löwis11437992002-04-12 09:54:03 +00003162fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003163
3164if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003165then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003166 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003167 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003168 enable_shared="yes";;
3169 *)
3170 enable_shared="no";;
3171 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003172fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003173echo "$as_me:$LINENO: result: $enable_shared" >&5
3174echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003175
3176
Martin v. Löwis11437992002-04-12 09:54:03 +00003177echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3178echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003179
Guido van Rossumb8552162001-09-05 14:58:11 +00003180# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3181# library that we build, but we do not want to link against it (we
3182# will find it with a -framework option). For this reason there is an
3183# extra variable BLDLIBRARY against which Python and the extension
3184# modules are linked, BLDLIBRARY. This is normally the same as
3185# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003186if test "$enable_framework"
3187then
3188 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003189 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003190 BLDLIBRARY=''
3191else
3192 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003193fi
Jack Jansene578a632001-08-15 01:27:14 +00003194
Martin v. Löwis1142de32002-03-29 16:28:31 +00003195# Other platforms follow
3196if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003197
3198cat >>confdefs.h <<\_ACEOF
3199#define Py_ENABLE_SHARED 1
3200_ACEOF
3201
Martin v. Löwis1142de32002-03-29 16:28:31 +00003202 case $ac_sys_system in
3203 BeOS*)
3204 LDLIBRARY='libpython$(VERSION).so'
3205 ;;
3206 CYGWIN*)
3207 LDLIBRARY='libpython$(VERSION).dll.a'
3208 DLLLIBRARY='libpython$(VERSION).dll'
3209 ;;
3210 SunOS*)
3211 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003212 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003213 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003214 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003215 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003216 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003217 LDLIBRARY='libpython$(VERSION).so'
3218 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003219 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003220 INSTSONAME="$LDLIBRARY".$SOVERSION
3221 ;;
3222 hp*|HP*)
3223 LDLIBRARY='libpython$(VERSION).sl'
3224 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003225 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003226 ;;
3227 OSF*)
3228 LDLIBRARY='libpython$(VERSION).so'
3229 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003230 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003231 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003232 atheos*)
3233 LDLIBRARY='libpython$(VERSION).so'
3234 BLDLIBRARY='-L. -lpython$(VERSION)'
3235 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3236 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003237 esac
Jason Tishler30765592003-09-04 11:04:06 +00003238else # shared is disabled
3239 case $ac_sys_system in
3240 CYGWIN*)
3241 BLDLIBRARY='$(LIBRARY)'
3242 LDLIBRARY='libpython$(VERSION).dll.a'
3243 ;;
3244 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003245fi
3246
Martin v. Löwis11437992002-04-12 09:54:03 +00003247echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3248echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003249
Martin v. Löwis11437992002-04-12 09:54:03 +00003250if test -n "$ac_tool_prefix"; then
3251 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3252set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3253echo "$as_me:$LINENO: checking for $ac_word" >&5
3254echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3255if test "${ac_cv_prog_RANLIB+set}" = set; then
3256 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257else
3258 if test -n "$RANLIB"; then
3259 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3260else
Martin v. Löwis11437992002-04-12 09:54:03 +00003261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3262for as_dir in $PATH
3263do
3264 IFS=$as_save_IFS
3265 test -z "$as_dir" && as_dir=.
3266 for ac_exec_ext in '' $ac_executable_extensions; do
3267 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3268 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3269 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3270 break 2
3271 fi
3272done
3273done
3274
Guido van Rossum627b2d71993-12-24 10:39:16 +00003275fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003277RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003279 echo "$as_me:$LINENO: result: $RANLIB" >&5
3280echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003281else
Martin v. Löwis11437992002-04-12 09:54:03 +00003282 echo "$as_me:$LINENO: result: no" >&5
3283echo "${ECHO_T}no" >&6
3284fi
3285
3286fi
3287if test -z "$ac_cv_prog_RANLIB"; then
3288 ac_ct_RANLIB=$RANLIB
3289 # Extract the first word of "ranlib", so it can be a program name with args.
3290set dummy ranlib; ac_word=$2
3291echo "$as_me:$LINENO: checking for $ac_word" >&5
3292echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3293if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3294 echo $ECHO_N "(cached) $ECHO_C" >&6
3295else
3296 if test -n "$ac_ct_RANLIB"; then
3297 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3298else
3299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300for as_dir in $PATH
3301do
3302 IFS=$as_save_IFS
3303 test -z "$as_dir" && as_dir=.
3304 for ac_exec_ext in '' $ac_executable_extensions; do
3305 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3306 ac_cv_prog_ac_ct_RANLIB="ranlib"
3307 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3308 break 2
3309 fi
3310done
3311done
3312
3313 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3314fi
3315fi
3316ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3317if test -n "$ac_ct_RANLIB"; then
3318 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3319echo "${ECHO_T}$ac_ct_RANLIB" >&6
3320else
3321 echo "$as_me:$LINENO: result: no" >&5
3322echo "${ECHO_T}no" >&6
3323fi
3324
3325 RANLIB=$ac_ct_RANLIB
3326else
3327 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003329
3330
Guido van Rossum7f43da71994-08-01 12:15:30 +00003331for ac_prog in ar aal
3332do
Martin v. Löwis11437992002-04-12 09:54:03 +00003333 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003334set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003335echo "$as_me:$LINENO: checking for $ac_word" >&5
3336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3337if test "${ac_cv_prog_AR+set}" = set; then
3338 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003339else
3340 if test -n "$AR"; then
3341 ac_cv_prog_AR="$AR" # Let the user override the test.
3342else
Martin v. Löwis11437992002-04-12 09:54:03 +00003343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3344for as_dir in $PATH
3345do
3346 IFS=$as_save_IFS
3347 test -z "$as_dir" && as_dir=.
3348 for ac_exec_ext in '' $ac_executable_extensions; do
3349 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3350 ac_cv_prog_AR="$ac_prog"
3351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3352 break 2
3353 fi
3354done
3355done
3356
Guido van Rossum7f43da71994-08-01 12:15:30 +00003357fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003359AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 echo "$as_me:$LINENO: result: $AR" >&5
3362echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003363else
Martin v. Löwis11437992002-04-12 09:54:03 +00003364 echo "$as_me:$LINENO: result: no" >&5
3365echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003366fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003367
Martin v. Löwis11437992002-04-12 09:54:03 +00003368 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003369done
3370test -n "$AR" || AR="ar"
3371
Michael W. Hudson54241132001-12-07 15:38:26 +00003372
Neil Schemenauera42c8272001-03-31 00:01:55 +00003373case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003374bsdos*|hp*|HP*)
3375 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003376 if test -z "$INSTALL"
3377 then
3378 INSTALL="${srcdir}/install-sh -c"
3379 fi
3380esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003381ac_aux_dir=
3382for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3383 if test -f $ac_dir/install-sh; then
3384 ac_aux_dir=$ac_dir
3385 ac_install_sh="$ac_aux_dir/install-sh -c"
3386 break
3387 elif test -f $ac_dir/install.sh; then
3388 ac_aux_dir=$ac_dir
3389 ac_install_sh="$ac_aux_dir/install.sh -c"
3390 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003391 elif test -f $ac_dir/shtool; then
3392 ac_aux_dir=$ac_dir
3393 ac_install_sh="$ac_aux_dir/shtool install -c"
3394 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003395 fi
3396done
3397if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3399echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3400 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003401fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003402ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3403ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3404ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003405
3406# Find a good install program. We prefer a C program (faster),
3407# so one script is as good as another. But avoid the broken or
3408# incompatible versions:
3409# SysV /etc/install, /usr/sbin/install
3410# SunOS /usr/etc/install
3411# IRIX /sbin/install
3412# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003413# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003414# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3415# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3416# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3417# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003418echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3419echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003420if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003421if test "${ac_cv_path_install+set}" = set; then
3422 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003423else
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3425for as_dir in $PATH
3426do
3427 IFS=$as_save_IFS
3428 test -z "$as_dir" && as_dir=.
3429 # Account for people who put trailing slashes in PATH elements.
3430case $as_dir/ in
3431 ./ | .// | /cC/* | \
3432 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3433 /usr/ucb/* ) ;;
3434 *)
3435 # OSF1 and SCO ODT 3.0 have their own names for install.
3436 # Don't use installbsd from OSF since it installs stuff as root
3437 # by default.
3438 for ac_prog in ginstall scoinst install; do
3439 for ac_exec_ext in '' $ac_executable_extensions; do
3440 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3441 if test $ac_prog = install &&
3442 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3443 # AIX install. It has an incompatible calling convention.
3444 :
3445 elif test $ac_prog = install &&
3446 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3447 # program-specific install script used by HP pwplus--don't use.
3448 :
3449 else
3450 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3451 break 3
3452 fi
3453 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003454 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 done
3456 ;;
3457esac
3458done
3459
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003460
3461fi
3462 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003463 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003464 else
3465 # As a last resort, use the slow shell script. We don't cache a
3466 # path for INSTALL within a source directory, because that will
3467 # break other packages using the cache if that directory is
3468 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003470 fi
3471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003472echo "$as_me:$LINENO: result: $INSTALL" >&5
3473echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003474
3475# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3476# It thinks the first close brace ends the variable substitution.
3477test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3478
Martin v. Löwis11437992002-04-12 09:54:03 +00003479test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003480
3481test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3482
Michael W. Hudson54241132001-12-07 15:38:26 +00003483
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003484# Not every filesystem supports hard links
3485
3486if test -z "$LN" ; then
3487 case $ac_sys_system in
3488 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003489 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003490 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003491 *) LN=ln;;
3492 esac
3493fi
3494
Fred Drake109d9862001-07-11 06:27:56 +00003495# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003496echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3497echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3498
Fred Drake109d9862001-07-11 06:27:56 +00003499# Check whether --with-pydebug or --without-pydebug was given.
3500if test "${with_pydebug+set}" = set; then
3501 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003502
Fred Drake109d9862001-07-11 06:27:56 +00003503if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003504then
3505
3506cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003507#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003508_ACEOF
3509
3510 echo "$as_me:$LINENO: result: yes" >&5
3511echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003512 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003513else echo "$as_me:$LINENO: result: no" >&5
3514echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003515fi
3516else
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 echo "$as_me:$LINENO: result: no" >&5
3518echo "${ECHO_T}no" >&6
3519fi;
Fred Drake109d9862001-07-11 06:27:56 +00003520
Skip Montanarodecc6a42003-01-01 20:07:49 +00003521# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3522# merged with this chunk of code?
3523
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003524# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003525# ------------------------
3526# (The following bit of code is complicated enough - please keep things
3527# indented properly. Just pretend you're editing Python code. ;-)
3528
3529# There are two parallel sets of case statements below, one that checks to
3530# see if OPT was set and one that does BASECFLAGS setting based upon
3531# compiler and platform. BASECFLAGS tweaks need to be made even if the
3532# user set OPT.
3533
3534# tweak OPT based on compiler and platform, only if the user didn't set
3535# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003536
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003537if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003538then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003539 case $GCC in
3540 yes)
3541 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003542 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003543 if test "$Py_DEBUG" = 'true' ; then
3544 # Optimization messes up debuggers, so turn it off for
3545 # debug builds.
3546 OPT="-g -Wall -Wstrict-prototypes"
3547 else
3548 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003549 fi
3550 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003551 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003552 OPT="-O3 -Wall -Wstrict-prototypes"
3553 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003554 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003555 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003556 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3557 ;;
3558 esac
Fred Drake109d9862001-07-11 06:27:56 +00003559 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003560
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003561 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003562 OPT="-O"
3563 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003564 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003565
3566 # The current (beta) Monterey compiler dies with optimizations
3567 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003568 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003569 Monterey*)
3570 OPT=""
3571 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003572 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003573
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003574fi
3575
Skip Montanarodecc6a42003-01-01 20:07:49 +00003576
3577# tweak BASECFLAGS based on compiler and platform
3578case $GCC in
3579yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003580 # Python violates C99 rules, by casting between incompatible
3581 # pointer types. GCC may generate bad code as a result of that,
3582 # so use -fno-strict-aliasing if supported.
3583 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3584echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3585 ac_save_cc="$CC"
3586 CC="$CC -fno-strict-aliasing"
3587 if test "$cross_compiling" = yes; then
3588 ac_cv_no_strict_aliasing_ok=no
3589else
3590 cat >conftest.$ac_ext <<_ACEOF
3591#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003592/* confdefs.h. */
3593_ACEOF
3594cat confdefs.h >>conftest.$ac_ext
3595cat >>conftest.$ac_ext <<_ACEOF
3596/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003597int main() { return 0; }
3598_ACEOF
3599rm -f conftest$ac_exeext
3600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3601 (eval $ac_link) 2>&5
3602 ac_status=$?
3603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3606 (eval $ac_try) 2>&5
3607 ac_status=$?
3608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3609 (exit $ac_status); }; }; then
3610 ac_cv_no_strict_aliasing_ok=yes
3611else
3612 echo "$as_me: program exited with status $ac_status" >&5
3613echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003614sed 's/^/| /' conftest.$ac_ext >&5
3615
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003616( exit $ac_status )
3617ac_cv_no_strict_aliasing_ok=no
3618fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003619rm -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 +00003620fi
3621 CC="$ac_save_cc"
3622 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3623echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3624 if test $ac_cv_no_strict_aliasing_ok = yes
3625 then
3626 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3627 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003628 case $ac_sys_system in
3629 SCO_SV*)
3630 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3631 ;;
3632 # is there any other compiler on Darwin besides gcc?
3633 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003634 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003635 ;;
3636 esac
3637 ;;
3638
3639*)
3640 case $ac_sys_system in
3641 OpenUNIX*|UnixWare*)
3642 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3643 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003644 OSF*)
3645 BASECFLAGS="$BASECFLAGS -ieee -std"
3646 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003647 SCO_SV*)
3648 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3649 ;;
3650 esac
3651 ;;
3652esac
3653
Fred Drakee1ceaa02001-12-04 20:55:47 +00003654if test "$Py_DEBUG" = 'true'; then
3655 :
3656else
3657 OPT="-DNDEBUG $OPT"
3658fi
3659
Guido van Rossum563e7081996-09-10 18:20:48 +00003660if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003661then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003662 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003663fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003664
Martin v. Löwis11437992002-04-12 09:54:03 +00003665echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3666echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3667if test "${ac_cv_opt_olimit_ok+set}" = set; then
3668 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003669else
3670 ac_save_cc="$CC"
3671CC="$CC -OPT:Olimit=0"
3672if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003673 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003674else
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 cat >conftest.$ac_ext <<_ACEOF
3676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003677/* confdefs.h. */
3678_ACEOF
3679cat confdefs.h >>conftest.$ac_ext
3680cat >>conftest.$ac_ext <<_ACEOF
3681/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003682int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683_ACEOF
3684rm -f conftest$ac_exeext
3685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3686 (eval $ac_link) 2>&5
3687 ac_status=$?
3688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3691 (eval $ac_try) 2>&5
3692 ac_status=$?
3693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3694 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003695 ac_cv_opt_olimit_ok=yes
3696else
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 echo "$as_me: program exited with status $ac_status" >&5
3698echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003699sed 's/^/| /' conftest.$ac_ext >&5
3700
Martin v. Löwis11437992002-04-12 09:54:03 +00003701( exit $ac_status )
3702ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003703fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003704rm -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 +00003705fi
Guido van Rossum91922671997-10-09 20:24:13 +00003706CC="$ac_save_cc"
3707fi
3708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3710echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003711if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003712 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003713 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3714 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3715 # environment?
3716 Darwin*)
3717 ;;
3718 *)
3719 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3720 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003721 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3724echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3725 if test "${ac_cv_olimit_ok+set}" = set; then
3726 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003727else
3728 ac_save_cc="$CC"
3729 CC="$CC -Olimit 1500"
3730 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003731 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003732else
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 cat >conftest.$ac_ext <<_ACEOF
3734#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003735/* confdefs.h. */
3736_ACEOF
3737cat confdefs.h >>conftest.$ac_ext
3738cat >>conftest.$ac_ext <<_ACEOF
3739/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003740int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003741_ACEOF
3742rm -f conftest$ac_exeext
3743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3744 (eval $ac_link) 2>&5
3745 ac_status=$?
3746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3749 (eval $ac_try) 2>&5
3750 ac_status=$?
3751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3752 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003753 ac_cv_olimit_ok=yes
3754else
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 echo "$as_me: program exited with status $ac_status" >&5
3756echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003757sed 's/^/| /' conftest.$ac_ext >&5
3758
Martin v. Löwis11437992002-04-12 09:54:03 +00003759( exit $ac_status )
3760ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003761fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003762rm -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 +00003763fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003764 CC="$ac_save_cc"
3765fi
3766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3768echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003769 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003770 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003771 fi
3772fi
3773
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003774# On some compilers, pthreads are available without further options
3775# (e.g. MacOS X). On some of these systems, the compiler will not
3776# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3777# So we have to see first whether pthreads are available without
3778# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003779echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3780echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3781if test "${ac_cv_pthread_is_default+set}" = set; then
3782 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003783else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003784 if test "$cross_compiling" = yes; then
3785 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003786else
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 cat >conftest.$ac_ext <<_ACEOF
3788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003789/* confdefs.h. */
3790_ACEOF
3791cat confdefs.h >>conftest.$ac_ext
3792cat >>conftest.$ac_ext <<_ACEOF
3793/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003794
Martin v. Löwis130fb172001-07-19 11:00:41 +00003795#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003796
3797void* routine(void* p){return NULL;}
3798
3799int main(){
3800 pthread_t p;
3801 if(pthread_create(&p,NULL,routine,NULL)!=0)
3802 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003803 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003804 return 0;
3805}
3806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807_ACEOF
3808rm -f conftest$ac_exeext
3809if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3810 (eval $ac_link) 2>&5
3811 ac_status=$?
3812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3813 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3815 (eval $ac_try) 2>&5
3816 ac_status=$?
3817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3818 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003819
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003820 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003821 ac_cv_kthread=no
3822 ac_cv_pthread=no
3823
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003824else
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 echo "$as_me: program exited with status $ac_status" >&5
3826echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003827sed 's/^/| /' conftest.$ac_ext >&5
3828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829( exit $ac_status )
3830ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003831fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003832rm -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 +00003833fi
3834
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003835fi
3836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3838echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003839
Michael W. Hudson54241132001-12-07 15:38:26 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003842then
3843 ac_cv_kpthread=no
3844else
3845# -Kpthread, if available, provides the right #defines
3846# and linker options to make pthread_create available
3847# Some compilers won't report that they do not support -Kpthread,
3848# so we need to run a program to see whether it really made the
3849# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003850echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3851echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3852if test "${ac_cv_kpthread+set}" = set; then
3853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003854else
3855 ac_save_cc="$CC"
3856CC="$CC -Kpthread"
3857if test "$cross_compiling" = yes; then
3858 ac_cv_kpthread=no
3859else
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 cat >conftest.$ac_ext <<_ACEOF
3861#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003862/* confdefs.h. */
3863_ACEOF
3864cat confdefs.h >>conftest.$ac_ext
3865cat >>conftest.$ac_ext <<_ACEOF
3866/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003867
3868#include <pthread.h>
3869
3870void* routine(void* p){return NULL;}
3871
3872int main(){
3873 pthread_t p;
3874 if(pthread_create(&p,NULL,routine,NULL)!=0)
3875 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003876 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003877 return 0;
3878}
3879
Martin v. Löwis11437992002-04-12 09:54:03 +00003880_ACEOF
3881rm -f conftest$ac_exeext
3882if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3883 (eval $ac_link) 2>&5
3884 ac_status=$?
3885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3888 (eval $ac_try) 2>&5
3889 ac_status=$?
3890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3891 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003892 ac_cv_kpthread=yes
3893else
Martin v. Löwis11437992002-04-12 09:54:03 +00003894 echo "$as_me: program exited with status $ac_status" >&5
3895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003896sed 's/^/| /' conftest.$ac_ext >&5
3897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898( exit $ac_status )
3899ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003900fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003901rm -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 +00003902fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003903CC="$ac_save_cc"
3904fi
3905
Martin v. Löwis11437992002-04-12 09:54:03 +00003906echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3907echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003908fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003909
Skip Montanarod8d39a02003-07-10 20:44:10 +00003910if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003911then
3912# -Kthread, if available, provides the right #defines
3913# and linker options to make pthread_create available
3914# Some compilers won't report that they do not support -Kthread,
3915# so we need to run a program to see whether it really made the
3916# function available.
3917echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3918echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3919if test "${ac_cv_kthread+set}" = set; then
3920 echo $ECHO_N "(cached) $ECHO_C" >&6
3921else
3922 ac_save_cc="$CC"
3923CC="$CC -Kthread"
3924if test "$cross_compiling" = yes; then
3925 ac_cv_kthread=no
3926else
3927 cat >conftest.$ac_ext <<_ACEOF
3928#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003934
3935#include <pthread.h>
3936
3937void* routine(void* p){return NULL;}
3938
3939int main(){
3940 pthread_t p;
3941 if(pthread_create(&p,NULL,routine,NULL)!=0)
3942 return 1;
3943 (void)pthread_detach(p);
3944 return 0;
3945}
3946
3947_ACEOF
3948rm -f conftest$ac_exeext
3949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3950 (eval $ac_link) 2>&5
3951 ac_status=$?
3952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3953 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3955 (eval $ac_try) 2>&5
3956 ac_status=$?
3957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3958 (exit $ac_status); }; }; then
3959 ac_cv_kthread=yes
3960else
3961 echo "$as_me: program exited with status $ac_status" >&5
3962echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003963sed 's/^/| /' conftest.$ac_ext >&5
3964
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003965( exit $ac_status )
3966ac_cv_kthread=no
3967fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003968rm -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 +00003969fi
3970CC="$ac_save_cc"
3971fi
3972
3973echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3974echo "${ECHO_T}$ac_cv_kthread" >&6
3975fi
3976
Skip Montanarod8d39a02003-07-10 20:44:10 +00003977if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003978then
3979# -pthread, if available, provides the right #defines
3980# and linker options to make pthread_create available
3981# Some compilers won't report that they do not support -pthread,
3982# so we need to run a program to see whether it really made the
3983# function available.
3984echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3985echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3986if test "${ac_cv_thread+set}" = set; then
3987 echo $ECHO_N "(cached) $ECHO_C" >&6
3988else
3989 ac_save_cc="$CC"
3990CC="$CC -pthread"
3991if test "$cross_compiling" = yes; then
3992 ac_cv_pthread=no
3993else
3994 cat >conftest.$ac_ext <<_ACEOF
3995#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003996/* confdefs.h. */
3997_ACEOF
3998cat confdefs.h >>conftest.$ac_ext
3999cat >>conftest.$ac_ext <<_ACEOF
4000/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004001
4002#include <pthread.h>
4003
4004void* routine(void* p){return NULL;}
4005
4006int main(){
4007 pthread_t p;
4008 if(pthread_create(&p,NULL,routine,NULL)!=0)
4009 return 1;
4010 (void)pthread_detach(p);
4011 return 0;
4012}
4013
4014_ACEOF
4015rm -f conftest$ac_exeext
4016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4017 (eval $ac_link) 2>&5
4018 ac_status=$?
4019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4022 (eval $ac_try) 2>&5
4023 ac_status=$?
4024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4025 (exit $ac_status); }; }; then
4026 ac_cv_pthread=yes
4027else
4028 echo "$as_me: program exited with status $ac_status" >&5
4029echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004030sed 's/^/| /' conftest.$ac_ext >&5
4031
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004032( exit $ac_status )
4033ac_cv_pthread=no
4034fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004035rm -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 +00004036fi
4037CC="$ac_save_cc"
4038fi
4039
4040echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4041echo "${ECHO_T}$ac_cv_pthread" >&6
4042fi
4043
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004044# If we have set a CC compiler flag for thread support then
4045# check if it works for CXX, too.
4046ac_cv_cxx_thread=no
4047if test ! -z "$CXX"
4048then
4049echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4050echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4051ac_save_cxx="$CXX"
4052
4053if test "$ac_cv_kpthread" = "yes"
4054then
4055 CXX="$CXX -Kpthread"
4056 ac_cv_cxx_thread=yes
4057elif test "$ac_cv_kthread" = "yes"
4058then
4059 CXX="$CXX -Kthread"
4060 ac_cv_cxx_thread=yes
4061elif test "$ac_cv_pthread" = "yes"
4062then
4063 CXX="$CXX -pthread"
4064 ac_cv_cxx_thread=yes
4065fi
4066
4067if test $ac_cv_cxx_thread = yes
4068then
4069 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4070 $CXX -c conftest.$ac_ext 2>&5
4071 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4072 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4073 then
4074 ac_cv_cxx_thread=yes
4075 else
4076 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004077 fi
4078 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004079fi
4080fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004081CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004082echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4083echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4084
Michael W. Hudson54241132001-12-07 15:38:26 +00004085
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004086# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004087echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4088echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4089if test "${ac_cv_header_stdc+set}" = set; then
4090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004091else
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 cat >conftest.$ac_ext <<_ACEOF
4093#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004094/* confdefs.h. */
4095_ACEOF
4096cat confdefs.h >>conftest.$ac_ext
4097cat >>conftest.$ac_ext <<_ACEOF
4098/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004099#include <stdlib.h>
4100#include <stdarg.h>
4101#include <string.h>
4102#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004103
Skip Montanaro6dead952003-09-25 14:50:04 +00004104int
4105main ()
4106{
4107
4108 ;
4109 return 0;
4110}
Martin v. Löwis11437992002-04-12 09:54:03 +00004111_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004112rm -f conftest.$ac_objext
4113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4114 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004115 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004117 (exit $ac_status); } &&
4118 { ac_try='test -s conftest.$ac_objext'
4119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4120 (eval $ac_try) 2>&5
4121 ac_status=$?
4122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4123 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124 ac_cv_header_stdc=yes
4125else
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004127sed 's/^/| /' conftest.$ac_ext >&5
4128
4129ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004130fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004131rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132
4133if test $ac_cv_header_stdc = yes; then
4134 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 cat >conftest.$ac_ext <<_ACEOF
4136#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004137/* confdefs.h. */
4138_ACEOF
4139cat confdefs.h >>conftest.$ac_ext
4140cat >>conftest.$ac_ext <<_ACEOF
4141/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004142#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004143
4144_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004146 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147 :
4148else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149 ac_cv_header_stdc=no
4150fi
4151rm -f conftest*
4152
4153fi
4154
4155if test $ac_cv_header_stdc = yes; then
4156 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 cat >conftest.$ac_ext <<_ACEOF
4158#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004159/* confdefs.h. */
4160_ACEOF
4161cat confdefs.h >>conftest.$ac_ext
4162cat >>conftest.$ac_ext <<_ACEOF
4163/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004165
4166_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004168 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169 :
4170else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171 ac_cv_header_stdc=no
4172fi
4173rm -f conftest*
4174
4175fi
4176
4177if test $ac_cv_header_stdc = yes; then
4178 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004179 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004180 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004181else
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 cat >conftest.$ac_ext <<_ACEOF
4183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* confdefs.h. */
4185_ACEOF
4186cat confdefs.h >>conftest.$ac_ext
4187cat >>conftest.$ac_ext <<_ACEOF
4188/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004189#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004190#if ((' ' & 0x0FF) == 0x020)
4191# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4192# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4193#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004194# define ISLOWER(c) \
4195 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 || ('j' <= (c) && (c) <= 'r') \
4197 || ('s' <= (c) && (c) <= 'z'))
4198# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4199#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004200
Martin v. Löwis11437992002-04-12 09:54:03 +00004201#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4202int
4203main ()
4204{
4205 int i;
4206 for (i = 0; i < 256; i++)
4207 if (XOR (islower (i), ISLOWER (i))
4208 || toupper (i) != TOUPPER (i))
4209 exit(2);
4210 exit (0);
4211}
4212_ACEOF
4213rm -f conftest$ac_exeext
4214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4215 (eval $ac_link) 2>&5
4216 ac_status=$?
4217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4220 (eval $ac_try) 2>&5
4221 ac_status=$?
4222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4223 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224 :
4225else
Martin v. Löwis11437992002-04-12 09:54:03 +00004226 echo "$as_me: program exited with status $ac_status" >&5
4227echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004228sed 's/^/| /' conftest.$ac_ext >&5
4229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230( exit $ac_status )
4231ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004232fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004233rm -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 +00004234fi
4235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004236fi
4237echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4238echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004239if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004240
4241cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004243_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004244
4245fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246
Skip Montanarob9820a32004-01-17 00:16:12 +00004247# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4258 inttypes.h stdint.h unistd.h
4259do
4260as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4261echo "$as_me:$LINENO: checking for $ac_header" >&5
4262echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4263if eval "test \"\${$as_ac_Header+set}\" = set"; then
4264 echo $ECHO_N "(cached) $ECHO_C" >&6
4265else
4266 cat >conftest.$ac_ext <<_ACEOF
4267#line $LINENO "configure"
4268/* confdefs.h. */
4269_ACEOF
4270cat confdefs.h >>conftest.$ac_ext
4271cat >>conftest.$ac_ext <<_ACEOF
4272/* end confdefs.h. */
4273$ac_includes_default
4274
4275#include <$ac_header>
4276_ACEOF
4277rm -f conftest.$ac_objext
4278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4279 (eval $ac_compile) 2>&5
4280 ac_status=$?
4281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4282 (exit $ac_status); } &&
4283 { ac_try='test -s conftest.$ac_objext'
4284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4285 (eval $ac_try) 2>&5
4286 ac_status=$?
4287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4288 (exit $ac_status); }; }; then
4289 eval "$as_ac_Header=yes"
4290else
4291 echo "$as_me: failed program was:" >&5
4292sed 's/^/| /' conftest.$ac_ext >&5
4293
4294eval "$as_ac_Header=no"
4295fi
4296rm -f conftest.$ac_objext conftest.$ac_ext
4297fi
4298echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4299echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4300if test `eval echo '${'$as_ac_Header'}'` = yes; then
4301 cat >>confdefs.h <<_ACEOF
4302#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4303_ACEOF
4304
4305fi
4306
4307done
4308
4309
Martin v. Löwis11437992002-04-12 09:54:03 +00004310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
Skip Montanaro7befb992004-02-10 16:50:21 +00004346for ac_header in dlfcn.h fcntl.h grp.h langinfo.h \
4347libintl.h ncurses.h poll.h pthread.h \
4348stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004349unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004350sys/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 +00004351sys/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 +00004352sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004353sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4354bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004355do
Martin v. Löwis11437992002-04-12 09:54:03 +00004356as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4357if eval "test \"\${$as_ac_Header+set}\" = set"; then
4358 echo "$as_me:$LINENO: checking for $ac_header" >&5
4359echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4360if eval "test \"\${$as_ac_Header+set}\" = set"; then
4361 echo $ECHO_N "(cached) $ECHO_C" >&6
4362fi
4363echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4364echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004365else
Martin v. Löwis11437992002-04-12 09:54:03 +00004366 # Is the header compilable?
4367echo "$as_me:$LINENO: checking $ac_header usability" >&5
4368echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4369cat >conftest.$ac_ext <<_ACEOF
4370#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004371/* confdefs.h. */
4372_ACEOF
4373cat confdefs.h >>conftest.$ac_ext
4374cat >>conftest.$ac_ext <<_ACEOF
4375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004376$ac_includes_default
4377#include <$ac_header>
4378_ACEOF
4379rm -f conftest.$ac_objext
4380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4381 (eval $ac_compile) 2>&5
4382 ac_status=$?
4383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4384 (exit $ac_status); } &&
4385 { ac_try='test -s conftest.$ac_objext'
4386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4387 (eval $ac_try) 2>&5
4388 ac_status=$?
4389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4390 (exit $ac_status); }; }; then
4391 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004392else
Martin v. Löwis11437992002-04-12 09:54:03 +00004393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004394sed 's/^/| /' conftest.$ac_ext >&5
4395
Martin v. Löwis11437992002-04-12 09:54:03 +00004396ac_header_compiler=no
4397fi
4398rm -f conftest.$ac_objext conftest.$ac_ext
4399echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4400echo "${ECHO_T}$ac_header_compiler" >&6
4401
4402# Is the header present?
4403echo "$as_me:$LINENO: checking $ac_header presence" >&5
4404echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4405cat >conftest.$ac_ext <<_ACEOF
4406#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004407/* confdefs.h. */
4408_ACEOF
4409cat confdefs.h >>conftest.$ac_ext
4410cat >>conftest.$ac_ext <<_ACEOF
4411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004412#include <$ac_header>
4413_ACEOF
4414if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4415 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4416 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004417 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004418 rm -f conftest.er1
4419 cat conftest.err >&5
4420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4421 (exit $ac_status); } >/dev/null; then
4422 if test -s conftest.err; then
4423 ac_cpp_err=$ac_c_preproc_warn_flag
4424 else
4425 ac_cpp_err=
4426 fi
4427else
4428 ac_cpp_err=yes
4429fi
4430if test -z "$ac_cpp_err"; then
4431 ac_header_preproc=yes
4432else
4433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004434sed 's/^/| /' conftest.$ac_ext >&5
4435
Martin v. Löwis11437992002-04-12 09:54:03 +00004436 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004437fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004438rm -f conftest.err conftest.$ac_ext
4439echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4440echo "${ECHO_T}$ac_header_preproc" >&6
4441
4442# So? What about this header?
4443case $ac_header_compiler:$ac_header_preproc in
4444 yes:no )
4445 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4446echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4447 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004448echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4449 (
4450 cat <<\_ASBOX
4451## ------------------------------------ ##
4452## Report this to bug-autoconf@gnu.org. ##
4453## ------------------------------------ ##
4454_ASBOX
4455 ) |
4456 sed "s/^/$as_me: WARNING: /" >&2
4457 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004458 no:yes )
4459 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4460echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4461 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4462echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4463 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004464echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4465 (
4466 cat <<\_ASBOX
4467## ------------------------------------ ##
4468## Report this to bug-autoconf@gnu.org. ##
4469## ------------------------------------ ##
4470_ASBOX
4471 ) |
4472 sed "s/^/$as_me: WARNING: /" >&2
4473 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004474esac
4475echo "$as_me:$LINENO: checking for $ac_header" >&5
4476echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4477if eval "test \"\${$as_ac_Header+set}\" = set"; then
4478 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004479else
Martin v. Löwis11437992002-04-12 09:54:03 +00004480 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004482echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4483echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4484
4485fi
4486if test `eval echo '${'$as_ac_Header'}'` = yes; then
4487 cat >>confdefs.h <<_ACEOF
4488#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4489_ACEOF
4490
4491fi
4492
Guido van Rossum627b2d71993-12-24 10:39:16 +00004493done
4494
Martin v. Löwis11437992002-04-12 09:54:03 +00004495
4496
4497
4498
4499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004500ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004501for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4502 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4503echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4504echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4505if eval "test \"\${$as_ac_Header+set}\" = set"; then
4506 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004507else
Martin v. Löwis11437992002-04-12 09:54:03 +00004508 cat >conftest.$ac_ext <<_ACEOF
4509#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004510/* confdefs.h. */
4511_ACEOF
4512cat confdefs.h >>conftest.$ac_ext
4513cat >>conftest.$ac_ext <<_ACEOF
4514/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004515#include <sys/types.h>
4516#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004517
Martin v. Löwis11437992002-04-12 09:54:03 +00004518int
4519main ()
4520{
4521if ((DIR *) 0)
4522return 0;
4523 ;
4524 return 0;
4525}
4526_ACEOF
4527rm -f conftest.$ac_objext
4528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4529 (eval $ac_compile) 2>&5
4530 ac_status=$?
4531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532 (exit $ac_status); } &&
4533 { ac_try='test -s conftest.$ac_objext'
4534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4535 (eval $ac_try) 2>&5
4536 ac_status=$?
4537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538 (exit $ac_status); }; }; then
4539 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004540else
Martin v. Löwis11437992002-04-12 09:54:03 +00004541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004542sed 's/^/| /' conftest.$ac_ext >&5
4543
Martin v. Löwis11437992002-04-12 09:54:03 +00004544eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004546rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004547fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004548echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4549echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4550if test `eval echo '${'$as_ac_Header'}'` = yes; then
4551 cat >>confdefs.h <<_ACEOF
4552#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4553_ACEOF
4554
4555ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004557
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004558done
4559# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4560if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004561 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4562echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4563if test "${ac_cv_search_opendir+set}" = set; then
4564 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565else
Martin v. Löwis11437992002-04-12 09:54:03 +00004566 ac_func_search_save_LIBS=$LIBS
4567ac_cv_search_opendir=no
4568cat >conftest.$ac_ext <<_ACEOF
4569#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004570/* confdefs.h. */
4571_ACEOF
4572cat confdefs.h >>conftest.$ac_ext
4573cat >>conftest.$ac_ext <<_ACEOF
4574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004575
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004576/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004577#ifdef __cplusplus
4578extern "C"
4579#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004580/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004581 builtin and then its argument prototype would still apply. */
4582char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004583int
4584main ()
4585{
4586opendir ();
4587 ;
4588 return 0;
4589}
4590_ACEOF
4591rm -f conftest.$ac_objext conftest$ac_exeext
4592if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4593 (eval $ac_link) 2>&5
4594 ac_status=$?
4595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4596 (exit $ac_status); } &&
4597 { ac_try='test -s conftest$ac_exeext'
4598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4599 (eval $ac_try) 2>&5
4600 ac_status=$?
4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); }; }; then
4603 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604else
Martin v. Löwis11437992002-04-12 09:54:03 +00004605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004606sed 's/^/| /' conftest.$ac_ext >&5
4607
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004609rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4610if test "$ac_cv_search_opendir" = no; then
4611 for ac_lib in dir; do
4612 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4613 cat >conftest.$ac_ext <<_ACEOF
4614#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004615/* confdefs.h. */
4616_ACEOF
4617cat confdefs.h >>conftest.$ac_ext
4618cat >>conftest.$ac_ext <<_ACEOF
4619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004620
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004621/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004622#ifdef __cplusplus
4623extern "C"
4624#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004625/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004626 builtin and then its argument prototype would still apply. */
4627char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004628int
4629main ()
4630{
4631opendir ();
4632 ;
4633 return 0;
4634}
4635_ACEOF
4636rm -f conftest.$ac_objext conftest$ac_exeext
4637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4638 (eval $ac_link) 2>&5
4639 ac_status=$?
4640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4641 (exit $ac_status); } &&
4642 { ac_try='test -s conftest$ac_exeext'
4643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4644 (eval $ac_try) 2>&5
4645 ac_status=$?
4646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4647 (exit $ac_status); }; }; then
4648 ac_cv_search_opendir="-l$ac_lib"
4649break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004650else
Martin v. Löwis11437992002-04-12 09:54:03 +00004651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004652sed 's/^/| /' conftest.$ac_ext >&5
4653
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004654fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004655rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4656 done
4657fi
4658LIBS=$ac_func_search_save_LIBS
4659fi
4660echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4661echo "${ECHO_T}$ac_cv_search_opendir" >&6
4662if test "$ac_cv_search_opendir" != no; then
4663 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004664
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004665fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004666
Michael W. Hudson54241132001-12-07 15:38:26 +00004667else
Martin v. Löwis11437992002-04-12 09:54:03 +00004668 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4669echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4670if test "${ac_cv_search_opendir+set}" = set; then
4671 echo $ECHO_N "(cached) $ECHO_C" >&6
4672else
4673 ac_func_search_save_LIBS=$LIBS
4674ac_cv_search_opendir=no
4675cat >conftest.$ac_ext <<_ACEOF
4676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004677/* confdefs.h. */
4678_ACEOF
4679cat confdefs.h >>conftest.$ac_ext
4680cat >>conftest.$ac_ext <<_ACEOF
4681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004682
4683/* Override any gcc2 internal prototype to avoid an error. */
4684#ifdef __cplusplus
4685extern "C"
4686#endif
4687/* We use char because int might match the return type of a gcc2
4688 builtin and then its argument prototype would still apply. */
4689char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004690int
4691main ()
4692{
4693opendir ();
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698rm -f conftest.$ac_objext conftest$ac_exeext
4699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4700 (eval $ac_link) 2>&5
4701 ac_status=$?
4702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4703 (exit $ac_status); } &&
4704 { ac_try='test -s conftest$ac_exeext'
4705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4706 (eval $ac_try) 2>&5
4707 ac_status=$?
4708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4709 (exit $ac_status); }; }; then
4710 ac_cv_search_opendir="none required"
4711else
4712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004713sed 's/^/| /' conftest.$ac_ext >&5
4714
Martin v. Löwis11437992002-04-12 09:54:03 +00004715fi
4716rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4717if test "$ac_cv_search_opendir" = no; then
4718 for ac_lib in x; do
4719 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4720 cat >conftest.$ac_ext <<_ACEOF
4721#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004722/* confdefs.h. */
4723_ACEOF
4724cat confdefs.h >>conftest.$ac_ext
4725cat >>conftest.$ac_ext <<_ACEOF
4726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004727
4728/* Override any gcc2 internal prototype to avoid an error. */
4729#ifdef __cplusplus
4730extern "C"
4731#endif
4732/* We use char because int might match the return type of a gcc2
4733 builtin and then its argument prototype would still apply. */
4734char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004735int
4736main ()
4737{
4738opendir ();
4739 ;
4740 return 0;
4741}
4742_ACEOF
4743rm -f conftest.$ac_objext conftest$ac_exeext
4744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4745 (eval $ac_link) 2>&5
4746 ac_status=$?
4747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4748 (exit $ac_status); } &&
4749 { ac_try='test -s conftest$ac_exeext'
4750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4751 (eval $ac_try) 2>&5
4752 ac_status=$?
4753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4754 (exit $ac_status); }; }; then
4755 ac_cv_search_opendir="-l$ac_lib"
4756break
4757else
4758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004759sed 's/^/| /' conftest.$ac_ext >&5
4760
Martin v. Löwis11437992002-04-12 09:54:03 +00004761fi
4762rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4763 done
4764fi
4765LIBS=$ac_func_search_save_LIBS
4766fi
4767echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4768echo "${ECHO_T}$ac_cv_search_opendir" >&6
4769if test "$ac_cv_search_opendir" != no; then
4770 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4771
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004772fi
4773
4774fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004775
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004776echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4777echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4778if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4779 echo $ECHO_N "(cached) $ECHO_C" >&6
4780else
4781 cat >conftest.$ac_ext <<_ACEOF
4782#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004783/* confdefs.h. */
4784_ACEOF
4785cat confdefs.h >>conftest.$ac_ext
4786cat >>conftest.$ac_ext <<_ACEOF
4787/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004788#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004789int
4790main ()
4791{
4792return makedev(0, 0);
4793 ;
4794 return 0;
4795}
4796_ACEOF
4797rm -f conftest.$ac_objext conftest$ac_exeext
4798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4799 (eval $ac_link) 2>&5
4800 ac_status=$?
4801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4802 (exit $ac_status); } &&
4803 { ac_try='test -s conftest$ac_exeext'
4804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4805 (eval $ac_try) 2>&5
4806 ac_status=$?
4807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808 (exit $ac_status); }; }; then
4809 ac_cv_header_sys_types_h_makedev=yes
4810else
4811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004812sed 's/^/| /' conftest.$ac_ext >&5
4813
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004814ac_cv_header_sys_types_h_makedev=no
4815fi
4816rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4817
4818fi
4819echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4820echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4821
4822if test $ac_cv_header_sys_types_h_makedev = no; then
4823if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4824 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4825echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4826if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4827 echo $ECHO_N "(cached) $ECHO_C" >&6
4828fi
4829echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4830echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4831else
4832 # Is the header compilable?
4833echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4834echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4835cat >conftest.$ac_ext <<_ACEOF
4836#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004837/* confdefs.h. */
4838_ACEOF
4839cat confdefs.h >>conftest.$ac_ext
4840cat >>conftest.$ac_ext <<_ACEOF
4841/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004842$ac_includes_default
4843#include <sys/mkdev.h>
4844_ACEOF
4845rm -f conftest.$ac_objext
4846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4847 (eval $ac_compile) 2>&5
4848 ac_status=$?
4849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850 (exit $ac_status); } &&
4851 { ac_try='test -s conftest.$ac_objext'
4852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4853 (eval $ac_try) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); }; }; then
4857 ac_header_compiler=yes
4858else
4859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004860sed 's/^/| /' conftest.$ac_ext >&5
4861
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004862ac_header_compiler=no
4863fi
4864rm -f conftest.$ac_objext conftest.$ac_ext
4865echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4866echo "${ECHO_T}$ac_header_compiler" >&6
4867
4868# Is the header present?
4869echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4870echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4871cat >conftest.$ac_ext <<_ACEOF
4872#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004873/* confdefs.h. */
4874_ACEOF
4875cat confdefs.h >>conftest.$ac_ext
4876cat >>conftest.$ac_ext <<_ACEOF
4877/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004878#include <sys/mkdev.h>
4879_ACEOF
4880if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4881 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4882 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004883 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004884 rm -f conftest.er1
4885 cat conftest.err >&5
4886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4887 (exit $ac_status); } >/dev/null; then
4888 if test -s conftest.err; then
4889 ac_cpp_err=$ac_c_preproc_warn_flag
4890 else
4891 ac_cpp_err=
4892 fi
4893else
4894 ac_cpp_err=yes
4895fi
4896if test -z "$ac_cpp_err"; then
4897 ac_header_preproc=yes
4898else
4899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004900sed 's/^/| /' conftest.$ac_ext >&5
4901
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004902 ac_header_preproc=no
4903fi
4904rm -f conftest.err conftest.$ac_ext
4905echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4906echo "${ECHO_T}$ac_header_preproc" >&6
4907
4908# So? What about this header?
4909case $ac_header_compiler:$ac_header_preproc in
4910 yes:no )
4911 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4912echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4913 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004914echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4915 (
4916 cat <<\_ASBOX
4917## ------------------------------------ ##
4918## Report this to bug-autoconf@gnu.org. ##
4919## ------------------------------------ ##
4920_ASBOX
4921 ) |
4922 sed "s/^/$as_me: WARNING: /" >&2
4923 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004924 no:yes )
4925 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4926echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4927 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4928echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4929 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004930echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4931 (
4932 cat <<\_ASBOX
4933## ------------------------------------ ##
4934## Report this to bug-autoconf@gnu.org. ##
4935## ------------------------------------ ##
4936_ASBOX
4937 ) |
4938 sed "s/^/$as_me: WARNING: /" >&2
4939 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004940esac
4941echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4942echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4943if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4944 echo $ECHO_N "(cached) $ECHO_C" >&6
4945else
4946 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4947fi
4948echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4949echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4950
4951fi
4952if test $ac_cv_header_sys_mkdev_h = yes; then
4953
4954cat >>confdefs.h <<\_ACEOF
4955#define MAJOR_IN_MKDEV 1
4956_ACEOF
4957
4958fi
4959
4960
4961
4962 if test $ac_cv_header_sys_mkdev_h = no; then
4963 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4964 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4965echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4966if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4967 echo $ECHO_N "(cached) $ECHO_C" >&6
4968fi
4969echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4970echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4971else
4972 # Is the header compilable?
4973echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4974echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4975cat >conftest.$ac_ext <<_ACEOF
4976#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004977/* confdefs.h. */
4978_ACEOF
4979cat confdefs.h >>conftest.$ac_ext
4980cat >>conftest.$ac_ext <<_ACEOF
4981/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004982$ac_includes_default
4983#include <sys/sysmacros.h>
4984_ACEOF
4985rm -f conftest.$ac_objext
4986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4987 (eval $ac_compile) 2>&5
4988 ac_status=$?
4989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990 (exit $ac_status); } &&
4991 { ac_try='test -s conftest.$ac_objext'
4992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4993 (eval $ac_try) 2>&5
4994 ac_status=$?
4995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4996 (exit $ac_status); }; }; then
4997 ac_header_compiler=yes
4998else
4999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005000sed 's/^/| /' conftest.$ac_ext >&5
5001
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005002ac_header_compiler=no
5003fi
5004rm -f conftest.$ac_objext conftest.$ac_ext
5005echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5006echo "${ECHO_T}$ac_header_compiler" >&6
5007
5008# Is the header present?
5009echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5010echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5011cat >conftest.$ac_ext <<_ACEOF
5012#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005013/* confdefs.h. */
5014_ACEOF
5015cat confdefs.h >>conftest.$ac_ext
5016cat >>conftest.$ac_ext <<_ACEOF
5017/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005018#include <sys/sysmacros.h>
5019_ACEOF
5020if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5021 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5022 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005023 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005024 rm -f conftest.er1
5025 cat conftest.err >&5
5026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027 (exit $ac_status); } >/dev/null; then
5028 if test -s conftest.err; then
5029 ac_cpp_err=$ac_c_preproc_warn_flag
5030 else
5031 ac_cpp_err=
5032 fi
5033else
5034 ac_cpp_err=yes
5035fi
5036if test -z "$ac_cpp_err"; then
5037 ac_header_preproc=yes
5038else
5039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005040sed 's/^/| /' conftest.$ac_ext >&5
5041
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005042 ac_header_preproc=no
5043fi
5044rm -f conftest.err conftest.$ac_ext
5045echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5046echo "${ECHO_T}$ac_header_preproc" >&6
5047
5048# So? What about this header?
5049case $ac_header_compiler:$ac_header_preproc in
5050 yes:no )
5051 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5052echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5053 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005054echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5055 (
5056 cat <<\_ASBOX
5057## ------------------------------------ ##
5058## Report this to bug-autoconf@gnu.org. ##
5059## ------------------------------------ ##
5060_ASBOX
5061 ) |
5062 sed "s/^/$as_me: WARNING: /" >&2
5063 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005064 no:yes )
5065 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5066echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5067 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5068echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5069 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005070echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5071 (
5072 cat <<\_ASBOX
5073## ------------------------------------ ##
5074## Report this to bug-autoconf@gnu.org. ##
5075## ------------------------------------ ##
5076_ASBOX
5077 ) |
5078 sed "s/^/$as_me: WARNING: /" >&2
5079 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005080esac
5081echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5082echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5083if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5084 echo $ECHO_N "(cached) $ECHO_C" >&6
5085else
5086 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5087fi
5088echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5089echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5090
5091fi
5092if test $ac_cv_header_sys_sysmacros_h = yes; then
5093
5094cat >>confdefs.h <<\_ACEOF
5095#define MAJOR_IN_SYSMACROS 1
5096_ACEOF
5097
5098fi
5099
5100
5101 fi
5102fi
5103
Michael W. Hudson54241132001-12-07 15:38:26 +00005104
Guido van Rossum627b2d71993-12-24 10:39:16 +00005105# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005106was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005107echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5108echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5109cat >conftest.$ac_ext <<_ACEOF
5110#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005111/* confdefs.h. */
5112_ACEOF
5113cat confdefs.h >>conftest.$ac_ext
5114cat >>conftest.$ac_ext <<_ACEOF
5115/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005116#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005117
5118_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005120 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005121 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005122else
Martin v. Löwis11437992002-04-12 09:54:03 +00005123
5124
5125cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005126#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005127_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005128
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005129
Guido van Rossum627b2d71993-12-24 10:39:16 +00005130fi
5131rm -f conftest*
5132
Martin v. Löwis11437992002-04-12 09:54:03 +00005133echo "$as_me:$LINENO: result: $was_it_defined" >&5
5134echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005135
Neal Norwitz11690112002-07-30 01:08:28 +00005136# Check whether using makedev requires defining _OSF_SOURCE
5137echo "$as_me:$LINENO: checking for makedev" >&5
5138echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5139cat >conftest.$ac_ext <<_ACEOF
5140#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005141/* confdefs.h. */
5142_ACEOF
5143cat confdefs.h >>conftest.$ac_ext
5144cat >>conftest.$ac_ext <<_ACEOF
5145/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005146#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005147int
5148main ()
5149{
5150 makedev(0, 0)
5151 ;
5152 return 0;
5153}
5154_ACEOF
5155rm -f conftest.$ac_objext conftest$ac_exeext
5156if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5157 (eval $ac_link) 2>&5
5158 ac_status=$?
5159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5160 (exit $ac_status); } &&
5161 { ac_try='test -s conftest$ac_exeext'
5162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5163 (eval $ac_try) 2>&5
5164 ac_status=$?
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); }; }; then
5167 ac_cv_has_makedev=yes
5168else
5169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005170sed 's/^/| /' conftest.$ac_ext >&5
5171
Neal Norwitz11690112002-07-30 01:08:28 +00005172ac_cv_has_makedev=no
5173fi
5174rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5175if test "$ac_cv_has_makedev" = "no"; then
5176 # we didn't link, try if _OSF_SOURCE will allow us to link
5177 cat >conftest.$ac_ext <<_ACEOF
5178#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005179/* confdefs.h. */
5180_ACEOF
5181cat confdefs.h >>conftest.$ac_ext
5182cat >>conftest.$ac_ext <<_ACEOF
5183/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005184
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005185#define _OSF_SOURCE 1
5186#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005187
Neal Norwitz11690112002-07-30 01:08:28 +00005188int
5189main ()
5190{
5191 makedev(0, 0)
5192 ;
5193 return 0;
5194}
5195_ACEOF
5196rm -f conftest.$ac_objext conftest$ac_exeext
5197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5198 (eval $ac_link) 2>&5
5199 ac_status=$?
5200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201 (exit $ac_status); } &&
5202 { ac_try='test -s conftest$ac_exeext'
5203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5204 (eval $ac_try) 2>&5
5205 ac_status=$?
5206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207 (exit $ac_status); }; }; then
5208 ac_cv_has_makedev=yes
5209else
5210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005211sed 's/^/| /' conftest.$ac_ext >&5
5212
Neal Norwitz11690112002-07-30 01:08:28 +00005213ac_cv_has_makedev=no
5214fi
5215rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5216 if test "$ac_cv_has_makedev" = "yes"; then
5217
5218cat >>confdefs.h <<\_ACEOF
5219#define _OSF_SOURCE 1
5220_ACEOF
5221
5222 fi
5223fi
5224echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5225echo "${ECHO_T}$ac_cv_has_makedev" >&6
5226if test "$ac_cv_has_makedev" = "yes"; then
5227
5228cat >>confdefs.h <<\_ACEOF
5229#define HAVE_MAKEDEV 1
5230_ACEOF
5231
5232fi
5233
Martin v. Löwis399a6892002-10-04 10:22:02 +00005234# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5235# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5236# defined, but the compiler does not support pragma redefine_extname,
5237# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5238# structures (such as rlimit64) without declaring them. As a
5239# work-around, disable LFS on such configurations
5240
5241use_lfs=yes
5242echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5243echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5244cat >conftest.$ac_ext <<_ACEOF
5245#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005246/* confdefs.h. */
5247_ACEOF
5248cat confdefs.h >>conftest.$ac_ext
5249cat >>conftest.$ac_ext <<_ACEOF
5250/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005251
5252#define _LARGEFILE_SOURCE 1
5253#define _FILE_OFFSET_BITS 64
5254#include <sys/resource.h>
5255
Martin v. Löwis399a6892002-10-04 10:22:02 +00005256int
5257main ()
5258{
5259struct rlimit foo;
5260 ;
5261 return 0;
5262}
5263_ACEOF
5264rm -f conftest.$ac_objext
5265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5266 (eval $ac_compile) 2>&5
5267 ac_status=$?
5268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269 (exit $ac_status); } &&
5270 { ac_try='test -s conftest.$ac_objext'
5271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5272 (eval $ac_try) 2>&5
5273 ac_status=$?
5274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5275 (exit $ac_status); }; }; then
5276 sol_lfs_bug=no
5277else
5278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005279sed 's/^/| /' conftest.$ac_ext >&5
5280
Martin v. Löwis399a6892002-10-04 10:22:02 +00005281sol_lfs_bug=yes
5282fi
5283rm -f conftest.$ac_objext conftest.$ac_ext
5284echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5285echo "${ECHO_T}$sol_lfs_bug" >&6
5286if test "$sol_lfs_bug" = "yes"; then
5287 use_lfs=no
5288fi
5289
5290if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005291# Two defines needed to enable largefile support on various platforms
5292# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005293
Martin v. Löwis11437992002-04-12 09:54:03 +00005294cat >>confdefs.h <<\_ACEOF
5295#define _LARGEFILE_SOURCE 1
5296_ACEOF
5297
5298
5299cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005300#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005301_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005302
Martin v. Löwis399a6892002-10-04 10:22:02 +00005303fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005304
Guido van Rossum84e7b241996-08-19 21:59:00 +00005305# Add some code to confdefs.h so that the test for off_t works on SCO
5306cat >> confdefs.h <<\EOF
5307#if defined(SCO_DS)
5308#undef _OFF_T
5309#endif
5310EOF
5311
Guido van Rossumef2255b2000-03-10 22:30:29 +00005312# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005313echo "$as_me:$LINENO: checking for mode_t" >&5
5314echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5315if test "${ac_cv_type_mode_t+set}" = set; then
5316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005317else
Martin v. Löwis11437992002-04-12 09:54:03 +00005318 cat >conftest.$ac_ext <<_ACEOF
5319#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005320/* confdefs.h. */
5321_ACEOF
5322cat confdefs.h >>conftest.$ac_ext
5323cat >>conftest.$ac_ext <<_ACEOF
5324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005325$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005326int
5327main ()
5328{
5329if ((mode_t *) 0)
5330 return 0;
5331if (sizeof (mode_t))
5332 return 0;
5333 ;
5334 return 0;
5335}
5336_ACEOF
5337rm -f conftest.$ac_objext
5338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5339 (eval $ac_compile) 2>&5
5340 ac_status=$?
5341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); } &&
5343 { ac_try='test -s conftest.$ac_objext'
5344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5345 (eval $ac_try) 2>&5
5346 ac_status=$?
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005349 ac_cv_type_mode_t=yes
5350else
Martin v. Löwis11437992002-04-12 09:54:03 +00005351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005352sed 's/^/| /' conftest.$ac_ext >&5
5353
Martin v. Löwis11437992002-04-12 09:54:03 +00005354ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005356rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005358echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5359echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5360if test $ac_cv_type_mode_t = yes; then
5361 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005362else
Martin v. Löwis11437992002-04-12 09:54:03 +00005363
5364cat >>confdefs.h <<_ACEOF
5365#define mode_t int
5366_ACEOF
5367
5368fi
5369
5370echo "$as_me:$LINENO: checking for off_t" >&5
5371echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5372if test "${ac_cv_type_off_t+set}" = set; then
5373 echo $ECHO_N "(cached) $ECHO_C" >&6
5374else
5375 cat >conftest.$ac_ext <<_ACEOF
5376#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005377/* confdefs.h. */
5378_ACEOF
5379cat confdefs.h >>conftest.$ac_ext
5380cat >>conftest.$ac_ext <<_ACEOF
5381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005382$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005383int
5384main ()
5385{
5386if ((off_t *) 0)
5387 return 0;
5388if (sizeof (off_t))
5389 return 0;
5390 ;
5391 return 0;
5392}
5393_ACEOF
5394rm -f conftest.$ac_objext
5395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5396 (eval $ac_compile) 2>&5
5397 ac_status=$?
5398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5399 (exit $ac_status); } &&
5400 { ac_try='test -s conftest.$ac_objext'
5401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5402 (eval $ac_try) 2>&5
5403 ac_status=$?
5404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005406 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005407else
Martin v. Löwis11437992002-04-12 09:54:03 +00005408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005409sed 's/^/| /' conftest.$ac_ext >&5
5410
Martin v. Löwis11437992002-04-12 09:54:03 +00005411ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005413rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005415echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5416echo "${ECHO_T}$ac_cv_type_off_t" >&6
5417if test $ac_cv_type_off_t = yes; then
5418 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005419else
Martin v. Löwis11437992002-04-12 09:54:03 +00005420
5421cat >>confdefs.h <<_ACEOF
5422#define off_t long
5423_ACEOF
5424
5425fi
5426
5427echo "$as_me:$LINENO: checking for pid_t" >&5
5428echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5429if test "${ac_cv_type_pid_t+set}" = set; then
5430 echo $ECHO_N "(cached) $ECHO_C" >&6
5431else
5432 cat >conftest.$ac_ext <<_ACEOF
5433#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005434/* confdefs.h. */
5435_ACEOF
5436cat confdefs.h >>conftest.$ac_ext
5437cat >>conftest.$ac_ext <<_ACEOF
5438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005439$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005440int
5441main ()
5442{
5443if ((pid_t *) 0)
5444 return 0;
5445if (sizeof (pid_t))
5446 return 0;
5447 ;
5448 return 0;
5449}
5450_ACEOF
5451rm -f conftest.$ac_objext
5452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5453 (eval $ac_compile) 2>&5
5454 ac_status=$?
5455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5456 (exit $ac_status); } &&
5457 { ac_try='test -s conftest.$ac_objext'
5458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5459 (eval $ac_try) 2>&5
5460 ac_status=$?
5461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5462 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005463 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005464else
Martin v. Löwis11437992002-04-12 09:54:03 +00005465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005466sed 's/^/| /' conftest.$ac_ext >&5
5467
Martin v. Löwis11437992002-04-12 09:54:03 +00005468ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005469fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005470rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005472echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5473echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5474if test $ac_cv_type_pid_t = yes; then
5475 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005476else
Martin v. Löwis11437992002-04-12 09:54:03 +00005477
5478cat >>confdefs.h <<_ACEOF
5479#define pid_t int
5480_ACEOF
5481
5482fi
5483
5484echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5485echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5486if test "${ac_cv_type_signal+set}" = set; then
5487 echo $ECHO_N "(cached) $ECHO_C" >&6
5488else
5489 cat >conftest.$ac_ext <<_ACEOF
5490#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005491/* confdefs.h. */
5492_ACEOF
5493cat confdefs.h >>conftest.$ac_ext
5494cat >>conftest.$ac_ext <<_ACEOF
5495/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005496#include <sys/types.h>
5497#include <signal.h>
5498#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005499# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005500#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005501#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005502extern "C" void (*signal (int, void (*)(int)))(int);
5503#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005504void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005505#endif
5506
Martin v. Löwis11437992002-04-12 09:54:03 +00005507int
5508main ()
5509{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005510int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005511 ;
5512 return 0;
5513}
5514_ACEOF
5515rm -f conftest.$ac_objext
5516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5517 (eval $ac_compile) 2>&5
5518 ac_status=$?
5519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520 (exit $ac_status); } &&
5521 { ac_try='test -s conftest.$ac_objext'
5522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5523 (eval $ac_try) 2>&5
5524 ac_status=$?
5525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5526 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005527 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005528else
Martin v. Löwis11437992002-04-12 09:54:03 +00005529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005530sed 's/^/| /' conftest.$ac_ext >&5
5531
Martin v. Löwis11437992002-04-12 09:54:03 +00005532ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005533fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005534rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005536echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5537echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005538
Martin v. Löwis11437992002-04-12 09:54:03 +00005539cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005540#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005541_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005542
Michael W. Hudson54241132001-12-07 15:38:26 +00005543
Martin v. Löwis11437992002-04-12 09:54:03 +00005544echo "$as_me:$LINENO: checking for size_t" >&5
5545echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5546if test "${ac_cv_type_size_t+set}" = set; then
5547 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005548else
Martin v. Löwis11437992002-04-12 09:54:03 +00005549 cat >conftest.$ac_ext <<_ACEOF
5550#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005551/* confdefs.h. */
5552_ACEOF
5553cat confdefs.h >>conftest.$ac_ext
5554cat >>conftest.$ac_ext <<_ACEOF
5555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005556$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005557int
5558main ()
5559{
5560if ((size_t *) 0)
5561 return 0;
5562if (sizeof (size_t))
5563 return 0;
5564 ;
5565 return 0;
5566}
5567_ACEOF
5568rm -f conftest.$ac_objext
5569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5570 (eval $ac_compile) 2>&5
5571 ac_status=$?
5572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5573 (exit $ac_status); } &&
5574 { ac_try='test -s conftest.$ac_objext'
5575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5576 (eval $ac_try) 2>&5
5577 ac_status=$?
5578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005580 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005581else
Martin v. Löwis11437992002-04-12 09:54:03 +00005582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005583sed 's/^/| /' conftest.$ac_ext >&5
5584
Martin v. Löwis11437992002-04-12 09:54:03 +00005585ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005587rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005589echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5590echo "${ECHO_T}$ac_cv_type_size_t" >&6
5591if test $ac_cv_type_size_t = yes; then
5592 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005593else
Martin v. Löwis11437992002-04-12 09:54:03 +00005594
5595cat >>confdefs.h <<_ACEOF
5596#define size_t unsigned
5597_ACEOF
5598
5599fi
5600
5601echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5602echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5603if test "${ac_cv_type_uid_t+set}" = set; then
5604 echo $ECHO_N "(cached) $ECHO_C" >&6
5605else
5606 cat >conftest.$ac_ext <<_ACEOF
5607#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005608/* confdefs.h. */
5609_ACEOF
5610cat confdefs.h >>conftest.$ac_ext
5611cat >>conftest.$ac_ext <<_ACEOF
5612/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005613#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005614
5615_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005617 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005618 ac_cv_type_uid_t=yes
5619else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005620 ac_cv_type_uid_t=no
5621fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005622rm -f conftest*
5623
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005625echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5626echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005627if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005628
Martin v. Löwis11437992002-04-12 09:54:03 +00005629cat >>confdefs.h <<\_ACEOF
5630#define uid_t int
5631_ACEOF
5632
5633
5634cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005635#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005636_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005637
5638fi
5639
Jack Jansendd19cf82001-12-06 22:36:17 +00005640
Michael W. Hudson54241132001-12-07 15:38:26 +00005641# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005642# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005643echo "$as_me:$LINENO: checking for int" >&5
5644echo $ECHO_N "checking for int... $ECHO_C" >&6
5645if test "${ac_cv_type_int+set}" = set; then
5646 echo $ECHO_N "(cached) $ECHO_C" >&6
5647else
5648 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 ((int *) 0)
5660 return 0;
5661if (sizeof (int))
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
5679 ac_cv_type_int=yes
5680else
5681 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_int=no
5685fi
5686rm -f conftest.$ac_objext conftest.$ac_ext
5687fi
5688echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5689echo "${ECHO_T}$ac_cv_type_int" >&6
5690
5691echo "$as_me:$LINENO: checking size of int" >&5
5692echo $ECHO_N "checking size of int... $ECHO_C" >&6
5693if test "${ac_cv_sizeof_int+set}" = set; then
5694 echo $ECHO_N "(cached) $ECHO_C" >&6
5695else
5696 if test "$ac_cv_type_int" = yes; then
5697 # The cast to unsigned long works around a bug in the HP C Compiler
5698 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5699 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5700 # This bug is HP SR number 8606223364.
5701 if test "$cross_compiling" = yes; then
5702 # Depending upon the size, compute the lo and hi bounds.
5703cat >conftest.$ac_ext <<_ACEOF
5704#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005705/* confdefs.h. */
5706_ACEOF
5707cat confdefs.h >>conftest.$ac_ext
5708cat >>conftest.$ac_ext <<_ACEOF
5709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005710$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005711int
5712main ()
5713{
5714static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5715test_array [0] = 0
5716
5717 ;
5718 return 0;
5719}
5720_ACEOF
5721rm -f conftest.$ac_objext
5722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5723 (eval $ac_compile) 2>&5
5724 ac_status=$?
5725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5726 (exit $ac_status); } &&
5727 { ac_try='test -s conftest.$ac_objext'
5728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5729 (eval $ac_try) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); }; }; then
5733 ac_lo=0 ac_mid=0
5734 while :; do
5735 cat >conftest.$ac_ext <<_ACEOF
5736#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005737/* confdefs.h. */
5738_ACEOF
5739cat confdefs.h >>conftest.$ac_ext
5740cat >>conftest.$ac_ext <<_ACEOF
5741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005742$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005743int
5744main ()
5745{
5746static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5747test_array [0] = 0
5748
5749 ;
5750 return 0;
5751}
5752_ACEOF
5753rm -f conftest.$ac_objext
5754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5755 (eval $ac_compile) 2>&5
5756 ac_status=$?
5757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758 (exit $ac_status); } &&
5759 { ac_try='test -s conftest.$ac_objext'
5760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5761 (eval $ac_try) 2>&5
5762 ac_status=$?
5763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764 (exit $ac_status); }; }; then
5765 ac_hi=$ac_mid; break
5766else
5767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005768sed 's/^/| /' conftest.$ac_ext >&5
5769
Martin v. Löwis11437992002-04-12 09:54:03 +00005770ac_lo=`expr $ac_mid + 1`
5771 if test $ac_lo -le $ac_mid; then
5772 ac_lo= ac_hi=
5773 break
5774 fi
5775 ac_mid=`expr 2 '*' $ac_mid + 1`
5776fi
5777rm -f conftest.$ac_objext conftest.$ac_ext
5778 done
5779else
5780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005781sed 's/^/| /' conftest.$ac_ext >&5
5782
Martin v. Löwis11437992002-04-12 09:54:03 +00005783cat >conftest.$ac_ext <<_ACEOF
5784#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005785/* confdefs.h. */
5786_ACEOF
5787cat confdefs.h >>conftest.$ac_ext
5788cat >>conftest.$ac_ext <<_ACEOF
5789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005790$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005791int
5792main ()
5793{
5794static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5795test_array [0] = 0
5796
5797 ;
5798 return 0;
5799}
5800_ACEOF
5801rm -f conftest.$ac_objext
5802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5803 (eval $ac_compile) 2>&5
5804 ac_status=$?
5805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5806 (exit $ac_status); } &&
5807 { ac_try='test -s conftest.$ac_objext'
5808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5809 (eval $ac_try) 2>&5
5810 ac_status=$?
5811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5812 (exit $ac_status); }; }; then
5813 ac_hi=-1 ac_mid=-1
5814 while :; do
5815 cat >conftest.$ac_ext <<_ACEOF
5816#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005817/* confdefs.h. */
5818_ACEOF
5819cat confdefs.h >>conftest.$ac_ext
5820cat >>conftest.$ac_ext <<_ACEOF
5821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005822$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005823int
5824main ()
5825{
5826static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5827test_array [0] = 0
5828
5829 ;
5830 return 0;
5831}
5832_ACEOF
5833rm -f conftest.$ac_objext
5834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5835 (eval $ac_compile) 2>&5
5836 ac_status=$?
5837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5838 (exit $ac_status); } &&
5839 { ac_try='test -s conftest.$ac_objext'
5840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5841 (eval $ac_try) 2>&5
5842 ac_status=$?
5843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5844 (exit $ac_status); }; }; then
5845 ac_lo=$ac_mid; break
5846else
5847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005848sed 's/^/| /' conftest.$ac_ext >&5
5849
Martin v. Löwis11437992002-04-12 09:54:03 +00005850ac_hi=`expr '(' $ac_mid ')' - 1`
5851 if test $ac_mid -le $ac_hi; then
5852 ac_lo= ac_hi=
5853 break
5854 fi
5855 ac_mid=`expr 2 '*' $ac_mid`
5856fi
5857rm -f conftest.$ac_objext conftest.$ac_ext
5858 done
5859else
5860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005861sed 's/^/| /' conftest.$ac_ext >&5
5862
Martin v. Löwis11437992002-04-12 09:54:03 +00005863ac_lo= ac_hi=
5864fi
5865rm -f conftest.$ac_objext conftest.$ac_ext
5866fi
5867rm -f conftest.$ac_objext conftest.$ac_ext
5868# Binary search between lo and hi bounds.
5869while test "x$ac_lo" != "x$ac_hi"; do
5870 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5871 cat >conftest.$ac_ext <<_ACEOF
5872#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005873/* confdefs.h. */
5874_ACEOF
5875cat confdefs.h >>conftest.$ac_ext
5876cat >>conftest.$ac_ext <<_ACEOF
5877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005878$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005879int
5880main ()
5881{
5882static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5883test_array [0] = 0
5884
5885 ;
5886 return 0;
5887}
5888_ACEOF
5889rm -f conftest.$ac_objext
5890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5891 (eval $ac_compile) 2>&5
5892 ac_status=$?
5893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894 (exit $ac_status); } &&
5895 { ac_try='test -s conftest.$ac_objext'
5896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5897 (eval $ac_try) 2>&5
5898 ac_status=$?
5899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900 (exit $ac_status); }; }; then
5901 ac_hi=$ac_mid
5902else
5903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005904sed 's/^/| /' conftest.$ac_ext >&5
5905
Martin v. Löwis11437992002-04-12 09:54:03 +00005906ac_lo=`expr '(' $ac_mid ')' + 1`
5907fi
5908rm -f conftest.$ac_objext conftest.$ac_ext
5909done
5910case $ac_lo in
5911?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005912'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5913See \`config.log' for more details." >&5
5914echo "$as_me: error: cannot compute sizeof (int), 77
5915See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005916 { (exit 1); exit 1; }; } ;;
5917esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005918else
5919 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005920 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5921See \`config.log' for more details." >&5
5922echo "$as_me: error: cannot run test program while cross compiling
5923See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005924 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005925else
Martin v. Löwis11437992002-04-12 09:54:03 +00005926 cat >conftest.$ac_ext <<_ACEOF
5927#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005928/* confdefs.h. */
5929_ACEOF
5930cat confdefs.h >>conftest.$ac_ext
5931cat >>conftest.$ac_ext <<_ACEOF
5932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005933$ac_includes_default
5934long longval () { return (long) (sizeof (int)); }
5935unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005936#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005937#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005938int
5939main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005940{
Martin v. Löwis11437992002-04-12 09:54:03 +00005941
5942 FILE *f = fopen ("conftest.val", "w");
5943 if (! f)
5944 exit (1);
5945 if (((long) (sizeof (int))) < 0)
5946 {
5947 long i = longval ();
5948 if (i != ((long) (sizeof (int))))
5949 exit (1);
5950 fprintf (f, "%ld\n", i);
5951 }
5952 else
5953 {
5954 unsigned long i = ulongval ();
5955 if (i != ((long) (sizeof (int))))
5956 exit (1);
5957 fprintf (f, "%lu\n", i);
5958 }
5959 exit (ferror (f) || fclose (f) != 0);
5960
5961 ;
5962 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005963}
Martin v. Löwis11437992002-04-12 09:54:03 +00005964_ACEOF
5965rm -f conftest$ac_exeext
5966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5967 (eval $ac_link) 2>&5
5968 ac_status=$?
5969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5970 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5972 (eval $ac_try) 2>&5
5973 ac_status=$?
5974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5975 (exit $ac_status); }; }; then
5976 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005977else
Martin v. Löwis11437992002-04-12 09:54:03 +00005978 echo "$as_me: program exited with status $ac_status" >&5
5979echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005980sed 's/^/| /' conftest.$ac_ext >&5
5981
Martin v. Löwis11437992002-04-12 09:54:03 +00005982( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005983{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5984See \`config.log' for more details." >&5
5985echo "$as_me: error: cannot compute sizeof (int), 77
5986See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005987 { (exit 1); exit 1; }; }
5988fi
Skip Montanaro6dead952003-09-25 14:50:04 +00005989rm -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 +00005990fi
5991fi
5992rm -f conftest.val
5993else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005994 ac_cv_sizeof_int=0
5995fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005997echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5998echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5999cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006000#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006001_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006002
6003
Martin v. Löwis11437992002-04-12 09:54:03 +00006004echo "$as_me:$LINENO: checking for long" >&5
6005echo $ECHO_N "checking for long... $ECHO_C" >&6
6006if test "${ac_cv_type_long+set}" = set; then
6007 echo $ECHO_N "(cached) $ECHO_C" >&6
6008else
6009 cat >conftest.$ac_ext <<_ACEOF
6010#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006011/* confdefs.h. */
6012_ACEOF
6013cat confdefs.h >>conftest.$ac_ext
6014cat >>conftest.$ac_ext <<_ACEOF
6015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006016$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006017int
6018main ()
6019{
6020if ((long *) 0)
6021 return 0;
6022if (sizeof (long))
6023 return 0;
6024 ;
6025 return 0;
6026}
6027_ACEOF
6028rm -f conftest.$ac_objext
6029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6030 (eval $ac_compile) 2>&5
6031 ac_status=$?
6032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6033 (exit $ac_status); } &&
6034 { ac_try='test -s conftest.$ac_objext'
6035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6036 (eval $ac_try) 2>&5
6037 ac_status=$?
6038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); }; }; then
6040 ac_cv_type_long=yes
6041else
6042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006043sed 's/^/| /' conftest.$ac_ext >&5
6044
Martin v. Löwis11437992002-04-12 09:54:03 +00006045ac_cv_type_long=no
6046fi
6047rm -f conftest.$ac_objext conftest.$ac_ext
6048fi
6049echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6050echo "${ECHO_T}$ac_cv_type_long" >&6
6051
6052echo "$as_me:$LINENO: checking size of long" >&5
6053echo $ECHO_N "checking size of long... $ECHO_C" >&6
6054if test "${ac_cv_sizeof_long+set}" = set; then
6055 echo $ECHO_N "(cached) $ECHO_C" >&6
6056else
6057 if test "$ac_cv_type_long" = yes; then
6058 # The cast to unsigned long works around a bug in the HP C Compiler
6059 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6060 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6061 # This bug is HP SR number 8606223364.
6062 if test "$cross_compiling" = yes; then
6063 # Depending upon the size, compute the lo and hi bounds.
6064cat >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 (long))) >= 0)];
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_lo=0 ac_mid=0
6095 while :; do
6096 cat >conftest.$ac_ext <<_ACEOF
6097#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006098/* confdefs.h. */
6099_ACEOF
6100cat confdefs.h >>conftest.$ac_ext
6101cat >>conftest.$ac_ext <<_ACEOF
6102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006103$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006104int
6105main ()
6106{
6107static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6108test_array [0] = 0
6109
6110 ;
6111 return 0;
6112}
6113_ACEOF
6114rm -f conftest.$ac_objext
6115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6116 (eval $ac_compile) 2>&5
6117 ac_status=$?
6118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6119 (exit $ac_status); } &&
6120 { ac_try='test -s conftest.$ac_objext'
6121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6122 (eval $ac_try) 2>&5
6123 ac_status=$?
6124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125 (exit $ac_status); }; }; then
6126 ac_hi=$ac_mid; break
6127else
6128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006129sed 's/^/| /' conftest.$ac_ext >&5
6130
Martin v. Löwis11437992002-04-12 09:54:03 +00006131ac_lo=`expr $ac_mid + 1`
6132 if test $ac_lo -le $ac_mid; then
6133 ac_lo= ac_hi=
6134 break
6135 fi
6136 ac_mid=`expr 2 '*' $ac_mid + 1`
6137fi
6138rm -f conftest.$ac_objext conftest.$ac_ext
6139 done
6140else
6141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006142sed 's/^/| /' conftest.$ac_ext >&5
6143
Martin v. Löwis11437992002-04-12 09:54:03 +00006144cat >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 (long))) < 0)];
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_hi=-1 ac_mid=-1
6175 while :; do
6176 cat >conftest.$ac_ext <<_ACEOF
6177#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006178/* confdefs.h. */
6179_ACEOF
6180cat confdefs.h >>conftest.$ac_ext
6181cat >>conftest.$ac_ext <<_ACEOF
6182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006183$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006184int
6185main ()
6186{
6187static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6188test_array [0] = 0
6189
6190 ;
6191 return 0;
6192}
6193_ACEOF
6194rm -f conftest.$ac_objext
6195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6196 (eval $ac_compile) 2>&5
6197 ac_status=$?
6198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199 (exit $ac_status); } &&
6200 { ac_try='test -s conftest.$ac_objext'
6201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6202 (eval $ac_try) 2>&5
6203 ac_status=$?
6204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6205 (exit $ac_status); }; }; then
6206 ac_lo=$ac_mid; break
6207else
6208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006209sed 's/^/| /' conftest.$ac_ext >&5
6210
Martin v. Löwis11437992002-04-12 09:54:03 +00006211ac_hi=`expr '(' $ac_mid ')' - 1`
6212 if test $ac_mid -le $ac_hi; then
6213 ac_lo= ac_hi=
6214 break
6215 fi
6216 ac_mid=`expr 2 '*' $ac_mid`
6217fi
6218rm -f conftest.$ac_objext conftest.$ac_ext
6219 done
6220else
6221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006222sed 's/^/| /' conftest.$ac_ext >&5
6223
Martin v. Löwis11437992002-04-12 09:54:03 +00006224ac_lo= ac_hi=
6225fi
6226rm -f conftest.$ac_objext conftest.$ac_ext
6227fi
6228rm -f conftest.$ac_objext conftest.$ac_ext
6229# Binary search between lo and hi bounds.
6230while test "x$ac_lo" != "x$ac_hi"; do
6231 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6232 cat >conftest.$ac_ext <<_ACEOF
6233#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006234/* confdefs.h. */
6235_ACEOF
6236cat confdefs.h >>conftest.$ac_ext
6237cat >>conftest.$ac_ext <<_ACEOF
6238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006239$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006240int
6241main ()
6242{
6243static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6244test_array [0] = 0
6245
6246 ;
6247 return 0;
6248}
6249_ACEOF
6250rm -f conftest.$ac_objext
6251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6252 (eval $ac_compile) 2>&5
6253 ac_status=$?
6254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6255 (exit $ac_status); } &&
6256 { ac_try='test -s conftest.$ac_objext'
6257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6258 (eval $ac_try) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); }; }; then
6262 ac_hi=$ac_mid
6263else
6264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006265sed 's/^/| /' conftest.$ac_ext >&5
6266
Martin v. Löwis11437992002-04-12 09:54:03 +00006267ac_lo=`expr '(' $ac_mid ')' + 1`
6268fi
6269rm -f conftest.$ac_objext conftest.$ac_ext
6270done
6271case $ac_lo in
6272?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006273'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6274See \`config.log' for more details." >&5
6275echo "$as_me: error: cannot compute sizeof (long), 77
6276See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006277 { (exit 1); exit 1; }; } ;;
6278esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006279else
6280 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006281 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6282See \`config.log' for more details." >&5
6283echo "$as_me: error: cannot run test program while cross compiling
6284See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006285 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006286else
Martin v. Löwis11437992002-04-12 09:54:03 +00006287 cat >conftest.$ac_ext <<_ACEOF
6288#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006289/* confdefs.h. */
6290_ACEOF
6291cat confdefs.h >>conftest.$ac_ext
6292cat >>conftest.$ac_ext <<_ACEOF
6293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006294$ac_includes_default
6295long longval () { return (long) (sizeof (long)); }
6296unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006297#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006298#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006299int
6300main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006301{
Martin v. Löwis11437992002-04-12 09:54:03 +00006302
6303 FILE *f = fopen ("conftest.val", "w");
6304 if (! f)
6305 exit (1);
6306 if (((long) (sizeof (long))) < 0)
6307 {
6308 long i = longval ();
6309 if (i != ((long) (sizeof (long))))
6310 exit (1);
6311 fprintf (f, "%ld\n", i);
6312 }
6313 else
6314 {
6315 unsigned long i = ulongval ();
6316 if (i != ((long) (sizeof (long))))
6317 exit (1);
6318 fprintf (f, "%lu\n", i);
6319 }
6320 exit (ferror (f) || fclose (f) != 0);
6321
6322 ;
6323 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006324}
Martin v. Löwis11437992002-04-12 09:54:03 +00006325_ACEOF
6326rm -f conftest$ac_exeext
6327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6328 (eval $ac_link) 2>&5
6329 ac_status=$?
6330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6331 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6333 (eval $ac_try) 2>&5
6334 ac_status=$?
6335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6336 (exit $ac_status); }; }; then
6337 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006338else
Martin v. Löwis11437992002-04-12 09:54:03 +00006339 echo "$as_me: program exited with status $ac_status" >&5
6340echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006341sed 's/^/| /' conftest.$ac_ext >&5
6342
Martin v. Löwis11437992002-04-12 09:54:03 +00006343( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006344{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6345See \`config.log' for more details." >&5
6346echo "$as_me: error: cannot compute sizeof (long), 77
6347See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006348 { (exit 1); exit 1; }; }
6349fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006350rm -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 +00006351fi
6352fi
6353rm -f conftest.val
6354else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006355 ac_cv_sizeof_long=0
6356fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006358echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6359echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6360cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006361#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006362_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006363
6364
Martin v. Löwis11437992002-04-12 09:54:03 +00006365echo "$as_me:$LINENO: checking for void *" >&5
6366echo $ECHO_N "checking for void *... $ECHO_C" >&6
6367if test "${ac_cv_type_void_p+set}" = set; then
6368 echo $ECHO_N "(cached) $ECHO_C" >&6
6369else
6370 cat >conftest.$ac_ext <<_ACEOF
6371#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006372/* confdefs.h. */
6373_ACEOF
6374cat confdefs.h >>conftest.$ac_ext
6375cat >>conftest.$ac_ext <<_ACEOF
6376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006377$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006378int
6379main ()
6380{
6381if ((void * *) 0)
6382 return 0;
6383if (sizeof (void *))
6384 return 0;
6385 ;
6386 return 0;
6387}
6388_ACEOF
6389rm -f conftest.$ac_objext
6390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6391 (eval $ac_compile) 2>&5
6392 ac_status=$?
6393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6394 (exit $ac_status); } &&
6395 { ac_try='test -s conftest.$ac_objext'
6396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6397 (eval $ac_try) 2>&5
6398 ac_status=$?
6399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6400 (exit $ac_status); }; }; then
6401 ac_cv_type_void_p=yes
6402else
6403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006404sed 's/^/| /' conftest.$ac_ext >&5
6405
Martin v. Löwis11437992002-04-12 09:54:03 +00006406ac_cv_type_void_p=no
6407fi
6408rm -f conftest.$ac_objext conftest.$ac_ext
6409fi
6410echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6411echo "${ECHO_T}$ac_cv_type_void_p" >&6
6412
6413echo "$as_me:$LINENO: checking size of void *" >&5
6414echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6415if test "${ac_cv_sizeof_void_p+set}" = set; then
6416 echo $ECHO_N "(cached) $ECHO_C" >&6
6417else
6418 if test "$ac_cv_type_void_p" = yes; then
6419 # The cast to unsigned long works around a bug in the HP C Compiler
6420 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6421 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6422 # This bug is HP SR number 8606223364.
6423 if test "$cross_compiling" = yes; then
6424 # Depending upon the size, compute the lo and hi bounds.
6425cat >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 (void *))) >= 0)];
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_lo=0 ac_mid=0
6456 while :; do
6457 cat >conftest.$ac_ext <<_ACEOF
6458#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006459/* confdefs.h. */
6460_ACEOF
6461cat confdefs.h >>conftest.$ac_ext
6462cat >>conftest.$ac_ext <<_ACEOF
6463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006464$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006465int
6466main ()
6467{
6468static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6469test_array [0] = 0
6470
6471 ;
6472 return 0;
6473}
6474_ACEOF
6475rm -f conftest.$ac_objext
6476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6477 (eval $ac_compile) 2>&5
6478 ac_status=$?
6479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6480 (exit $ac_status); } &&
6481 { ac_try='test -s conftest.$ac_objext'
6482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6483 (eval $ac_try) 2>&5
6484 ac_status=$?
6485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6486 (exit $ac_status); }; }; then
6487 ac_hi=$ac_mid; break
6488else
6489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006490sed 's/^/| /' conftest.$ac_ext >&5
6491
Martin v. Löwis11437992002-04-12 09:54:03 +00006492ac_lo=`expr $ac_mid + 1`
6493 if test $ac_lo -le $ac_mid; then
6494 ac_lo= ac_hi=
6495 break
6496 fi
6497 ac_mid=`expr 2 '*' $ac_mid + 1`
6498fi
6499rm -f conftest.$ac_objext conftest.$ac_ext
6500 done
6501else
6502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006503sed 's/^/| /' conftest.$ac_ext >&5
6504
Martin v. Löwis11437992002-04-12 09:54:03 +00006505cat >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 (void *))) < 0)];
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_hi=-1 ac_mid=-1
6536 while :; do
6537 cat >conftest.$ac_ext <<_ACEOF
6538#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006539/* confdefs.h. */
6540_ACEOF
6541cat confdefs.h >>conftest.$ac_ext
6542cat >>conftest.$ac_ext <<_ACEOF
6543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006544$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006545int
6546main ()
6547{
6548static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6549test_array [0] = 0
6550
6551 ;
6552 return 0;
6553}
6554_ACEOF
6555rm -f conftest.$ac_objext
6556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6557 (eval $ac_compile) 2>&5
6558 ac_status=$?
6559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6560 (exit $ac_status); } &&
6561 { ac_try='test -s conftest.$ac_objext'
6562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6563 (eval $ac_try) 2>&5
6564 ac_status=$?
6565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6566 (exit $ac_status); }; }; then
6567 ac_lo=$ac_mid; break
6568else
6569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006570sed 's/^/| /' conftest.$ac_ext >&5
6571
Martin v. Löwis11437992002-04-12 09:54:03 +00006572ac_hi=`expr '(' $ac_mid ')' - 1`
6573 if test $ac_mid -le $ac_hi; then
6574 ac_lo= ac_hi=
6575 break
6576 fi
6577 ac_mid=`expr 2 '*' $ac_mid`
6578fi
6579rm -f conftest.$ac_objext conftest.$ac_ext
6580 done
6581else
6582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006583sed 's/^/| /' conftest.$ac_ext >&5
6584
Martin v. Löwis11437992002-04-12 09:54:03 +00006585ac_lo= ac_hi=
6586fi
6587rm -f conftest.$ac_objext conftest.$ac_ext
6588fi
6589rm -f conftest.$ac_objext conftest.$ac_ext
6590# Binary search between lo and hi bounds.
6591while test "x$ac_lo" != "x$ac_hi"; do
6592 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6593 cat >conftest.$ac_ext <<_ACEOF
6594#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006595/* confdefs.h. */
6596_ACEOF
6597cat confdefs.h >>conftest.$ac_ext
6598cat >>conftest.$ac_ext <<_ACEOF
6599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006600$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006601int
6602main ()
6603{
6604static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6605test_array [0] = 0
6606
6607 ;
6608 return 0;
6609}
6610_ACEOF
6611rm -f conftest.$ac_objext
6612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6613 (eval $ac_compile) 2>&5
6614 ac_status=$?
6615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6616 (exit $ac_status); } &&
6617 { ac_try='test -s conftest.$ac_objext'
6618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6619 (eval $ac_try) 2>&5
6620 ac_status=$?
6621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6622 (exit $ac_status); }; }; then
6623 ac_hi=$ac_mid
6624else
6625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006626sed 's/^/| /' conftest.$ac_ext >&5
6627
Martin v. Löwis11437992002-04-12 09:54:03 +00006628ac_lo=`expr '(' $ac_mid ')' + 1`
6629fi
6630rm -f conftest.$ac_objext conftest.$ac_ext
6631done
6632case $ac_lo in
6633?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006634'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6635See \`config.log' for more details." >&5
6636echo "$as_me: error: cannot compute sizeof (void *), 77
6637See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006638 { (exit 1); exit 1; }; } ;;
6639esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006640else
6641 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006642 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6643See \`config.log' for more details." >&5
6644echo "$as_me: error: cannot run test program while cross compiling
6645See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006646 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006647else
Martin v. Löwis11437992002-04-12 09:54:03 +00006648 cat >conftest.$ac_ext <<_ACEOF
6649#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006650/* confdefs.h. */
6651_ACEOF
6652cat confdefs.h >>conftest.$ac_ext
6653cat >>conftest.$ac_ext <<_ACEOF
6654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006655$ac_includes_default
6656long longval () { return (long) (sizeof (void *)); }
6657unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006658#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006659#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006660int
6661main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006662{
Martin v. Löwis11437992002-04-12 09:54:03 +00006663
6664 FILE *f = fopen ("conftest.val", "w");
6665 if (! f)
6666 exit (1);
6667 if (((long) (sizeof (void *))) < 0)
6668 {
6669 long i = longval ();
6670 if (i != ((long) (sizeof (void *))))
6671 exit (1);
6672 fprintf (f, "%ld\n", i);
6673 }
6674 else
6675 {
6676 unsigned long i = ulongval ();
6677 if (i != ((long) (sizeof (void *))))
6678 exit (1);
6679 fprintf (f, "%lu\n", i);
6680 }
6681 exit (ferror (f) || fclose (f) != 0);
6682
6683 ;
6684 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006685}
Martin v. Löwis11437992002-04-12 09:54:03 +00006686_ACEOF
6687rm -f conftest$ac_exeext
6688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6689 (eval $ac_link) 2>&5
6690 ac_status=$?
6691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6694 (eval $ac_try) 2>&5
6695 ac_status=$?
6696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6697 (exit $ac_status); }; }; then
6698 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006699else
Martin v. Löwis11437992002-04-12 09:54:03 +00006700 echo "$as_me: program exited with status $ac_status" >&5
6701echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006702sed 's/^/| /' conftest.$ac_ext >&5
6703
Martin v. Löwis11437992002-04-12 09:54:03 +00006704( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006705{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6706See \`config.log' for more details." >&5
6707echo "$as_me: error: cannot compute sizeof (void *), 77
6708See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006709 { (exit 1); exit 1; }; }
6710fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006711rm -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 +00006712fi
6713fi
6714rm -f conftest.val
6715else
Guido van Rossumad678af1998-10-02 14:42:15 +00006716 ac_cv_sizeof_void_p=0
6717fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006719echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6720echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6721cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006722#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006723_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006724
6725
Martin v. Löwis11437992002-04-12 09:54:03 +00006726echo "$as_me:$LINENO: checking for short" >&5
6727echo $ECHO_N "checking for short... $ECHO_C" >&6
6728if test "${ac_cv_type_short+set}" = set; then
6729 echo $ECHO_N "(cached) $ECHO_C" >&6
6730else
6731 cat >conftest.$ac_ext <<_ACEOF
6732#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006733/* confdefs.h. */
6734_ACEOF
6735cat confdefs.h >>conftest.$ac_ext
6736cat >>conftest.$ac_ext <<_ACEOF
6737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006738$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006739int
6740main ()
6741{
6742if ((short *) 0)
6743 return 0;
6744if (sizeof (short))
6745 return 0;
6746 ;
6747 return 0;
6748}
6749_ACEOF
6750rm -f conftest.$ac_objext
6751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6752 (eval $ac_compile) 2>&5
6753 ac_status=$?
6754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6755 (exit $ac_status); } &&
6756 { ac_try='test -s conftest.$ac_objext'
6757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6758 (eval $ac_try) 2>&5
6759 ac_status=$?
6760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761 (exit $ac_status); }; }; then
6762 ac_cv_type_short=yes
6763else
6764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006765sed 's/^/| /' conftest.$ac_ext >&5
6766
Martin v. Löwis11437992002-04-12 09:54:03 +00006767ac_cv_type_short=no
6768fi
6769rm -f conftest.$ac_objext conftest.$ac_ext
6770fi
6771echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6772echo "${ECHO_T}$ac_cv_type_short" >&6
6773
6774echo "$as_me:$LINENO: checking size of short" >&5
6775echo $ECHO_N "checking size of short... $ECHO_C" >&6
6776if test "${ac_cv_sizeof_short+set}" = set; then
6777 echo $ECHO_N "(cached) $ECHO_C" >&6
6778else
6779 if test "$ac_cv_type_short" = yes; then
6780 # The cast to unsigned long works around a bug in the HP C Compiler
6781 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6782 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6783 # This bug is HP SR number 8606223364.
6784 if test "$cross_compiling" = yes; then
6785 # Depending upon the size, compute the lo and hi bounds.
6786cat >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 (short))) >= 0)];
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_lo=0 ac_mid=0
6817 while :; do
6818 cat >conftest.$ac_ext <<_ACEOF
6819#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006820/* confdefs.h. */
6821_ACEOF
6822cat confdefs.h >>conftest.$ac_ext
6823cat >>conftest.$ac_ext <<_ACEOF
6824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006825$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006826int
6827main ()
6828{
6829static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6830test_array [0] = 0
6831
6832 ;
6833 return 0;
6834}
6835_ACEOF
6836rm -f conftest.$ac_objext
6837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6838 (eval $ac_compile) 2>&5
6839 ac_status=$?
6840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6841 (exit $ac_status); } &&
6842 { ac_try='test -s conftest.$ac_objext'
6843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6844 (eval $ac_try) 2>&5
6845 ac_status=$?
6846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6847 (exit $ac_status); }; }; then
6848 ac_hi=$ac_mid; break
6849else
6850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006851sed 's/^/| /' conftest.$ac_ext >&5
6852
Martin v. Löwis11437992002-04-12 09:54:03 +00006853ac_lo=`expr $ac_mid + 1`
6854 if test $ac_lo -le $ac_mid; then
6855 ac_lo= ac_hi=
6856 break
6857 fi
6858 ac_mid=`expr 2 '*' $ac_mid + 1`
6859fi
6860rm -f conftest.$ac_objext conftest.$ac_ext
6861 done
6862else
6863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006864sed 's/^/| /' conftest.$ac_ext >&5
6865
Martin v. Löwis11437992002-04-12 09:54:03 +00006866cat >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 (short))) < 0)];
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_hi=-1 ac_mid=-1
6897 while :; do
6898 cat >conftest.$ac_ext <<_ACEOF
6899#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006900/* confdefs.h. */
6901_ACEOF
6902cat confdefs.h >>conftest.$ac_ext
6903cat >>conftest.$ac_ext <<_ACEOF
6904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006905$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006906int
6907main ()
6908{
6909static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6910test_array [0] = 0
6911
6912 ;
6913 return 0;
6914}
6915_ACEOF
6916rm -f conftest.$ac_objext
6917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6918 (eval $ac_compile) 2>&5
6919 ac_status=$?
6920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6921 (exit $ac_status); } &&
6922 { ac_try='test -s conftest.$ac_objext'
6923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6924 (eval $ac_try) 2>&5
6925 ac_status=$?
6926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6927 (exit $ac_status); }; }; then
6928 ac_lo=$ac_mid; break
6929else
6930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006931sed 's/^/| /' conftest.$ac_ext >&5
6932
Martin v. Löwis11437992002-04-12 09:54:03 +00006933ac_hi=`expr '(' $ac_mid ')' - 1`
6934 if test $ac_mid -le $ac_hi; then
6935 ac_lo= ac_hi=
6936 break
6937 fi
6938 ac_mid=`expr 2 '*' $ac_mid`
6939fi
6940rm -f conftest.$ac_objext conftest.$ac_ext
6941 done
6942else
6943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006944sed 's/^/| /' conftest.$ac_ext >&5
6945
Martin v. Löwis11437992002-04-12 09:54:03 +00006946ac_lo= ac_hi=
6947fi
6948rm -f conftest.$ac_objext conftest.$ac_ext
6949fi
6950rm -f conftest.$ac_objext conftest.$ac_ext
6951# Binary search between lo and hi bounds.
6952while test "x$ac_lo" != "x$ac_hi"; do
6953 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6954 cat >conftest.$ac_ext <<_ACEOF
6955#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006956/* confdefs.h. */
6957_ACEOF
6958cat confdefs.h >>conftest.$ac_ext
6959cat >>conftest.$ac_ext <<_ACEOF
6960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006961$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006962int
6963main ()
6964{
6965static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6966test_array [0] = 0
6967
6968 ;
6969 return 0;
6970}
6971_ACEOF
6972rm -f conftest.$ac_objext
6973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6974 (eval $ac_compile) 2>&5
6975 ac_status=$?
6976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6977 (exit $ac_status); } &&
6978 { ac_try='test -s conftest.$ac_objext'
6979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6980 (eval $ac_try) 2>&5
6981 ac_status=$?
6982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6983 (exit $ac_status); }; }; then
6984 ac_hi=$ac_mid
6985else
6986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006987sed 's/^/| /' conftest.$ac_ext >&5
6988
Martin v. Löwis11437992002-04-12 09:54:03 +00006989ac_lo=`expr '(' $ac_mid ')' + 1`
6990fi
6991rm -f conftest.$ac_objext conftest.$ac_ext
6992done
6993case $ac_lo in
6994?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006995'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
6996See \`config.log' for more details." >&5
6997echo "$as_me: error: cannot compute sizeof (short), 77
6998See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006999 { (exit 1); exit 1; }; } ;;
7000esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007001else
7002 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007003 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7004See \`config.log' for more details." >&5
7005echo "$as_me: error: cannot run test program while cross compiling
7006See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007007 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007008else
Martin v. Löwis11437992002-04-12 09:54:03 +00007009 cat >conftest.$ac_ext <<_ACEOF
7010#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007011/* confdefs.h. */
7012_ACEOF
7013cat confdefs.h >>conftest.$ac_ext
7014cat >>conftest.$ac_ext <<_ACEOF
7015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007016$ac_includes_default
7017long longval () { return (long) (sizeof (short)); }
7018unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007019#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007020#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007021int
7022main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007023{
Martin v. Löwis11437992002-04-12 09:54:03 +00007024
7025 FILE *f = fopen ("conftest.val", "w");
7026 if (! f)
7027 exit (1);
7028 if (((long) (sizeof (short))) < 0)
7029 {
7030 long i = longval ();
7031 if (i != ((long) (sizeof (short))))
7032 exit (1);
7033 fprintf (f, "%ld\n", i);
7034 }
7035 else
7036 {
7037 unsigned long i = ulongval ();
7038 if (i != ((long) (sizeof (short))))
7039 exit (1);
7040 fprintf (f, "%lu\n", i);
7041 }
7042 exit (ferror (f) || fclose (f) != 0);
7043
7044 ;
7045 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007046}
Martin v. Löwis11437992002-04-12 09:54:03 +00007047_ACEOF
7048rm -f conftest$ac_exeext
7049if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7050 (eval $ac_link) 2>&5
7051 ac_status=$?
7052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7055 (eval $ac_try) 2>&5
7056 ac_status=$?
7057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7058 (exit $ac_status); }; }; then
7059 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007060else
Martin v. Löwis11437992002-04-12 09:54:03 +00007061 echo "$as_me: program exited with status $ac_status" >&5
7062echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007063sed 's/^/| /' conftest.$ac_ext >&5
7064
Martin v. Löwis11437992002-04-12 09:54:03 +00007065( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007066{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7067See \`config.log' for more details." >&5
7068echo "$as_me: error: cannot compute sizeof (short), 77
7069See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007070 { (exit 1); exit 1; }; }
7071fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007072rm -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 +00007073fi
7074fi
7075rm -f conftest.val
7076else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007077 ac_cv_sizeof_short=0
7078fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007079fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007080echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7081echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7082cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007083#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007084_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007085
7086
Martin v. Löwis11437992002-04-12 09:54:03 +00007087echo "$as_me:$LINENO: checking for float" >&5
7088echo $ECHO_N "checking for float... $ECHO_C" >&6
7089if test "${ac_cv_type_float+set}" = set; then
7090 echo $ECHO_N "(cached) $ECHO_C" >&6
7091else
7092 cat >conftest.$ac_ext <<_ACEOF
7093#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007094/* confdefs.h. */
7095_ACEOF
7096cat confdefs.h >>conftest.$ac_ext
7097cat >>conftest.$ac_ext <<_ACEOF
7098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007099$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007100int
7101main ()
7102{
7103if ((float *) 0)
7104 return 0;
7105if (sizeof (float))
7106 return 0;
7107 ;
7108 return 0;
7109}
7110_ACEOF
7111rm -f conftest.$ac_objext
7112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7113 (eval $ac_compile) 2>&5
7114 ac_status=$?
7115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7116 (exit $ac_status); } &&
7117 { ac_try='test -s conftest.$ac_objext'
7118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7119 (eval $ac_try) 2>&5
7120 ac_status=$?
7121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122 (exit $ac_status); }; }; then
7123 ac_cv_type_float=yes
7124else
7125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007126sed 's/^/| /' conftest.$ac_ext >&5
7127
Martin v. Löwis11437992002-04-12 09:54:03 +00007128ac_cv_type_float=no
7129fi
7130rm -f conftest.$ac_objext conftest.$ac_ext
7131fi
7132echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7133echo "${ECHO_T}$ac_cv_type_float" >&6
7134
7135echo "$as_me:$LINENO: checking size of float" >&5
7136echo $ECHO_N "checking size of float... $ECHO_C" >&6
7137if test "${ac_cv_sizeof_float+set}" = set; then
7138 echo $ECHO_N "(cached) $ECHO_C" >&6
7139else
7140 if test "$ac_cv_type_float" = yes; then
7141 # The cast to unsigned long works around a bug in the HP C Compiler
7142 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7143 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7144 # This bug is HP SR number 8606223364.
7145 if test "$cross_compiling" = yes; then
7146 # Depending upon the size, compute the lo and hi bounds.
7147cat >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 (float))) >= 0)];
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_lo=0 ac_mid=0
7178 while :; do
7179 cat >conftest.$ac_ext <<_ACEOF
7180#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007181/* confdefs.h. */
7182_ACEOF
7183cat confdefs.h >>conftest.$ac_ext
7184cat >>conftest.$ac_ext <<_ACEOF
7185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007186$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007187int
7188main ()
7189{
7190static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7191test_array [0] = 0
7192
7193 ;
7194 return 0;
7195}
7196_ACEOF
7197rm -f conftest.$ac_objext
7198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7199 (eval $ac_compile) 2>&5
7200 ac_status=$?
7201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7202 (exit $ac_status); } &&
7203 { ac_try='test -s conftest.$ac_objext'
7204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7205 (eval $ac_try) 2>&5
7206 ac_status=$?
7207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7208 (exit $ac_status); }; }; then
7209 ac_hi=$ac_mid; break
7210else
7211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007212sed 's/^/| /' conftest.$ac_ext >&5
7213
Martin v. Löwis11437992002-04-12 09:54:03 +00007214ac_lo=`expr $ac_mid + 1`
7215 if test $ac_lo -le $ac_mid; then
7216 ac_lo= ac_hi=
7217 break
7218 fi
7219 ac_mid=`expr 2 '*' $ac_mid + 1`
7220fi
7221rm -f conftest.$ac_objext conftest.$ac_ext
7222 done
7223else
7224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007225sed 's/^/| /' conftest.$ac_ext >&5
7226
Martin v. Löwis11437992002-04-12 09:54:03 +00007227cat >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 (float))) < 0)];
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_hi=-1 ac_mid=-1
7258 while :; do
7259 cat >conftest.$ac_ext <<_ACEOF
7260#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007261/* confdefs.h. */
7262_ACEOF
7263cat confdefs.h >>conftest.$ac_ext
7264cat >>conftest.$ac_ext <<_ACEOF
7265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007266$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007267int
7268main ()
7269{
7270static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7271test_array [0] = 0
7272
7273 ;
7274 return 0;
7275}
7276_ACEOF
7277rm -f conftest.$ac_objext
7278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7279 (eval $ac_compile) 2>&5
7280 ac_status=$?
7281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7282 (exit $ac_status); } &&
7283 { ac_try='test -s conftest.$ac_objext'
7284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7285 (eval $ac_try) 2>&5
7286 ac_status=$?
7287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7288 (exit $ac_status); }; }; then
7289 ac_lo=$ac_mid; break
7290else
7291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007292sed 's/^/| /' conftest.$ac_ext >&5
7293
Martin v. Löwis11437992002-04-12 09:54:03 +00007294ac_hi=`expr '(' $ac_mid ')' - 1`
7295 if test $ac_mid -le $ac_hi; then
7296 ac_lo= ac_hi=
7297 break
7298 fi
7299 ac_mid=`expr 2 '*' $ac_mid`
7300fi
7301rm -f conftest.$ac_objext conftest.$ac_ext
7302 done
7303else
7304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007305sed 's/^/| /' conftest.$ac_ext >&5
7306
Martin v. Löwis11437992002-04-12 09:54:03 +00007307ac_lo= ac_hi=
7308fi
7309rm -f conftest.$ac_objext conftest.$ac_ext
7310fi
7311rm -f conftest.$ac_objext conftest.$ac_ext
7312# Binary search between lo and hi bounds.
7313while test "x$ac_lo" != "x$ac_hi"; do
7314 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7315 cat >conftest.$ac_ext <<_ACEOF
7316#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007317/* confdefs.h. */
7318_ACEOF
7319cat confdefs.h >>conftest.$ac_ext
7320cat >>conftest.$ac_ext <<_ACEOF
7321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007322$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007323int
7324main ()
7325{
7326static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7327test_array [0] = 0
7328
7329 ;
7330 return 0;
7331}
7332_ACEOF
7333rm -f conftest.$ac_objext
7334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7335 (eval $ac_compile) 2>&5
7336 ac_status=$?
7337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7338 (exit $ac_status); } &&
7339 { ac_try='test -s conftest.$ac_objext'
7340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7341 (eval $ac_try) 2>&5
7342 ac_status=$?
7343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); }; }; then
7345 ac_hi=$ac_mid
7346else
7347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007348sed 's/^/| /' conftest.$ac_ext >&5
7349
Martin v. Löwis11437992002-04-12 09:54:03 +00007350ac_lo=`expr '(' $ac_mid ')' + 1`
7351fi
7352rm -f conftest.$ac_objext conftest.$ac_ext
7353done
7354case $ac_lo in
7355?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007356'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7357See \`config.log' for more details." >&5
7358echo "$as_me: error: cannot compute sizeof (float), 77
7359See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007360 { (exit 1); exit 1; }; } ;;
7361esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007362else
7363 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007364 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7365See \`config.log' for more details." >&5
7366echo "$as_me: error: cannot run test program while cross compiling
7367See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007368 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007369else
Martin v. Löwis11437992002-04-12 09:54:03 +00007370 cat >conftest.$ac_ext <<_ACEOF
7371#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007372/* confdefs.h. */
7373_ACEOF
7374cat confdefs.h >>conftest.$ac_ext
7375cat >>conftest.$ac_ext <<_ACEOF
7376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007377$ac_includes_default
7378long longval () { return (long) (sizeof (float)); }
7379unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007380#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007381#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007382int
7383main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007384{
Martin v. Löwis11437992002-04-12 09:54:03 +00007385
7386 FILE *f = fopen ("conftest.val", "w");
7387 if (! f)
7388 exit (1);
7389 if (((long) (sizeof (float))) < 0)
7390 {
7391 long i = longval ();
7392 if (i != ((long) (sizeof (float))))
7393 exit (1);
7394 fprintf (f, "%ld\n", i);
7395 }
7396 else
7397 {
7398 unsigned long i = ulongval ();
7399 if (i != ((long) (sizeof (float))))
7400 exit (1);
7401 fprintf (f, "%lu\n", i);
7402 }
7403 exit (ferror (f) || fclose (f) != 0);
7404
7405 ;
7406 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007407}
Martin v. Löwis11437992002-04-12 09:54:03 +00007408_ACEOF
7409rm -f conftest$ac_exeext
7410if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7411 (eval $ac_link) 2>&5
7412 ac_status=$?
7413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7414 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7416 (eval $ac_try) 2>&5
7417 ac_status=$?
7418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7419 (exit $ac_status); }; }; then
7420 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007421else
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 echo "$as_me: program exited with status $ac_status" >&5
7423echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007424sed 's/^/| /' conftest.$ac_ext >&5
7425
Martin v. Löwis11437992002-04-12 09:54:03 +00007426( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007427{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7428See \`config.log' for more details." >&5
7429echo "$as_me: error: cannot compute sizeof (float), 77
7430See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007431 { (exit 1); exit 1; }; }
7432fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007433rm -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 +00007434fi
7435fi
7436rm -f conftest.val
7437else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007438 ac_cv_sizeof_float=0
7439fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007440fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007441echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7442echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7443cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007444#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007445_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007446
7447
Martin v. Löwis11437992002-04-12 09:54:03 +00007448echo "$as_me:$LINENO: checking for double" >&5
7449echo $ECHO_N "checking for double... $ECHO_C" >&6
7450if test "${ac_cv_type_double+set}" = set; then
7451 echo $ECHO_N "(cached) $ECHO_C" >&6
7452else
7453 cat >conftest.$ac_ext <<_ACEOF
7454#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007455/* confdefs.h. */
7456_ACEOF
7457cat confdefs.h >>conftest.$ac_ext
7458cat >>conftest.$ac_ext <<_ACEOF
7459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007460$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007461int
7462main ()
7463{
7464if ((double *) 0)
7465 return 0;
7466if (sizeof (double))
7467 return 0;
7468 ;
7469 return 0;
7470}
7471_ACEOF
7472rm -f conftest.$ac_objext
7473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7474 (eval $ac_compile) 2>&5
7475 ac_status=$?
7476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7477 (exit $ac_status); } &&
7478 { ac_try='test -s conftest.$ac_objext'
7479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7480 (eval $ac_try) 2>&5
7481 ac_status=$?
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); }; }; then
7484 ac_cv_type_double=yes
7485else
7486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007487sed 's/^/| /' conftest.$ac_ext >&5
7488
Martin v. Löwis11437992002-04-12 09:54:03 +00007489ac_cv_type_double=no
7490fi
7491rm -f conftest.$ac_objext conftest.$ac_ext
7492fi
7493echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7494echo "${ECHO_T}$ac_cv_type_double" >&6
7495
7496echo "$as_me:$LINENO: checking size of double" >&5
7497echo $ECHO_N "checking size of double... $ECHO_C" >&6
7498if test "${ac_cv_sizeof_double+set}" = set; then
7499 echo $ECHO_N "(cached) $ECHO_C" >&6
7500else
7501 if test "$ac_cv_type_double" = yes; then
7502 # The cast to unsigned long works around a bug in the HP C Compiler
7503 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7504 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7505 # This bug is HP SR number 8606223364.
7506 if test "$cross_compiling" = yes; then
7507 # Depending upon the size, compute the lo and hi bounds.
7508cat >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 (double))) >= 0)];
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_lo=0 ac_mid=0
7539 while :; do
7540 cat >conftest.$ac_ext <<_ACEOF
7541#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007542/* confdefs.h. */
7543_ACEOF
7544cat confdefs.h >>conftest.$ac_ext
7545cat >>conftest.$ac_ext <<_ACEOF
7546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007547$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007548int
7549main ()
7550{
7551static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7552test_array [0] = 0
7553
7554 ;
7555 return 0;
7556}
7557_ACEOF
7558rm -f conftest.$ac_objext
7559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7560 (eval $ac_compile) 2>&5
7561 ac_status=$?
7562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7563 (exit $ac_status); } &&
7564 { ac_try='test -s conftest.$ac_objext'
7565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7566 (eval $ac_try) 2>&5
7567 ac_status=$?
7568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7569 (exit $ac_status); }; }; then
7570 ac_hi=$ac_mid; break
7571else
7572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007573sed 's/^/| /' conftest.$ac_ext >&5
7574
Martin v. Löwis11437992002-04-12 09:54:03 +00007575ac_lo=`expr $ac_mid + 1`
7576 if test $ac_lo -le $ac_mid; then
7577 ac_lo= ac_hi=
7578 break
7579 fi
7580 ac_mid=`expr 2 '*' $ac_mid + 1`
7581fi
7582rm -f conftest.$ac_objext conftest.$ac_ext
7583 done
7584else
7585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007586sed 's/^/| /' conftest.$ac_ext >&5
7587
Martin v. Löwis11437992002-04-12 09:54:03 +00007588cat >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 (double))) < 0)];
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_hi=-1 ac_mid=-1
7619 while :; do
7620 cat >conftest.$ac_ext <<_ACEOF
7621#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007622/* confdefs.h. */
7623_ACEOF
7624cat confdefs.h >>conftest.$ac_ext
7625cat >>conftest.$ac_ext <<_ACEOF
7626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007627$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007628int
7629main ()
7630{
7631static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7632test_array [0] = 0
7633
7634 ;
7635 return 0;
7636}
7637_ACEOF
7638rm -f conftest.$ac_objext
7639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7640 (eval $ac_compile) 2>&5
7641 ac_status=$?
7642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7643 (exit $ac_status); } &&
7644 { ac_try='test -s conftest.$ac_objext'
7645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7646 (eval $ac_try) 2>&5
7647 ac_status=$?
7648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649 (exit $ac_status); }; }; then
7650 ac_lo=$ac_mid; break
7651else
7652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007653sed 's/^/| /' conftest.$ac_ext >&5
7654
Martin v. Löwis11437992002-04-12 09:54:03 +00007655ac_hi=`expr '(' $ac_mid ')' - 1`
7656 if test $ac_mid -le $ac_hi; then
7657 ac_lo= ac_hi=
7658 break
7659 fi
7660 ac_mid=`expr 2 '*' $ac_mid`
7661fi
7662rm -f conftest.$ac_objext conftest.$ac_ext
7663 done
7664else
7665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007666sed 's/^/| /' conftest.$ac_ext >&5
7667
Martin v. Löwis11437992002-04-12 09:54:03 +00007668ac_lo= ac_hi=
7669fi
7670rm -f conftest.$ac_objext conftest.$ac_ext
7671fi
7672rm -f conftest.$ac_objext conftest.$ac_ext
7673# Binary search between lo and hi bounds.
7674while test "x$ac_lo" != "x$ac_hi"; do
7675 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7676 cat >conftest.$ac_ext <<_ACEOF
7677#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007678/* confdefs.h. */
7679_ACEOF
7680cat confdefs.h >>conftest.$ac_ext
7681cat >>conftest.$ac_ext <<_ACEOF
7682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007683$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007684int
7685main ()
7686{
7687static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7688test_array [0] = 0
7689
7690 ;
7691 return 0;
7692}
7693_ACEOF
7694rm -f conftest.$ac_objext
7695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7696 (eval $ac_compile) 2>&5
7697 ac_status=$?
7698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7699 (exit $ac_status); } &&
7700 { ac_try='test -s conftest.$ac_objext'
7701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7702 (eval $ac_try) 2>&5
7703 ac_status=$?
7704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7705 (exit $ac_status); }; }; then
7706 ac_hi=$ac_mid
7707else
7708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007709sed 's/^/| /' conftest.$ac_ext >&5
7710
Martin v. Löwis11437992002-04-12 09:54:03 +00007711ac_lo=`expr '(' $ac_mid ')' + 1`
7712fi
7713rm -f conftest.$ac_objext conftest.$ac_ext
7714done
7715case $ac_lo in
7716?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007717'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7718See \`config.log' for more details." >&5
7719echo "$as_me: error: cannot compute sizeof (double), 77
7720See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007721 { (exit 1); exit 1; }; } ;;
7722esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007723else
7724 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007725 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7726See \`config.log' for more details." >&5
7727echo "$as_me: error: cannot run test program while cross compiling
7728See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007730else
Martin v. Löwis11437992002-04-12 09:54:03 +00007731 cat >conftest.$ac_ext <<_ACEOF
7732#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007733/* confdefs.h. */
7734_ACEOF
7735cat confdefs.h >>conftest.$ac_ext
7736cat >>conftest.$ac_ext <<_ACEOF
7737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007738$ac_includes_default
7739long longval () { return (long) (sizeof (double)); }
7740unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007741#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007742#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007743int
7744main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007745{
Martin v. Löwis11437992002-04-12 09:54:03 +00007746
7747 FILE *f = fopen ("conftest.val", "w");
7748 if (! f)
7749 exit (1);
7750 if (((long) (sizeof (double))) < 0)
7751 {
7752 long i = longval ();
7753 if (i != ((long) (sizeof (double))))
7754 exit (1);
7755 fprintf (f, "%ld\n", i);
7756 }
7757 else
7758 {
7759 unsigned long i = ulongval ();
7760 if (i != ((long) (sizeof (double))))
7761 exit (1);
7762 fprintf (f, "%lu\n", i);
7763 }
7764 exit (ferror (f) || fclose (f) != 0);
7765
7766 ;
7767 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007768}
Martin v. Löwis11437992002-04-12 09:54:03 +00007769_ACEOF
7770rm -f conftest$ac_exeext
7771if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7772 (eval $ac_link) 2>&5
7773 ac_status=$?
7774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7775 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7777 (eval $ac_try) 2>&5
7778 ac_status=$?
7779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7780 (exit $ac_status); }; }; then
7781 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007782else
Martin v. Löwis11437992002-04-12 09:54:03 +00007783 echo "$as_me: program exited with status $ac_status" >&5
7784echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007785sed 's/^/| /' conftest.$ac_ext >&5
7786
Martin v. Löwis11437992002-04-12 09:54:03 +00007787( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007788{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7789See \`config.log' for more details." >&5
7790echo "$as_me: error: cannot compute sizeof (double), 77
7791See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 { (exit 1); exit 1; }; }
7793fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007794rm -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 +00007795fi
7796fi
7797rm -f conftest.val
7798else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007799 ac_cv_sizeof_double=0
7800fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007802echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7803echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7804cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007805#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007806_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007807
7808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809echo "$as_me:$LINENO: checking for fpos_t" >&5
7810echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7811if test "${ac_cv_type_fpos_t+set}" = set; then
7812 echo $ECHO_N "(cached) $ECHO_C" >&6
7813else
7814 cat >conftest.$ac_ext <<_ACEOF
7815#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007816/* confdefs.h. */
7817_ACEOF
7818cat confdefs.h >>conftest.$ac_ext
7819cat >>conftest.$ac_ext <<_ACEOF
7820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007821$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007822int
7823main ()
7824{
7825if ((fpos_t *) 0)
7826 return 0;
7827if (sizeof (fpos_t))
7828 return 0;
7829 ;
7830 return 0;
7831}
7832_ACEOF
7833rm -f conftest.$ac_objext
7834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7835 (eval $ac_compile) 2>&5
7836 ac_status=$?
7837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7838 (exit $ac_status); } &&
7839 { ac_try='test -s conftest.$ac_objext'
7840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7841 (eval $ac_try) 2>&5
7842 ac_status=$?
7843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7844 (exit $ac_status); }; }; then
7845 ac_cv_type_fpos_t=yes
7846else
7847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007848sed 's/^/| /' conftest.$ac_ext >&5
7849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850ac_cv_type_fpos_t=no
7851fi
7852rm -f conftest.$ac_objext conftest.$ac_ext
7853fi
7854echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7855echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7856
7857echo "$as_me:$LINENO: checking size of fpos_t" >&5
7858echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7859if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7860 echo $ECHO_N "(cached) $ECHO_C" >&6
7861else
7862 if test "$ac_cv_type_fpos_t" = yes; then
7863 # The cast to unsigned long works around a bug in the HP C Compiler
7864 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7865 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7866 # This bug is HP SR number 8606223364.
7867 if test "$cross_compiling" = yes; then
7868 # Depending upon the size, compute the lo and hi bounds.
7869cat >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 (fpos_t))) >= 0)];
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_lo=0 ac_mid=0
7900 while :; do
7901 cat >conftest.$ac_ext <<_ACEOF
7902#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007903/* confdefs.h. */
7904_ACEOF
7905cat confdefs.h >>conftest.$ac_ext
7906cat >>conftest.$ac_ext <<_ACEOF
7907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007908$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007909int
7910main ()
7911{
7912static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7913test_array [0] = 0
7914
7915 ;
7916 return 0;
7917}
7918_ACEOF
7919rm -f conftest.$ac_objext
7920if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7921 (eval $ac_compile) 2>&5
7922 ac_status=$?
7923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 (exit $ac_status); } &&
7925 { ac_try='test -s conftest.$ac_objext'
7926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7927 (eval $ac_try) 2>&5
7928 ac_status=$?
7929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930 (exit $ac_status); }; }; then
7931 ac_hi=$ac_mid; break
7932else
7933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007934sed 's/^/| /' conftest.$ac_ext >&5
7935
Martin v. Löwis11437992002-04-12 09:54:03 +00007936ac_lo=`expr $ac_mid + 1`
7937 if test $ac_lo -le $ac_mid; then
7938 ac_lo= ac_hi=
7939 break
7940 fi
7941 ac_mid=`expr 2 '*' $ac_mid + 1`
7942fi
7943rm -f conftest.$ac_objext conftest.$ac_ext
7944 done
7945else
7946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007947sed 's/^/| /' conftest.$ac_ext >&5
7948
Martin v. Löwis11437992002-04-12 09:54:03 +00007949cat >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 (fpos_t))) < 0)];
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_hi=-1 ac_mid=-1
7980 while :; do
7981 cat >conftest.$ac_ext <<_ACEOF
7982#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007983/* confdefs.h. */
7984_ACEOF
7985cat confdefs.h >>conftest.$ac_ext
7986cat >>conftest.$ac_ext <<_ACEOF
7987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007988$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
7992static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7993test_array [0] = 0
7994
7995 ;
7996 return 0;
7997}
7998_ACEOF
7999rm -f conftest.$ac_objext
8000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8001 (eval $ac_compile) 2>&5
8002 ac_status=$?
8003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8004 (exit $ac_status); } &&
8005 { ac_try='test -s conftest.$ac_objext'
8006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8007 (eval $ac_try) 2>&5
8008 ac_status=$?
8009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8010 (exit $ac_status); }; }; then
8011 ac_lo=$ac_mid; break
8012else
8013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008014sed 's/^/| /' conftest.$ac_ext >&5
8015
Martin v. Löwis11437992002-04-12 09:54:03 +00008016ac_hi=`expr '(' $ac_mid ')' - 1`
8017 if test $ac_mid -le $ac_hi; then
8018 ac_lo= ac_hi=
8019 break
8020 fi
8021 ac_mid=`expr 2 '*' $ac_mid`
8022fi
8023rm -f conftest.$ac_objext conftest.$ac_ext
8024 done
8025else
8026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008027sed 's/^/| /' conftest.$ac_ext >&5
8028
Martin v. Löwis11437992002-04-12 09:54:03 +00008029ac_lo= ac_hi=
8030fi
8031rm -f conftest.$ac_objext conftest.$ac_ext
8032fi
8033rm -f conftest.$ac_objext conftest.$ac_ext
8034# Binary search between lo and hi bounds.
8035while test "x$ac_lo" != "x$ac_hi"; do
8036 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8037 cat >conftest.$ac_ext <<_ACEOF
8038#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008039/* confdefs.h. */
8040_ACEOF
8041cat confdefs.h >>conftest.$ac_ext
8042cat >>conftest.$ac_ext <<_ACEOF
8043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008044$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008045int
8046main ()
8047{
8048static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8049test_array [0] = 0
8050
8051 ;
8052 return 0;
8053}
8054_ACEOF
8055rm -f conftest.$ac_objext
8056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8057 (eval $ac_compile) 2>&5
8058 ac_status=$?
8059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8060 (exit $ac_status); } &&
8061 { ac_try='test -s conftest.$ac_objext'
8062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8063 (eval $ac_try) 2>&5
8064 ac_status=$?
8065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066 (exit $ac_status); }; }; then
8067 ac_hi=$ac_mid
8068else
8069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008070sed 's/^/| /' conftest.$ac_ext >&5
8071
Martin v. Löwis11437992002-04-12 09:54:03 +00008072ac_lo=`expr '(' $ac_mid ')' + 1`
8073fi
8074rm -f conftest.$ac_objext conftest.$ac_ext
8075done
8076case $ac_lo in
8077?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008078'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8079See \`config.log' for more details." >&5
8080echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8081See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 { (exit 1); exit 1; }; } ;;
8083esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008084else
8085 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008086 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8087See \`config.log' for more details." >&5
8088echo "$as_me: error: cannot run test program while cross compiling
8089See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008091else
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 cat >conftest.$ac_ext <<_ACEOF
8093#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008094/* confdefs.h. */
8095_ACEOF
8096cat confdefs.h >>conftest.$ac_ext
8097cat >>conftest.$ac_ext <<_ACEOF
8098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008099$ac_includes_default
8100long longval () { return (long) (sizeof (fpos_t)); }
8101unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008102#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008103#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008104int
8105main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008106{
Martin v. Löwis11437992002-04-12 09:54:03 +00008107
8108 FILE *f = fopen ("conftest.val", "w");
8109 if (! f)
8110 exit (1);
8111 if (((long) (sizeof (fpos_t))) < 0)
8112 {
8113 long i = longval ();
8114 if (i != ((long) (sizeof (fpos_t))))
8115 exit (1);
8116 fprintf (f, "%ld\n", i);
8117 }
8118 else
8119 {
8120 unsigned long i = ulongval ();
8121 if (i != ((long) (sizeof (fpos_t))))
8122 exit (1);
8123 fprintf (f, "%lu\n", i);
8124 }
8125 exit (ferror (f) || fclose (f) != 0);
8126
8127 ;
8128 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008129}
Martin v. Löwis11437992002-04-12 09:54:03 +00008130_ACEOF
8131rm -f conftest$ac_exeext
8132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8133 (eval $ac_link) 2>&5
8134 ac_status=$?
8135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8138 (eval $ac_try) 2>&5
8139 ac_status=$?
8140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8141 (exit $ac_status); }; }; then
8142 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008143else
Martin v. Löwis11437992002-04-12 09:54:03 +00008144 echo "$as_me: program exited with status $ac_status" >&5
8145echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008146sed 's/^/| /' conftest.$ac_ext >&5
8147
Martin v. Löwis11437992002-04-12 09:54:03 +00008148( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008149{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8150See \`config.log' for more details." >&5
8151echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8152See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008153 { (exit 1); exit 1; }; }
8154fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008155rm -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 +00008156fi
8157fi
8158rm -f conftest.val
8159else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008160 ac_cv_sizeof_fpos_t=0
8161fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008162fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008163echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8164echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8165cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008166#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008167_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008168
Michael W. Hudson54241132001-12-07 15:38:26 +00008169
8170
Martin v. Löwis11437992002-04-12 09:54:03 +00008171echo "$as_me:$LINENO: checking for long long support" >&5
8172echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008173have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008174cat >conftest.$ac_ext <<_ACEOF
8175#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008176/* confdefs.h. */
8177_ACEOF
8178cat confdefs.h >>conftest.$ac_ext
8179cat >>conftest.$ac_ext <<_ACEOF
8180/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008181
Martin v. Löwis11437992002-04-12 09:54:03 +00008182int
8183main ()
8184{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008185long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008186 ;
8187 return 0;
8188}
8189_ACEOF
8190rm -f conftest.$ac_objext
8191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8192 (eval $ac_compile) 2>&5
8193 ac_status=$?
8194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8195 (exit $ac_status); } &&
8196 { ac_try='test -s conftest.$ac_objext'
8197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8198 (eval $ac_try) 2>&5
8199 ac_status=$?
8200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8201 (exit $ac_status); }; }; then
8202
8203
8204cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008205#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008206_ACEOF
8207
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008208 have_long_long=yes
8209
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008210else
Martin v. Löwis11437992002-04-12 09:54:03 +00008211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008212sed 's/^/| /' conftest.$ac_ext >&5
8213
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008215rm -f conftest.$ac_objext conftest.$ac_ext
8216echo "$as_me:$LINENO: result: $have_long_long" >&5
8217echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008218if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008219echo "$as_me:$LINENO: checking for long long" >&5
8220echo $ECHO_N "checking for long long... $ECHO_C" >&6
8221if test "${ac_cv_type_long_long+set}" = set; then
8222 echo $ECHO_N "(cached) $ECHO_C" >&6
8223else
8224 cat >conftest.$ac_ext <<_ACEOF
8225#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008226/* confdefs.h. */
8227_ACEOF
8228cat confdefs.h >>conftest.$ac_ext
8229cat >>conftest.$ac_ext <<_ACEOF
8230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008231$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008232int
8233main ()
8234{
8235if ((long long *) 0)
8236 return 0;
8237if (sizeof (long long))
8238 return 0;
8239 ;
8240 return 0;
8241}
8242_ACEOF
8243rm -f conftest.$ac_objext
8244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8245 (eval $ac_compile) 2>&5
8246 ac_status=$?
8247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8248 (exit $ac_status); } &&
8249 { ac_try='test -s conftest.$ac_objext'
8250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8251 (eval $ac_try) 2>&5
8252 ac_status=$?
8253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8254 (exit $ac_status); }; }; then
8255 ac_cv_type_long_long=yes
8256else
8257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008258sed 's/^/| /' conftest.$ac_ext >&5
8259
Martin v. Löwis11437992002-04-12 09:54:03 +00008260ac_cv_type_long_long=no
8261fi
8262rm -f conftest.$ac_objext conftest.$ac_ext
8263fi
8264echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8265echo "${ECHO_T}$ac_cv_type_long_long" >&6
8266
8267echo "$as_me:$LINENO: checking size of long long" >&5
8268echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8269if test "${ac_cv_sizeof_long_long+set}" = set; then
8270 echo $ECHO_N "(cached) $ECHO_C" >&6
8271else
8272 if test "$ac_cv_type_long_long" = yes; then
8273 # The cast to unsigned long works around a bug in the HP C Compiler
8274 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8275 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8276 # This bug is HP SR number 8606223364.
8277 if test "$cross_compiling" = yes; then
8278 # Depending upon the size, compute the lo and hi bounds.
8279cat >conftest.$ac_ext <<_ACEOF
8280#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008281/* confdefs.h. */
8282_ACEOF
8283cat confdefs.h >>conftest.$ac_ext
8284cat >>conftest.$ac_ext <<_ACEOF
8285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008286$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008287int
8288main ()
8289{
8290static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8291test_array [0] = 0
8292
8293 ;
8294 return 0;
8295}
8296_ACEOF
8297rm -f conftest.$ac_objext
8298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8299 (eval $ac_compile) 2>&5
8300 ac_status=$?
8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302 (exit $ac_status); } &&
8303 { ac_try='test -s conftest.$ac_objext'
8304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8305 (eval $ac_try) 2>&5
8306 ac_status=$?
8307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8308 (exit $ac_status); }; }; then
8309 ac_lo=0 ac_mid=0
8310 while :; do
8311 cat >conftest.$ac_ext <<_ACEOF
8312#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008313/* confdefs.h. */
8314_ACEOF
8315cat confdefs.h >>conftest.$ac_ext
8316cat >>conftest.$ac_ext <<_ACEOF
8317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008318$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008319int
8320main ()
8321{
8322static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8323test_array [0] = 0
8324
8325 ;
8326 return 0;
8327}
8328_ACEOF
8329rm -f conftest.$ac_objext
8330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8331 (eval $ac_compile) 2>&5
8332 ac_status=$?
8333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334 (exit $ac_status); } &&
8335 { ac_try='test -s conftest.$ac_objext'
8336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8337 (eval $ac_try) 2>&5
8338 ac_status=$?
8339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340 (exit $ac_status); }; }; then
8341 ac_hi=$ac_mid; break
8342else
8343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008344sed 's/^/| /' conftest.$ac_ext >&5
8345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346ac_lo=`expr $ac_mid + 1`
8347 if test $ac_lo -le $ac_mid; then
8348 ac_lo= ac_hi=
8349 break
8350 fi
8351 ac_mid=`expr 2 '*' $ac_mid + 1`
8352fi
8353rm -f conftest.$ac_objext conftest.$ac_ext
8354 done
8355else
8356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008357sed 's/^/| /' conftest.$ac_ext >&5
8358
Martin v. Löwis11437992002-04-12 09:54:03 +00008359cat >conftest.$ac_ext <<_ACEOF
8360#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008361/* confdefs.h. */
8362_ACEOF
8363cat confdefs.h >>conftest.$ac_ext
8364cat >>conftest.$ac_ext <<_ACEOF
8365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008366$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008367int
8368main ()
8369{
8370static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8371test_array [0] = 0
8372
8373 ;
8374 return 0;
8375}
8376_ACEOF
8377rm -f conftest.$ac_objext
8378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8379 (eval $ac_compile) 2>&5
8380 ac_status=$?
8381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382 (exit $ac_status); } &&
8383 { ac_try='test -s conftest.$ac_objext'
8384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8385 (eval $ac_try) 2>&5
8386 ac_status=$?
8387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388 (exit $ac_status); }; }; then
8389 ac_hi=-1 ac_mid=-1
8390 while :; do
8391 cat >conftest.$ac_ext <<_ACEOF
8392#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008393/* confdefs.h. */
8394_ACEOF
8395cat confdefs.h >>conftest.$ac_ext
8396cat >>conftest.$ac_ext <<_ACEOF
8397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008398$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008399int
8400main ()
8401{
8402static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8403test_array [0] = 0
8404
8405 ;
8406 return 0;
8407}
8408_ACEOF
8409rm -f conftest.$ac_objext
8410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8411 (eval $ac_compile) 2>&5
8412 ac_status=$?
8413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8414 (exit $ac_status); } &&
8415 { ac_try='test -s conftest.$ac_objext'
8416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8417 (eval $ac_try) 2>&5
8418 ac_status=$?
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); }; }; then
8421 ac_lo=$ac_mid; break
8422else
8423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008424sed 's/^/| /' conftest.$ac_ext >&5
8425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426ac_hi=`expr '(' $ac_mid ')' - 1`
8427 if test $ac_mid -le $ac_hi; then
8428 ac_lo= ac_hi=
8429 break
8430 fi
8431 ac_mid=`expr 2 '*' $ac_mid`
8432fi
8433rm -f conftest.$ac_objext conftest.$ac_ext
8434 done
8435else
8436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008437sed 's/^/| /' conftest.$ac_ext >&5
8438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439ac_lo= ac_hi=
8440fi
8441rm -f conftest.$ac_objext conftest.$ac_ext
8442fi
8443rm -f conftest.$ac_objext conftest.$ac_ext
8444# Binary search between lo and hi bounds.
8445while test "x$ac_lo" != "x$ac_hi"; do
8446 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8447 cat >conftest.$ac_ext <<_ACEOF
8448#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008449/* confdefs.h. */
8450_ACEOF
8451cat confdefs.h >>conftest.$ac_ext
8452cat >>conftest.$ac_ext <<_ACEOF
8453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008454$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008455int
8456main ()
8457{
8458static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8459test_array [0] = 0
8460
8461 ;
8462 return 0;
8463}
8464_ACEOF
8465rm -f conftest.$ac_objext
8466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8467 (eval $ac_compile) 2>&5
8468 ac_status=$?
8469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8470 (exit $ac_status); } &&
8471 { ac_try='test -s conftest.$ac_objext'
8472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8473 (eval $ac_try) 2>&5
8474 ac_status=$?
8475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8476 (exit $ac_status); }; }; then
8477 ac_hi=$ac_mid
8478else
8479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008480sed 's/^/| /' conftest.$ac_ext >&5
8481
Martin v. Löwis11437992002-04-12 09:54:03 +00008482ac_lo=`expr '(' $ac_mid ')' + 1`
8483fi
8484rm -f conftest.$ac_objext conftest.$ac_ext
8485done
8486case $ac_lo in
8487?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008488'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8489See \`config.log' for more details." >&5
8490echo "$as_me: error: cannot compute sizeof (long long), 77
8491See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008492 { (exit 1); exit 1; }; } ;;
8493esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008494else
8495 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008496 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8497See \`config.log' for more details." >&5
8498echo "$as_me: error: cannot run test program while cross compiling
8499See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008501else
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 cat >conftest.$ac_ext <<_ACEOF
8503#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008504/* confdefs.h. */
8505_ACEOF
8506cat confdefs.h >>conftest.$ac_ext
8507cat >>conftest.$ac_ext <<_ACEOF
8508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008509$ac_includes_default
8510long longval () { return (long) (sizeof (long long)); }
8511unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008512#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008513#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008514int
8515main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008516{
Martin v. Löwis11437992002-04-12 09:54:03 +00008517
8518 FILE *f = fopen ("conftest.val", "w");
8519 if (! f)
8520 exit (1);
8521 if (((long) (sizeof (long long))) < 0)
8522 {
8523 long i = longval ();
8524 if (i != ((long) (sizeof (long long))))
8525 exit (1);
8526 fprintf (f, "%ld\n", i);
8527 }
8528 else
8529 {
8530 unsigned long i = ulongval ();
8531 if (i != ((long) (sizeof (long long))))
8532 exit (1);
8533 fprintf (f, "%lu\n", i);
8534 }
8535 exit (ferror (f) || fclose (f) != 0);
8536
8537 ;
8538 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008539}
Martin v. Löwis11437992002-04-12 09:54:03 +00008540_ACEOF
8541rm -f conftest$ac_exeext
8542if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8543 (eval $ac_link) 2>&5
8544 ac_status=$?
8545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8546 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8548 (eval $ac_try) 2>&5
8549 ac_status=$?
8550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551 (exit $ac_status); }; }; then
8552 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008553else
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 echo "$as_me: program exited with status $ac_status" >&5
8555echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008556sed 's/^/| /' conftest.$ac_ext >&5
8557
Martin v. Löwis11437992002-04-12 09:54:03 +00008558( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008559{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8560See \`config.log' for more details." >&5
8561echo "$as_me: error: cannot compute sizeof (long long), 77
8562See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 { (exit 1); exit 1; }; }
8564fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008565rm -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 +00008566fi
8567fi
8568rm -f conftest.val
8569else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008570 ac_cv_sizeof_long_long=0
8571fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008573echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8574echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8575cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008576#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008577_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008578
Michael W. Hudson54241132001-12-07 15:38:26 +00008579
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008580fi
8581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8583echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008584have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008585cat >conftest.$ac_ext <<_ACEOF
8586#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008587/* confdefs.h. */
8588_ACEOF
8589cat confdefs.h >>conftest.$ac_ext
8590cat >>conftest.$ac_ext <<_ACEOF
8591/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008592
Martin v. Löwis11437992002-04-12 09:54:03 +00008593int
8594main ()
8595{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008596uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 ;
8598 return 0;
8599}
8600_ACEOF
8601rm -f conftest.$ac_objext
8602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8603 (eval $ac_compile) 2>&5
8604 ac_status=$?
8605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8606 (exit $ac_status); } &&
8607 { ac_try='test -s conftest.$ac_objext'
8608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8609 (eval $ac_try) 2>&5
8610 ac_status=$?
8611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8612 (exit $ac_status); }; }; then
8613
8614
8615cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008616#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008617_ACEOF
8618
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008619 have_uintptr_t=yes
8620
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008621else
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008623sed 's/^/| /' conftest.$ac_ext >&5
8624
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008625fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008626rm -f conftest.$ac_objext conftest.$ac_ext
8627echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8628echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008629if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008630echo "$as_me:$LINENO: checking for uintptr_t" >&5
8631echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8632if test "${ac_cv_type_uintptr_t+set}" = set; then
8633 echo $ECHO_N "(cached) $ECHO_C" >&6
8634else
8635 cat >conftest.$ac_ext <<_ACEOF
8636#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008637/* confdefs.h. */
8638_ACEOF
8639cat confdefs.h >>conftest.$ac_ext
8640cat >>conftest.$ac_ext <<_ACEOF
8641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008642$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008643int
8644main ()
8645{
8646if ((uintptr_t *) 0)
8647 return 0;
8648if (sizeof (uintptr_t))
8649 return 0;
8650 ;
8651 return 0;
8652}
8653_ACEOF
8654rm -f conftest.$ac_objext
8655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8656 (eval $ac_compile) 2>&5
8657 ac_status=$?
8658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8659 (exit $ac_status); } &&
8660 { ac_try='test -s conftest.$ac_objext'
8661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8662 (eval $ac_try) 2>&5
8663 ac_status=$?
8664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8665 (exit $ac_status); }; }; then
8666 ac_cv_type_uintptr_t=yes
8667else
8668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008669sed 's/^/| /' conftest.$ac_ext >&5
8670
Martin v. Löwis11437992002-04-12 09:54:03 +00008671ac_cv_type_uintptr_t=no
8672fi
8673rm -f conftest.$ac_objext conftest.$ac_ext
8674fi
8675echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8676echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8677
8678echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8679echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8680if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8681 echo $ECHO_N "(cached) $ECHO_C" >&6
8682else
8683 if test "$ac_cv_type_uintptr_t" = yes; then
8684 # The cast to unsigned long works around a bug in the HP C Compiler
8685 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8686 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8687 # This bug is HP SR number 8606223364.
8688 if test "$cross_compiling" = yes; then
8689 # Depending upon the size, compute the lo and hi bounds.
8690cat >conftest.$ac_ext <<_ACEOF
8691#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008692/* confdefs.h. */
8693_ACEOF
8694cat confdefs.h >>conftest.$ac_ext
8695cat >>conftest.$ac_ext <<_ACEOF
8696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008697$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008698int
8699main ()
8700{
8701static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8702test_array [0] = 0
8703
8704 ;
8705 return 0;
8706}
8707_ACEOF
8708rm -f conftest.$ac_objext
8709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8710 (eval $ac_compile) 2>&5
8711 ac_status=$?
8712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8713 (exit $ac_status); } &&
8714 { ac_try='test -s conftest.$ac_objext'
8715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8716 (eval $ac_try) 2>&5
8717 ac_status=$?
8718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8719 (exit $ac_status); }; }; then
8720 ac_lo=0 ac_mid=0
8721 while :; do
8722 cat >conftest.$ac_ext <<_ACEOF
8723#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008724/* confdefs.h. */
8725_ACEOF
8726cat confdefs.h >>conftest.$ac_ext
8727cat >>conftest.$ac_ext <<_ACEOF
8728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008729$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008730int
8731main ()
8732{
8733static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8734test_array [0] = 0
8735
8736 ;
8737 return 0;
8738}
8739_ACEOF
8740rm -f conftest.$ac_objext
8741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8742 (eval $ac_compile) 2>&5
8743 ac_status=$?
8744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8745 (exit $ac_status); } &&
8746 { ac_try='test -s conftest.$ac_objext'
8747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8748 (eval $ac_try) 2>&5
8749 ac_status=$?
8750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751 (exit $ac_status); }; }; then
8752 ac_hi=$ac_mid; break
8753else
8754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008755sed 's/^/| /' conftest.$ac_ext >&5
8756
Martin v. Löwis11437992002-04-12 09:54:03 +00008757ac_lo=`expr $ac_mid + 1`
8758 if test $ac_lo -le $ac_mid; then
8759 ac_lo= ac_hi=
8760 break
8761 fi
8762 ac_mid=`expr 2 '*' $ac_mid + 1`
8763fi
8764rm -f conftest.$ac_objext conftest.$ac_ext
8765 done
8766else
8767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008768sed 's/^/| /' conftest.$ac_ext >&5
8769
Martin v. Löwis11437992002-04-12 09:54:03 +00008770cat >conftest.$ac_ext <<_ACEOF
8771#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008772/* confdefs.h. */
8773_ACEOF
8774cat confdefs.h >>conftest.$ac_ext
8775cat >>conftest.$ac_ext <<_ACEOF
8776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008777$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008778int
8779main ()
8780{
8781static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8782test_array [0] = 0
8783
8784 ;
8785 return 0;
8786}
8787_ACEOF
8788rm -f conftest.$ac_objext
8789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8790 (eval $ac_compile) 2>&5
8791 ac_status=$?
8792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8793 (exit $ac_status); } &&
8794 { ac_try='test -s conftest.$ac_objext'
8795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8796 (eval $ac_try) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); }; }; then
8800 ac_hi=-1 ac_mid=-1
8801 while :; do
8802 cat >conftest.$ac_ext <<_ACEOF
8803#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008804/* confdefs.h. */
8805_ACEOF
8806cat confdefs.h >>conftest.$ac_ext
8807cat >>conftest.$ac_ext <<_ACEOF
8808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008810int
8811main ()
8812{
8813static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8814test_array [0] = 0
8815
8816 ;
8817 return 0;
8818}
8819_ACEOF
8820rm -f conftest.$ac_objext
8821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8822 (eval $ac_compile) 2>&5
8823 ac_status=$?
8824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8825 (exit $ac_status); } &&
8826 { ac_try='test -s conftest.$ac_objext'
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_lo=$ac_mid; break
8833else
8834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008835sed 's/^/| /' conftest.$ac_ext >&5
8836
Martin v. Löwis11437992002-04-12 09:54:03 +00008837ac_hi=`expr '(' $ac_mid ')' - 1`
8838 if test $ac_mid -le $ac_hi; then
8839 ac_lo= ac_hi=
8840 break
8841 fi
8842 ac_mid=`expr 2 '*' $ac_mid`
8843fi
8844rm -f conftest.$ac_objext conftest.$ac_ext
8845 done
8846else
8847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008848sed 's/^/| /' conftest.$ac_ext >&5
8849
Martin v. Löwis11437992002-04-12 09:54:03 +00008850ac_lo= ac_hi=
8851fi
8852rm -f conftest.$ac_objext conftest.$ac_ext
8853fi
8854rm -f conftest.$ac_objext conftest.$ac_ext
8855# Binary search between lo and hi bounds.
8856while test "x$ac_lo" != "x$ac_hi"; do
8857 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8858 cat >conftest.$ac_ext <<_ACEOF
8859#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* confdefs.h. */
8861_ACEOF
8862cat confdefs.h >>conftest.$ac_ext
8863cat >>conftest.$ac_ext <<_ACEOF
8864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008866int
8867main ()
8868{
8869static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8870test_array [0] = 0
8871
8872 ;
8873 return 0;
8874}
8875_ACEOF
8876rm -f conftest.$ac_objext
8877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8878 (eval $ac_compile) 2>&5
8879 ac_status=$?
8880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8881 (exit $ac_status); } &&
8882 { ac_try='test -s conftest.$ac_objext'
8883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8884 (eval $ac_try) 2>&5
8885 ac_status=$?
8886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8887 (exit $ac_status); }; }; then
8888 ac_hi=$ac_mid
8889else
8890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008891sed 's/^/| /' conftest.$ac_ext >&5
8892
Martin v. Löwis11437992002-04-12 09:54:03 +00008893ac_lo=`expr '(' $ac_mid ')' + 1`
8894fi
8895rm -f conftest.$ac_objext conftest.$ac_ext
8896done
8897case $ac_lo in
8898?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008899'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8900See \`config.log' for more details." >&5
8901echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8902See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 { (exit 1); exit 1; }; } ;;
8904esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008905else
8906 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008907 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8908See \`config.log' for more details." >&5
8909echo "$as_me: error: cannot run test program while cross compiling
8910See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008912else
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 cat >conftest.$ac_ext <<_ACEOF
8914#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008915/* confdefs.h. */
8916_ACEOF
8917cat confdefs.h >>conftest.$ac_ext
8918cat >>conftest.$ac_ext <<_ACEOF
8919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008920$ac_includes_default
8921long longval () { return (long) (sizeof (uintptr_t)); }
8922unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008923#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008924#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008925int
8926main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008927{
Martin v. Löwis11437992002-04-12 09:54:03 +00008928
8929 FILE *f = fopen ("conftest.val", "w");
8930 if (! f)
8931 exit (1);
8932 if (((long) (sizeof (uintptr_t))) < 0)
8933 {
8934 long i = longval ();
8935 if (i != ((long) (sizeof (uintptr_t))))
8936 exit (1);
8937 fprintf (f, "%ld\n", i);
8938 }
8939 else
8940 {
8941 unsigned long i = ulongval ();
8942 if (i != ((long) (sizeof (uintptr_t))))
8943 exit (1);
8944 fprintf (f, "%lu\n", i);
8945 }
8946 exit (ferror (f) || fclose (f) != 0);
8947
8948 ;
8949 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008950}
Martin v. Löwis11437992002-04-12 09:54:03 +00008951_ACEOF
8952rm -f conftest$ac_exeext
8953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8954 (eval $ac_link) 2>&5
8955 ac_status=$?
8956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8957 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8959 (eval $ac_try) 2>&5
8960 ac_status=$?
8961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8962 (exit $ac_status); }; }; then
8963 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008964else
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 echo "$as_me: program exited with status $ac_status" >&5
8966echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008967sed 's/^/| /' conftest.$ac_ext >&5
8968
Martin v. Löwis11437992002-04-12 09:54:03 +00008969( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008970{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8971See \`config.log' for more details." >&5
8972echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8973See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 { (exit 1); exit 1; }; }
8975fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008976rm -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 +00008977fi
8978fi
8979rm -f conftest.val
8980else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008981 ac_cv_sizeof_uintptr_t=0
8982fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008983fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008984echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8985echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8986cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008987#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008988_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008989
Michael W. Hudson54241132001-12-07 15:38:26 +00008990
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008991fi
8992
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008993# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008994echo "$as_me:$LINENO: checking size of off_t" >&5
8995echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8996if test "${ac_cv_sizeof_off_t+set}" = set; then
8997 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008998else
8999 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009000 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009001else
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 cat >conftest.$ac_ext <<_ACEOF
9003#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009004/* confdefs.h. */
9005_ACEOF
9006cat confdefs.h >>conftest.$ac_ext
9007cat >>conftest.$ac_ext <<_ACEOF
9008/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009009#include <stdio.h>
9010#include <sys/types.h>
9011main()
9012{
9013 FILE *f=fopen("conftestval", "w");
9014 if (!f) exit(1);
9015 fprintf(f, "%d\n", sizeof(off_t));
9016 exit(0);
9017}
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
9019rm -f conftest$ac_exeext
9020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9021 (eval $ac_link) 2>&5
9022 ac_status=$?
9023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9026 (eval $ac_try) 2>&5
9027 ac_status=$?
9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9029 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009030 ac_cv_sizeof_off_t=`cat conftestval`
9031else
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 echo "$as_me: program exited with status $ac_status" >&5
9033echo "$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 +00009036( exit $ac_status )
9037ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009038fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009039rm -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 +00009040fi
9041
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009042fi
9043
Martin v. Löwis11437992002-04-12 09:54:03 +00009044echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9045echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9046
9047cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009048#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009049_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009050
Michael W. Hudson54241132001-12-07 15:38:26 +00009051
Martin v. Löwis11437992002-04-12 09:54:03 +00009052echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9053echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009054if test "$have_long_long" = yes -a \
9055 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9056 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009057
Martin v. Löwis11437992002-04-12 09:54:03 +00009058cat >>confdefs.h <<\_ACEOF
9059#define HAVE_LARGEFILE_SUPPORT 1
9060_ACEOF
9061
9062 echo "$as_me:$LINENO: result: yes" >&5
9063echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009064else
Martin v. Löwis11437992002-04-12 09:54:03 +00009065 echo "$as_me:$LINENO: result: no" >&5
9066echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009067fi
9068
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009069# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009070echo "$as_me:$LINENO: checking size of time_t" >&5
9071echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9072if test "${ac_cv_sizeof_time_t+set}" = set; then
9073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009074else
9075 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009076 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009077else
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 cat >conftest.$ac_ext <<_ACEOF
9079#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009080/* confdefs.h. */
9081_ACEOF
9082cat confdefs.h >>conftest.$ac_ext
9083cat >>conftest.$ac_ext <<_ACEOF
9084/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009085#include <stdio.h>
9086#include <time.h>
9087main()
9088{
9089 FILE *f=fopen("conftestval", "w");
9090 if (!f) exit(1);
9091 fprintf(f, "%d\n", sizeof(time_t));
9092 exit(0);
9093}
Martin v. Löwis11437992002-04-12 09:54:03 +00009094_ACEOF
9095rm -f conftest$ac_exeext
9096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9097 (eval $ac_link) 2>&5
9098 ac_status=$?
9099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9102 (eval $ac_try) 2>&5
9103 ac_status=$?
9104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009106 ac_cv_sizeof_time_t=`cat conftestval`
9107else
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 echo "$as_me: program exited with status $ac_status" >&5
9109echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009110sed 's/^/| /' conftest.$ac_ext >&5
9111
Martin v. Löwis11437992002-04-12 09:54:03 +00009112( exit $ac_status )
9113ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009114fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009115rm -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 +00009116fi
9117
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009118fi
9119
Martin v. Löwis11437992002-04-12 09:54:03 +00009120echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9121echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9122
9123cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009124#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009125_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009126
Michael W. Hudson54241132001-12-07 15:38:26 +00009127
9128
Trent Mick635f6fb2000-08-23 21:33:05 +00009129# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009130ac_save_cc="$CC"
9131if test "$ac_cv_kpthread" = "yes"
9132then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009133elif test "$ac_cv_kthread" = "yes"
9134then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009135elif test "$ac_cv_pthread" = "yes"
9136then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009137fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009138echo "$as_me:$LINENO: checking for pthread_t" >&5
9139echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009140have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009141cat >conftest.$ac_ext <<_ACEOF
9142#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009143/* confdefs.h. */
9144_ACEOF
9145cat confdefs.h >>conftest.$ac_ext
9146cat >>conftest.$ac_ext <<_ACEOF
9147/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009148#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009149int
9150main ()
9151{
Guido van Rossum12580492000-09-24 16:47:19 +00009152pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 ;
9154 return 0;
9155}
9156_ACEOF
9157rm -f conftest.$ac_objext
9158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9159 (eval $ac_compile) 2>&5
9160 ac_status=$?
9161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9162 (exit $ac_status); } &&
9163 { ac_try='test -s conftest.$ac_objext'
9164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9165 (eval $ac_try) 2>&5
9166 ac_status=$?
9167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9168 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009169 have_pthread_t=yes
9170else
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009172sed 's/^/| /' conftest.$ac_ext >&5
9173
Trent Mick635f6fb2000-08-23 21:33:05 +00009174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009175rm -f conftest.$ac_objext conftest.$ac_ext
9176echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9177echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009178if test "$have_pthread_t" = yes ; then
9179 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9181echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9182 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9183 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009184else
9185 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009186 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009187else
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 cat >conftest.$ac_ext <<_ACEOF
9189#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009190/* confdefs.h. */
9191_ACEOF
9192cat confdefs.h >>conftest.$ac_ext
9193cat >>conftest.$ac_ext <<_ACEOF
9194/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009195#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009196#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009197 main()
9198 {
9199 FILE *f=fopen("conftestval", "w");
9200 if (!f) exit(1);
9201 fprintf(f, "%d\n", sizeof(pthread_t));
9202 exit(0);
9203 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009204_ACEOF
9205rm -f conftest$ac_exeext
9206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9207 (eval $ac_link) 2>&5
9208 ac_status=$?
9209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9212 (eval $ac_try) 2>&5
9213 ac_status=$?
9214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9215 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009216 ac_cv_sizeof_pthread_t=`cat conftestval`
9217else
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 echo "$as_me: program exited with status $ac_status" >&5
9219echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009220sed 's/^/| /' conftest.$ac_ext >&5
9221
Martin v. Löwis11437992002-04-12 09:54:03 +00009222( exit $ac_status )
9223ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009224fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009225rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009226fi
9227
Trent Mick635f6fb2000-08-23 21:33:05 +00009228fi
9229
Martin v. Löwis11437992002-04-12 09:54:03 +00009230 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9231echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9232
9233cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009234#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009235_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009236
9237fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009238CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009239
Martin v. Löwis11437992002-04-12 09:54:03 +00009240echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9241echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009242# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9243if test "${enable_toolbox_glue+set}" = set; then
9244 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009245
Martin v. Löwis11437992002-04-12 09:54:03 +00009246fi;
Jack Jansene578a632001-08-15 01:27:14 +00009247
9248if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009249then
Jack Jansene578a632001-08-15 01:27:14 +00009250 case $ac_sys_system/$ac_sys_release in
9251 Darwin/*)
9252 enable_toolbox_glue="yes";;
9253 *)
9254 enable_toolbox_glue="no";;
9255 esac
9256fi
9257case "$enable_toolbox_glue" in
9258yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009259 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009260 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009261 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009262
9263cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009264#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009265_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009266
9267 ;;
9268*)
9269 extra_frameworks=""
9270 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009271 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009272 ;;
9273esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009274echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9275echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009276
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009277
9278case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009279 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009280 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009281 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009283 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009284 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009285 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009286 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289esac
9290
Martin v. Löwis11437992002-04-12 09:54:03 +00009291echo "$as_me:$LINENO: checking for --enable-framework" >&5
9292echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009293if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009294then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009295 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009297 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009298
Martin v. Löwis11437992002-04-12 09:54:03 +00009299cat >>confdefs.h <<\_ACEOF
9300#define WITH_NEXT_FRAMEWORK 1
9301_ACEOF
9302
9303 echo "$as_me:$LINENO: result: yes" >&5
9304echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305else
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 echo "$as_me:$LINENO: result: no" >&5
9307echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009308fi
9309
Martin v. Löwis11437992002-04-12 09:54:03 +00009310echo "$as_me:$LINENO: checking for dyld" >&5
9311echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009312case $ac_sys_system/$ac_sys_release in
9313 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009314
Martin v. Löwis11437992002-04-12 09:54:03 +00009315cat >>confdefs.h <<\_ACEOF
9316#define WITH_DYLD 1
9317_ACEOF
9318
9319 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9320echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009321 ;;
9322 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009323 echo "$as_me:$LINENO: result: no" >&5
9324echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009325 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009326esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009327
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329
Michael W. Hudson54241132001-12-07 15:38:26 +00009330
9331
9332
9333
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009335# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009336echo "$as_me:$LINENO: checking SO" >&5
9337echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009338if test -z "$SO"
9339then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009340 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009341 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009342 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009343 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009344 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009345else
9346 # this might also be a termcap variable, see #610332
9347 echo
9348 echo '====================================================================='
9349 echo '+ +'
9350 echo '+ WARNING: You have set SO in your environment. +'
9351 echo '+ Do you really mean to change the extension for shared libraries? +'
9352 echo '+ Continuing in 10 seconds to let you to ponder. +'
9353 echo '+ +'
9354 echo '====================================================================='
9355 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009357echo "$as_me:$LINENO: result: $SO" >&5
9358echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009359# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009360# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009361# (Shared libraries in this instance are shared modules to be loaded into
9362# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009363echo "$as_me:$LINENO: checking LDSHARED" >&5
9364echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009365if test -z "$LDSHARED"
9366then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009367 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009368 AIX*)
9369 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009370 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009371 ;;
9372 BeOS*)
9373 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009374 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009375 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009376 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009377 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009379 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009380 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009381 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009382 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009384 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009385 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009386 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9387 if test "$enable_framework" ; then
9388 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009389 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9390 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009391 else
9392 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009393 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009394 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009395 Darwin/*)
9396 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9397 if test "$enable_framework" ; then
9398 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009399 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9400 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009401 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009402 # No framework, use the Python app as bundle-loader
9403 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009404 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009405 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009406 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009407 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009408 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009409 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009410 then
9411 LDSHARED="cc -shared ${LDFLAGS}"
9412 else
9413 LDSHARED="ld -Bshareable ${LDFLAGS}"
9414 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009415 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009416 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009417 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009418 then LDSHARED='$(CC) -shared'
9419 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009420 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009421 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009422 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009423 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009424 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009425 *) LDSHARED="ld";;
9426 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009427fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009428echo "$as_me:$LINENO: result: $LDSHARED" >&5
9429echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009430BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009431# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009432# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009433echo "$as_me:$LINENO: checking CCSHARED" >&5
9434echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009435if test -z "$CCSHARED"
9436then
Guido van Rossum07397971997-04-29 21:49:50 +00009437 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009438 SunOS*) if test "$GCC" = yes;
9439 then CCSHARED="-fPIC";
9440 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009441 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009442 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009443 else CCSHARED="+z";
9444 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009445 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009446 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009447 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009448 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009449 if test "$GCC" = "yes"
9450 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009451 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009452 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009453 SCO_SV*)
9454 if test "$GCC" = "yes"
9455 then CCSHARED="-fPIC"
9456 else CCSHARED="-Kpic -belf"
9457 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009458 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009459 IRIX*/6*) case $CC in
9460 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009461 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009462 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009463 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009464 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009465fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009466echo "$as_me:$LINENO: result: $CCSHARED" >&5
9467echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009468# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009470echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9471echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009472if test -z "$LINKFORSHARED"
9473then
Guido van Rossum07397971997-04-29 21:49:50 +00009474 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009475 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009476 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009477 LINKFORSHARED="-Wl,-E -Wl,+s";;
9478# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009479 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009480 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009481 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009483 # -u __dummy makes the linker aware of the objc runtime
9484 # in System.framework; otherwise, __objcInit (referenced in
9485 # crt1.o) gets erroneously defined as common, which breaks dynamic
9486 # loading of any modules which reference it in System.framework.
9487 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9488 # not used by the core itself but which needs to be in the core so
9489 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009490 # -prebind is no longer used, because it actually seems to give a
9491 # slowdown in stead of a speedup, maybe due to the large number of
9492 # dynamic loads Python does.
9493 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009494 if test "$enable_framework"
9495 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009496 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009497 fi
9498 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009499 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009500 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009501 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009503 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9504 then
9505 LINKFORSHARED="-Wl,--export-dynamic"
9506 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009507 SunOS/5*) case $CC in
9508 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009509 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009510 then
9511 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009512 fi;;
9513 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009514 CYGWIN*)
9515 if test $enable_shared = "no"
9516 then
9517 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9518 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009519 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009520fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009521echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9522echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009523
Michael W. Hudson54241132001-12-07 15:38:26 +00009524
Martin v. Löwis11437992002-04-12 09:54:03 +00009525echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9526echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009527if test ! "$LIBRARY" = "$LDLIBRARY"
9528then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009529 case $ac_sys_system in
9530 CYGWIN*)
9531 # Cygwin needs CCSHARED when building extension DLLs
9532 # but not when building the interpreter DLL.
9533 CFLAGSFORSHARED='';;
9534 *)
9535 CFLAGSFORSHARED='$(CCSHARED)'
9536 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009538echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9539echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009540
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009541# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9542# library (with --enable-shared).
9543# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009544# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9545# if it is not required, since it creates a dependency of the shared library
9546# to LIBS. This, in turn, means that applications linking the shared libpython
9547# don't need to link LIBS explicitly. The default should be only changed
9548# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009549
9550echo "$as_me:$LINENO: checking SHLIBS" >&5
9551echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9552case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009553 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009554 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009555esac
9556echo "$as_me:$LINENO: result: $SHLIBS" >&5
9557echo "${ECHO_T}$SHLIBS" >&6
9558
9559
Guido van Rossum627b2d71993-12-24 10:39:16 +00009560# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009561
9562echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9563echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9564if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9565 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009566else
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009568LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009569cat >conftest.$ac_ext <<_ACEOF
9570#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009571/* confdefs.h. */
9572_ACEOF
9573cat confdefs.h >>conftest.$ac_ext
9574cat >>conftest.$ac_ext <<_ACEOF
9575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009576
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009577/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009578#ifdef __cplusplus
9579extern "C"
9580#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009581/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 builtin and then its argument prototype would still apply. */
9583char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009584int
9585main ()
9586{
9587dlopen ();
9588 ;
9589 return 0;
9590}
9591_ACEOF
9592rm -f conftest.$ac_objext conftest$ac_exeext
9593if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9594 (eval $ac_link) 2>&5
9595 ac_status=$?
9596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597 (exit $ac_status); } &&
9598 { ac_try='test -s conftest$ac_exeext'
9599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9600 (eval $ac_try) 2>&5
9601 ac_status=$?
9602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9603 (exit $ac_status); }; }; then
9604 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009605else
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009607sed 's/^/| /' conftest.$ac_ext >&5
9608
Martin v. Löwis11437992002-04-12 09:54:03 +00009609ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009610fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009611rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9612LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009613fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009614echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9615echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9616if test $ac_cv_lib_dl_dlopen = yes; then
9617 cat >>confdefs.h <<_ACEOF
9618#define HAVE_LIBDL 1
9619_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009620
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009621 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009622
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009623fi
9624 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009625
9626echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9627echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9628if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009630else
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009632LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009633cat >conftest.$ac_ext <<_ACEOF
9634#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009635/* confdefs.h. */
9636_ACEOF
9637cat confdefs.h >>conftest.$ac_ext
9638cat >>conftest.$ac_ext <<_ACEOF
9639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009640
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009641/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009642#ifdef __cplusplus
9643extern "C"
9644#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009645/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009646 builtin and then its argument prototype would still apply. */
9647char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009648int
9649main ()
9650{
9651shl_load ();
9652 ;
9653 return 0;
9654}
9655_ACEOF
9656rm -f conftest.$ac_objext conftest$ac_exeext
9657if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9658 (eval $ac_link) 2>&5
9659 ac_status=$?
9660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9661 (exit $ac_status); } &&
9662 { ac_try='test -s conftest$ac_exeext'
9663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9664 (eval $ac_try) 2>&5
9665 ac_status=$?
9666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9667 (exit $ac_status); }; }; then
9668 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009669else
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009671sed 's/^/| /' conftest.$ac_ext >&5
9672
Martin v. Löwis11437992002-04-12 09:54:03 +00009673ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009674fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009675rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9676LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009677fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009678echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9679echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9680if test $ac_cv_lib_dld_shl_load = yes; then
9681 cat >>confdefs.h <<_ACEOF
9682#define HAVE_LIBDLD 1
9683_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009684
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009685 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009686
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009687fi
9688 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009689
9690# only check for sem_ini if thread support is requested
9691if test "$with_threads" = "yes" -o -z "$with_threads"; then
9692 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009693echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9694if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009696else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009697 ac_func_search_save_LIBS=$LIBS
9698ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009699cat >conftest.$ac_ext <<_ACEOF
9700#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009701/* confdefs.h. */
9702_ACEOF
9703cat confdefs.h >>conftest.$ac_ext
9704cat >>conftest.$ac_ext <<_ACEOF
9705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009706
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009707/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009708#ifdef __cplusplus
9709extern "C"
9710#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009711/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 builtin and then its argument prototype would still apply. */
9713char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009714int
9715main ()
9716{
9717sem_init ();
9718 ;
9719 return 0;
9720}
9721_ACEOF
9722rm -f conftest.$ac_objext conftest$ac_exeext
9723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9724 (eval $ac_link) 2>&5
9725 ac_status=$?
9726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9727 (exit $ac_status); } &&
9728 { ac_try='test -s conftest$ac_exeext'
9729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9730 (eval $ac_try) 2>&5
9731 ac_status=$?
9732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009734 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009735else
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009737sed 's/^/| /' conftest.$ac_ext >&5
9738
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009739fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009740rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009741if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009742 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009743 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9744 cat >conftest.$ac_ext <<_ACEOF
9745#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009746/* confdefs.h. */
9747_ACEOF
9748cat confdefs.h >>conftest.$ac_ext
9749cat >>conftest.$ac_ext <<_ACEOF
9750/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009751
9752/* Override any gcc2 internal prototype to avoid an error. */
9753#ifdef __cplusplus
9754extern "C"
9755#endif
9756/* We use char because int might match the return type of a gcc2
9757 builtin and then its argument prototype would still apply. */
9758char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009759int
9760main ()
9761{
9762sem_init ();
9763 ;
9764 return 0;
9765}
Martin v. Löwis11437992002-04-12 09:54:03 +00009766_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009767rm -f conftest.$ac_objext conftest$ac_exeext
9768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9769 (eval $ac_link) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
9773 { ac_try='test -s conftest$ac_exeext'
9774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
9779 ac_cv_search_sem_init="-l$ac_lib"
9780break
9781else
9782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009783sed 's/^/| /' conftest.$ac_ext >&5
9784
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009785fi
9786rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9787 done
9788fi
9789LIBS=$ac_func_search_save_LIBS
9790fi
9791echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9792echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9793if test "$ac_cv_search_sem_init" != no; then
9794 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009795
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009796fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009797 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009798 # posix4 on Solaris 2.6
9799 # pthread (first!) on Linux
9800fi
9801
Martin v. Löwis19d17342003-06-14 21:03:05 +00009802# check if we need libintl for locale functions
9803echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9804echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9805if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9806 echo $ECHO_N "(cached) $ECHO_C" >&6
9807else
9808 ac_check_lib_save_LIBS=$LIBS
9809LIBS="-lintl $LIBS"
9810cat >conftest.$ac_ext <<_ACEOF
9811#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009812/* confdefs.h. */
9813_ACEOF
9814cat confdefs.h >>conftest.$ac_ext
9815cat >>conftest.$ac_ext <<_ACEOF
9816/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009817
9818/* Override any gcc2 internal prototype to avoid an error. */
9819#ifdef __cplusplus
9820extern "C"
9821#endif
9822/* We use char because int might match the return type of a gcc2
9823 builtin and then its argument prototype would still apply. */
9824char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009825int
9826main ()
9827{
9828textdomain ();
9829 ;
9830 return 0;
9831}
9832_ACEOF
9833rm -f conftest.$ac_objext conftest$ac_exeext
9834if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9835 (eval $ac_link) 2>&5
9836 ac_status=$?
9837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9838 (exit $ac_status); } &&
9839 { ac_try='test -s conftest$ac_exeext'
9840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9841 (eval $ac_try) 2>&5
9842 ac_status=$?
9843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9844 (exit $ac_status); }; }; then
9845 ac_cv_lib_intl_textdomain=yes
9846else
9847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009848sed 's/^/| /' conftest.$ac_ext >&5
9849
Martin v. Löwis19d17342003-06-14 21:03:05 +00009850ac_cv_lib_intl_textdomain=no
9851fi
9852rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9853LIBS=$ac_check_lib_save_LIBS
9854fi
9855echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9856echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9857if test $ac_cv_lib_intl_textdomain = yes; then
9858
9859cat >>confdefs.h <<\_ACEOF
9860#define WITH_LIBINTL 1
9861_ACEOF
9862
9863fi
9864
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009865
9866# checks for system dependent C++ extensions support
9867case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9869echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9870 cat >conftest.$ac_ext <<_ACEOF
9871#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009872/* confdefs.h. */
9873_ACEOF
9874cat confdefs.h >>conftest.$ac_ext
9875cat >>conftest.$ac_ext <<_ACEOF
9876/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009877#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009878int
9879main ()
9880{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009881loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ;
9883 return 0;
9884}
9885_ACEOF
9886rm -f conftest.$ac_objext conftest$ac_exeext
9887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9888 (eval $ac_link) 2>&5
9889 ac_status=$?
9890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9891 (exit $ac_status); } &&
9892 { ac_try='test -s conftest$ac_exeext'
9893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9894 (eval $ac_try) 2>&5
9895 ac_status=$?
9896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9897 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009898
Martin v. Löwis11437992002-04-12 09:54:03 +00009899cat >>confdefs.h <<\_ACEOF
9900#define AIX_GENUINE_CPLUSPLUS 1
9901_ACEOF
9902
9903 echo "$as_me:$LINENO: result: yes" >&5
9904echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009905else
Martin v. Löwis11437992002-04-12 09:54:03 +00009906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009907sed 's/^/| /' conftest.$ac_ext >&5
9908
Martin v. Löwis11437992002-04-12 09:54:03 +00009909echo "$as_me:$LINENO: result: no" >&5
9910echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009911fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009912rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009913 *) ;;
9914esac
9915
Guido van Rossum70c7f481998-03-26 18:44:10 +00009916# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009917# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +00009918echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9919echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9920if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009922else
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009924LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009925cat >conftest.$ac_ext <<_ACEOF
9926#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* confdefs.h. */
9928_ACEOF
9929cat confdefs.h >>conftest.$ac_ext
9930cat >>conftest.$ac_ext <<_ACEOF
9931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009933/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009934#ifdef __cplusplus
9935extern "C"
9936#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009937/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009938 builtin and then its argument prototype would still apply. */
9939char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009940int
9941main ()
9942{
9943t_open ();
9944 ;
9945 return 0;
9946}
9947_ACEOF
9948rm -f conftest.$ac_objext conftest$ac_exeext
9949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9950 (eval $ac_link) 2>&5
9951 ac_status=$?
9952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9953 (exit $ac_status); } &&
9954 { ac_try='test -s conftest$ac_exeext'
9955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9956 (eval $ac_try) 2>&5
9957 ac_status=$?
9958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9959 (exit $ac_status); }; }; then
9960 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009961else
Martin v. Löwis11437992002-04-12 09:54:03 +00009962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009963sed 's/^/| /' conftest.$ac_ext >&5
9964
Martin v. Löwis11437992002-04-12 09:54:03 +00009965ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009966fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009967rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9968LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009969fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009970echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9971echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9972if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009973 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009974fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009975 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009976echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9977echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9978if test "${ac_cv_lib_socket_socket+set}" = set; then
9979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009980else
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009982LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009983cat >conftest.$ac_ext <<_ACEOF
9984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009985/* confdefs.h. */
9986_ACEOF
9987cat confdefs.h >>conftest.$ac_ext
9988cat >>conftest.$ac_ext <<_ACEOF
9989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009992#ifdef __cplusplus
9993extern "C"
9994#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 builtin and then its argument prototype would still apply. */
9997char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009998int
9999main ()
10000{
10001socket ();
10002 ;
10003 return 0;
10004}
10005_ACEOF
10006rm -f conftest.$ac_objext conftest$ac_exeext
10007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10008 (eval $ac_link) 2>&5
10009 ac_status=$?
10010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011 (exit $ac_status); } &&
10012 { ac_try='test -s conftest$ac_exeext'
10013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10014 (eval $ac_try) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); }; }; then
10018 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010019else
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010021sed 's/^/| /' conftest.$ac_ext >&5
10022
Martin v. Löwis11437992002-04-12 09:54:03 +000010023ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010025rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10026LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010027fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010028echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10029echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10030if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010031 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010032fi
10033 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010034
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010035case "$ac_sys_system" in
10036BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010037echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10038echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10039if test "${ac_cv_lib_net_socket+set}" = set; then
10040 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010041else
Martin v. Löwis11437992002-04-12 09:54:03 +000010042 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010043LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010044cat >conftest.$ac_ext <<_ACEOF
10045#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* confdefs.h. */
10047_ACEOF
10048cat confdefs.h >>conftest.$ac_ext
10049cat >>conftest.$ac_ext <<_ACEOF
10050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010051
Guido van Rossumad678af1998-10-02 14:42:15 +000010052/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010053#ifdef __cplusplus
10054extern "C"
10055#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010056/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 builtin and then its argument prototype would still apply. */
10058char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010059int
10060main ()
10061{
10062socket ();
10063 ;
10064 return 0;
10065}
10066_ACEOF
10067rm -f conftest.$ac_objext conftest$ac_exeext
10068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10069 (eval $ac_link) 2>&5
10070 ac_status=$?
10071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10072 (exit $ac_status); } &&
10073 { ac_try='test -s conftest$ac_exeext'
10074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10075 (eval $ac_try) 2>&5
10076 ac_status=$?
10077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078 (exit $ac_status); }; }; then
10079 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010080else
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010082sed 's/^/| /' conftest.$ac_ext >&5
10083
Martin v. Löwis11437992002-04-12 09:54:03 +000010084ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010086rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10087LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010089echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10090echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10091if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010092 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010093fi
10094 # BeOS
10095;;
10096esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010097
Martin v. Löwis11437992002-04-12 09:54:03 +000010098echo "$as_me:$LINENO: checking for --with-libs" >&5
10099echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10100
Guido van Rossuma68acba1996-07-31 17:36:39 +000010101# Check whether --with-libs or --without-libs was given.
10102if test "${with_libs+set}" = set; then
10103 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010104
10105echo "$as_me:$LINENO: result: $withval" >&5
10106echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010107LIBS="$withval $LIBS"
10108
10109else
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 echo "$as_me:$LINENO: result: no" >&5
10111echo "${ECHO_T}no" >&6
10112fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010113
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010114# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010115
10116
Martin v. Löwis11437992002-04-12 09:54:03 +000010117echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10118echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10119
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010120# Check whether --with-signal-module or --without-signal-module was given.
10121if test "${with_signal_module+set}" = set; then
10122 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010123
Martin v. Löwis11437992002-04-12 09:54:03 +000010124fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010125
10126if test -z "$with_signal_module"
10127then with_signal_module="yes"
10128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010129echo "$as_me:$LINENO: result: $with_signal_module" >&5
10130echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010131
10132if test "${with_signal_module}" = "yes"; then
10133 USE_SIGNAL_MODULE=""
10134 SIGNAL_OBJS=""
10135else
10136 USE_SIGNAL_MODULE="#"
10137 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10138fi
10139
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010140# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010141
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010142USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010143
Martin v. Löwis11437992002-04-12 09:54:03 +000010144echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10145echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10146
Guido van Rossumec2f0731997-01-22 20:54:01 +000010147
10148# Check whether --with-dec-threads or --without-dec-threads was given.
10149if test "${with_dec_threads+set}" = set; then
10150 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010151
10152echo "$as_me:$LINENO: result: $withval" >&5
10153echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010154LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010155if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010156 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010157fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010158else
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 echo "$as_me:$LINENO: result: no" >&5
10160echo "${ECHO_T}no" >&6
10161fi;
10162
10163# Templates for things AC_DEFINEd more than once.
10164# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010165
10166
Martin v. Löwis11437992002-04-12 09:54:03 +000010167
10168
10169
10170
10171
10172echo "$as_me:$LINENO: checking for --with-threads" >&5
10173echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10174
Guido van Rossumec2f0731997-01-22 20:54:01 +000010175# Check whether --with-threads or --without-threads was given.
10176if test "${with_threads+set}" = set; then
10177 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010178
Martin v. Löwis11437992002-04-12 09:54:03 +000010179fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010180
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010181# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010182
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010183# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010184if test "${with_thread+set}" = set; then
10185 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010186 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010187fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010188
10189if test -z "$with_threads"
10190then with_threads="yes"
10191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010192echo "$as_me:$LINENO: result: $with_threads" >&5
10193echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010194
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010195
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010196if test "$with_threads" = "no"
10197then
10198 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199elif test "$ac_cv_pthread_is_default" = yes
10200then
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010202#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010203_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010204
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010205 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010207#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010208_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010209
10210 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010211 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010212elif test "$ac_cv_kpthread" = "yes"
10213then
10214 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010215 if test "$ac_cv_cxx_thread" = "yes"; then
10216 CXX="$CXX -Kpthread"
10217 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010219#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010220_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010221
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010222 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010223 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010224elif test "$ac_cv_kthread" = "yes"
10225then
10226 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010227 if test "$ac_cv_cxx_thread" = "yes"; then
10228 CXX="$CXX -Kthread"
10229 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010230 cat >>confdefs.h <<\_ACEOF
10231#define WITH_THREAD 1
10232_ACEOF
10233
10234 posix_threads=yes
10235 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010236elif test "$ac_cv_pthread" = "yes"
10237then
10238 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010239 if test "$ac_cv_cxx_thread" = "yes"; then
10240 CXX="$CXX -pthread"
10241 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010242 cat >>confdefs.h <<\_ACEOF
10243#define WITH_THREAD 1
10244_ACEOF
10245
10246 posix_threads=yes
10247 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010248else
10249 if test ! -z "$with_threads" -a -d "$with_threads"
10250 then LDFLAGS="$LDFLAGS -L$with_threads"
10251 fi
10252 if test ! -z "$withval" -a -d "$withval"
10253 then LDFLAGS="$LDFLAGS -L$withval"
10254 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010255
10256 # According to the POSIX spec, a pthreads implementation must
10257 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10259echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10260 cat >conftest.$ac_ext <<_ACEOF
10261#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010262/* confdefs.h. */
10263_ACEOF
10264cat confdefs.h >>conftest.$ac_ext
10265cat >>conftest.$ac_ext <<_ACEOF
10266/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010267
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010268#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010269#ifdef _POSIX_THREADS
10270yes
10271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010272
10273_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010275 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010276 unistd_defines_pthreads=yes
10277else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010278 unistd_defines_pthreads=no
10279fi
10280rm -f conftest*
10281
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10283echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284
Martin v. Löwis11437992002-04-12 09:54:03 +000010285 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010286#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010287_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010288
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 if test "${ac_cv_header_cthreads_h+set}" = set; then
10290 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10291echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10292if test "${ac_cv_header_cthreads_h+set}" = set; then
10293 echo $ECHO_N "(cached) $ECHO_C" >&6
10294fi
10295echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10296echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010297else
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 # Is the header compilable?
10299echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10300echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10301cat >conftest.$ac_ext <<_ACEOF
10302#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* confdefs.h. */
10304_ACEOF
10305cat confdefs.h >>conftest.$ac_ext
10306cat >>conftest.$ac_ext <<_ACEOF
10307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010308$ac_includes_default
10309#include <cthreads.h>
10310_ACEOF
10311rm -f conftest.$ac_objext
10312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10313 (eval $ac_compile) 2>&5
10314 ac_status=$?
10315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10316 (exit $ac_status); } &&
10317 { ac_try='test -s conftest.$ac_objext'
10318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10319 (eval $ac_try) 2>&5
10320 ac_status=$?
10321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322 (exit $ac_status); }; }; then
10323 ac_header_compiler=yes
10324else
10325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010326sed 's/^/| /' conftest.$ac_ext >&5
10327
Martin v. Löwis11437992002-04-12 09:54:03 +000010328ac_header_compiler=no
10329fi
10330rm -f conftest.$ac_objext conftest.$ac_ext
10331echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10332echo "${ECHO_T}$ac_header_compiler" >&6
10333
10334# Is the header present?
10335echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10336echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10337cat >conftest.$ac_ext <<_ACEOF
10338#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010339/* confdefs.h. */
10340_ACEOF
10341cat confdefs.h >>conftest.$ac_ext
10342cat >>conftest.$ac_ext <<_ACEOF
10343/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010344#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010345_ACEOF
10346if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10347 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10348 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010349 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 rm -f conftest.er1
10351 cat conftest.err >&5
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); } >/dev/null; then
10354 if test -s conftest.err; then
10355 ac_cpp_err=$ac_c_preproc_warn_flag
10356 else
10357 ac_cpp_err=
10358 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010359else
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 ac_cpp_err=yes
10361fi
10362if test -z "$ac_cpp_err"; then
10363 ac_header_preproc=yes
10364else
10365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010366sed 's/^/| /' conftest.$ac_ext >&5
10367
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010370rm -f conftest.err conftest.$ac_ext
10371echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10372echo "${ECHO_T}$ac_header_preproc" >&6
10373
10374# So? What about this header?
10375case $ac_header_compiler:$ac_header_preproc in
10376 yes:no )
10377 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10378echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10379 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010380echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10381 (
10382 cat <<\_ASBOX
10383## ------------------------------------ ##
10384## Report this to bug-autoconf@gnu.org. ##
10385## ------------------------------------ ##
10386_ASBOX
10387 ) |
10388 sed "s/^/$as_me: WARNING: /" >&2
10389 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 no:yes )
10391 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10392echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10393 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10394echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10395 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010396echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10397 (
10398 cat <<\_ASBOX
10399## ------------------------------------ ##
10400## Report this to bug-autoconf@gnu.org. ##
10401## ------------------------------------ ##
10402_ASBOX
10403 ) |
10404 sed "s/^/$as_me: WARNING: /" >&2
10405 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010406esac
10407echo "$as_me:$LINENO: checking for cthreads.h" >&5
10408echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10409if test "${ac_cv_header_cthreads_h+set}" = set; then
10410 echo $ECHO_N "(cached) $ECHO_C" >&6
10411else
10412 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010413fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010414echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10415echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10416
10417fi
10418if test $ac_cv_header_cthreads_h = yes; then
10419 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010420#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010421_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010422
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010424#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010425_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010426
Martin v. Löwis11437992002-04-12 09:54:03 +000010427
10428cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010429#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010430_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010431
10432 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010433 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010434else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010435
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10437 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10438echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10439if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10440 echo $ECHO_N "(cached) $ECHO_C" >&6
10441fi
10442echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10443echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010444else
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 # Is the header compilable?
10446echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10447echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10448cat >conftest.$ac_ext <<_ACEOF
10449#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* confdefs.h. */
10451_ACEOF
10452cat confdefs.h >>conftest.$ac_ext
10453cat >>conftest.$ac_ext <<_ACEOF
10454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010455$ac_includes_default
10456#include <mach/cthreads.h>
10457_ACEOF
10458rm -f conftest.$ac_objext
10459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10460 (eval $ac_compile) 2>&5
10461 ac_status=$?
10462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10463 (exit $ac_status); } &&
10464 { ac_try='test -s conftest.$ac_objext'
10465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10466 (eval $ac_try) 2>&5
10467 ac_status=$?
10468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10469 (exit $ac_status); }; }; then
10470 ac_header_compiler=yes
10471else
10472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010473sed 's/^/| /' conftest.$ac_ext >&5
10474
Martin v. Löwis11437992002-04-12 09:54:03 +000010475ac_header_compiler=no
10476fi
10477rm -f conftest.$ac_objext conftest.$ac_ext
10478echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10479echo "${ECHO_T}$ac_header_compiler" >&6
10480
10481# Is the header present?
10482echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10483echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10484cat >conftest.$ac_ext <<_ACEOF
10485#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010486/* confdefs.h. */
10487_ACEOF
10488cat confdefs.h >>conftest.$ac_ext
10489cat >>conftest.$ac_ext <<_ACEOF
10490/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010491#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010492_ACEOF
10493if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10494 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10495 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010496 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010497 rm -f conftest.er1
10498 cat conftest.err >&5
10499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10500 (exit $ac_status); } >/dev/null; then
10501 if test -s conftest.err; then
10502 ac_cpp_err=$ac_c_preproc_warn_flag
10503 else
10504 ac_cpp_err=
10505 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010506else
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 ac_cpp_err=yes
10508fi
10509if test -z "$ac_cpp_err"; then
10510 ac_header_preproc=yes
10511else
10512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010513sed 's/^/| /' conftest.$ac_ext >&5
10514
Martin v. Löwis11437992002-04-12 09:54:03 +000010515 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010516fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010517rm -f conftest.err conftest.$ac_ext
10518echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10519echo "${ECHO_T}$ac_header_preproc" >&6
10520
10521# So? What about this header?
10522case $ac_header_compiler:$ac_header_preproc in
10523 yes:no )
10524 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10525echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10526 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010527echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10528 (
10529 cat <<\_ASBOX
10530## ------------------------------------ ##
10531## Report this to bug-autoconf@gnu.org. ##
10532## ------------------------------------ ##
10533_ASBOX
10534 ) |
10535 sed "s/^/$as_me: WARNING: /" >&2
10536 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010537 no:yes )
10538 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10539echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10540 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10541echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10542 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010543echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10544 (
10545 cat <<\_ASBOX
10546## ------------------------------------ ##
10547## Report this to bug-autoconf@gnu.org. ##
10548## ------------------------------------ ##
10549_ASBOX
10550 ) |
10551 sed "s/^/$as_me: WARNING: /" >&2
10552 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010553esac
10554echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10555echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10556if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10557 echo $ECHO_N "(cached) $ECHO_C" >&6
10558else
10559 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010561echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10562echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10563
10564fi
10565if test $ac_cv_header_mach_cthreads_h = yes; then
10566 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010567#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010568_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010569
Martin v. Löwis11437992002-04-12 09:54:03 +000010570 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010571#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010572_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010573
Martin v. Löwis11437992002-04-12 09:54:03 +000010574
10575cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010576#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010577_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010578
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010579 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010580else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010581
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 echo "$as_me:$LINENO: checking for --with-pth" >&5
10583echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10584
10585# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010586if test "${with_pth+set}" = set; then
10587 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010588 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010589echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010590 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010591#define WITH_THREAD 1
10592_ACEOF
10593
10594
10595cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010596#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010597_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010598
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010599 LIBS="-lpth $LIBS"
10600 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010601else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010602 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010603echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010604
10605 # Just looking for pthread_create in libpthread is not enough:
10606 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10607 # So we really have to include pthread.h, and then link.
10608 _libs=$LIBS
10609 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10611echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10612 cat >conftest.$ac_ext <<_ACEOF
10613#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* confdefs.h. */
10615_ACEOF
10616cat confdefs.h >>conftest.$ac_ext
10617cat >>conftest.$ac_ext <<_ACEOF
10618/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010619#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010620
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010621void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010622int
10623main ()
10624{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010625
10626pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010627 ;
10628 return 0;
10629}
10630_ACEOF
10631rm -f conftest.$ac_objext conftest$ac_exeext
10632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10633 (eval $ac_link) 2>&5
10634 ac_status=$?
10635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10636 (exit $ac_status); } &&
10637 { ac_try='test -s conftest$ac_exeext'
10638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10639 (eval $ac_try) 2>&5
10640 ac_status=$?
10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); }; }; then
10643
10644 echo "$as_me:$LINENO: result: yes" >&5
10645echo "${ECHO_T}yes" >&6
10646 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010647#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010648_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010649
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010650 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010651 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010652else
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010654sed 's/^/| /' conftest.$ac_ext >&5
10655
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010657 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10659echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10660if test "${ac_cv_func_pthread_detach+set}" = set; then
10661 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010662else
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 cat >conftest.$ac_ext <<_ACEOF
10664#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* confdefs.h. */
10666_ACEOF
10667cat confdefs.h >>conftest.$ac_ext
10668cat >>conftest.$ac_ext <<_ACEOF
10669/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010670/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010671 which can conflict with char pthread_detach (); below.
10672 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010673 <limits.h> exists even on freestanding compilers. Under hpux,
10674 including <limits.h> includes <sys/time.h> and causes problems
10675 checking for functions defined therein. */
10676#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010677# include <limits.h>
10678#else
10679# include <assert.h>
10680#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010681/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010682#ifdef __cplusplus
10683extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010684{
Martin v. Löwis11437992002-04-12 09:54:03 +000010685#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010686/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 builtin and then its argument prototype would still apply. */
10688char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010689/* The GNU C library defines this for functions which it implements
10690 to always fail with ENOSYS. Some functions are actually named
10691 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010692#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010693choke me
10694#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010695char (*f) () = pthread_detach;
10696#endif
10697#ifdef __cplusplus
10698}
Guido van Rossumad678af1998-10-02 14:42:15 +000010699#endif
10700
Skip Montanaro6dead952003-09-25 14:50:04 +000010701int
10702main ()
10703{
10704return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ;
10706 return 0;
10707}
10708_ACEOF
10709rm -f conftest.$ac_objext conftest$ac_exeext
10710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10711 (eval $ac_link) 2>&5
10712 ac_status=$?
10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714 (exit $ac_status); } &&
10715 { ac_try='test -s conftest$ac_exeext'
10716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10717 (eval $ac_try) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); }; }; then
10721 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010722else
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010724sed 's/^/| /' conftest.$ac_ext >&5
10725
Martin v. Löwis11437992002-04-12 09:54:03 +000010726ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010727fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010728rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010729fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010730echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10731echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10732if test $ac_cv_func_pthread_detach = yes; then
10733 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010734#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010735_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010736
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010737 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010738 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010739else
Guido van Rossumad678af1998-10-02 14:42:15 +000010740
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010741 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10742 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10743echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10744if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10745 echo $ECHO_N "(cached) $ECHO_C" >&6
10746fi
10747echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10748echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10749else
10750 # Is the header compilable?
10751echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10752echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10753cat >conftest.$ac_ext <<_ACEOF
10754#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010755/* confdefs.h. */
10756_ACEOF
10757cat confdefs.h >>conftest.$ac_ext
10758cat >>conftest.$ac_ext <<_ACEOF
10759/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010760$ac_includes_default
10761#include <atheos/threads.h>
10762_ACEOF
10763rm -f conftest.$ac_objext
10764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10765 (eval $ac_compile) 2>&5
10766 ac_status=$?
10767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10768 (exit $ac_status); } &&
10769 { ac_try='test -s conftest.$ac_objext'
10770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10771 (eval $ac_try) 2>&5
10772 ac_status=$?
10773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10774 (exit $ac_status); }; }; then
10775 ac_header_compiler=yes
10776else
10777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010778sed 's/^/| /' conftest.$ac_ext >&5
10779
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010780ac_header_compiler=no
10781fi
10782rm -f conftest.$ac_objext conftest.$ac_ext
10783echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10784echo "${ECHO_T}$ac_header_compiler" >&6
10785
10786# Is the header present?
10787echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10788echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10789cat >conftest.$ac_ext <<_ACEOF
10790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010791/* confdefs.h. */
10792_ACEOF
10793cat confdefs.h >>conftest.$ac_ext
10794cat >>conftest.$ac_ext <<_ACEOF
10795/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010796#include <atheos/threads.h>
10797_ACEOF
10798if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10799 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10800 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010801 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010802 rm -f conftest.er1
10803 cat conftest.err >&5
10804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10805 (exit $ac_status); } >/dev/null; then
10806 if test -s conftest.err; then
10807 ac_cpp_err=$ac_c_preproc_warn_flag
10808 else
10809 ac_cpp_err=
10810 fi
10811else
10812 ac_cpp_err=yes
10813fi
10814if test -z "$ac_cpp_err"; then
10815 ac_header_preproc=yes
10816else
10817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010818sed 's/^/| /' conftest.$ac_ext >&5
10819
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010820 ac_header_preproc=no
10821fi
10822rm -f conftest.err conftest.$ac_ext
10823echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10824echo "${ECHO_T}$ac_header_preproc" >&6
10825
10826# So? What about this header?
10827case $ac_header_compiler:$ac_header_preproc in
10828 yes:no )
10829 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10830echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10831 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010832echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10833 (
10834 cat <<\_ASBOX
10835## ------------------------------------ ##
10836## Report this to bug-autoconf@gnu.org. ##
10837## ------------------------------------ ##
10838_ASBOX
10839 ) |
10840 sed "s/^/$as_me: WARNING: /" >&2
10841 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010842 no:yes )
10843 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10844echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10845 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10846echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10847 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010848echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10849 (
10850 cat <<\_ASBOX
10851## ------------------------------------ ##
10852## Report this to bug-autoconf@gnu.org. ##
10853## ------------------------------------ ##
10854_ASBOX
10855 ) |
10856 sed "s/^/$as_me: WARNING: /" >&2
10857 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010858esac
10859echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10860echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10861if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10862 echo $ECHO_N "(cached) $ECHO_C" >&6
10863else
10864 ac_cv_header_atheos_threads_h=$ac_header_preproc
10865fi
10866echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10867echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10868
10869fi
10870if test $ac_cv_header_atheos_threads_h = yes; then
10871 cat >>confdefs.h <<\_ACEOF
10872#define WITH_THREAD 1
10873_ACEOF
10874
10875
10876cat >>confdefs.h <<\_ACEOF
10877#define ATHEOS_THREADS 1
10878_ACEOF
10879
10880 THREADOBJ="Python/thread.o"
10881else
10882
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10884 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10885echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10886if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10887 echo $ECHO_N "(cached) $ECHO_C" >&6
10888fi
10889echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10890echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010891else
Martin v. Löwis11437992002-04-12 09:54:03 +000010892 # Is the header compilable?
10893echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10894echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10895cat >conftest.$ac_ext <<_ACEOF
10896#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010897/* confdefs.h. */
10898_ACEOF
10899cat confdefs.h >>conftest.$ac_ext
10900cat >>conftest.$ac_ext <<_ACEOF
10901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010902$ac_includes_default
10903#include <kernel/OS.h>
10904_ACEOF
10905rm -f conftest.$ac_objext
10906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10907 (eval $ac_compile) 2>&5
10908 ac_status=$?
10909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10910 (exit $ac_status); } &&
10911 { ac_try='test -s conftest.$ac_objext'
10912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10913 (eval $ac_try) 2>&5
10914 ac_status=$?
10915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10916 (exit $ac_status); }; }; then
10917 ac_header_compiler=yes
10918else
10919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010920sed 's/^/| /' conftest.$ac_ext >&5
10921
Martin v. Löwis11437992002-04-12 09:54:03 +000010922ac_header_compiler=no
10923fi
10924rm -f conftest.$ac_objext conftest.$ac_ext
10925echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10926echo "${ECHO_T}$ac_header_compiler" >&6
10927
10928# Is the header present?
10929echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10930echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10931cat >conftest.$ac_ext <<_ACEOF
10932#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010933/* confdefs.h. */
10934_ACEOF
10935cat confdefs.h >>conftest.$ac_ext
10936cat >>conftest.$ac_ext <<_ACEOF
10937/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010938#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010939_ACEOF
10940if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10941 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10942 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010943 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 rm -f conftest.er1
10945 cat conftest.err >&5
10946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10947 (exit $ac_status); } >/dev/null; then
10948 if test -s conftest.err; then
10949 ac_cpp_err=$ac_c_preproc_warn_flag
10950 else
10951 ac_cpp_err=
10952 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010953else
Martin v. Löwis11437992002-04-12 09:54:03 +000010954 ac_cpp_err=yes
10955fi
10956if test -z "$ac_cpp_err"; then
10957 ac_header_preproc=yes
10958else
10959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010960sed 's/^/| /' conftest.$ac_ext >&5
10961
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010964rm -f conftest.err conftest.$ac_ext
10965echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10966echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010967
Martin v. Löwis11437992002-04-12 09:54:03 +000010968# So? What about this header?
10969case $ac_header_compiler:$ac_header_preproc in
10970 yes:no )
10971 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10972echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10973 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010974echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10975 (
10976 cat <<\_ASBOX
10977## ------------------------------------ ##
10978## Report this to bug-autoconf@gnu.org. ##
10979## ------------------------------------ ##
10980_ASBOX
10981 ) |
10982 sed "s/^/$as_me: WARNING: /" >&2
10983 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010984 no:yes )
10985 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10986echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10987 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10988echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10989 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010990echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10991 (
10992 cat <<\_ASBOX
10993## ------------------------------------ ##
10994## Report this to bug-autoconf@gnu.org. ##
10995## ------------------------------------ ##
10996_ASBOX
10997 ) |
10998 sed "s/^/$as_me: WARNING: /" >&2
10999 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011000esac
11001echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11002echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11003if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11004 echo $ECHO_N "(cached) $ECHO_C" >&6
11005else
11006 ac_cv_header_kernel_OS_h=$ac_header_preproc
11007fi
11008echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11009echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11010
11011fi
11012if test $ac_cv_header_kernel_OS_h = yes; then
11013 cat >>confdefs.h <<\_ACEOF
11014#define WITH_THREAD 1
11015_ACEOF
11016
11017
11018cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011019#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011020_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011021
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011022 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011023else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011024
Martin v. Löwis11437992002-04-12 09:54:03 +000011025 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11026echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11027if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011029else
Martin v. Löwis11437992002-04-12 09:54:03 +000011030 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011031LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011032cat >conftest.$ac_ext <<_ACEOF
11033#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011034/* confdefs.h. */
11035_ACEOF
11036cat confdefs.h >>conftest.$ac_ext
11037cat >>conftest.$ac_ext <<_ACEOF
11038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011039
Greg Steinadf63d62000-07-05 10:38:09 +000011040/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011041#ifdef __cplusplus
11042extern "C"
11043#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011044/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011045 builtin and then its argument prototype would still apply. */
11046char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011047int
11048main ()
11049{
11050pthread_create ();
11051 ;
11052 return 0;
11053}
11054_ACEOF
11055rm -f conftest.$ac_objext conftest$ac_exeext
11056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11057 (eval $ac_link) 2>&5
11058 ac_status=$?
11059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11060 (exit $ac_status); } &&
11061 { ac_try='test -s conftest$ac_exeext'
11062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11063 (eval $ac_try) 2>&5
11064 ac_status=$?
11065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11066 (exit $ac_status); }; }; then
11067 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011068else
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011070sed 's/^/| /' conftest.$ac_ext >&5
11071
Martin v. Löwis11437992002-04-12 09:54:03 +000011072ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011074rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11075LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011076fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011077echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11078echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11079if test $ac_cv_lib_pthreads_pthread_create = yes; then
11080 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011081#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011082_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011083
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011084 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011085 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011086 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011087else
Greg Steinadf63d62000-07-05 10:38:09 +000011088
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11090echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11091if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11092 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011093else
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011095LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011096cat >conftest.$ac_ext <<_ACEOF
11097#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011098/* confdefs.h. */
11099_ACEOF
11100cat confdefs.h >>conftest.$ac_ext
11101cat >>conftest.$ac_ext <<_ACEOF
11102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011103
Guido van Rossum49545951997-12-02 19:28:29 +000011104/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011105#ifdef __cplusplus
11106extern "C"
11107#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011108/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 builtin and then its argument prototype would still apply. */
11110char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011111int
11112main ()
11113{
11114pthread_create ();
11115 ;
11116 return 0;
11117}
11118_ACEOF
11119rm -f conftest.$ac_objext conftest$ac_exeext
11120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11121 (eval $ac_link) 2>&5
11122 ac_status=$?
11123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11124 (exit $ac_status); } &&
11125 { ac_try='test -s conftest$ac_exeext'
11126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11127 (eval $ac_try) 2>&5
11128 ac_status=$?
11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130 (exit $ac_status); }; }; then
11131 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011132else
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011134sed 's/^/| /' conftest.$ac_ext >&5
11135
Martin v. Löwis11437992002-04-12 09:54:03 +000011136ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011138rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11139LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011141echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11142echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11143if test $ac_cv_lib_c_r_pthread_create = yes; then
11144 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011145#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011146_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011147
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011148 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011149 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011150 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011151else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011152
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11154echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11155if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11156 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011157else
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011159LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011160cat >conftest.$ac_ext <<_ACEOF
11161#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011162/* confdefs.h. */
11163_ACEOF
11164cat confdefs.h >>conftest.$ac_ext
11165cat >>conftest.$ac_ext <<_ACEOF
11166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011168/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011169#ifdef __cplusplus
11170extern "C"
11171#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011172/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 builtin and then its argument prototype would still apply. */
11174char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011175int
11176main ()
11177{
11178__pthread_create_system ();
11179 ;
11180 return 0;
11181}
11182_ACEOF
11183rm -f conftest.$ac_objext conftest$ac_exeext
11184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11185 (eval $ac_link) 2>&5
11186 ac_status=$?
11187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188 (exit $ac_status); } &&
11189 { ac_try='test -s conftest$ac_exeext'
11190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11191 (eval $ac_try) 2>&5
11192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); }; }; then
11195 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011196else
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011198sed 's/^/| /' conftest.$ac_ext >&5
11199
Martin v. Löwis11437992002-04-12 09:54:03 +000011200ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011202rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11203LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011205echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11206echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11207if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11208 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011209#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011210_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011211
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011212 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011213 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011214 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011215else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011216
Martin v. Löwis11437992002-04-12 09:54:03 +000011217 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11218echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11219if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11220 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011221else
Martin v. Löwis11437992002-04-12 09:54:03 +000011222 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011223LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011224cat >conftest.$ac_ext <<_ACEOF
11225#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011226/* confdefs.h. */
11227_ACEOF
11228cat confdefs.h >>conftest.$ac_ext
11229cat >>conftest.$ac_ext <<_ACEOF
11230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
Guido van Rossumb93a8621998-05-07 13:27:32 +000011232/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011233#ifdef __cplusplus
11234extern "C"
11235#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011236/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 builtin and then its argument prototype would still apply. */
11238char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011239int
11240main ()
11241{
11242pthread_create ();
11243 ;
11244 return 0;
11245}
11246_ACEOF
11247rm -f conftest.$ac_objext conftest$ac_exeext
11248if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11249 (eval $ac_link) 2>&5
11250 ac_status=$?
11251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11252 (exit $ac_status); } &&
11253 { ac_try='test -s conftest$ac_exeext'
11254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11255 (eval $ac_try) 2>&5
11256 ac_status=$?
11257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258 (exit $ac_status); }; }; then
11259 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011260else
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011262sed 's/^/| /' conftest.$ac_ext >&5
11263
Martin v. Löwis11437992002-04-12 09:54:03 +000011264ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011266rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11267LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011269echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11270echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11271if test $ac_cv_lib_cma_pthread_create = yes; then
11272 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011273#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011274_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011275
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011276 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011277 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011278 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011279else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011280
Martin v. Löwis130fb172001-07-19 11:00:41 +000011281 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011282fi
11283
Guido van Rossum627b2d71993-12-24 10:39:16 +000011284
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011285fi
11286
Guido van Rossum0be3e491997-05-22 20:33:33 +000011287fi
11288
Guido van Rossum49545951997-12-02 19:28:29 +000011289fi
11290
Guido van Rossumb93a8621998-05-07 13:27:32 +000011291fi
11292
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011293
Michael W. Hudson54241132001-12-07 15:38:26 +000011294fi
11295
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011296
11297fi
11298
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011300rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11301fi;
11302fi
11303
11304
11305fi
11306
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011307
Michael W. Hudson54241132001-12-07 15:38:26 +000011308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11310echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11311if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011313else
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011315LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011316cat >conftest.$ac_ext <<_ACEOF
11317#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* confdefs.h. */
11319_ACEOF
11320cat confdefs.h >>conftest.$ac_ext
11321cat >>conftest.$ac_ext <<_ACEOF
11322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011324/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011325#ifdef __cplusplus
11326extern "C"
11327#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011328/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011329 builtin and then its argument prototype would still apply. */
11330char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011331int
11332main ()
11333{
11334usconfig ();
11335 ;
11336 return 0;
11337}
11338_ACEOF
11339rm -f conftest.$ac_objext conftest$ac_exeext
11340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11341 (eval $ac_link) 2>&5
11342 ac_status=$?
11343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11344 (exit $ac_status); } &&
11345 { ac_try='test -s conftest$ac_exeext'
11346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11347 (eval $ac_try) 2>&5
11348 ac_status=$?
11349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11350 (exit $ac_status); }; }; then
11351 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011352else
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011354sed 's/^/| /' conftest.$ac_ext >&5
11355
Martin v. Löwis11437992002-04-12 09:54:03 +000011356ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011358rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11359LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011361echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11362echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11363if test $ac_cv_lib_mpc_usconfig = yes; then
11364 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011365#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011366_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011367
Martin v. Löwis130fb172001-07-19 11:00:41 +000011368 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011369 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011370 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011371fi
11372
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011373
Neal Norwitza978ab02002-11-02 16:58:05 +000011374 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11376echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11377if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11378 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011379else
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011381LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011382cat >conftest.$ac_ext <<_ACEOF
11383#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* confdefs.h. */
11385_ACEOF
11386cat confdefs.h >>conftest.$ac_ext
11387cat >>conftest.$ac_ext <<_ACEOF
11388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011389
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011390/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011391#ifdef __cplusplus
11392extern "C"
11393#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011394/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 builtin and then its argument prototype would still apply. */
11396char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011397int
11398main ()
11399{
11400thr_create ();
11401 ;
11402 return 0;
11403}
11404_ACEOF
11405rm -f conftest.$ac_objext conftest$ac_exeext
11406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11407 (eval $ac_link) 2>&5
11408 ac_status=$?
11409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410 (exit $ac_status); } &&
11411 { ac_try='test -s conftest$ac_exeext'
11412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11413 (eval $ac_try) 2>&5
11414 ac_status=$?
11415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416 (exit $ac_status); }; }; then
11417 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011418else
Martin v. Löwis11437992002-04-12 09:54:03 +000011419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011420sed 's/^/| /' conftest.$ac_ext >&5
11421
Martin v. Löwis11437992002-04-12 09:54:03 +000011422ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011424rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11425LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011427echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11428echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11429if test $ac_cv_lib_thread_thr_create = yes; then
11430 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011432_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011433
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011434 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011435 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011436 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011437fi
11438
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011439 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011440
Martin v. Löwis130fb172001-07-19 11:00:41 +000011441 if test "$USE_THREAD_MODULE" != "#"
11442 then
11443 # If the above checks didn't disable threads, (at least) OSF1
11444 # needs this '-threads' argument during linking.
11445 case $ac_sys_system in
11446 OSF1) LDLAST=-threads;;
11447 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011448 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011449fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011450
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011451if test "$posix_threads" = "yes"; then
11452 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011453
11454cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011455#define _POSIX_THREADS 1
11456_ACEOF
11457
11458 fi
11459
11460 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11461 case $ac_sys_system/$ac_sys_release in
11462 SunOS/5.6)
11463cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011464#define HAVE_PTHREAD_DESTRUCTOR 1
11465_ACEOF
11466
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011467 ;;
11468 SunOS/5.8)
11469cat >>confdefs.h <<\_ACEOF
11470#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11471_ACEOF
11472
11473 ;;
11474 esac
11475
11476 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11477echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11478 if test "${ac_cv_pthread_system_supported+set}" = set; then
11479 echo $ECHO_N "(cached) $ECHO_C" >&6
11480else
11481 if test "$cross_compiling" = yes; then
11482 ac_cv_pthread_system_supported=no
11483else
11484 cat >conftest.$ac_ext <<_ACEOF
11485#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011486/* confdefs.h. */
11487_ACEOF
11488cat confdefs.h >>conftest.$ac_ext
11489cat >>conftest.$ac_ext <<_ACEOF
11490/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011491#include <pthread.h>
11492 void *foo(void *parm) {
11493 return NULL;
11494 }
11495 main() {
11496 pthread_attr_t attr;
11497 pthread_t id;
11498 if (pthread_attr_init(&attr)) exit(-1);
11499 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11500 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11501 exit(0);
11502 }
11503_ACEOF
11504rm -f conftest$ac_exeext
11505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11506 (eval $ac_link) 2>&5
11507 ac_status=$?
11508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11509 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11511 (eval $ac_try) 2>&5
11512 ac_status=$?
11513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11514 (exit $ac_status); }; }; then
11515 ac_cv_pthread_system_supported=yes
11516else
11517 echo "$as_me: program exited with status $ac_status" >&5
11518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011519sed 's/^/| /' conftest.$ac_ext >&5
11520
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011521( exit $ac_status )
11522ac_cv_pthread_system_supported=no
11523fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011524rm -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 +000011525fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011526
Guido van Rossum627b2d71993-12-24 10:39:16 +000011527fi
11528
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011529 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11530echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11531 if test "$ac_cv_pthread_system_supported" = "yes"; then
11532
11533cat >>confdefs.h <<\_ACEOF
11534#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11535_ACEOF
11536
11537 fi
11538
11539for ac_func in pthread_sigmask
11540do
11541as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11542echo "$as_me:$LINENO: checking for $ac_func" >&5
11543echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11544if eval "test \"\${$as_ac_var+set}\" = set"; then
11545 echo $ECHO_N "(cached) $ECHO_C" >&6
11546else
11547 cat >conftest.$ac_ext <<_ACEOF
11548#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011549/* confdefs.h. */
11550_ACEOF
11551cat confdefs.h >>conftest.$ac_ext
11552cat >>conftest.$ac_ext <<_ACEOF
11553/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011554/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011555 which can conflict with char $ac_func (); below.
11556 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011557 <limits.h> exists even on freestanding compilers. Under hpux,
11558 including <limits.h> includes <sys/time.h> and causes problems
11559 checking for functions defined therein. */
11560#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011561# include <limits.h>
11562#else
11563# include <assert.h>
11564#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011565/* Override any gcc2 internal prototype to avoid an error. */
11566#ifdef __cplusplus
11567extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011568{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011569#endif
11570/* We use char because int might match the return type of a gcc2
11571 builtin and then its argument prototype would still apply. */
11572char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011573/* The GNU C library defines this for functions which it implements
11574 to always fail with ENOSYS. Some functions are actually named
11575 something starting with __ and the normal name is an alias. */
11576#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11577choke me
11578#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011579char (*f) () = $ac_func;
11580#endif
11581#ifdef __cplusplus
11582}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011583#endif
11584
Skip Montanaro6dead952003-09-25 14:50:04 +000011585int
11586main ()
11587{
11588return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011589 ;
11590 return 0;
11591}
11592_ACEOF
11593rm -f conftest.$ac_objext conftest$ac_exeext
11594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11595 (eval $ac_link) 2>&5
11596 ac_status=$?
11597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598 (exit $ac_status); } &&
11599 { ac_try='test -s conftest$ac_exeext'
11600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11601 (eval $ac_try) 2>&5
11602 ac_status=$?
11603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604 (exit $ac_status); }; }; then
11605 eval "$as_ac_var=yes"
11606else
11607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011608sed 's/^/| /' conftest.$ac_ext >&5
11609
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011610eval "$as_ac_var=no"
11611fi
11612rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11613fi
11614echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11615echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11616if test `eval echo '${'$as_ac_var'}'` = yes; then
11617 cat >>confdefs.h <<_ACEOF
11618#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11619_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011620 case $ac_sys_system in
11621 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011622
Jason Tishlerfac083d2003-07-22 15:20:49 +000011623cat >>confdefs.h <<\_ACEOF
11624#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11625_ACEOF
11626
11627 ;;
11628 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011629fi
11630done
11631
11632fi
11633
11634
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011635# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011636
11637
11638echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11639echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011640# Check whether --enable-ipv6 or --disable-ipv6 was given.
11641if test "${enable_ipv6+set}" = set; then
11642 enableval="$enable_ipv6"
11643 case "$enableval" in
11644 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011645 echo "$as_me:$LINENO: result: no" >&5
11646echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011647 ipv6=no
11648 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 *) echo "$as_me:$LINENO: result: yes" >&5
11650echo "${ECHO_T}yes" >&6
11651 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011652#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011653_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011654
11655 ipv6=yes
11656 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011658else
Martin v. Löwis11437992002-04-12 09:54:03 +000011659
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011660 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011661 echo "$as_me:$LINENO: result: no" >&5
11662echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011663 ipv6=no
11664
11665else
Martin v. Löwis11437992002-04-12 09:54:03 +000011666 cat >conftest.$ac_ext <<_ACEOF
11667#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011668/* confdefs.h. */
11669_ACEOF
11670cat confdefs.h >>conftest.$ac_ext
11671cat >>conftest.$ac_ext <<_ACEOF
11672/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011673 /* AF_INET6 available check */
11674#include <sys/types.h>
11675#include <sys/socket.h>
11676main()
11677{
11678 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11679 exit(1);
11680 else
11681 exit(0);
11682}
11683
Martin v. Löwis11437992002-04-12 09:54:03 +000011684_ACEOF
11685rm -f conftest$ac_exeext
11686if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11687 (eval $ac_link) 2>&5
11688 ac_status=$?
11689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11690 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11692 (eval $ac_try) 2>&5
11693 ac_status=$?
11694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11695 (exit $ac_status); }; }; then
11696 echo "$as_me:$LINENO: result: yes" >&5
11697echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011698 ipv6=yes
11699else
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 echo "$as_me: program exited with status $ac_status" >&5
11701echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011702sed 's/^/| /' conftest.$ac_ext >&5
11703
Martin v. Löwis11437992002-04-12 09:54:03 +000011704( exit $ac_status )
11705echo "$as_me:$LINENO: result: no" >&5
11706echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011707 ipv6=no
11708fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011709rm -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 +000011710fi
11711
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011712if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011713 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11714echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11715 cat >conftest.$ac_ext <<_ACEOF
11716#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011717/* confdefs.h. */
11718_ACEOF
11719cat confdefs.h >>conftest.$ac_ext
11720cat >>conftest.$ac_ext <<_ACEOF
11721/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011722#include <sys/types.h>
11723#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011724int
11725main ()
11726{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011727struct sockaddr_in6 x;
11728x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 ;
11730 return 0;
11731}
11732_ACEOF
11733rm -f conftest.$ac_objext
11734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11735 (eval $ac_compile) 2>&5
11736 ac_status=$?
11737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11738 (exit $ac_status); } &&
11739 { ac_try='test -s conftest.$ac_objext'
11740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11741 (eval $ac_try) 2>&5
11742 ac_status=$?
11743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11744 (exit $ac_status); }; }; then
11745 echo "$as_me:$LINENO: result: yes" >&5
11746echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011747 ipv6=yes
11748else
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011750sed 's/^/| /' conftest.$ac_ext >&5
11751
Martin v. Löwis11437992002-04-12 09:54:03 +000011752echo "$as_me:$LINENO: result: no" >&5
11753echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011754 ipv6=no
11755fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011756rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011757fi
11758
11759if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011760 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011761#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011762_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011763
11764fi
11765
Martin v. Löwis11437992002-04-12 09:54:03 +000011766fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011767
11768ipv6type=unknown
11769ipv6lib=none
11770ipv6trylibc=no
11771
11772if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11774echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011775 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11776 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011777 case $i in
11778 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 cat >conftest.$ac_ext <<_ACEOF
11780#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011781/* confdefs.h. */
11782_ACEOF
11783cat confdefs.h >>conftest.$ac_ext
11784cat >>conftest.$ac_ext <<_ACEOF
11785/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011786
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011787#include <netinet/in.h>
11788#ifdef IPV6_INRIA_VERSION
11789yes
11790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011791_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011793 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011794 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011795fi
11796rm -f conftest*
11797
11798 ;;
11799 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011800 cat >conftest.$ac_ext <<_ACEOF
11801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* confdefs.h. */
11803_ACEOF
11804cat confdefs.h >>conftest.$ac_ext
11805cat >>conftest.$ac_ext <<_ACEOF
11806/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011807
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011808#include <netinet/in.h>
11809#ifdef __KAME__
11810yes
11811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011812_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011814 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011815 ipv6type=$i;
11816 ipv6lib=inet6
11817 ipv6libdir=/usr/local/v6/lib
11818 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011819fi
11820rm -f conftest*
11821
11822 ;;
11823 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011824 cat >conftest.$ac_ext <<_ACEOF
11825#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011826/* confdefs.h. */
11827_ACEOF
11828cat confdefs.h >>conftest.$ac_ext
11829cat >>conftest.$ac_ext <<_ACEOF
11830/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011831
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011832#include <features.h>
11833#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11834yes
11835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011836_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011838 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011839 ipv6type=$i;
11840 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011841fi
11842rm -f conftest*
11843
11844 ;;
11845 linux-inet6)
11846 if test -d /usr/inet6; then
11847 ipv6type=$i
11848 ipv6lib=inet6
11849 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011850 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011851 fi
11852 ;;
11853 solaris)
11854 if test -f /etc/netconfig; then
11855 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11856 ipv6type=$i
11857 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011858 fi
11859 fi
11860 ;;
11861 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011862 cat >conftest.$ac_ext <<_ACEOF
11863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011864/* confdefs.h. */
11865_ACEOF
11866cat confdefs.h >>conftest.$ac_ext
11867cat >>conftest.$ac_ext <<_ACEOF
11868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011870#include <sys/param.h>
11871#ifdef _TOSHIBA_INET6
11872yes
11873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011874_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011876 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011877 ipv6type=$i;
11878 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011879 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011880fi
11881rm -f conftest*
11882
11883 ;;
11884 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011885 cat >conftest.$ac_ext <<_ACEOF
11886#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011887/* confdefs.h. */
11888_ACEOF
11889cat confdefs.h >>conftest.$ac_ext
11890cat >>conftest.$ac_ext <<_ACEOF
11891/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011893#include </usr/local/v6/include/sys/v6config.h>
11894#ifdef __V6D__
11895yes
11896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011897_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011899 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011900 ipv6type=$i;
11901 ipv6lib=v6;
11902 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011903 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011904fi
11905rm -f conftest*
11906
11907 ;;
11908 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011909 cat >conftest.$ac_ext <<_ACEOF
11910#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011911/* confdefs.h. */
11912_ACEOF
11913cat confdefs.h >>conftest.$ac_ext
11914cat >>conftest.$ac_ext <<_ACEOF
11915/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011916
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011917#include <sys/param.h>
11918#ifdef _ZETA_MINAMI_INET6
11919yes
11920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011921_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011923 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011924 ipv6type=$i;
11925 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011926 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011927fi
11928rm -f conftest*
11929
11930 ;;
11931 esac
11932 if test "$ipv6type" != "unknown"; then
11933 break
11934 fi
11935 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011936 echo "$as_me:$LINENO: result: $ipv6type" >&5
11937echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011938fi
11939
11940if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11941 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11942 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11943 echo "using lib$ipv6lib"
11944 else
11945 if test $ipv6trylibc = "yes"; then
11946 echo "using libc"
11947 else
11948 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11949 echo "You need to fetch lib$ipv6lib.a from appropriate"
11950 echo 'ipv6 kit and compile beforehand.'
11951 exit 1
11952 fi
11953 fi
11954fi
11955
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011956# Check for --with-doc-strings
11957echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11958echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11959
11960# Check whether --with-doc-strings or --without-doc-strings was given.
11961if test "${with_doc_strings+set}" = set; then
11962 withval="$with_doc_strings"
11963
11964fi;
11965
11966if test -z "$with_doc_strings"
11967then with_doc_strings="yes"
11968fi
11969if test "$with_doc_strings" != "no"
11970then
11971
11972cat >>confdefs.h <<\_ACEOF
11973#define WITH_DOC_STRINGS 1
11974_ACEOF
11975
11976fi
11977echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11978echo "${ECHO_T}$with_doc_strings" >&6
11979
Neil Schemenauera35c6882001-02-27 04:45:05 +000011980# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011981echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11982echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11983
Neil Schemenauera35c6882001-02-27 04:45:05 +000011984# Check whether --with-pymalloc or --without-pymalloc was given.
11985if test "${with_pymalloc+set}" = set; then
11986 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011987
Martin v. Löwis11437992002-04-12 09:54:03 +000011988fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011989
Neil Schemenauer16c22972002-03-22 15:34:49 +000011990if test -z "$with_pymalloc"
11991then with_pymalloc="yes"
11992fi
11993if test "$with_pymalloc" != "no"
11994then
Martin v. Löwis11437992002-04-12 09:54:03 +000011995
11996cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011997#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011998_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011999
12000fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012001echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12002echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012003
Barry Warsawef82cd72000-06-30 16:21:01 +000012004# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012005echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12006echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12007
Barry Warsawef82cd72000-06-30 16:21:01 +000012008# Check whether --with-wctype-functions or --without-wctype-functions was given.
12009if test "${with_wctype_functions+set}" = set; then
12010 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012011
Barry Warsawef82cd72000-06-30 16:21:01 +000012012if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012013then
12014
12015cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012016#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012017_ACEOF
12018
12019 echo "$as_me:$LINENO: result: yes" >&5
12020echo "${ECHO_T}yes" >&6
12021else echo "$as_me:$LINENO: result: no" >&5
12022echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012023fi
12024else
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 echo "$as_me:$LINENO: result: no" >&5
12026echo "${ECHO_T}no" >&6
12027fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012029# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012030
Guido van Rossum98935bf2001-09-05 19:13:16 +000012031DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012032
Guido van Rossume97ee181999-12-20 21:27:22 +000012033# the dlopen() function means we might want to use dynload_shlib.o. some
12034# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012035
Thomas Wouters3a584202000-08-05 23:28:51 +000012036for ac_func in dlopen
12037do
Martin v. Löwis11437992002-04-12 09:54:03 +000012038as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12039echo "$as_me:$LINENO: checking for $ac_func" >&5
12040echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12041if eval "test \"\${$as_ac_var+set}\" = set"; then
12042 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012043else
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 cat >conftest.$ac_ext <<_ACEOF
12045#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012046/* confdefs.h. */
12047_ACEOF
12048cat confdefs.h >>conftest.$ac_ext
12049cat >>conftest.$ac_ext <<_ACEOF
12050/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012051/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012052 which can conflict with char $ac_func (); below.
12053 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012054 <limits.h> exists even on freestanding compilers. Under hpux,
12055 including <limits.h> includes <sys/time.h> and causes problems
12056 checking for functions defined therein. */
12057#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012058# include <limits.h>
12059#else
12060# include <assert.h>
12061#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012062/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012063#ifdef __cplusplus
12064extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012065{
Martin v. Löwis11437992002-04-12 09:54:03 +000012066#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012067/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 builtin and then its argument prototype would still apply. */
12069char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012070/* The GNU C library defines this for functions which it implements
12071 to always fail with ENOSYS. Some functions are actually named
12072 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012073#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012074choke me
12075#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012076char (*f) () = $ac_func;
12077#endif
12078#ifdef __cplusplus
12079}
Guido van Rossume97ee181999-12-20 21:27:22 +000012080#endif
12081
Skip Montanaro6dead952003-09-25 14:50:04 +000012082int
12083main ()
12084{
12085return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 ;
12087 return 0;
12088}
12089_ACEOF
12090rm -f conftest.$ac_objext conftest$ac_exeext
12091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12092 (eval $ac_link) 2>&5
12093 ac_status=$?
12094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12095 (exit $ac_status); } &&
12096 { ac_try='test -s conftest$ac_exeext'
12097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12098 (eval $ac_try) 2>&5
12099 ac_status=$?
12100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12101 (exit $ac_status); }; }; then
12102 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012103else
Martin v. Löwis11437992002-04-12 09:54:03 +000012104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012105sed 's/^/| /' conftest.$ac_ext >&5
12106
Martin v. Löwis11437992002-04-12 09:54:03 +000012107eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012108fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012110fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012111echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12112echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12113if test `eval echo '${'$as_ac_var'}'` = yes; then
12114 cat >>confdefs.h <<_ACEOF
12115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12116_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012117
Guido van Rossume97ee181999-12-20 21:27:22 +000012118fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012119done
Guido van Rossume97ee181999-12-20 21:27:22 +000012120
Michael W. Hudson54241132001-12-07 15:38:26 +000012121
Guido van Rossume97ee181999-12-20 21:27:22 +000012122# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12123# loading of modules.
12124
Martin v. Löwis11437992002-04-12 09:54:03 +000012125echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12126echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012127if test -z "$DYNLOADFILE"
12128then
12129 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012130 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12131 if test "$ac_cv_func_dlopen" = yes
12132 then DYNLOADFILE="dynload_shlib.o"
12133 else DYNLOADFILE="dynload_aix.o"
12134 fi
12135 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012136 BeOS*) DYNLOADFILE="dynload_beos.o";;
12137 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012138 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012139 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012140 *)
12141 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12142 # out any dynamic loading
12143 if test "$ac_cv_func_dlopen" = yes
12144 then DYNLOADFILE="dynload_shlib.o"
12145 else DYNLOADFILE="dynload_stub.o"
12146 fi
12147 ;;
12148 esac
12149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012150echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12151echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012152if test "$DYNLOADFILE" != "dynload_stub.o"
12153then
Martin v. Löwis11437992002-04-12 09:54:03 +000012154
12155cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012156#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012157_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012158
12159fi
12160
Neil Schemenauer4e425612001-06-19 15:44:15 +000012161# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12162
Michael W. Hudson54241132001-12-07 15:38:26 +000012163
Martin v. Löwis11437992002-04-12 09:54:03 +000012164echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12165echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012166if test -z "$MACHDEP_OBJS"
12167then
Jack Jansene578a632001-08-15 01:27:14 +000012168 MACHDEP_OBJS=$extra_machdep_objs
12169else
12170 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012172echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12173echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012174
Guido van Rossum627b2d71993-12-24 10:39:16 +000012175# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
Martin v. Löwisd5843682002-11-21 20:41:28 +000012247for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012248 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012249 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012250 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012251 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012252 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012253 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012254 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012255 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000012256 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012257 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012258 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012259do
Martin v. Löwis11437992002-04-12 09:54:03 +000012260as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12261echo "$as_me:$LINENO: checking for $ac_func" >&5
12262echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12263if eval "test \"\${$as_ac_var+set}\" = set"; then
12264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012265else
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 cat >conftest.$ac_ext <<_ACEOF
12267#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* confdefs.h. */
12269_ACEOF
12270cat confdefs.h >>conftest.$ac_ext
12271cat >>conftest.$ac_ext <<_ACEOF
12272/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012273/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012274 which can conflict with char $ac_func (); below.
12275 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012276 <limits.h> exists even on freestanding compilers. Under hpux,
12277 including <limits.h> includes <sys/time.h> and causes problems
12278 checking for functions defined therein. */
12279#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012280# include <limits.h>
12281#else
12282# include <assert.h>
12283#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012284/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012285#ifdef __cplusplus
12286extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012287{
Martin v. Löwis11437992002-04-12 09:54:03 +000012288#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012289/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012290 builtin and then its argument prototype would still apply. */
12291char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012292/* The GNU C library defines this for functions which it implements
12293 to always fail with ENOSYS. Some functions are actually named
12294 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012295#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012296choke me
12297#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012298char (*f) () = $ac_func;
12299#endif
12300#ifdef __cplusplus
12301}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012302#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012303
Skip Montanaro6dead952003-09-25 14:50:04 +000012304int
12305main ()
12306{
12307return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012308 ;
12309 return 0;
12310}
12311_ACEOF
12312rm -f conftest.$ac_objext conftest$ac_exeext
12313if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12314 (eval $ac_link) 2>&5
12315 ac_status=$?
12316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12317 (exit $ac_status); } &&
12318 { ac_try='test -s conftest$ac_exeext'
12319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12320 (eval $ac_try) 2>&5
12321 ac_status=$?
12322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12323 (exit $ac_status); }; }; then
12324 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012325else
Martin v. Löwis11437992002-04-12 09:54:03 +000012326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012327sed 's/^/| /' conftest.$ac_ext >&5
12328
Martin v. Löwis11437992002-04-12 09:54:03 +000012329eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012331rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012333echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12334echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12335if test `eval echo '${'$as_ac_var'}'` = yes; then
12336 cat >>confdefs.h <<_ACEOF
12337#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12338_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012339
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012340fi
12341done
12342
Michael W. Hudson54241132001-12-07 15:38:26 +000012343
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012344# For some functions, having a definition is not sufficient, since
12345# we want to take their address.
12346echo "$as_me:$LINENO: checking for chroot" >&5
12347echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12348cat >conftest.$ac_ext <<_ACEOF
12349#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012350/* confdefs.h. */
12351_ACEOF
12352cat confdefs.h >>conftest.$ac_ext
12353cat >>conftest.$ac_ext <<_ACEOF
12354/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012355#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012356int
12357main ()
12358{
12359void *x=chroot
12360 ;
12361 return 0;
12362}
12363_ACEOF
12364rm -f conftest.$ac_objext
12365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12366 (eval $ac_compile) 2>&5
12367 ac_status=$?
12368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369 (exit $ac_status); } &&
12370 { ac_try='test -s conftest.$ac_objext'
12371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12372 (eval $ac_try) 2>&5
12373 ac_status=$?
12374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375 (exit $ac_status); }; }; then
12376
12377cat >>confdefs.h <<\_ACEOF
12378#define HAVE_CHROOT 1
12379_ACEOF
12380
12381 echo "$as_me:$LINENO: result: yes" >&5
12382echo "${ECHO_T}yes" >&6
12383else
12384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012385sed 's/^/| /' conftest.$ac_ext >&5
12386
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012387echo "$as_me:$LINENO: result: no" >&5
12388echo "${ECHO_T}no" >&6
12389
12390fi
12391rm -f conftest.$ac_objext conftest.$ac_ext
12392echo "$as_me:$LINENO: checking for link" >&5
12393echo $ECHO_N "checking for link... $ECHO_C" >&6
12394cat >conftest.$ac_ext <<_ACEOF
12395#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012396/* confdefs.h. */
12397_ACEOF
12398cat confdefs.h >>conftest.$ac_ext
12399cat >>conftest.$ac_ext <<_ACEOF
12400/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012401#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012402int
12403main ()
12404{
12405void *x=link
12406 ;
12407 return 0;
12408}
12409_ACEOF
12410rm -f conftest.$ac_objext
12411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12412 (eval $ac_compile) 2>&5
12413 ac_status=$?
12414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12415 (exit $ac_status); } &&
12416 { ac_try='test -s conftest.$ac_objext'
12417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12418 (eval $ac_try) 2>&5
12419 ac_status=$?
12420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12421 (exit $ac_status); }; }; then
12422
12423cat >>confdefs.h <<\_ACEOF
12424#define HAVE_LINK 1
12425_ACEOF
12426
12427 echo "$as_me:$LINENO: result: yes" >&5
12428echo "${ECHO_T}yes" >&6
12429else
12430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012431sed 's/^/| /' conftest.$ac_ext >&5
12432
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012433echo "$as_me:$LINENO: result: no" >&5
12434echo "${ECHO_T}no" >&6
12435
12436fi
12437rm -f conftest.$ac_objext conftest.$ac_ext
12438echo "$as_me:$LINENO: checking for symlink" >&5
12439echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12440cat >conftest.$ac_ext <<_ACEOF
12441#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* confdefs.h. */
12443_ACEOF
12444cat confdefs.h >>conftest.$ac_ext
12445cat >>conftest.$ac_ext <<_ACEOF
12446/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012447#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012448int
12449main ()
12450{
12451void *x=symlink
12452 ;
12453 return 0;
12454}
12455_ACEOF
12456rm -f conftest.$ac_objext
12457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12458 (eval $ac_compile) 2>&5
12459 ac_status=$?
12460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12461 (exit $ac_status); } &&
12462 { ac_try='test -s conftest.$ac_objext'
12463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12464 (eval $ac_try) 2>&5
12465 ac_status=$?
12466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12467 (exit $ac_status); }; }; then
12468
12469cat >>confdefs.h <<\_ACEOF
12470#define HAVE_SYMLINK 1
12471_ACEOF
12472
12473 echo "$as_me:$LINENO: result: yes" >&5
12474echo "${ECHO_T}yes" >&6
12475else
12476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012477sed 's/^/| /' conftest.$ac_ext >&5
12478
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012479echo "$as_me:$LINENO: result: no" >&5
12480echo "${ECHO_T}no" >&6
12481
12482fi
12483rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012484echo "$as_me:$LINENO: checking for fchdir" >&5
12485echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12486cat >conftest.$ac_ext <<_ACEOF
12487#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012488/* confdefs.h. */
12489_ACEOF
12490cat confdefs.h >>conftest.$ac_ext
12491cat >>conftest.$ac_ext <<_ACEOF
12492/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012493#include <unistd.h>
12494int
12495main ()
12496{
12497void *x=fchdir
12498 ;
12499 return 0;
12500}
12501_ACEOF
12502rm -f conftest.$ac_objext
12503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12504 (eval $ac_compile) 2>&5
12505 ac_status=$?
12506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507 (exit $ac_status); } &&
12508 { ac_try='test -s conftest.$ac_objext'
12509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12510 (eval $ac_try) 2>&5
12511 ac_status=$?
12512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12513 (exit $ac_status); }; }; then
12514
12515cat >>confdefs.h <<\_ACEOF
12516#define HAVE_FCHDIR 1
12517_ACEOF
12518
12519 echo "$as_me:$LINENO: result: yes" >&5
12520echo "${ECHO_T}yes" >&6
12521else
12522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012523sed 's/^/| /' conftest.$ac_ext >&5
12524
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012525echo "$as_me:$LINENO: result: no" >&5
12526echo "${ECHO_T}no" >&6
12527
12528fi
12529rm -f conftest.$ac_objext conftest.$ac_ext
12530echo "$as_me:$LINENO: checking for fsync" >&5
12531echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12532cat >conftest.$ac_ext <<_ACEOF
12533#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012534/* confdefs.h. */
12535_ACEOF
12536cat confdefs.h >>conftest.$ac_ext
12537cat >>conftest.$ac_ext <<_ACEOF
12538/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012539#include <unistd.h>
12540int
12541main ()
12542{
12543void *x=fsync
12544 ;
12545 return 0;
12546}
12547_ACEOF
12548rm -f conftest.$ac_objext
12549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12550 (eval $ac_compile) 2>&5
12551 ac_status=$?
12552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12553 (exit $ac_status); } &&
12554 { ac_try='test -s conftest.$ac_objext'
12555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12556 (eval $ac_try) 2>&5
12557 ac_status=$?
12558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559 (exit $ac_status); }; }; then
12560
12561cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012562#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012563_ACEOF
12564
12565 echo "$as_me:$LINENO: result: yes" >&5
12566echo "${ECHO_T}yes" >&6
12567else
12568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012569sed 's/^/| /' conftest.$ac_ext >&5
12570
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012571echo "$as_me:$LINENO: result: no" >&5
12572echo "${ECHO_T}no" >&6
12573
12574fi
12575rm -f conftest.$ac_objext conftest.$ac_ext
12576echo "$as_me:$LINENO: checking for fdatasync" >&5
12577echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12578cat >conftest.$ac_ext <<_ACEOF
12579#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012580/* confdefs.h. */
12581_ACEOF
12582cat confdefs.h >>conftest.$ac_ext
12583cat >>conftest.$ac_ext <<_ACEOF
12584/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012585#include <unistd.h>
12586int
12587main ()
12588{
12589void *x=fdatasync
12590 ;
12591 return 0;
12592}
12593_ACEOF
12594rm -f conftest.$ac_objext
12595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12596 (eval $ac_compile) 2>&5
12597 ac_status=$?
12598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12599 (exit $ac_status); } &&
12600 { ac_try='test -s conftest.$ac_objext'
12601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12602 (eval $ac_try) 2>&5
12603 ac_status=$?
12604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12605 (exit $ac_status); }; }; then
12606
12607cat >>confdefs.h <<\_ACEOF
12608#define HAVE_FDATASYNC 1
12609_ACEOF
12610
12611 echo "$as_me:$LINENO: result: yes" >&5
12612echo "${ECHO_T}yes" >&6
12613else
12614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012615sed 's/^/| /' conftest.$ac_ext >&5
12616
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012617echo "$as_me:$LINENO: result: no" >&5
12618echo "${ECHO_T}no" >&6
12619
12620fi
12621rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012622
Martin v. Löwisd5843682002-11-21 20:41:28 +000012623# On some systems (eg. FreeBSD 5), we would find a definition of the
12624# functions ctermid_r, setgroups in the library, but no prototype
12625# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12626# address to avoid compiler warnings and potential miscompilations
12627# because of the missing prototypes.
12628
12629echo "$as_me:$LINENO: checking for ctermid_r" >&5
12630echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12631cat >conftest.$ac_ext <<_ACEOF
12632#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012633/* confdefs.h. */
12634_ACEOF
12635cat confdefs.h >>conftest.$ac_ext
12636cat >>conftest.$ac_ext <<_ACEOF
12637/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012638
12639#include "confdefs.h"
12640#include <stdio.h>
12641
Martin v. Löwisd5843682002-11-21 20:41:28 +000012642int
12643main ()
12644{
12645void* p = ctermid_r
12646 ;
12647 return 0;
12648}
12649_ACEOF
12650rm -f conftest.$ac_objext
12651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12652 (eval $ac_compile) 2>&5
12653 ac_status=$?
12654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655 (exit $ac_status); } &&
12656 { ac_try='test -s conftest.$ac_objext'
12657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12658 (eval $ac_try) 2>&5
12659 ac_status=$?
12660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12661 (exit $ac_status); }; }; then
12662
12663cat >>confdefs.h <<\_ACEOF
12664#define HAVE_CTERMID_R 1
12665_ACEOF
12666
12667 echo "$as_me:$LINENO: result: yes" >&5
12668echo "${ECHO_T}yes" >&6
12669else
12670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012671sed 's/^/| /' conftest.$ac_ext >&5
12672
Martin v. Löwisd5843682002-11-21 20:41:28 +000012673echo "$as_me:$LINENO: result: no" >&5
12674echo "${ECHO_T}no" >&6
12675
12676fi
12677rm -f conftest.$ac_objext conftest.$ac_ext
12678
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012679echo "$as_me:$LINENO: checking for flock" >&5
12680echo $ECHO_N "checking for flock... $ECHO_C" >&6
12681cat >conftest.$ac_ext <<_ACEOF
12682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* confdefs.h. */
12684_ACEOF
12685cat confdefs.h >>conftest.$ac_ext
12686cat >>conftest.$ac_ext <<_ACEOF
12687/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012688
12689#include "confdefs.h"
12690#include <sys/file.h>
12691
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012692int
12693main ()
12694{
12695void* p = flock
12696 ;
12697 return 0;
12698}
12699_ACEOF
12700rm -f conftest.$ac_objext
12701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12702 (eval $ac_compile) 2>&5
12703 ac_status=$?
12704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705 (exit $ac_status); } &&
12706 { ac_try='test -s conftest.$ac_objext'
12707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12708 (eval $ac_try) 2>&5
12709 ac_status=$?
12710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12711 (exit $ac_status); }; }; then
12712
12713cat >>confdefs.h <<\_ACEOF
12714#define HAVE_FLOCK 1
12715_ACEOF
12716
12717 echo "$as_me:$LINENO: result: yes" >&5
12718echo "${ECHO_T}yes" >&6
12719else
12720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012721sed 's/^/| /' conftest.$ac_ext >&5
12722
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012723echo "$as_me:$LINENO: result: no" >&5
12724echo "${ECHO_T}no" >&6
12725
12726fi
12727rm -f conftest.$ac_objext conftest.$ac_ext
12728
12729echo "$as_me:$LINENO: checking for getpagesize" >&5
12730echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12731cat >conftest.$ac_ext <<_ACEOF
12732#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012733/* confdefs.h. */
12734_ACEOF
12735cat confdefs.h >>conftest.$ac_ext
12736cat >>conftest.$ac_ext <<_ACEOF
12737/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012738
12739#include "confdefs.h"
12740#include <unistd.h>
12741
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012742int
12743main ()
12744{
12745void* p = getpagesize
12746 ;
12747 return 0;
12748}
12749_ACEOF
12750rm -f conftest.$ac_objext
12751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12752 (eval $ac_compile) 2>&5
12753 ac_status=$?
12754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12755 (exit $ac_status); } &&
12756 { ac_try='test -s conftest.$ac_objext'
12757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12758 (eval $ac_try) 2>&5
12759 ac_status=$?
12760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12761 (exit $ac_status); }; }; then
12762
12763cat >>confdefs.h <<\_ACEOF
12764#define HAVE_GETPAGESIZE 1
12765_ACEOF
12766
12767 echo "$as_me:$LINENO: result: yes" >&5
12768echo "${ECHO_T}yes" >&6
12769else
12770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012771sed 's/^/| /' conftest.$ac_ext >&5
12772
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012773echo "$as_me:$LINENO: result: no" >&5
12774echo "${ECHO_T}no" >&6
12775
12776fi
12777rm -f conftest.$ac_objext conftest.$ac_ext
12778
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012779for ac_prog in true
12780do
12781 # Extract the first word of "$ac_prog", so it can be a program name with args.
12782set dummy $ac_prog; ac_word=$2
12783echo "$as_me:$LINENO: checking for $ac_word" >&5
12784echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12785if test "${ac_cv_prog_TRUE+set}" = set; then
12786 echo $ECHO_N "(cached) $ECHO_C" >&6
12787else
12788 if test -n "$TRUE"; then
12789 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12790else
12791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12792for as_dir in $PATH
12793do
12794 IFS=$as_save_IFS
12795 test -z "$as_dir" && as_dir=.
12796 for ac_exec_ext in '' $ac_executable_extensions; do
12797 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12798 ac_cv_prog_TRUE="$ac_prog"
12799 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12800 break 2
12801 fi
12802done
12803done
12804
12805fi
12806fi
12807TRUE=$ac_cv_prog_TRUE
12808if test -n "$TRUE"; then
12809 echo "$as_me:$LINENO: result: $TRUE" >&5
12810echo "${ECHO_T}$TRUE" >&6
12811else
12812 echo "$as_me:$LINENO: result: no" >&5
12813echo "${ECHO_T}no" >&6
12814fi
12815
12816 test -n "$TRUE" && break
12817done
12818test -n "$TRUE" || TRUE="/bin/true"
12819
12820
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012821echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12822echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12823if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12824 echo $ECHO_N "(cached) $ECHO_C" >&6
12825else
12826 ac_check_lib_save_LIBS=$LIBS
12827LIBS="-lc $LIBS"
12828cat >conftest.$ac_ext <<_ACEOF
12829#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012830/* confdefs.h. */
12831_ACEOF
12832cat confdefs.h >>conftest.$ac_ext
12833cat >>conftest.$ac_ext <<_ACEOF
12834/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012835
12836/* Override any gcc2 internal prototype to avoid an error. */
12837#ifdef __cplusplus
12838extern "C"
12839#endif
12840/* We use char because int might match the return type of a gcc2
12841 builtin and then its argument prototype would still apply. */
12842char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012843int
12844main ()
12845{
12846inet_aton ();
12847 ;
12848 return 0;
12849}
12850_ACEOF
12851rm -f conftest.$ac_objext conftest$ac_exeext
12852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12853 (eval $ac_link) 2>&5
12854 ac_status=$?
12855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12856 (exit $ac_status); } &&
12857 { ac_try='test -s conftest$ac_exeext'
12858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12859 (eval $ac_try) 2>&5
12860 ac_status=$?
12861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12862 (exit $ac_status); }; }; then
12863 ac_cv_lib_c_inet_aton=yes
12864else
12865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012866sed 's/^/| /' conftest.$ac_ext >&5
12867
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012868ac_cv_lib_c_inet_aton=no
12869fi
12870rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12871LIBS=$ac_check_lib_save_LIBS
12872fi
12873echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12874echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12875if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012876 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012877else
12878
12879echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12880echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12881if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12882 echo $ECHO_N "(cached) $ECHO_C" >&6
12883else
12884 ac_check_lib_save_LIBS=$LIBS
12885LIBS="-lresolv $LIBS"
12886cat >conftest.$ac_ext <<_ACEOF
12887#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012888/* confdefs.h. */
12889_ACEOF
12890cat confdefs.h >>conftest.$ac_ext
12891cat >>conftest.$ac_ext <<_ACEOF
12892/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012893
12894/* Override any gcc2 internal prototype to avoid an error. */
12895#ifdef __cplusplus
12896extern "C"
12897#endif
12898/* We use char because int might match the return type of a gcc2
12899 builtin and then its argument prototype would still apply. */
12900char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012901int
12902main ()
12903{
12904inet_aton ();
12905 ;
12906 return 0;
12907}
12908_ACEOF
12909rm -f conftest.$ac_objext conftest$ac_exeext
12910if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12911 (eval $ac_link) 2>&5
12912 ac_status=$?
12913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12914 (exit $ac_status); } &&
12915 { ac_try='test -s conftest$ac_exeext'
12916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12917 (eval $ac_try) 2>&5
12918 ac_status=$?
12919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12920 (exit $ac_status); }; }; then
12921 ac_cv_lib_resolv_inet_aton=yes
12922else
12923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012924sed 's/^/| /' conftest.$ac_ext >&5
12925
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012926ac_cv_lib_resolv_inet_aton=no
12927fi
12928rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12929LIBS=$ac_check_lib_save_LIBS
12930fi
12931echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12932echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12933if test $ac_cv_lib_resolv_inet_aton = yes; then
12934 cat >>confdefs.h <<_ACEOF
12935#define HAVE_LIBRESOLV 1
12936_ACEOF
12937
12938 LIBS="-lresolv $LIBS"
12939
12940fi
12941
12942
12943fi
12944
12945
Martin v. Löwise9416172003-05-03 10:12:45 +000012946echo "$as_me:$LINENO: checking for hstrerror" >&5
12947echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12948cat >conftest.$ac_ext <<_ACEOF
12949#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012950/* confdefs.h. */
12951_ACEOF
12952cat confdefs.h >>conftest.$ac_ext
12953cat >>conftest.$ac_ext <<_ACEOF
12954/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012955
12956#include "confdefs.h"
12957#include <netdb.h>
12958
Martin v. Löwise9416172003-05-03 10:12:45 +000012959int
12960main ()
12961{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012962void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012963 ;
12964 return 0;
12965}
12966_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012967rm -f conftest.$ac_objext conftest$ac_exeext
12968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12969 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012970 ac_status=$?
12971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12972 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012973 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12975 (eval $ac_try) 2>&5
12976 ac_status=$?
12977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978 (exit $ac_status); }; }; then
12979
12980cat >>confdefs.h <<\_ACEOF
12981#define HAVE_HSTRERROR 1
12982_ACEOF
12983
12984 echo "$as_me:$LINENO: result: yes" >&5
12985echo "${ECHO_T}yes" >&6
12986else
12987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012988sed 's/^/| /' conftest.$ac_ext >&5
12989
Martin v. Löwise9416172003-05-03 10:12:45 +000012990echo "$as_me:$LINENO: result: no" >&5
12991echo "${ECHO_T}no" >&6
12992
12993fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012995
12996echo "$as_me:$LINENO: checking for inet_aton" >&5
12997echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12998cat >conftest.$ac_ext <<_ACEOF
12999#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013000/* confdefs.h. */
13001_ACEOF
13002cat confdefs.h >>conftest.$ac_ext
13003cat >>conftest.$ac_ext <<_ACEOF
13004/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013005
13006#include "confdefs.h"
13007#include <sys/socket.h>
13008#include <netinet/in.h>
13009#include <arpa/inet.h>
13010
Martin v. Löwise9416172003-05-03 10:12:45 +000013011int
13012main ()
13013{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013014void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013015 ;
13016 return 0;
13017}
13018_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013019rm -f conftest.$ac_objext conftest$ac_exeext
13020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13021 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013022 ac_status=$?
13023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13024 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013025 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13027 (eval $ac_try) 2>&5
13028 ac_status=$?
13029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13030 (exit $ac_status); }; }; then
13031
13032cat >>confdefs.h <<\_ACEOF
13033#define HAVE_INET_ATON 1
13034_ACEOF
13035
13036 echo "$as_me:$LINENO: result: yes" >&5
13037echo "${ECHO_T}yes" >&6
13038else
13039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013040sed 's/^/| /' conftest.$ac_ext >&5
13041
Martin v. Löwise9416172003-05-03 10:12:45 +000013042echo "$as_me:$LINENO: result: no" >&5
13043echo "${ECHO_T}no" >&6
13044
13045fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013046rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013047
13048echo "$as_me:$LINENO: checking for inet_pton" >&5
13049echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13050cat >conftest.$ac_ext <<_ACEOF
13051#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013052/* confdefs.h. */
13053_ACEOF
13054cat confdefs.h >>conftest.$ac_ext
13055cat >>conftest.$ac_ext <<_ACEOF
13056/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013057
13058#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013059#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013060#include <sys/socket.h>
13061#include <netinet/in.h>
13062#include <arpa/inet.h>
13063
Martin v. Löwise9416172003-05-03 10:12:45 +000013064int
13065main ()
13066{
13067void* p = inet_pton
13068 ;
13069 return 0;
13070}
13071_ACEOF
13072rm -f conftest.$ac_objext
13073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13074 (eval $ac_compile) 2>&5
13075 ac_status=$?
13076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13077 (exit $ac_status); } &&
13078 { ac_try='test -s conftest.$ac_objext'
13079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13080 (eval $ac_try) 2>&5
13081 ac_status=$?
13082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13083 (exit $ac_status); }; }; then
13084
13085cat >>confdefs.h <<\_ACEOF
13086#define HAVE_INET_PTON 1
13087_ACEOF
13088
13089 echo "$as_me:$LINENO: result: yes" >&5
13090echo "${ECHO_T}yes" >&6
13091else
13092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013093sed 's/^/| /' conftest.$ac_ext >&5
13094
Martin v. Löwise9416172003-05-03 10:12:45 +000013095echo "$as_me:$LINENO: result: no" >&5
13096echo "${ECHO_T}no" >&6
13097
13098fi
13099rm -f conftest.$ac_objext conftest.$ac_ext
13100
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013101# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013102echo "$as_me:$LINENO: checking for setgroups" >&5
13103echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13104cat >conftest.$ac_ext <<_ACEOF
13105#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013106/* confdefs.h. */
13107_ACEOF
13108cat confdefs.h >>conftest.$ac_ext
13109cat >>conftest.$ac_ext <<_ACEOF
13110/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013111
13112#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013113#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013114#ifdef HAVE_GRP_H
13115#include <grp.h>
13116#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013117
Martin v. Löwisd5843682002-11-21 20:41:28 +000013118int
13119main ()
13120{
13121void* p = setgroups
13122 ;
13123 return 0;
13124}
13125_ACEOF
13126rm -f conftest.$ac_objext
13127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13128 (eval $ac_compile) 2>&5
13129 ac_status=$?
13130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13131 (exit $ac_status); } &&
13132 { ac_try='test -s conftest.$ac_objext'
13133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13134 (eval $ac_try) 2>&5
13135 ac_status=$?
13136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13137 (exit $ac_status); }; }; then
13138
13139cat >>confdefs.h <<\_ACEOF
13140#define HAVE_SETGROUPS 1
13141_ACEOF
13142
13143 echo "$as_me:$LINENO: result: yes" >&5
13144echo "${ECHO_T}yes" >&6
13145else
13146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013147sed 's/^/| /' conftest.$ac_ext >&5
13148
Martin v. Löwisd5843682002-11-21 20:41:28 +000013149echo "$as_me:$LINENO: result: no" >&5
13150echo "${ECHO_T}no" >&6
13151
13152fi
13153rm -f conftest.$ac_objext conftest.$ac_ext
13154
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013155# check for openpty and forkpty
13156
Martin v. Löwis11437992002-04-12 09:54:03 +000013157
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013158for ac_func in openpty
13159do
Martin v. Löwis11437992002-04-12 09:54:03 +000013160as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13161echo "$as_me:$LINENO: checking for $ac_func" >&5
13162echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13163if eval "test \"\${$as_ac_var+set}\" = set"; then
13164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013165else
Martin v. Löwis11437992002-04-12 09:54:03 +000013166 cat >conftest.$ac_ext <<_ACEOF
13167#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013168/* confdefs.h. */
13169_ACEOF
13170cat confdefs.h >>conftest.$ac_ext
13171cat >>conftest.$ac_ext <<_ACEOF
13172/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013173/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013174 which can conflict with char $ac_func (); below.
13175 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013176 <limits.h> exists even on freestanding compilers. Under hpux,
13177 including <limits.h> includes <sys/time.h> and causes problems
13178 checking for functions defined therein. */
13179#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013180# include <limits.h>
13181#else
13182# include <assert.h>
13183#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013184/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013185#ifdef __cplusplus
13186extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013187{
Martin v. Löwis11437992002-04-12 09:54:03 +000013188#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013189/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013190 builtin and then its argument prototype would still apply. */
13191char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013192/* The GNU C library defines this for functions which it implements
13193 to always fail with ENOSYS. Some functions are actually named
13194 something starting with __ and the normal name is an alias. */
13195#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13196choke me
13197#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013198char (*f) () = $ac_func;
13199#endif
13200#ifdef __cplusplus
13201}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013202#endif
13203
Skip Montanaro6dead952003-09-25 14:50:04 +000013204int
13205main ()
13206{
13207return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013208 ;
13209 return 0;
13210}
13211_ACEOF
13212rm -f conftest.$ac_objext conftest$ac_exeext
13213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13214 (eval $ac_link) 2>&5
13215 ac_status=$?
13216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13217 (exit $ac_status); } &&
13218 { ac_try='test -s conftest$ac_exeext'
13219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13220 (eval $ac_try) 2>&5
13221 ac_status=$?
13222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13223 (exit $ac_status); }; }; then
13224 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013225else
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013227sed 's/^/| /' conftest.$ac_ext >&5
13228
Martin v. Löwis11437992002-04-12 09:54:03 +000013229eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013231rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013232fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013233echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13234echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13235if test `eval echo '${'$as_ac_var'}'` = yes; then
13236 cat >>confdefs.h <<_ACEOF
13237#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13238_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013239
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013240else
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13242echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13243if test "${ac_cv_lib_util_openpty+set}" = set; then
13244 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013245else
Martin v. Löwis11437992002-04-12 09:54:03 +000013246 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013247LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013248cat >conftest.$ac_ext <<_ACEOF
13249#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013250/* confdefs.h. */
13251_ACEOF
13252cat confdefs.h >>conftest.$ac_ext
13253cat >>conftest.$ac_ext <<_ACEOF
13254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013255
Fred Drake8cef4cf2000-06-28 16:40:38 +000013256/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013257#ifdef __cplusplus
13258extern "C"
13259#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013260/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 builtin and then its argument prototype would still apply. */
13262char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013263int
13264main ()
13265{
13266openpty ();
13267 ;
13268 return 0;
13269}
13270_ACEOF
13271rm -f conftest.$ac_objext conftest$ac_exeext
13272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13273 (eval $ac_link) 2>&5
13274 ac_status=$?
13275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13276 (exit $ac_status); } &&
13277 { ac_try='test -s conftest$ac_exeext'
13278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13279 (eval $ac_try) 2>&5
13280 ac_status=$?
13281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13282 (exit $ac_status); }; }; then
13283 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013284else
Martin v. Löwis11437992002-04-12 09:54:03 +000013285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013286sed 's/^/| /' conftest.$ac_ext >&5
13287
Martin v. Löwis11437992002-04-12 09:54:03 +000013288ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13291LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013293echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13294echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13295if test $ac_cv_lib_util_openpty = yes; then
13296 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013297#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013298_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013299 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013300fi
13301
13302fi
13303done
13304
Martin v. Löwis11437992002-04-12 09:54:03 +000013305
Fred Drake8cef4cf2000-06-28 16:40:38 +000013306for ac_func in forkpty
13307do
Martin v. Löwis11437992002-04-12 09:54:03 +000013308as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13309echo "$as_me:$LINENO: checking for $ac_func" >&5
13310echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13311if eval "test \"\${$as_ac_var+set}\" = set"; then
13312 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013313else
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 cat >conftest.$ac_ext <<_ACEOF
13315#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013316/* confdefs.h. */
13317_ACEOF
13318cat confdefs.h >>conftest.$ac_ext
13319cat >>conftest.$ac_ext <<_ACEOF
13320/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013321/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013322 which can conflict with char $ac_func (); below.
13323 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013324 <limits.h> exists even on freestanding compilers. Under hpux,
13325 including <limits.h> includes <sys/time.h> and causes problems
13326 checking for functions defined therein. */
13327#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013328# include <limits.h>
13329#else
13330# include <assert.h>
13331#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013332/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013333#ifdef __cplusplus
13334extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013335{
Martin v. Löwis11437992002-04-12 09:54:03 +000013336#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013337/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 builtin and then its argument prototype would still apply. */
13339char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013340/* The GNU C library defines this for functions which it implements
13341 to always fail with ENOSYS. Some functions are actually named
13342 something starting with __ and the normal name is an alias. */
13343#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13344choke me
13345#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013346char (*f) () = $ac_func;
13347#endif
13348#ifdef __cplusplus
13349}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013350#endif
13351
Skip Montanaro6dead952003-09-25 14:50:04 +000013352int
13353main ()
13354{
13355return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013356 ;
13357 return 0;
13358}
13359_ACEOF
13360rm -f conftest.$ac_objext conftest$ac_exeext
13361if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13362 (eval $ac_link) 2>&5
13363 ac_status=$?
13364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13365 (exit $ac_status); } &&
13366 { ac_try='test -s conftest$ac_exeext'
13367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13368 (eval $ac_try) 2>&5
13369 ac_status=$?
13370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13371 (exit $ac_status); }; }; then
13372 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013373else
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013375sed 's/^/| /' conftest.$ac_ext >&5
13376
Martin v. Löwis11437992002-04-12 09:54:03 +000013377eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013379rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013381echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13382echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13383if test `eval echo '${'$as_ac_var'}'` = yes; then
13384 cat >>confdefs.h <<_ACEOF
13385#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13386_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013387
Fred Drake8cef4cf2000-06-28 16:40:38 +000013388else
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13390echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13391if test "${ac_cv_lib_util_forkpty+set}" = set; then
13392 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013393else
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013395LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013396cat >conftest.$ac_ext <<_ACEOF
13397#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* confdefs.h. */
13399_ACEOF
13400cat confdefs.h >>conftest.$ac_ext
13401cat >>conftest.$ac_ext <<_ACEOF
13402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Fred Drake8cef4cf2000-06-28 16:40:38 +000013404/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013405#ifdef __cplusplus
13406extern "C"
13407#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013408/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 builtin and then its argument prototype would still apply. */
13410char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013411int
13412main ()
13413{
13414forkpty ();
13415 ;
13416 return 0;
13417}
13418_ACEOF
13419rm -f conftest.$ac_objext conftest$ac_exeext
13420if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13421 (eval $ac_link) 2>&5
13422 ac_status=$?
13423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13424 (exit $ac_status); } &&
13425 { ac_try='test -s conftest$ac_exeext'
13426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13427 (eval $ac_try) 2>&5
13428 ac_status=$?
13429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13430 (exit $ac_status); }; }; then
13431 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013432else
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013434sed 's/^/| /' conftest.$ac_ext >&5
13435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13439LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013441echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13442echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13443if test $ac_cv_lib_util_forkpty = yes; then
13444 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013445#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013446_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013447 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013448fi
13449
13450fi
13451done
13452
Jack Jansendd19cf82001-12-06 22:36:17 +000013453
Michael W. Hudson54241132001-12-07 15:38:26 +000013454# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
13456
13457
13458
13459
13460
Fred Drake8cef4cf2000-06-28 16:40:38 +000013461for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13462do
Martin v. Löwis11437992002-04-12 09:54:03 +000013463as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13464echo "$as_me:$LINENO: checking for $ac_func" >&5
13465echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13466if eval "test \"\${$as_ac_var+set}\" = set"; then
13467 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013468else
Martin v. Löwis11437992002-04-12 09:54:03 +000013469 cat >conftest.$ac_ext <<_ACEOF
13470#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013471/* confdefs.h. */
13472_ACEOF
13473cat confdefs.h >>conftest.$ac_ext
13474cat >>conftest.$ac_ext <<_ACEOF
13475/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013476/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013477 which can conflict with char $ac_func (); below.
13478 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013479 <limits.h> exists even on freestanding compilers. Under hpux,
13480 including <limits.h> includes <sys/time.h> and causes problems
13481 checking for functions defined therein. */
13482#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013483# include <limits.h>
13484#else
13485# include <assert.h>
13486#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013487/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013488#ifdef __cplusplus
13489extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013490{
Martin v. Löwis11437992002-04-12 09:54:03 +000013491#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013492/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 builtin and then its argument prototype would still apply. */
13494char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013495/* The GNU C library defines this for functions which it implements
13496 to always fail with ENOSYS. Some functions are actually named
13497 something starting with __ and the normal name is an alias. */
13498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13499choke me
13500#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013501char (*f) () = $ac_func;
13502#endif
13503#ifdef __cplusplus
13504}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013505#endif
13506
Skip Montanaro6dead952003-09-25 14:50:04 +000013507int
13508main ()
13509{
13510return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 ;
13512 return 0;
13513}
13514_ACEOF
13515rm -f conftest.$ac_objext conftest$ac_exeext
13516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13517 (eval $ac_link) 2>&5
13518 ac_status=$?
13519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13520 (exit $ac_status); } &&
13521 { ac_try='test -s conftest$ac_exeext'
13522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13523 (eval $ac_try) 2>&5
13524 ac_status=$?
13525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13526 (exit $ac_status); }; }; then
13527 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528else
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013530sed 's/^/| /' conftest.$ac_ext >&5
13531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013533fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013534rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013535fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013536echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13537echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13538if test `eval echo '${'$as_ac_var'}'` = yes; then
13539 cat >>confdefs.h <<_ACEOF
13540#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13541_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013542
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013543fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013544done
13545
Michael W. Hudson54241132001-12-07 15:38:26 +000013546
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
13548
13549
13550
13551
Martin v. Löwis1142de32002-03-29 16:28:31 +000013552for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013553do
Martin v. Löwis11437992002-04-12 09:54:03 +000013554as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13555echo "$as_me:$LINENO: checking for $ac_func" >&5
13556echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13557if eval "test \"\${$as_ac_var+set}\" = set"; then
13558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013559else
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 cat >conftest.$ac_ext <<_ACEOF
13561#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013562/* confdefs.h. */
13563_ACEOF
13564cat confdefs.h >>conftest.$ac_ext
13565cat >>conftest.$ac_ext <<_ACEOF
13566/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013567/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013568 which can conflict with char $ac_func (); below.
13569 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013570 <limits.h> exists even on freestanding compilers. Under hpux,
13571 including <limits.h> includes <sys/time.h> and causes problems
13572 checking for functions defined therein. */
13573#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013574# include <limits.h>
13575#else
13576# include <assert.h>
13577#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013578/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013579#ifdef __cplusplus
13580extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013581{
Martin v. Löwis11437992002-04-12 09:54:03 +000013582#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013583/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013584 builtin and then its argument prototype would still apply. */
13585char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013586/* The GNU C library defines this for functions which it implements
13587 to always fail with ENOSYS. Some functions are actually named
13588 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013589#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013590choke me
13591#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013592char (*f) () = $ac_func;
13593#endif
13594#ifdef __cplusplus
13595}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013596#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013597
Skip Montanaro6dead952003-09-25 14:50:04 +000013598int
13599main ()
13600{
13601return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ;
13603 return 0;
13604}
13605_ACEOF
13606rm -f conftest.$ac_objext conftest$ac_exeext
13607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13608 (eval $ac_link) 2>&5
13609 ac_status=$?
13610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13611 (exit $ac_status); } &&
13612 { ac_try='test -s conftest$ac_exeext'
13613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13614 (eval $ac_try) 2>&5
13615 ac_status=$?
13616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617 (exit $ac_status); }; }; then
13618 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013619else
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013621sed 's/^/| /' conftest.$ac_ext >&5
13622
Martin v. Löwis11437992002-04-12 09:54:03 +000013623eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013625rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013627echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13628echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13629if test `eval echo '${'$as_ac_var'}'` = yes; then
13630 cat >>confdefs.h <<_ACEOF
13631#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13632_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013633
Martin v. Löwis1142de32002-03-29 16:28:31 +000013634else
Martin v. Löwis11437992002-04-12 09:54:03 +000013635 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013636fi
13637done
13638
13639
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
Martin v. Löwis1142de32002-03-29 16:28:31 +000013641for ac_func in getpgrp
13642do
Martin v. Löwis11437992002-04-12 09:54:03 +000013643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13644echo "$as_me:$LINENO: checking for $ac_func" >&5
13645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13646if eval "test \"\${$as_ac_var+set}\" = set"; then
13647 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013648else
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 cat >conftest.$ac_ext <<_ACEOF
13650#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013651/* confdefs.h. */
13652_ACEOF
13653cat confdefs.h >>conftest.$ac_ext
13654cat >>conftest.$ac_ext <<_ACEOF
13655/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013656/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013657 which can conflict with char $ac_func (); below.
13658 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013659 <limits.h> exists even on freestanding compilers. Under hpux,
13660 including <limits.h> includes <sys/time.h> and causes problems
13661 checking for functions defined therein. */
13662#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013663# include <limits.h>
13664#else
13665# include <assert.h>
13666#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013667/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013668#ifdef __cplusplus
13669extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013670{
Martin v. Löwis11437992002-04-12 09:54:03 +000013671#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013672/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013673 builtin and then its argument prototype would still apply. */
13674char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013675/* The GNU C library defines this for functions which it implements
13676 to always fail with ENOSYS. Some functions are actually named
13677 something starting with __ and the normal name is an alias. */
13678#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13679choke me
13680#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013681char (*f) () = $ac_func;
13682#endif
13683#ifdef __cplusplus
13684}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013685#endif
13686
Skip Montanaro6dead952003-09-25 14:50:04 +000013687int
13688main ()
13689{
13690return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013691 ;
13692 return 0;
13693}
13694_ACEOF
13695rm -f conftest.$ac_objext conftest$ac_exeext
13696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13697 (eval $ac_link) 2>&5
13698 ac_status=$?
13699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13700 (exit $ac_status); } &&
13701 { ac_try='test -s conftest$ac_exeext'
13702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13703 (eval $ac_try) 2>&5
13704 ac_status=$?
13705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13706 (exit $ac_status); }; }; then
13707 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013708else
Martin v. Löwis11437992002-04-12 09:54:03 +000013709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013710sed 's/^/| /' conftest.$ac_ext >&5
13711
Martin v. Löwis11437992002-04-12 09:54:03 +000013712eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013714rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013715fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013716echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13717echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13718if test `eval echo '${'$as_ac_var'}'` = yes; then
13719 cat >>confdefs.h <<_ACEOF
13720#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13721_ACEOF
13722 cat >conftest.$ac_ext <<_ACEOF
13723#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013724/* confdefs.h. */
13725_ACEOF
13726cat confdefs.h >>conftest.$ac_ext
13727cat >>conftest.$ac_ext <<_ACEOF
13728/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013729#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013730int
13731main ()
13732{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 ;
13735 return 0;
13736}
13737_ACEOF
13738rm -f conftest.$ac_objext
13739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13740 (eval $ac_compile) 2>&5
13741 ac_status=$?
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); } &&
13744 { ac_try='test -s conftest.$ac_objext'
13745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13746 (eval $ac_try) 2>&5
13747 ac_status=$?
13748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749 (exit $ac_status); }; }; then
13750
13751cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013752#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013753_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013754
Martin v. Löwis11437992002-04-12 09:54:03 +000013755
Guido van Rossumf78abae1997-01-21 22:02:36 +000013756else
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013758sed 's/^/| /' conftest.$ac_ext >&5
13759
Guido van Rossum627b2d71993-12-24 10:39:16 +000013760fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013761rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013762
Guido van Rossum627b2d71993-12-24 10:39:16 +000013763fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013764done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013765
Jack Jansen150753c2003-03-29 22:07:47 +000013766
13767for ac_func in setpgrp
13768do
13769as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13770echo "$as_me:$LINENO: checking for $ac_func" >&5
13771echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13772if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774else
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 cat >conftest.$ac_ext <<_ACEOF
13776#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013777/* confdefs.h. */
13778_ACEOF
13779cat confdefs.h >>conftest.$ac_ext
13780cat >>conftest.$ac_ext <<_ACEOF
13781/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013782/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013783 which can conflict with char $ac_func (); below.
13784 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013785 <limits.h> exists even on freestanding compilers. Under hpux,
13786 including <limits.h> includes <sys/time.h> and causes problems
13787 checking for functions defined therein. */
13788#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013789# include <limits.h>
13790#else
13791# include <assert.h>
13792#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013793/* Override any gcc2 internal prototype to avoid an error. */
13794#ifdef __cplusplus
13795extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013796{
Martin v. Löwis11437992002-04-12 09:54:03 +000013797#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013798/* We use char because int might match the return type of a gcc2
13799 builtin and then its argument prototype would still apply. */
13800char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013801/* The GNU C library defines this for functions which it implements
13802 to always fail with ENOSYS. Some functions are actually named
13803 something starting with __ and the normal name is an alias. */
13804#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13805choke me
13806#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013807char (*f) () = $ac_func;
13808#endif
13809#ifdef __cplusplus
13810}
Jack Jansen150753c2003-03-29 22:07:47 +000013811#endif
13812
Skip Montanaro6dead952003-09-25 14:50:04 +000013813int
13814main ()
13815{
13816return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 ;
13818 return 0;
13819}
13820_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013821rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13823 (eval $ac_link) 2>&5
13824 ac_status=$?
13825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013826 (exit $ac_status); } &&
13827 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13829 (eval $ac_try) 2>&5
13830 ac_status=$?
13831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13832 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013833 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013834else
Jack Jansen150753c2003-03-29 22:07:47 +000013835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013836sed 's/^/| /' conftest.$ac_ext >&5
13837
Jack Jansen150753c2003-03-29 22:07:47 +000013838eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013839fi
Jack Jansen150753c2003-03-29 22:07:47 +000013840rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013841fi
Jack Jansen150753c2003-03-29 22:07:47 +000013842echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13843echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13844if test `eval echo '${'$as_ac_var'}'` = yes; then
13845 cat >>confdefs.h <<_ACEOF
13846#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13847_ACEOF
13848 cat >conftest.$ac_ext <<_ACEOF
13849#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013850/* confdefs.h. */
13851_ACEOF
13852cat confdefs.h >>conftest.$ac_ext
13853cat >>conftest.$ac_ext <<_ACEOF
13854/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013855#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013856int
13857main ()
13858{
13859setpgrp(0,0);
13860 ;
13861 return 0;
13862}
13863_ACEOF
13864rm -f conftest.$ac_objext
13865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13866 (eval $ac_compile) 2>&5
13867 ac_status=$?
13868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13869 (exit $ac_status); } &&
13870 { ac_try='test -s conftest.$ac_objext'
13871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13872 (eval $ac_try) 2>&5
13873 ac_status=$?
13874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013876
13877cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013878#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013879_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013880
Jack Jansen150753c2003-03-29 22:07:47 +000013881
13882else
13883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013884sed 's/^/| /' conftest.$ac_ext >&5
13885
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013886fi
Jack Jansen150753c2003-03-29 22:07:47 +000013887rm -f conftest.$ac_objext conftest.$ac_ext
13888
13889fi
13890done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013891
Martin v. Löwis11437992002-04-12 09:54:03 +000013892
Thomas Wouters3a584202000-08-05 23:28:51 +000013893for ac_func in gettimeofday
13894do
Martin v. Löwis11437992002-04-12 09:54:03 +000013895as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13896echo "$as_me:$LINENO: checking for $ac_func" >&5
13897echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13898if eval "test \"\${$as_ac_var+set}\" = set"; then
13899 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013900else
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 cat >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. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013908/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013909 which can conflict with char $ac_func (); below.
13910 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013911 <limits.h> exists even on freestanding compilers. Under hpux,
13912 including <limits.h> includes <sys/time.h> and causes problems
13913 checking for functions defined therein. */
13914#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013915# include <limits.h>
13916#else
13917# include <assert.h>
13918#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013919/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013920#ifdef __cplusplus
13921extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013922{
Martin v. Löwis11437992002-04-12 09:54:03 +000013923#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013924/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 builtin and then its argument prototype would still apply. */
13926char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013927/* The GNU C library defines this for functions which it implements
13928 to always fail with ENOSYS. Some functions are actually named
13929 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013930#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013931choke me
13932#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013933char (*f) () = $ac_func;
13934#endif
13935#ifdef __cplusplus
13936}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013937#endif
13938
Skip Montanaro6dead952003-09-25 14:50:04 +000013939int
13940main ()
13941{
13942return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 ;
13944 return 0;
13945}
13946_ACEOF
13947rm -f conftest.$ac_objext conftest$ac_exeext
13948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13949 (eval $ac_link) 2>&5
13950 ac_status=$?
13951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13952 (exit $ac_status); } &&
13953 { ac_try='test -s conftest$ac_exeext'
13954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13955 (eval $ac_try) 2>&5
13956 ac_status=$?
13957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13958 (exit $ac_status); }; }; then
13959 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013960else
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013962sed 's/^/| /' conftest.$ac_ext >&5
13963
Martin v. Löwis11437992002-04-12 09:54:03 +000013964eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013966rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013967fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013968echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13969echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13970if test `eval echo '${'$as_ac_var'}'` = yes; then
13971 cat >>confdefs.h <<_ACEOF
13972#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13973_ACEOF
13974 cat >conftest.$ac_ext <<_ACEOF
13975#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013976/* confdefs.h. */
13977_ACEOF
13978cat confdefs.h >>conftest.$ac_ext
13979cat >>conftest.$ac_ext <<_ACEOF
13980/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013981#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013982int
13983main ()
13984{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013985gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013986 ;
13987 return 0;
13988}
13989_ACEOF
13990rm -f conftest.$ac_objext
13991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13992 (eval $ac_compile) 2>&5
13993 ac_status=$?
13994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13995 (exit $ac_status); } &&
13996 { ac_try='test -s conftest.$ac_objext'
13997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13998 (eval $ac_try) 2>&5
13999 ac_status=$?
14000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14001 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014002 :
14003else
Martin v. Löwis11437992002-04-12 09:54:03 +000014004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014005sed 's/^/| /' conftest.$ac_ext >&5
14006
Martin v. Löwis11437992002-04-12 09:54:03 +000014007
14008cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014009#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014010_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014011
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
Guido van Rossum627b2d71993-12-24 10:39:16 +000014013fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014014rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014015
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014016fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014017done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014018
Michael W. Hudson54241132001-12-07 15:38:26 +000014019
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014020echo "$as_me:$LINENO: checking for major" >&5
14021echo $ECHO_N "checking for major... $ECHO_C" >&6
14022cat >conftest.$ac_ext <<_ACEOF
14023#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014024/* confdefs.h. */
14025_ACEOF
14026cat confdefs.h >>conftest.$ac_ext
14027cat >>conftest.$ac_ext <<_ACEOF
14028/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014029
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014030#if defined(MAJOR_IN_MKDEV)
14031#include <sys/mkdev.h>
14032#elif defined(MAJOR_IN_SYSMACROS)
14033#include <sys/sysmacros.h>
14034#else
14035#include <sys/types.h>
14036#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014037
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014038int
14039main ()
14040{
14041
14042 makedev(major(0),minor(0));
14043
14044 ;
14045 return 0;
14046}
14047_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014048rm -f conftest.$ac_objext conftest$ac_exeext
14049if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14050 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014051 ac_status=$?
14052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014054 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14056 (eval $ac_try) 2>&5
14057 ac_status=$?
14058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14059 (exit $ac_status); }; }; then
14060
14061
14062cat >>confdefs.h <<\_ACEOF
14063#define HAVE_DEVICE_MACROS 1
14064_ACEOF
14065
14066 echo "$as_me:$LINENO: result: yes" >&5
14067echo "${ECHO_T}yes" >&6
14068
14069else
14070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014071sed 's/^/| /' conftest.$ac_ext >&5
14072
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014073
14074 echo "$as_me:$LINENO: result: no" >&5
14075echo "${ECHO_T}no" >&6
14076
14077fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014078rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014079
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014080# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014081# for [no]getaddrinfo in netdb.h.
14082echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14083echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14084cat >conftest.$ac_ext <<_ACEOF
14085#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014086/* confdefs.h. */
14087_ACEOF
14088cat confdefs.h >>conftest.$ac_ext
14089cat >>conftest.$ac_ext <<_ACEOF
14090/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014091
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014092#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014093#include <sys/socket.h>
14094#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014095#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014096
Martin v. Löwis11437992002-04-12 09:54:03 +000014097int
14098main ()
14099{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014100
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014101getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014102
Martin v. Löwis11437992002-04-12 09:54:03 +000014103 ;
14104 return 0;
14105}
14106_ACEOF
14107rm -f conftest.$ac_objext conftest$ac_exeext
14108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14109 (eval $ac_link) 2>&5
14110 ac_status=$?
14111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14112 (exit $ac_status); } &&
14113 { ac_try='test -s conftest$ac_exeext'
14114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14115 (eval $ac_try) 2>&5
14116 ac_status=$?
14117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14118 (exit $ac_status); }; }; then
14119
14120echo "$as_me:$LINENO: result: yes" >&5
14121echo "${ECHO_T}yes" >&6
14122echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14123echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014124if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 echo "$as_me:$LINENO: result: buggy" >&5
14126echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014127buggygetaddrinfo=yes
14128else
Martin v. Löwis11437992002-04-12 09:54:03 +000014129 cat >conftest.$ac_ext <<_ACEOF
14130#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014131/* confdefs.h. */
14132_ACEOF
14133cat confdefs.h >>conftest.$ac_ext
14134cat >>conftest.$ac_ext <<_ACEOF
14135/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014136
14137#include <sys/types.h>
14138#include <netdb.h>
14139#include <string.h>
14140#include <sys/socket.h>
14141#include <netinet/in.h>
14142
14143main()
14144{
14145 int passive, gaierr, inet4 = 0, inet6 = 0;
14146 struct addrinfo hints, *ai, *aitop;
14147 char straddr[INET6_ADDRSTRLEN], strport[16];
14148
14149 for (passive = 0; passive <= 1; passive++) {
14150 memset(&hints, 0, sizeof(hints));
14151 hints.ai_family = AF_UNSPEC;
14152 hints.ai_flags = passive ? AI_PASSIVE : 0;
14153 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000014154 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014155 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14156 (void)gai_strerror(gaierr);
14157 goto bad;
14158 }
14159 for (ai = aitop; ai; ai = ai->ai_next) {
14160 if (ai->ai_addr == NULL ||
14161 ai->ai_addrlen == 0 ||
14162 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14163 straddr, sizeof(straddr), strport, sizeof(strport),
14164 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14165 goto bad;
14166 }
14167 switch (ai->ai_family) {
14168 case AF_INET:
14169 if (strcmp(strport, "54321") != 0) {
14170 goto bad;
14171 }
14172 if (passive) {
14173 if (strcmp(straddr, "0.0.0.0") != 0) {
14174 goto bad;
14175 }
14176 } else {
14177 if (strcmp(straddr, "127.0.0.1") != 0) {
14178 goto bad;
14179 }
14180 }
14181 inet4++;
14182 break;
14183 case AF_INET6:
14184 if (strcmp(strport, "54321") != 0) {
14185 goto bad;
14186 }
14187 if (passive) {
14188 if (strcmp(straddr, "::") != 0) {
14189 goto bad;
14190 }
14191 } else {
14192 if (strcmp(straddr, "::1") != 0) {
14193 goto bad;
14194 }
14195 }
14196 inet6++;
14197 break;
14198 case AF_UNSPEC:
14199 goto bad;
14200 break;
14201 default:
14202 /* another family support? */
14203 break;
14204 }
14205 }
14206 }
14207
14208 if (!(inet4 == 0 || inet4 == 2))
14209 goto bad;
14210 if (!(inet6 == 0 || inet6 == 2))
14211 goto bad;
14212
14213 if (aitop)
14214 freeaddrinfo(aitop);
14215 exit(0);
14216
14217 bad:
14218 if (aitop)
14219 freeaddrinfo(aitop);
14220 exit(1);
14221}
14222
Martin v. Löwis11437992002-04-12 09:54:03 +000014223_ACEOF
14224rm -f conftest$ac_exeext
14225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14226 (eval $ac_link) 2>&5
14227 ac_status=$?
14228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14229 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14231 (eval $ac_try) 2>&5
14232 ac_status=$?
14233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14234 (exit $ac_status); }; }; then
14235 echo "$as_me:$LINENO: result: good" >&5
14236echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014237buggygetaddrinfo=no
14238else
Martin v. Löwis11437992002-04-12 09:54:03 +000014239 echo "$as_me: program exited with status $ac_status" >&5
14240echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014241sed 's/^/| /' conftest.$ac_ext >&5
14242
Martin v. Löwis11437992002-04-12 09:54:03 +000014243( exit $ac_status )
14244echo "$as_me:$LINENO: result: buggy" >&5
14245echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014246buggygetaddrinfo=yes
14247fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014248rm -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 +000014249fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014250else
Martin v. Löwis11437992002-04-12 09:54:03 +000014251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014252sed 's/^/| /' conftest.$ac_ext >&5
14253
Martin v. Löwis11437992002-04-12 09:54:03 +000014254
14255echo "$as_me:$LINENO: result: no" >&5
14256echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014257buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014258
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014259fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014260rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014261
14262if test "$buggygetaddrinfo" = "yes"; then
14263 if test "$ipv6" = "yes"; then
14264 echo 'Fatal: You must get working getaddrinfo() function.'
14265 echo ' or you can specify "--disable-ipv6"'.
14266 exit 1
14267 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014268else
Martin v. Löwis11437992002-04-12 09:54:03 +000014269
14270cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014271#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014272_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014273
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014276for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014277do
Martin v. Löwis11437992002-04-12 09:54:03 +000014278as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14279echo "$as_me:$LINENO: checking for $ac_func" >&5
14280echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14281if eval "test \"\${$as_ac_var+set}\" = set"; then
14282 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014283else
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 cat >conftest.$ac_ext <<_ACEOF
14285#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014286/* confdefs.h. */
14287_ACEOF
14288cat confdefs.h >>conftest.$ac_ext
14289cat >>conftest.$ac_ext <<_ACEOF
14290/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014291/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014292 which can conflict with char $ac_func (); below.
14293 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014294 <limits.h> exists even on freestanding compilers. Under hpux,
14295 including <limits.h> includes <sys/time.h> and causes problems
14296 checking for functions defined therein. */
14297#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014298# include <limits.h>
14299#else
14300# include <assert.h>
14301#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014302/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014303#ifdef __cplusplus
14304extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014305{
Martin v. Löwis11437992002-04-12 09:54:03 +000014306#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014307/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 builtin and then its argument prototype would still apply. */
14309char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014310/* The GNU C library defines this for functions which it implements
14311 to always fail with ENOSYS. Some functions are actually named
14312 something starting with __ and the normal name is an alias. */
14313#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14314choke me
14315#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014316char (*f) () = $ac_func;
14317#endif
14318#ifdef __cplusplus
14319}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014320#endif
14321
Skip Montanaro6dead952003-09-25 14:50:04 +000014322int
14323main ()
14324{
14325return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014326 ;
14327 return 0;
14328}
14329_ACEOF
14330rm -f conftest.$ac_objext conftest$ac_exeext
14331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14332 (eval $ac_link) 2>&5
14333 ac_status=$?
14334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14335 (exit $ac_status); } &&
14336 { ac_try='test -s conftest$ac_exeext'
14337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14338 (eval $ac_try) 2>&5
14339 ac_status=$?
14340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14341 (exit $ac_status); }; }; then
14342 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014343else
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014345sed 's/^/| /' conftest.$ac_ext >&5
14346
Martin v. Löwis11437992002-04-12 09:54:03 +000014347eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014349rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014351echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14352echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14353if test `eval echo '${'$as_ac_var'}'` = yes; then
14354 cat >>confdefs.h <<_ACEOF
14355#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14356_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014357
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014358fi
14359done
14360
Michael W. Hudson54241132001-12-07 15:38:26 +000014361
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014362# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014363echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14364echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14365if test "${ac_cv_header_time+set}" = set; then
14366 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014367else
Martin v. Löwis11437992002-04-12 09:54:03 +000014368 cat >conftest.$ac_ext <<_ACEOF
14369#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014370/* confdefs.h. */
14371_ACEOF
14372cat confdefs.h >>conftest.$ac_ext
14373cat >>conftest.$ac_ext <<_ACEOF
14374/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014375#include <sys/types.h>
14376#include <sys/time.h>
14377#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
Martin v. Löwis11437992002-04-12 09:54:03 +000014379int
14380main ()
14381{
14382if ((struct tm *) 0)
14383return 0;
14384 ;
14385 return 0;
14386}
14387_ACEOF
14388rm -f conftest.$ac_objext
14389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14390 (eval $ac_compile) 2>&5
14391 ac_status=$?
14392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14393 (exit $ac_status); } &&
14394 { ac_try='test -s conftest.$ac_objext'
14395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14396 (eval $ac_try) 2>&5
14397 ac_status=$?
14398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14399 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014400 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014401else
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014403sed 's/^/| /' conftest.$ac_ext >&5
14404
Martin v. Löwis11437992002-04-12 09:54:03 +000014405ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014407rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014408fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014409echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14410echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014411if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014412
14413cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014414#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014415_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014416
14417fi
14418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14420echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14421if test "${ac_cv_struct_tm+set}" = set; then
14422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014423else
Martin v. Löwis11437992002-04-12 09:54:03 +000014424 cat >conftest.$ac_ext <<_ACEOF
14425#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014426/* confdefs.h. */
14427_ACEOF
14428cat confdefs.h >>conftest.$ac_ext
14429cat >>conftest.$ac_ext <<_ACEOF
14430/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014431#include <sys/types.h>
14432#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
Martin v. Löwis11437992002-04-12 09:54:03 +000014434int
14435main ()
14436{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014437struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 ;
14439 return 0;
14440}
14441_ACEOF
14442rm -f conftest.$ac_objext
14443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14444 (eval $ac_compile) 2>&5
14445 ac_status=$?
14446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14447 (exit $ac_status); } &&
14448 { ac_try='test -s conftest.$ac_objext'
14449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14450 (eval $ac_try) 2>&5
14451 ac_status=$?
14452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14453 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014454 ac_cv_struct_tm=time.h
14455else
Martin v. Löwis11437992002-04-12 09:54:03 +000014456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014457sed 's/^/| /' conftest.$ac_ext >&5
14458
Martin v. Löwis11437992002-04-12 09:54:03 +000014459ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014460fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014461rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014462fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014463echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14464echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014465if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
14467cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014468#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014469_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014470
14471fi
14472
Martin v. Löwis11437992002-04-12 09:54:03 +000014473echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14474echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14475if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14476 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014477else
Martin v. Löwis11437992002-04-12 09:54:03 +000014478 cat >conftest.$ac_ext <<_ACEOF
14479#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014480/* confdefs.h. */
14481_ACEOF
14482cat confdefs.h >>conftest.$ac_ext
14483cat >>conftest.$ac_ext <<_ACEOF
14484/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014485#include <sys/types.h>
14486#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014487
14488
Martin v. Löwis11437992002-04-12 09:54:03 +000014489int
14490main ()
14491{
14492static struct tm ac_aggr;
14493if (ac_aggr.tm_zone)
14494return 0;
14495 ;
14496 return 0;
14497}
14498_ACEOF
14499rm -f conftest.$ac_objext
14500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14501 (eval $ac_compile) 2>&5
14502 ac_status=$?
14503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14504 (exit $ac_status); } &&
14505 { ac_try='test -s conftest.$ac_objext'
14506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14507 (eval $ac_try) 2>&5
14508 ac_status=$?
14509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14510 (exit $ac_status); }; }; then
14511 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014512else
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014514sed 's/^/| /' conftest.$ac_ext >&5
14515
14516cat >conftest.$ac_ext <<_ACEOF
14517#line $LINENO "configure"
14518/* confdefs.h. */
14519_ACEOF
14520cat confdefs.h >>conftest.$ac_ext
14521cat >>conftest.$ac_ext <<_ACEOF
14522/* end confdefs.h. */
14523#include <sys/types.h>
14524#include <$ac_cv_struct_tm>
14525
14526
14527int
14528main ()
14529{
14530static struct tm ac_aggr;
14531if (sizeof ac_aggr.tm_zone)
14532return 0;
14533 ;
14534 return 0;
14535}
14536_ACEOF
14537rm -f conftest.$ac_objext
14538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14539 (eval $ac_compile) 2>&5
14540 ac_status=$?
14541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14542 (exit $ac_status); } &&
14543 { ac_try='test -s conftest.$ac_objext'
14544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14545 (eval $ac_try) 2>&5
14546 ac_status=$?
14547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14548 (exit $ac_status); }; }; then
14549 ac_cv_member_struct_tm_tm_zone=yes
14550else
14551 echo "$as_me: failed program was:" >&5
14552sed 's/^/| /' conftest.$ac_ext >&5
14553
Martin v. Löwis11437992002-04-12 09:54:03 +000014554ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014555fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014556rm -f conftest.$ac_objext conftest.$ac_ext
14557fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014558rm -f conftest.$ac_objext conftest.$ac_ext
14559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014560echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14561echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14562if test $ac_cv_member_struct_tm_tm_zone = yes; then
14563
14564cat >>confdefs.h <<_ACEOF
14565#define HAVE_STRUCT_TM_TM_ZONE 1
14566_ACEOF
14567
14568
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014569fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014570
Martin v. Löwis11437992002-04-12 09:54:03 +000014571if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14572
14573cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014574#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014575_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014576
14577else
Martin v. Löwis11437992002-04-12 09:54:03 +000014578 echo "$as_me:$LINENO: checking for tzname" >&5
14579echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14580if test "${ac_cv_var_tzname+set}" = set; then
14581 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014582else
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 cat >conftest.$ac_ext <<_ACEOF
14584#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014585/* confdefs.h. */
14586_ACEOF
14587cat confdefs.h >>conftest.$ac_ext
14588cat >>conftest.$ac_ext <<_ACEOF
14589/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014590#include <time.h>
14591#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014592extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014594
Martin v. Löwis11437992002-04-12 09:54:03 +000014595int
14596main ()
14597{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014598atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014599 ;
14600 return 0;
14601}
14602_ACEOF
14603rm -f conftest.$ac_objext conftest$ac_exeext
14604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14605 (eval $ac_link) 2>&5
14606 ac_status=$?
14607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14608 (exit $ac_status); } &&
14609 { ac_try='test -s conftest$ac_exeext'
14610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14611 (eval $ac_try) 2>&5
14612 ac_status=$?
14613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14614 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014615 ac_cv_var_tzname=yes
14616else
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014618sed 's/^/| /' conftest.$ac_ext >&5
14619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014621fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014622rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014623fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014624echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14625echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014626 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
14628cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014629#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014630_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014631
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014632 fi
14633fi
14634
Martin v. Löwis11437992002-04-12 09:54:03 +000014635echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14636echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14637if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14638 echo $ECHO_N "(cached) $ECHO_C" >&6
14639else
14640 cat >conftest.$ac_ext <<_ACEOF
14641#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014642/* confdefs.h. */
14643_ACEOF
14644cat confdefs.h >>conftest.$ac_ext
14645cat >>conftest.$ac_ext <<_ACEOF
14646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014647$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014648int
14649main ()
14650{
14651static struct stat ac_aggr;
14652if (ac_aggr.st_rdev)
14653return 0;
14654 ;
14655 return 0;
14656}
14657_ACEOF
14658rm -f conftest.$ac_objext
14659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14660 (eval $ac_compile) 2>&5
14661 ac_status=$?
14662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14663 (exit $ac_status); } &&
14664 { ac_try='test -s conftest.$ac_objext'
14665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14666 (eval $ac_try) 2>&5
14667 ac_status=$?
14668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14669 (exit $ac_status); }; }; then
14670 ac_cv_member_struct_stat_st_rdev=yes
14671else
14672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014673sed 's/^/| /' conftest.$ac_ext >&5
14674
14675cat >conftest.$ac_ext <<_ACEOF
14676#line $LINENO "configure"
14677/* confdefs.h. */
14678_ACEOF
14679cat confdefs.h >>conftest.$ac_ext
14680cat >>conftest.$ac_ext <<_ACEOF
14681/* end confdefs.h. */
14682$ac_includes_default
14683int
14684main ()
14685{
14686static struct stat ac_aggr;
14687if (sizeof ac_aggr.st_rdev)
14688return 0;
14689 ;
14690 return 0;
14691}
14692_ACEOF
14693rm -f conftest.$ac_objext
14694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14695 (eval $ac_compile) 2>&5
14696 ac_status=$?
14697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14698 (exit $ac_status); } &&
14699 { ac_try='test -s conftest.$ac_objext'
14700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14701 (eval $ac_try) 2>&5
14702 ac_status=$?
14703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14704 (exit $ac_status); }; }; then
14705 ac_cv_member_struct_stat_st_rdev=yes
14706else
14707 echo "$as_me: failed program was:" >&5
14708sed 's/^/| /' conftest.$ac_ext >&5
14709
Martin v. Löwis11437992002-04-12 09:54:03 +000014710ac_cv_member_struct_stat_st_rdev=no
14711fi
14712rm -f conftest.$ac_objext conftest.$ac_ext
14713fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014714rm -f conftest.$ac_objext conftest.$ac_ext
14715fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014716echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14717echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14718if test $ac_cv_member_struct_stat_st_rdev = yes; then
14719
14720cat >>confdefs.h <<_ACEOF
14721#define HAVE_STRUCT_STAT_ST_RDEV 1
14722_ACEOF
14723
14724
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014725fi
14726
Martin v. Löwis11437992002-04-12 09:54:03 +000014727echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14728echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14729if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14730 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014731else
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 cat >conftest.$ac_ext <<_ACEOF
14733#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014734/* confdefs.h. */
14735_ACEOF
14736cat confdefs.h >>conftest.$ac_ext
14737cat >>conftest.$ac_ext <<_ACEOF
14738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014739$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014740int
14741main ()
14742{
14743static struct stat ac_aggr;
14744if (ac_aggr.st_blksize)
14745return 0;
14746 ;
14747 return 0;
14748}
14749_ACEOF
14750rm -f conftest.$ac_objext
14751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14752 (eval $ac_compile) 2>&5
14753 ac_status=$?
14754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14755 (exit $ac_status); } &&
14756 { ac_try='test -s conftest.$ac_objext'
14757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14758 (eval $ac_try) 2>&5
14759 ac_status=$?
14760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14761 (exit $ac_status); }; }; then
14762 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014763else
Martin v. Löwis11437992002-04-12 09:54:03 +000014764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014765sed 's/^/| /' conftest.$ac_ext >&5
14766
14767cat >conftest.$ac_ext <<_ACEOF
14768#line $LINENO "configure"
14769/* confdefs.h. */
14770_ACEOF
14771cat confdefs.h >>conftest.$ac_ext
14772cat >>conftest.$ac_ext <<_ACEOF
14773/* end confdefs.h. */
14774$ac_includes_default
14775int
14776main ()
14777{
14778static struct stat ac_aggr;
14779if (sizeof ac_aggr.st_blksize)
14780return 0;
14781 ;
14782 return 0;
14783}
14784_ACEOF
14785rm -f conftest.$ac_objext
14786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14787 (eval $ac_compile) 2>&5
14788 ac_status=$?
14789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14790 (exit $ac_status); } &&
14791 { ac_try='test -s conftest.$ac_objext'
14792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14793 (eval $ac_try) 2>&5
14794 ac_status=$?
14795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796 (exit $ac_status); }; }; then
14797 ac_cv_member_struct_stat_st_blksize=yes
14798else
14799 echo "$as_me: failed program was:" >&5
14800sed 's/^/| /' conftest.$ac_ext >&5
14801
Martin v. Löwis11437992002-04-12 09:54:03 +000014802ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014803fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014804rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014805fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014806rm -f conftest.$ac_objext conftest.$ac_ext
14807fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014808echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14809echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14810if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014811
Martin v. Löwis11437992002-04-12 09:54:03 +000014812cat >>confdefs.h <<_ACEOF
14813#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14814_ACEOF
14815
14816
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014817fi
14818
Martin v. Löwis11437992002-04-12 09:54:03 +000014819echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14820echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14821if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014823else
Martin v. Löwis11437992002-04-12 09:54:03 +000014824 cat >conftest.$ac_ext <<_ACEOF
14825#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014826/* confdefs.h. */
14827_ACEOF
14828cat confdefs.h >>conftest.$ac_ext
14829cat >>conftest.$ac_ext <<_ACEOF
14830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014831$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014832int
14833main ()
14834{
14835static struct stat ac_aggr;
14836if (ac_aggr.st_blocks)
14837return 0;
14838 ;
14839 return 0;
14840}
14841_ACEOF
14842rm -f conftest.$ac_objext
14843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14844 (eval $ac_compile) 2>&5
14845 ac_status=$?
14846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14847 (exit $ac_status); } &&
14848 { ac_try='test -s conftest.$ac_objext'
14849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14850 (eval $ac_try) 2>&5
14851 ac_status=$?
14852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853 (exit $ac_status); }; }; then
14854 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014855else
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014857sed 's/^/| /' conftest.$ac_ext >&5
14858
14859cat >conftest.$ac_ext <<_ACEOF
14860#line $LINENO "configure"
14861/* confdefs.h. */
14862_ACEOF
14863cat confdefs.h >>conftest.$ac_ext
14864cat >>conftest.$ac_ext <<_ACEOF
14865/* end confdefs.h. */
14866$ac_includes_default
14867int
14868main ()
14869{
14870static struct stat ac_aggr;
14871if (sizeof ac_aggr.st_blocks)
14872return 0;
14873 ;
14874 return 0;
14875}
14876_ACEOF
14877rm -f conftest.$ac_objext
14878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14879 (eval $ac_compile) 2>&5
14880 ac_status=$?
14881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14882 (exit $ac_status); } &&
14883 { ac_try='test -s conftest.$ac_objext'
14884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14885 (eval $ac_try) 2>&5
14886 ac_status=$?
14887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14888 (exit $ac_status); }; }; then
14889 ac_cv_member_struct_stat_st_blocks=yes
14890else
14891 echo "$as_me: failed program was:" >&5
14892sed 's/^/| /' conftest.$ac_ext >&5
14893
Martin v. Löwis11437992002-04-12 09:54:03 +000014894ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014895fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014896rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014897fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014898rm -f conftest.$ac_objext conftest.$ac_ext
14899fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014900echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14901echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14902if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014903
Martin v. Löwis11437992002-04-12 09:54:03 +000014904cat >>confdefs.h <<_ACEOF
14905#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14906_ACEOF
14907
14908
14909cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014910#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014911_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014912
14913else
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014915fi
14916
Michael W. Hudson54241132001-12-07 15:38:26 +000014917
Martin v. Löwis11437992002-04-12 09:54:03 +000014918
14919echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14920echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14921if test "${ac_cv_header_time_altzone+set}" = set; then
14922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014923else
Martin v. Löwis11437992002-04-12 09:54:03 +000014924 cat >conftest.$ac_ext <<_ACEOF
14925#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014926/* confdefs.h. */
14927_ACEOF
14928cat confdefs.h >>conftest.$ac_ext
14929cat >>conftest.$ac_ext <<_ACEOF
14930/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014931#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014932int
14933main ()
14934{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014935return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 ;
14937 return 0;
14938}
14939_ACEOF
14940rm -f conftest.$ac_objext
14941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14942 (eval $ac_compile) 2>&5
14943 ac_status=$?
14944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14945 (exit $ac_status); } &&
14946 { ac_try='test -s conftest.$ac_objext'
14947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14948 (eval $ac_try) 2>&5
14949 ac_status=$?
14950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14951 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014952 ac_cv_header_time_altzone=yes
14953else
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014955sed 's/^/| /' conftest.$ac_ext >&5
14956
Martin v. Löwis11437992002-04-12 09:54:03 +000014957ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014958fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014959rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014960fi
14961
Martin v. Löwis11437992002-04-12 09:54:03 +000014962echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14963echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014964if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014965
14966cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014967#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014968_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014969
14970fi
14971
Guido van Rossumda88dad1995-01-26 00:46:29 +000014972was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014973echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14974echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14975cat >conftest.$ac_ext <<_ACEOF
14976#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014977/* confdefs.h. */
14978_ACEOF
14979cat confdefs.h >>conftest.$ac_ext
14980cat >>conftest.$ac_ext <<_ACEOF
14981/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014982
14983#include <sys/types.h>
14984#include <sys/select.h>
14985#include <sys/time.h>
14986
Martin v. Löwis11437992002-04-12 09:54:03 +000014987int
14988main ()
14989{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014990;
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 ;
14992 return 0;
14993}
14994_ACEOF
14995rm -f conftest.$ac_objext
14996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14997 (eval $ac_compile) 2>&5
14998 ac_status=$?
14999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15000 (exit $ac_status); } &&
15001 { ac_try='test -s conftest.$ac_objext'
15002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15003 (eval $ac_try) 2>&5
15004 ac_status=$?
15005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15006 (exit $ac_status); }; }; then
15007
15008
15009cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015010#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015011_ACEOF
15012
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015013 was_it_defined=yes
15014
Guido van Rossumf78abae1997-01-21 22:02:36 +000015015else
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015017sed 's/^/| /' conftest.$ac_ext >&5
15018
Guido van Rossum7f43da71994-08-01 12:15:30 +000015019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015020rm -f conftest.$ac_objext conftest.$ac_ext
15021echo "$as_me:$LINENO: result: $was_it_defined" >&5
15022echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015023
Martin v. Löwis11437992002-04-12 09:54:03 +000015024echo "$as_me:$LINENO: checking for addrinfo" >&5
15025echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15026if test "${ac_cv_struct_addrinfo+set}" = set; then
15027 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015028else
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 cat >conftest.$ac_ext <<_ACEOF
15030#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015031/* confdefs.h. */
15032_ACEOF
15033cat confdefs.h >>conftest.$ac_ext
15034cat >>conftest.$ac_ext <<_ACEOF
15035/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015036
15037# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015038int
15039main ()
15040{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015041struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 ;
15043 return 0;
15044}
15045_ACEOF
15046rm -f conftest.$ac_objext
15047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15048 (eval $ac_compile) 2>&5
15049 ac_status=$?
15050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15051 (exit $ac_status); } &&
15052 { ac_try='test -s conftest.$ac_objext'
15053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15054 (eval $ac_try) 2>&5
15055 ac_status=$?
15056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15057 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015058 ac_cv_struct_addrinfo=yes
15059else
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015061sed 's/^/| /' conftest.$ac_ext >&5
15062
Martin v. Löwis11437992002-04-12 09:54:03 +000015063ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015065rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015066fi
15067
Martin v. Löwis11437992002-04-12 09:54:03 +000015068echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15069echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015070if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015071
15072cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015073#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015074_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015075
15076fi
15077
Martin v. Löwis11437992002-04-12 09:54:03 +000015078echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15079echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15080if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15081 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015082else
Martin v. Löwis11437992002-04-12 09:54:03 +000015083 cat >conftest.$ac_ext <<_ACEOF
15084#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015085/* confdefs.h. */
15086_ACEOF
15087cat confdefs.h >>conftest.$ac_ext
15088cat >>conftest.$ac_ext <<_ACEOF
15089/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015090
15091# include <sys/types.h>
15092# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015093int
15094main ()
15095{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015096struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 ;
15098 return 0;
15099}
15100_ACEOF
15101rm -f conftest.$ac_objext
15102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15103 (eval $ac_compile) 2>&5
15104 ac_status=$?
15105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15106 (exit $ac_status); } &&
15107 { ac_try='test -s conftest.$ac_objext'
15108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15109 (eval $ac_try) 2>&5
15110 ac_status=$?
15111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15112 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015113 ac_cv_struct_sockaddr_storage=yes
15114else
Martin v. Löwis11437992002-04-12 09:54:03 +000015115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015116sed 's/^/| /' conftest.$ac_ext >&5
15117
Martin v. Löwis11437992002-04-12 09:54:03 +000015118ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015119fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015120rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015121fi
15122
Martin v. Löwis11437992002-04-12 09:54:03 +000015123echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15124echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015125if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015126
15127cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015128#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015129_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015130
15131fi
15132
Guido van Rossum627b2d71993-12-24 10:39:16 +000015133# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015134
Michael W. Hudson54241132001-12-07 15:38:26 +000015135
Martin v. Löwis11437992002-04-12 09:54:03 +000015136echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15137echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15138if test "${ac_cv_c_char_unsigned+set}" = set; then
15139 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015140else
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 cat >conftest.$ac_ext <<_ACEOF
15142#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015143/* confdefs.h. */
15144_ACEOF
15145cat confdefs.h >>conftest.$ac_ext
15146cat >>conftest.$ac_ext <<_ACEOF
15147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015148$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015149int
15150main ()
15151{
15152static int test_array [1 - 2 * !(((char) -1) < 0)];
15153test_array [0] = 0
15154
15155 ;
15156 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015157}
Martin v. Löwis11437992002-04-12 09:54:03 +000015158_ACEOF
15159rm -f conftest.$ac_objext
15160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15161 (eval $ac_compile) 2>&5
15162 ac_status=$?
15163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15164 (exit $ac_status); } &&
15165 { ac_try='test -s conftest.$ac_objext'
15166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15167 (eval $ac_try) 2>&5
15168 ac_status=$?
15169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15170 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015171 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015172else
15173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015174sed 's/^/| /' conftest.$ac_ext >&5
15175
Martin v. Löwis11437992002-04-12 09:54:03 +000015176ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015177fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015178rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015179fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015180echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15181echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015182if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015184#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015185_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015186
15187fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015188
Martin v. Löwis11437992002-04-12 09:54:03 +000015189echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15190echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15191if test "${ac_cv_c_const+set}" = set; then
15192 echo $ECHO_N "(cached) $ECHO_C" >&6
15193else
15194 cat >conftest.$ac_ext <<_ACEOF
15195#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015196/* confdefs.h. */
15197_ACEOF
15198cat confdefs.h >>conftest.$ac_ext
15199cat >>conftest.$ac_ext <<_ACEOF
15200/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015201
Martin v. Löwis11437992002-04-12 09:54:03 +000015202int
15203main ()
15204{
15205/* FIXME: Include the comments suggested by Paul. */
15206#ifndef __cplusplus
15207 /* Ultrix mips cc rejects this. */
15208 typedef int charset[2];
15209 const charset x;
15210 /* SunOS 4.1.1 cc rejects this. */
15211 char const *const *ccp;
15212 char **p;
15213 /* NEC SVR4.0.2 mips cc rejects this. */
15214 struct point {int x, y;};
15215 static struct point const zero = {0,0};
15216 /* AIX XL C 1.02.0.0 rejects this.
15217 It does not let you subtract one const X* pointer from another in
15218 an arm of an if-expression whose if-part is not a constant
15219 expression */
15220 const char *g = "string";
15221 ccp = &g + (g ? g-g : 0);
15222 /* HPUX 7.0 cc rejects these. */
15223 ++ccp;
15224 p = (char**) ccp;
15225 ccp = (char const *const *) p;
15226 { /* SCO 3.2v4 cc rejects this. */
15227 char *t;
15228 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230 *t++ = 0;
15231 }
15232 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15233 int x[] = {25, 17};
15234 const int *foo = &x[0];
15235 ++foo;
15236 }
15237 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15238 typedef const int *iptr;
15239 iptr p = 0;
15240 ++p;
15241 }
15242 { /* AIX XL C 1.02.0.0 rejects this saying
15243 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15244 struct s { int j; const int *ap[3]; };
15245 struct s *b; b->j = 5;
15246 }
15247 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15248 const int foo = 10;
15249 }
15250#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015251
Martin v. Löwis11437992002-04-12 09:54:03 +000015252 ;
15253 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015254}
Martin v. Löwis11437992002-04-12 09:54:03 +000015255_ACEOF
15256rm -f conftest.$ac_objext
15257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15258 (eval $ac_compile) 2>&5
15259 ac_status=$?
15260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15261 (exit $ac_status); } &&
15262 { ac_try='test -s conftest.$ac_objext'
15263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15264 (eval $ac_try) 2>&5
15265 ac_status=$?
15266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15267 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015268 ac_cv_c_const=yes
15269else
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015271sed 's/^/| /' conftest.$ac_ext >&5
15272
Martin v. Löwis11437992002-04-12 09:54:03 +000015273ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015275rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015277echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15278echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015279if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015280
15281cat >>confdefs.h <<\_ACEOF
15282#define const
15283_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015284
15285fi
15286
Michael W. Hudson54241132001-12-07 15:38:26 +000015287
Guido van Rossumda88dad1995-01-26 00:46:29 +000015288works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015289echo "$as_me:$LINENO: checking for working volatile" >&5
15290echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15291cat >conftest.$ac_ext <<_ACEOF
15292#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015293/* confdefs.h. */
15294_ACEOF
15295cat confdefs.h >>conftest.$ac_ext
15296cat >>conftest.$ac_ext <<_ACEOF
15297/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015298
Martin v. Löwis11437992002-04-12 09:54:03 +000015299int
15300main ()
15301{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015302volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 ;
15304 return 0;
15305}
15306_ACEOF
15307rm -f conftest.$ac_objext
15308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15309 (eval $ac_compile) 2>&5
15310 ac_status=$?
15311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15312 (exit $ac_status); } &&
15313 { ac_try='test -s conftest.$ac_objext'
15314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15315 (eval $ac_try) 2>&5
15316 ac_status=$?
15317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15318 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015319 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015320else
Martin v. Löwis11437992002-04-12 09:54:03 +000015321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015322sed 's/^/| /' conftest.$ac_ext >&5
15323
Martin v. Löwis11437992002-04-12 09:54:03 +000015324
15325cat >>confdefs.h <<\_ACEOF
15326#define volatile
15327_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015328
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015329
Guido van Rossum627b2d71993-12-24 10:39:16 +000015330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015331rm -f conftest.$ac_objext conftest.$ac_ext
15332echo "$as_me:$LINENO: result: $works" >&5
15333echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015334
Guido van Rossumda88dad1995-01-26 00:46:29 +000015335works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015336echo "$as_me:$LINENO: checking for working signed char" >&5
15337echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15338cat >conftest.$ac_ext <<_ACEOF
15339#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015340/* confdefs.h. */
15341_ACEOF
15342cat confdefs.h >>conftest.$ac_ext
15343cat >>conftest.$ac_ext <<_ACEOF
15344/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015345
Martin v. Löwis11437992002-04-12 09:54:03 +000015346int
15347main ()
15348{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015349signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 ;
15351 return 0;
15352}
15353_ACEOF
15354rm -f conftest.$ac_objext
15355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15356 (eval $ac_compile) 2>&5
15357 ac_status=$?
15358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15359 (exit $ac_status); } &&
15360 { ac_try='test -s conftest.$ac_objext'
15361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15362 (eval $ac_try) 2>&5
15363 ac_status=$?
15364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15365 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015366 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015367else
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015369sed 's/^/| /' conftest.$ac_ext >&5
15370
Martin v. Löwis11437992002-04-12 09:54:03 +000015371
15372cat >>confdefs.h <<\_ACEOF
15373#define signed
15374_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015375
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015376
Guido van Rossum7f43da71994-08-01 12:15:30 +000015377fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015378rm -f conftest.$ac_objext conftest.$ac_ext
15379echo "$as_me:$LINENO: result: $works" >&5
15380echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015381
Guido van Rossumda88dad1995-01-26 00:46:29 +000015382have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015383echo "$as_me:$LINENO: checking for prototypes" >&5
15384echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15385cat >conftest.$ac_ext <<_ACEOF
15386#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015387/* confdefs.h. */
15388_ACEOF
15389cat confdefs.h >>conftest.$ac_ext
15390cat >>conftest.$ac_ext <<_ACEOF
15391/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015392int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015393int
15394main ()
15395{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015396return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015397 ;
15398 return 0;
15399}
15400_ACEOF
15401rm -f conftest.$ac_objext
15402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15403 (eval $ac_compile) 2>&5
15404 ac_status=$?
15405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15406 (exit $ac_status); } &&
15407 { ac_try='test -s conftest.$ac_objext'
15408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15409 (eval $ac_try) 2>&5
15410 ac_status=$?
15411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15412 (exit $ac_status); }; }; then
15413
15414
15415cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015416#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015417_ACEOF
15418
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015419 have_prototypes=yes
15420
Guido van Rossumf78abae1997-01-21 22:02:36 +000015421else
Martin v. Löwis11437992002-04-12 09:54:03 +000015422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015423sed 's/^/| /' conftest.$ac_ext >&5
15424
Guido van Rossum7f43da71994-08-01 12:15:30 +000015425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015426rm -f conftest.$ac_objext conftest.$ac_ext
15427echo "$as_me:$LINENO: result: $have_prototypes" >&5
15428echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015429
Guido van Rossumda88dad1995-01-26 00:46:29 +000015430works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015431echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15432echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15433cat >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 Rossum7f43da71994-08-01 12:15:30 +000015440
15441#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015442int foo(int x, ...) {
15443 va_list va;
15444 va_start(va, x);
15445 va_arg(va, int);
15446 va_arg(va, char *);
15447 va_arg(va, double);
15448 return 0;
15449}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015450
Martin v. Löwis11437992002-04-12 09:54:03 +000015451int
15452main ()
15453{
Guido van Rossum90eea071996-08-30 20:58:57 +000015454return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015455 ;
15456 return 0;
15457}
15458_ACEOF
15459rm -f conftest.$ac_objext
15460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15461 (eval $ac_compile) 2>&5
15462 ac_status=$?
15463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15464 (exit $ac_status); } &&
15465 { ac_try='test -s conftest.$ac_objext'
15466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15467 (eval $ac_try) 2>&5
15468 ac_status=$?
15469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15470 (exit $ac_status); }; }; then
15471
15472
15473cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015474#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015475_ACEOF
15476
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015477 works=yes
15478
Guido van Rossumf78abae1997-01-21 22:02:36 +000015479else
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015481sed 's/^/| /' conftest.$ac_ext >&5
15482
Guido van Rossum627b2d71993-12-24 10:39:16 +000015483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015484rm -f conftest.$ac_objext conftest.$ac_ext
15485echo "$as_me:$LINENO: result: $works" >&5
15486echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015487
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015488# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015489echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15490echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15491cat >conftest.$ac_ext <<_ACEOF
15492#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015493/* confdefs.h. */
15494_ACEOF
15495cat confdefs.h >>conftest.$ac_ext
15496cat >>conftest.$ac_ext <<_ACEOF
15497/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015498#include <sys/types.h>
15499#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015500int
15501main ()
15502{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015503struct sockaddr x;
15504x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015505 ;
15506 return 0;
15507}
15508_ACEOF
15509rm -f conftest.$ac_objext
15510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15511 (eval $ac_compile) 2>&5
15512 ac_status=$?
15513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15514 (exit $ac_status); } &&
15515 { ac_try='test -s conftest.$ac_objext'
15516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15517 (eval $ac_try) 2>&5
15518 ac_status=$?
15519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15520 (exit $ac_status); }; }; then
15521 echo "$as_me:$LINENO: result: yes" >&5
15522echo "${ECHO_T}yes" >&6
15523
15524cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015525#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015526_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015527
15528else
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015530sed 's/^/| /' conftest.$ac_ext >&5
15531
Martin v. Löwis11437992002-04-12 09:54:03 +000015532echo "$as_me:$LINENO: result: no" >&5
15533echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015534fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015535rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015536
Guido van Rossumda88dad1995-01-26 00:46:29 +000015537va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015538echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15539echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15540cat >conftest.$ac_ext <<_ACEOF
15541#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015542/* confdefs.h. */
15543_ACEOF
15544cat confdefs.h >>conftest.$ac_ext
15545cat >>conftest.$ac_ext <<_ACEOF
15546/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015547
15548#ifdef HAVE_STDARG_PROTOTYPES
15549#include <stdarg.h>
15550#else
15551#include <varargs.h>
15552#endif
15553
Martin v. Löwis11437992002-04-12 09:54:03 +000015554int
15555main ()
15556{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015557va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015558 ;
15559 return 0;
15560}
15561_ACEOF
15562rm -f conftest.$ac_objext
15563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15564 (eval $ac_compile) 2>&5
15565 ac_status=$?
15566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15567 (exit $ac_status); } &&
15568 { ac_try='test -s conftest.$ac_objext'
15569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15570 (eval $ac_try) 2>&5
15571 ac_status=$?
15572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15573 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015574 :
15575else
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015577sed 's/^/| /' conftest.$ac_ext >&5
15578
Martin v. Löwis11437992002-04-12 09:54:03 +000015579
15580
15581cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015582#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015583_ACEOF
15584
Guido van Rossumda88dad1995-01-26 00:46:29 +000015585 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015586
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015588rm -f conftest.$ac_objext conftest.$ac_ext
15589echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15590echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015592# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015593
15594
15595
15596echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15597echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15598if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15599 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015600else
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 cat >conftest.$ac_ext <<_ACEOF
15602#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015603/* confdefs.h. */
15604_ACEOF
15605cat confdefs.h >>conftest.$ac_ext
15606cat >>conftest.$ac_ext <<_ACEOF
15607/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015608/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015609 which can conflict with char gethostbyname_r (); below.
15610 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015611 <limits.h> exists even on freestanding compilers. Under hpux,
15612 including <limits.h> includes <sys/time.h> and causes problems
15613 checking for functions defined therein. */
15614#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015615# include <limits.h>
15616#else
15617# include <assert.h>
15618#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015619/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015620#ifdef __cplusplus
15621extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015622{
Martin v. Löwis11437992002-04-12 09:54:03 +000015623#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015624/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015625 builtin and then its argument prototype would still apply. */
15626char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015627/* The GNU C library defines this for functions which it implements
15628 to always fail with ENOSYS. Some functions are actually named
15629 something starting with __ and the normal name is an alias. */
15630#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15631choke me
15632#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015633char (*f) () = gethostbyname_r;
15634#endif
15635#ifdef __cplusplus
15636}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015637#endif
15638
Skip Montanaro6dead952003-09-25 14:50:04 +000015639int
15640main ()
15641{
15642return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015643 ;
15644 return 0;
15645}
15646_ACEOF
15647rm -f conftest.$ac_objext conftest$ac_exeext
15648if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15649 (eval $ac_link) 2>&5
15650 ac_status=$?
15651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15652 (exit $ac_status); } &&
15653 { ac_try='test -s conftest$ac_exeext'
15654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15655 (eval $ac_try) 2>&5
15656 ac_status=$?
15657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15658 (exit $ac_status); }; }; then
15659 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015660else
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015662sed 's/^/| /' conftest.$ac_ext >&5
15663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015665fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015666rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015667fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015668echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15669echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15670if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015671
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015673#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015674_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015675
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15677echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015678 OLD_CFLAGS=$CFLAGS
15679 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 cat >conftest.$ac_ext <<_ACEOF
15681#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015682/* confdefs.h. */
15683_ACEOF
15684cat confdefs.h >>conftest.$ac_ext
15685cat >>conftest.$ac_ext <<_ACEOF
15686/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015687
15688# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015689
Martin v. Löwis11437992002-04-12 09:54:03 +000015690int
15691main ()
15692{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015693
15694 char *name;
15695 struct hostent *he, *res;
15696 char buffer[2048];
15697 int buflen = 2048;
15698 int h_errnop;
15699
15700 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015701
15702 ;
15703 return 0;
15704}
15705_ACEOF
15706rm -f conftest.$ac_objext
15707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15708 (eval $ac_compile) 2>&5
15709 ac_status=$?
15710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15711 (exit $ac_status); } &&
15712 { ac_try='test -s conftest.$ac_objext'
15713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15714 (eval $ac_try) 2>&5
15715 ac_status=$?
15716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15717 (exit $ac_status); }; }; then
15718
15719 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015720#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015721_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015722
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
15724cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015725#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015726_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015727
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 echo "$as_me:$LINENO: result: yes" >&5
15729echo "${ECHO_T}yes" >&6
15730
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015731else
Martin v. Löwis11437992002-04-12 09:54:03 +000015732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015733sed 's/^/| /' conftest.$ac_ext >&5
15734
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
15736 echo "$as_me:$LINENO: result: no" >&5
15737echo "${ECHO_T}no" >&6
15738 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15739echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15740 cat >conftest.$ac_ext <<_ACEOF
15741#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015742/* confdefs.h. */
15743_ACEOF
15744cat confdefs.h >>conftest.$ac_ext
15745cat >>conftest.$ac_ext <<_ACEOF
15746/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015747
15748# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015749
Martin v. Löwis11437992002-04-12 09:54:03 +000015750int
15751main ()
15752{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015753
15754 char *name;
15755 struct hostent *he;
15756 char buffer[2048];
15757 int buflen = 2048;
15758 int h_errnop;
15759
15760 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015761
15762 ;
15763 return 0;
15764}
15765_ACEOF
15766rm -f conftest.$ac_objext
15767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15768 (eval $ac_compile) 2>&5
15769 ac_status=$?
15770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15771 (exit $ac_status); } &&
15772 { ac_try='test -s conftest.$ac_objext'
15773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15774 (eval $ac_try) 2>&5
15775 ac_status=$?
15776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15777 (exit $ac_status); }; }; then
15778
15779 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015780#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015781_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015782
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
15784cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015785#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015786_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015787
Martin v. Löwis11437992002-04-12 09:54:03 +000015788 echo "$as_me:$LINENO: result: yes" >&5
15789echo "${ECHO_T}yes" >&6
15790
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015791else
Martin v. Löwis11437992002-04-12 09:54:03 +000015792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015793sed 's/^/| /' conftest.$ac_ext >&5
15794
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
15796 echo "$as_me:$LINENO: result: no" >&5
15797echo "${ECHO_T}no" >&6
15798 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15799echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15800 cat >conftest.$ac_ext <<_ACEOF
15801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015802/* confdefs.h. */
15803_ACEOF
15804cat confdefs.h >>conftest.$ac_ext
15805cat >>conftest.$ac_ext <<_ACEOF
15806/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015807
15808# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015809
Martin v. Löwis11437992002-04-12 09:54:03 +000015810int
15811main ()
15812{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015813
15814 char *name;
15815 struct hostent *he;
15816 struct hostent_data data;
15817
15818 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015819
15820 ;
15821 return 0;
15822}
15823_ACEOF
15824rm -f conftest.$ac_objext
15825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15826 (eval $ac_compile) 2>&5
15827 ac_status=$?
15828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15829 (exit $ac_status); } &&
15830 { ac_try='test -s conftest.$ac_objext'
15831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15832 (eval $ac_try) 2>&5
15833 ac_status=$?
15834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15835 (exit $ac_status); }; }; then
15836
15837 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015838#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015839_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015840
Martin v. Löwis11437992002-04-12 09:54:03 +000015841
15842cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015843#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015844_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015845
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 echo "$as_me:$LINENO: result: yes" >&5
15847echo "${ECHO_T}yes" >&6
15848
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015849else
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015851sed 's/^/| /' conftest.$ac_ext >&5
15852
Martin v. Löwis11437992002-04-12 09:54:03 +000015853
15854 echo "$as_me:$LINENO: result: no" >&5
15855echo "${ECHO_T}no" >&6
15856
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015858rm -f conftest.$ac_objext conftest.$ac_ext
15859
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015860fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015861rm -f conftest.$ac_objext conftest.$ac_ext
15862
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015863fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015864rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015865 CFLAGS=$OLD_CFLAGS
15866
15867else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
15870for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015871do
Martin v. Löwis11437992002-04-12 09:54:03 +000015872as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15873echo "$as_me:$LINENO: checking for $ac_func" >&5
15874echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15875if eval "test \"\${$as_ac_var+set}\" = set"; then
15876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015877else
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 cat >conftest.$ac_ext <<_ACEOF
15879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015880/* confdefs.h. */
15881_ACEOF
15882cat confdefs.h >>conftest.$ac_ext
15883cat >>conftest.$ac_ext <<_ACEOF
15884/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015885/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015886 which can conflict with char $ac_func (); below.
15887 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015888 <limits.h> exists even on freestanding compilers. Under hpux,
15889 including <limits.h> includes <sys/time.h> and causes problems
15890 checking for functions defined therein. */
15891#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015892# include <limits.h>
15893#else
15894# include <assert.h>
15895#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015896/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015897#ifdef __cplusplus
15898extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015899{
Martin v. Löwis11437992002-04-12 09:54:03 +000015900#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015901/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015902 builtin and then its argument prototype would still apply. */
15903char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015904/* The GNU C library defines this for functions which it implements
15905 to always fail with ENOSYS. Some functions are actually named
15906 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015907#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015908choke me
15909#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015910char (*f) () = $ac_func;
15911#endif
15912#ifdef __cplusplus
15913}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015914#endif
15915
Skip Montanaro6dead952003-09-25 14:50:04 +000015916int
15917main ()
15918{
15919return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 ;
15921 return 0;
15922}
15923_ACEOF
15924rm -f conftest.$ac_objext conftest$ac_exeext
15925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15926 (eval $ac_link) 2>&5
15927 ac_status=$?
15928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15929 (exit $ac_status); } &&
15930 { ac_try='test -s conftest$ac_exeext'
15931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15932 (eval $ac_try) 2>&5
15933 ac_status=$?
15934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15935 (exit $ac_status); }; }; then
15936 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015937else
Martin v. Löwis11437992002-04-12 09:54:03 +000015938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015939sed 's/^/| /' conftest.$ac_ext >&5
15940
Martin v. Löwis11437992002-04-12 09:54:03 +000015941eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015942fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015943rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015944fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015945echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15946echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15947if test `eval echo '${'$as_ac_var'}'` = yes; then
15948 cat >>confdefs.h <<_ACEOF
15949#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15950_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015951
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015952fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015953done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015954
Michael W. Hudson54241132001-12-07 15:38:26 +000015955
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015956fi
15957
Michael W. Hudson54241132001-12-07 15:38:26 +000015958
15959
15960
15961
15962
15963
Guido van Rossum627b2d71993-12-24 10:39:16 +000015964# checks for system services
15965# (none yet)
15966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015967# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015968echo "$as_me:$LINENO: checking for __fpu_control" >&5
15969echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15970if test "${ac_cv_func___fpu_control+set}" = set; then
15971 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015972else
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 cat >conftest.$ac_ext <<_ACEOF
15974#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015975/* confdefs.h. */
15976_ACEOF
15977cat confdefs.h >>conftest.$ac_ext
15978cat >>conftest.$ac_ext <<_ACEOF
15979/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015980/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015981 which can conflict with char __fpu_control (); below.
15982 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015983 <limits.h> exists even on freestanding compilers. Under hpux,
15984 including <limits.h> includes <sys/time.h> and causes problems
15985 checking for functions defined therein. */
15986#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015987# include <limits.h>
15988#else
15989# include <assert.h>
15990#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015992#ifdef __cplusplus
15993extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015994{
Martin v. Löwis11437992002-04-12 09:54:03 +000015995#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015996/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015997 builtin and then its argument prototype would still apply. */
15998char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015999/* The GNU C library defines this for functions which it implements
16000 to always fail with ENOSYS. Some functions are actually named
16001 something starting with __ and the normal name is an alias. */
16002#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16003choke me
16004#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016005char (*f) () = __fpu_control;
16006#endif
16007#ifdef __cplusplus
16008}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016009#endif
16010
Skip Montanaro6dead952003-09-25 14:50:04 +000016011int
16012main ()
16013{
16014return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 ;
16016 return 0;
16017}
16018_ACEOF
16019rm -f conftest.$ac_objext conftest$ac_exeext
16020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16021 (eval $ac_link) 2>&5
16022 ac_status=$?
16023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16024 (exit $ac_status); } &&
16025 { ac_try='test -s conftest$ac_exeext'
16026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16027 (eval $ac_try) 2>&5
16028 ac_status=$?
16029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16030 (exit $ac_status); }; }; then
16031 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016032else
Martin v. Löwis11437992002-04-12 09:54:03 +000016033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016034sed 's/^/| /' conftest.$ac_ext >&5
16035
Martin v. Löwis11437992002-04-12 09:54:03 +000016036ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016038rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016040echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16041echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16042if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016043 :
16044else
Martin v. Löwis11437992002-04-12 09:54:03 +000016045
16046echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16047echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16048if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16049 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016050else
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016052LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016053cat >conftest.$ac_ext <<_ACEOF
16054#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016055/* confdefs.h. */
16056_ACEOF
16057cat confdefs.h >>conftest.$ac_ext
16058cat >>conftest.$ac_ext <<_ACEOF
16059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016060
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016061/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016062#ifdef __cplusplus
16063extern "C"
16064#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016065/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 builtin and then its argument prototype would still apply. */
16067char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016068int
16069main ()
16070{
16071__fpu_control ();
16072 ;
16073 return 0;
16074}
16075_ACEOF
16076rm -f conftest.$ac_objext conftest$ac_exeext
16077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16078 (eval $ac_link) 2>&5
16079 ac_status=$?
16080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16081 (exit $ac_status); } &&
16082 { ac_try='test -s conftest$ac_exeext'
16083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16084 (eval $ac_try) 2>&5
16085 ac_status=$?
16086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16087 (exit $ac_status); }; }; then
16088 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016089else
Martin v. Löwis11437992002-04-12 09:54:03 +000016090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016091sed 's/^/| /' conftest.$ac_ext >&5
16092
Martin v. Löwis11437992002-04-12 09:54:03 +000016093ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016095rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16096LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016098echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16099echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16100if test $ac_cv_lib_ieee___fpu_control = yes; then
16101 cat >>confdefs.h <<_ACEOF
16102#define HAVE_LIBIEEE 1
16103_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016104
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016105 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016106
Guido van Rossum627b2d71993-12-24 10:39:16 +000016107fi
16108
Michael W. Hudson54241132001-12-07 15:38:26 +000016109
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016110fi
16111
Michael W. Hudson54241132001-12-07 15:38:26 +000016112
Guido van Rossum7f253911997-05-09 02:42:48 +000016113# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016114echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16115echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16116
Guido van Rossum7f253911997-05-09 02:42:48 +000016117# Check whether --with-fpectl or --without-fpectl was given.
16118if test "${with_fpectl+set}" = set; then
16119 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016120
Guido van Rossum7f253911997-05-09 02:42:48 +000016121if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016122then
16123
16124cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016125#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016126_ACEOF
16127
16128 echo "$as_me:$LINENO: result: yes" >&5
16129echo "${ECHO_T}yes" >&6
16130else echo "$as_me:$LINENO: result: no" >&5
16131echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016132fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016133else
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 echo "$as_me:$LINENO: result: no" >&5
16135echo "${ECHO_T}no" >&6
16136fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016137
Guido van Rossum7f43da71994-08-01 12:15:30 +000016138# check for --with-libm=...
16139
Guido van Rossum563e7081996-09-10 18:20:48 +000016140case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016141Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016142BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016143*) LIBM=-lm
16144esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016145echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16146echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16147
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016148# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016149if test "${with_libm+set}" = set; then
16150 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016151
Guido van Rossum7f253911997-05-09 02:42:48 +000016152if test "$withval" = no
16153then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016154 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16155echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016156elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016157then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016158 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16159echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16160else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16161echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16162 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016163fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016164else
Martin v. Löwis11437992002-04-12 09:54:03 +000016165 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16166echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16167fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016168
16169# check for --with-libc=...
16170
Martin v. Löwis11437992002-04-12 09:54:03 +000016171echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16172echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16173
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016174# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016175if test "${with_libc+set}" = set; then
16176 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016177
Guido van Rossum7f253911997-05-09 02:42:48 +000016178if test "$withval" = no
16179then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16181echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016182elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016183then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016184 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16185echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16186else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16187echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16188 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016189fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016190else
Martin v. Löwis11437992002-04-12 09:54:03 +000016191 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16192echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16193fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016194
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016195# check for hypot() in math library
16196LIBS_SAVE=$LIBS
16197LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016198
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016199for ac_func in hypot
16200do
Martin v. Löwis11437992002-04-12 09:54:03 +000016201as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16202echo "$as_me:$LINENO: checking for $ac_func" >&5
16203echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16204if eval "test \"\${$as_ac_var+set}\" = set"; then
16205 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016206else
Martin v. Löwis11437992002-04-12 09:54:03 +000016207 cat >conftest.$ac_ext <<_ACEOF
16208#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016209/* confdefs.h. */
16210_ACEOF
16211cat confdefs.h >>conftest.$ac_ext
16212cat >>conftest.$ac_ext <<_ACEOF
16213/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016214/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016215 which can conflict with char $ac_func (); below.
16216 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016217 <limits.h> exists even on freestanding compilers. Under hpux,
16218 including <limits.h> includes <sys/time.h> and causes problems
16219 checking for functions defined therein. */
16220#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016221# include <limits.h>
16222#else
16223# include <assert.h>
16224#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016225/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016226#ifdef __cplusplus
16227extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016228{
Martin v. Löwis11437992002-04-12 09:54:03 +000016229#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016230/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016231 builtin and then its argument prototype would still apply. */
16232char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016233/* The GNU C library defines this for functions which it implements
16234 to always fail with ENOSYS. Some functions are actually named
16235 something starting with __ and the normal name is an alias. */
16236#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16237choke me
16238#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016239char (*f) () = $ac_func;
16240#endif
16241#ifdef __cplusplus
16242}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016243#endif
16244
Skip Montanaro6dead952003-09-25 14:50:04 +000016245int
16246main ()
16247{
16248return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016249 ;
16250 return 0;
16251}
16252_ACEOF
16253rm -f conftest.$ac_objext conftest$ac_exeext
16254if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16255 (eval $ac_link) 2>&5
16256 ac_status=$?
16257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16258 (exit $ac_status); } &&
16259 { ac_try='test -s conftest$ac_exeext'
16260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16261 (eval $ac_try) 2>&5
16262 ac_status=$?
16263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16264 (exit $ac_status); }; }; then
16265 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016266else
Martin v. Löwis11437992002-04-12 09:54:03 +000016267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016268sed 's/^/| /' conftest.$ac_ext >&5
16269
Martin v. Löwis11437992002-04-12 09:54:03 +000016270eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016272rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016274echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16275echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16276if test `eval echo '${'$as_ac_var'}'` = yes; then
16277 cat >>confdefs.h <<_ACEOF
16278#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16279_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016280
Michael W. Hudson54241132001-12-07 15:38:26 +000016281else
Martin v. Löwis11437992002-04-12 09:54:03 +000016282 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016283fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016284done
16285
Michael W. Hudson54241132001-12-07 15:38:26 +000016286
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016287LIBS=$LIBS_SAVE
16288
Guido van Rossumef2255b2000-03-10 22:30:29 +000016289# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016290if test "${ac_cv_header_wchar_h+set}" = set; then
16291 echo "$as_me:$LINENO: checking for wchar.h" >&5
16292echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16293if test "${ac_cv_header_wchar_h+set}" = set; then
16294 echo $ECHO_N "(cached) $ECHO_C" >&6
16295fi
16296echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16297echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016298else
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 # Is the header compilable?
16300echo "$as_me:$LINENO: checking wchar.h usability" >&5
16301echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16302cat >conftest.$ac_ext <<_ACEOF
16303#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016304/* confdefs.h. */
16305_ACEOF
16306cat confdefs.h >>conftest.$ac_ext
16307cat >>conftest.$ac_ext <<_ACEOF
16308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016309$ac_includes_default
16310#include <wchar.h>
16311_ACEOF
16312rm -f conftest.$ac_objext
16313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16314 (eval $ac_compile) 2>&5
16315 ac_status=$?
16316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16317 (exit $ac_status); } &&
16318 { ac_try='test -s conftest.$ac_objext'
16319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16320 (eval $ac_try) 2>&5
16321 ac_status=$?
16322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16323 (exit $ac_status); }; }; then
16324 ac_header_compiler=yes
16325else
16326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016327sed 's/^/| /' conftest.$ac_ext >&5
16328
Martin v. Löwis11437992002-04-12 09:54:03 +000016329ac_header_compiler=no
16330fi
16331rm -f conftest.$ac_objext conftest.$ac_ext
16332echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16333echo "${ECHO_T}$ac_header_compiler" >&6
16334
16335# Is the header present?
16336echo "$as_me:$LINENO: checking wchar.h presence" >&5
16337echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16338cat >conftest.$ac_ext <<_ACEOF
16339#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016340/* confdefs.h. */
16341_ACEOF
16342cat confdefs.h >>conftest.$ac_ext
16343cat >>conftest.$ac_ext <<_ACEOF
16344/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016345#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016346_ACEOF
16347if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16348 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16349 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016350 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 rm -f conftest.er1
16352 cat conftest.err >&5
16353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16354 (exit $ac_status); } >/dev/null; then
16355 if test -s conftest.err; then
16356 ac_cpp_err=$ac_c_preproc_warn_flag
16357 else
16358 ac_cpp_err=
16359 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016360else
Martin v. Löwis11437992002-04-12 09:54:03 +000016361 ac_cpp_err=yes
16362fi
16363if test -z "$ac_cpp_err"; then
16364 ac_header_preproc=yes
16365else
16366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016367sed 's/^/| /' conftest.$ac_ext >&5
16368
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016370fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016371rm -f conftest.err conftest.$ac_ext
16372echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16373echo "${ECHO_T}$ac_header_preproc" >&6
16374
16375# So? What about this header?
16376case $ac_header_compiler:$ac_header_preproc in
16377 yes:no )
16378 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16379echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16380 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016381echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16382 (
16383 cat <<\_ASBOX
16384## ------------------------------------ ##
16385## Report this to bug-autoconf@gnu.org. ##
16386## ------------------------------------ ##
16387_ASBOX
16388 ) |
16389 sed "s/^/$as_me: WARNING: /" >&2
16390 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 no:yes )
16392 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16393echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16394 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16395echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16396 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016397echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16398 (
16399 cat <<\_ASBOX
16400## ------------------------------------ ##
16401## Report this to bug-autoconf@gnu.org. ##
16402## ------------------------------------ ##
16403_ASBOX
16404 ) |
16405 sed "s/^/$as_me: WARNING: /" >&2
16406 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016407esac
16408echo "$as_me:$LINENO: checking for wchar.h" >&5
16409echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16410if test "${ac_cv_header_wchar_h+set}" = set; then
16411 echo $ECHO_N "(cached) $ECHO_C" >&6
16412else
16413 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016415echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16416echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16417
16418fi
16419if test $ac_cv_header_wchar_h = yes; then
16420
16421
16422cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016423#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016424_ACEOF
16425
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016426 wchar_h="yes"
16427
Guido van Rossumef2255b2000-03-10 22:30:29 +000016428else
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016430
16431fi
16432
Michael W. Hudson54241132001-12-07 15:38:26 +000016433
Martin v. Löwis11437992002-04-12 09:54:03 +000016434
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016435# determine wchar_t size
16436if test "$wchar_h" = yes
16437then
Martin v. Löwis11437992002-04-12 09:54:03 +000016438 echo "$as_me:$LINENO: checking for wchar_t" >&5
16439echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16440if test "${ac_cv_type_wchar_t+set}" = set; then
16441 echo $ECHO_N "(cached) $ECHO_C" >&6
16442else
16443 cat >conftest.$ac_ext <<_ACEOF
16444#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016445/* confdefs.h. */
16446_ACEOF
16447cat confdefs.h >>conftest.$ac_ext
16448cat >>conftest.$ac_ext <<_ACEOF
16449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016450#include <wchar.h>
16451
Martin v. Löwis11437992002-04-12 09:54:03 +000016452int
16453main ()
16454{
16455if ((wchar_t *) 0)
16456 return 0;
16457if (sizeof (wchar_t))
16458 return 0;
16459 ;
16460 return 0;
16461}
16462_ACEOF
16463rm -f conftest.$ac_objext
16464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16465 (eval $ac_compile) 2>&5
16466 ac_status=$?
16467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16468 (exit $ac_status); } &&
16469 { ac_try='test -s conftest.$ac_objext'
16470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16471 (eval $ac_try) 2>&5
16472 ac_status=$?
16473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16474 (exit $ac_status); }; }; then
16475 ac_cv_type_wchar_t=yes
16476else
16477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016478sed 's/^/| /' conftest.$ac_ext >&5
16479
Martin v. Löwis11437992002-04-12 09:54:03 +000016480ac_cv_type_wchar_t=no
16481fi
16482rm -f conftest.$ac_objext conftest.$ac_ext
16483fi
16484echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16485echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16486
16487echo "$as_me:$LINENO: checking size of wchar_t" >&5
16488echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16489if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16490 echo $ECHO_N "(cached) $ECHO_C" >&6
16491else
16492 if test "$ac_cv_type_wchar_t" = yes; then
16493 # The cast to unsigned long works around a bug in the HP C Compiler
16494 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16495 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16496 # This bug is HP SR number 8606223364.
16497 if test "$cross_compiling" = yes; then
16498 # Depending upon the size, compute the lo and hi bounds.
16499cat >conftest.$ac_ext <<_ACEOF
16500#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016501/* confdefs.h. */
16502_ACEOF
16503cat confdefs.h >>conftest.$ac_ext
16504cat >>conftest.$ac_ext <<_ACEOF
16505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016506#include <wchar.h>
16507
Martin v. Löwis11437992002-04-12 09:54:03 +000016508int
16509main ()
16510{
16511static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16512test_array [0] = 0
16513
16514 ;
16515 return 0;
16516}
16517_ACEOF
16518rm -f conftest.$ac_objext
16519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16520 (eval $ac_compile) 2>&5
16521 ac_status=$?
16522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16523 (exit $ac_status); } &&
16524 { ac_try='test -s conftest.$ac_objext'
16525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16526 (eval $ac_try) 2>&5
16527 ac_status=$?
16528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16529 (exit $ac_status); }; }; then
16530 ac_lo=0 ac_mid=0
16531 while :; do
16532 cat >conftest.$ac_ext <<_ACEOF
16533#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016534/* confdefs.h. */
16535_ACEOF
16536cat confdefs.h >>conftest.$ac_ext
16537cat >>conftest.$ac_ext <<_ACEOF
16538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016539#include <wchar.h>
16540
Martin v. Löwis11437992002-04-12 09:54:03 +000016541int
16542main ()
16543{
16544static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16545test_array [0] = 0
16546
16547 ;
16548 return 0;
16549}
16550_ACEOF
16551rm -f conftest.$ac_objext
16552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16553 (eval $ac_compile) 2>&5
16554 ac_status=$?
16555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16556 (exit $ac_status); } &&
16557 { ac_try='test -s conftest.$ac_objext'
16558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16559 (eval $ac_try) 2>&5
16560 ac_status=$?
16561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16562 (exit $ac_status); }; }; then
16563 ac_hi=$ac_mid; break
16564else
16565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016566sed 's/^/| /' conftest.$ac_ext >&5
16567
Martin v. Löwis11437992002-04-12 09:54:03 +000016568ac_lo=`expr $ac_mid + 1`
16569 if test $ac_lo -le $ac_mid; then
16570 ac_lo= ac_hi=
16571 break
16572 fi
16573 ac_mid=`expr 2 '*' $ac_mid + 1`
16574fi
16575rm -f conftest.$ac_objext conftest.$ac_ext
16576 done
16577else
16578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016579sed 's/^/| /' conftest.$ac_ext >&5
16580
Martin v. Löwis11437992002-04-12 09:54:03 +000016581cat >conftest.$ac_ext <<_ACEOF
16582#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016583/* confdefs.h. */
16584_ACEOF
16585cat confdefs.h >>conftest.$ac_ext
16586cat >>conftest.$ac_ext <<_ACEOF
16587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016588#include <wchar.h>
16589
Martin v. Löwis11437992002-04-12 09:54:03 +000016590int
16591main ()
16592{
16593static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16594test_array [0] = 0
16595
16596 ;
16597 return 0;
16598}
16599_ACEOF
16600rm -f conftest.$ac_objext
16601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16602 (eval $ac_compile) 2>&5
16603 ac_status=$?
16604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16605 (exit $ac_status); } &&
16606 { ac_try='test -s conftest.$ac_objext'
16607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16608 (eval $ac_try) 2>&5
16609 ac_status=$?
16610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16611 (exit $ac_status); }; }; then
16612 ac_hi=-1 ac_mid=-1
16613 while :; do
16614 cat >conftest.$ac_ext <<_ACEOF
16615#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016616/* confdefs.h. */
16617_ACEOF
16618cat confdefs.h >>conftest.$ac_ext
16619cat >>conftest.$ac_ext <<_ACEOF
16620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016621#include <wchar.h>
16622
Martin v. Löwis11437992002-04-12 09:54:03 +000016623int
16624main ()
16625{
16626static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16627test_array [0] = 0
16628
16629 ;
16630 return 0;
16631}
16632_ACEOF
16633rm -f conftest.$ac_objext
16634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16635 (eval $ac_compile) 2>&5
16636 ac_status=$?
16637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16638 (exit $ac_status); } &&
16639 { ac_try='test -s conftest.$ac_objext'
16640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16641 (eval $ac_try) 2>&5
16642 ac_status=$?
16643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16644 (exit $ac_status); }; }; then
16645 ac_lo=$ac_mid; break
16646else
16647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016648sed 's/^/| /' conftest.$ac_ext >&5
16649
Martin v. Löwis11437992002-04-12 09:54:03 +000016650ac_hi=`expr '(' $ac_mid ')' - 1`
16651 if test $ac_mid -le $ac_hi; then
16652 ac_lo= ac_hi=
16653 break
16654 fi
16655 ac_mid=`expr 2 '*' $ac_mid`
16656fi
16657rm -f conftest.$ac_objext conftest.$ac_ext
16658 done
16659else
16660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016661sed 's/^/| /' conftest.$ac_ext >&5
16662
Martin v. Löwis11437992002-04-12 09:54:03 +000016663ac_lo= ac_hi=
16664fi
16665rm -f conftest.$ac_objext conftest.$ac_ext
16666fi
16667rm -f conftest.$ac_objext conftest.$ac_ext
16668# Binary search between lo and hi bounds.
16669while test "x$ac_lo" != "x$ac_hi"; do
16670 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16671 cat >conftest.$ac_ext <<_ACEOF
16672#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016673/* confdefs.h. */
16674_ACEOF
16675cat confdefs.h >>conftest.$ac_ext
16676cat >>conftest.$ac_ext <<_ACEOF
16677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016678#include <wchar.h>
16679
Martin v. Löwis11437992002-04-12 09:54:03 +000016680int
16681main ()
16682{
16683static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16684test_array [0] = 0
16685
16686 ;
16687 return 0;
16688}
16689_ACEOF
16690rm -f conftest.$ac_objext
16691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16692 (eval $ac_compile) 2>&5
16693 ac_status=$?
16694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16695 (exit $ac_status); } &&
16696 { ac_try='test -s conftest.$ac_objext'
16697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16698 (eval $ac_try) 2>&5
16699 ac_status=$?
16700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16701 (exit $ac_status); }; }; then
16702 ac_hi=$ac_mid
16703else
16704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016705sed 's/^/| /' conftest.$ac_ext >&5
16706
Martin v. Löwis11437992002-04-12 09:54:03 +000016707ac_lo=`expr '(' $ac_mid ')' + 1`
16708fi
16709rm -f conftest.$ac_objext conftest.$ac_ext
16710done
16711case $ac_lo in
16712?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016713'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16714See \`config.log' for more details." >&5
16715echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16716See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016717 { (exit 1); exit 1; }; } ;;
16718esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016719else
16720 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016721 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16722See \`config.log' for more details." >&5
16723echo "$as_me: error: cannot run test program while cross compiling
16724See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016725 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016726else
Martin v. Löwis11437992002-04-12 09:54:03 +000016727 cat >conftest.$ac_ext <<_ACEOF
16728#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016729/* confdefs.h. */
16730_ACEOF
16731cat confdefs.h >>conftest.$ac_ext
16732cat >>conftest.$ac_ext <<_ACEOF
16733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016734#include <wchar.h>
16735
16736long longval () { return (long) (sizeof (wchar_t)); }
16737unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016738#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016739#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016740int
16741main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016742{
Martin v. Löwis11437992002-04-12 09:54:03 +000016743
16744 FILE *f = fopen ("conftest.val", "w");
16745 if (! f)
16746 exit (1);
16747 if (((long) (sizeof (wchar_t))) < 0)
16748 {
16749 long i = longval ();
16750 if (i != ((long) (sizeof (wchar_t))))
16751 exit (1);
16752 fprintf (f, "%ld\n", i);
16753 }
16754 else
16755 {
16756 unsigned long i = ulongval ();
16757 if (i != ((long) (sizeof (wchar_t))))
16758 exit (1);
16759 fprintf (f, "%lu\n", i);
16760 }
16761 exit (ferror (f) || fclose (f) != 0);
16762
16763 ;
16764 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016765}
Martin v. Löwis11437992002-04-12 09:54:03 +000016766_ACEOF
16767rm -f conftest$ac_exeext
16768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16769 (eval $ac_link) 2>&5
16770 ac_status=$?
16771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16772 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16774 (eval $ac_try) 2>&5
16775 ac_status=$?
16776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16777 (exit $ac_status); }; }; then
16778 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016779else
Martin v. Löwis11437992002-04-12 09:54:03 +000016780 echo "$as_me: program exited with status $ac_status" >&5
16781echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016782sed 's/^/| /' conftest.$ac_ext >&5
16783
Martin v. Löwis11437992002-04-12 09:54:03 +000016784( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016785{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16786See \`config.log' for more details." >&5
16787echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16788See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016789 { (exit 1); exit 1; }; }
16790fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016791rm -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 +000016792fi
16793fi
16794rm -f conftest.val
16795else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016796 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016797fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016799echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16800echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16801cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016802#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016803_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016804
Michael W. Hudson54241132001-12-07 15:38:26 +000016805
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016806fi
16807
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016808echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16809echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16810have_ucs4_tcl=no
16811cat >conftest.$ac_ext <<_ACEOF
16812#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016813/* confdefs.h. */
16814_ACEOF
16815cat confdefs.h >>conftest.$ac_ext
16816cat >>conftest.$ac_ext <<_ACEOF
16817/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016818
16819#include <tcl.h>
16820#if TCL_UTF_MAX != 6
16821# error "NOT UCS4_TCL"
16822#endif
16823int
16824main ()
16825{
16826
16827 ;
16828 return 0;
16829}
16830_ACEOF
16831rm -f conftest.$ac_objext
16832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16833 (eval $ac_compile) 2>&5
16834 ac_status=$?
16835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16836 (exit $ac_status); } &&
16837 { ac_try='test -s conftest.$ac_objext'
16838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16839 (eval $ac_try) 2>&5
16840 ac_status=$?
16841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16842 (exit $ac_status); }; }; then
16843
16844
16845cat >>confdefs.h <<\_ACEOF
16846#define HAVE_UCS4_TCL 1
16847_ACEOF
16848
16849 have_ucs4_tcl=yes
16850
16851else
16852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016853sed 's/^/| /' conftest.$ac_ext >&5
16854
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016855fi
16856rm -f conftest.$ac_objext conftest.$ac_ext
16857echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16858echo "${ECHO_T}$have_ucs4_tcl" >&6
16859
Skip Montanaro6dead952003-09-25 14:50:04 +000016860# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016861if test "$wchar_h" = yes
16862then
16863 # check whether wchar_t is signed or not
16864 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16865echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16866 if test "${ac_cv_wchar_t_signed+set}" = set; then
16867 echo $ECHO_N "(cached) $ECHO_C" >&6
16868else
16869
16870 if test "$cross_compiling" = yes; then
16871 ac_cv_wchar_t_signed=yes
16872else
16873 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. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016880
16881 #include <wchar.h>
16882 int main()
16883 {
16884 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16885 }
16886
16887_ACEOF
16888rm -f conftest$ac_exeext
16889if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16890 (eval $ac_link) 2>&5
16891 ac_status=$?
16892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16893 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16895 (eval $ac_try) 2>&5
16896 ac_status=$?
16897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16898 (exit $ac_status); }; }; then
16899 ac_cv_wchar_t_signed=yes
16900else
16901 echo "$as_me: program exited with status $ac_status" >&5
16902echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016903sed 's/^/| /' conftest.$ac_ext >&5
16904
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016905( exit $ac_status )
16906ac_cv_wchar_t_signed=no
16907fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016908rm -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 +000016909fi
16910fi
16911
16912 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
16913echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
16914fi
16915
Martin v. Löwis11437992002-04-12 09:54:03 +000016916echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16917echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016918# Check whether --enable-unicode or --disable-unicode was given.
16919if test "${enable_unicode+set}" = set; then
16920 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016921
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016922else
16923 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016924fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016925
16926if test $enable_unicode = yes
16927then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016928 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016929 case "$have_ucs4_tcl" in
16930 yes) enable_unicode="ucs4"
16931 ;;
16932 *) enable_unicode="ucs2"
16933 ;;
16934 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016935fi
16936
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016937
16938
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016939case "$enable_unicode" in
16940ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016941 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016942#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016943_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016944
16945 ;;
16946ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016948#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016949_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016950
16951 ;;
16952esac
16953
Michael W. Hudson54241132001-12-07 15:38:26 +000016954
Martin v. Löwis11437992002-04-12 09:54:03 +000016955
16956
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016957
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016958if test "$enable_unicode" = "no"
16959then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016960 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016961 echo "$as_me:$LINENO: result: not used" >&5
16962echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016963else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016964 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016965
16966cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016967#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016968_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016969
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016970
16971 # wchar_t is only usable if it maps to an unsigned type
16972 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
16973 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016974 then
16975 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016976
Martin v. Löwis11437992002-04-12 09:54:03 +000016977cat >>confdefs.h <<\_ACEOF
16978#define HAVE_USABLE_WCHAR_T 1
16979_ACEOF
16980
16981 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016982#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016983_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016984
16985 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16986 then
16987 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016988 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016989#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016990_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016991
16992 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16993 then
16994 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016995 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016996#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016997_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016998
16999 else
17000 PY_UNICODE_TYPE="no type found"
17001 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017002 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17003echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017004fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017005
17006# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017007echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17008echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17009if test "${ac_cv_c_bigendian+set}" = set; then
17010 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017011else
Martin v. Löwis11437992002-04-12 09:54:03 +000017012 # See if sys/param.h defines the BYTE_ORDER macro.
17013cat >conftest.$ac_ext <<_ACEOF
17014#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017015/* confdefs.h. */
17016_ACEOF
17017cat confdefs.h >>conftest.$ac_ext
17018cat >>conftest.$ac_ext <<_ACEOF
17019/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017020#include <sys/types.h>
17021#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017022
Martin v. Löwis11437992002-04-12 09:54:03 +000017023int
17024main ()
17025{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017026#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17027 bogus endian macros
17028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017029
17030 ;
17031 return 0;
17032}
17033_ACEOF
17034rm -f conftest.$ac_objext
17035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17036 (eval $ac_compile) 2>&5
17037 ac_status=$?
17038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17039 (exit $ac_status); } &&
17040 { ac_try='test -s conftest.$ac_objext'
17041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17042 (eval $ac_try) 2>&5
17043 ac_status=$?
17044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17045 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017046 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017047cat >conftest.$ac_ext <<_ACEOF
17048#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017049/* confdefs.h. */
17050_ACEOF
17051cat confdefs.h >>conftest.$ac_ext
17052cat >>conftest.$ac_ext <<_ACEOF
17053/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017054#include <sys/types.h>
17055#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017056
Martin v. Löwis11437992002-04-12 09:54:03 +000017057int
17058main ()
17059{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017060#if BYTE_ORDER != BIG_ENDIAN
17061 not big endian
17062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017063
17064 ;
17065 return 0;
17066}
17067_ACEOF
17068rm -f conftest.$ac_objext
17069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17070 (eval $ac_compile) 2>&5
17071 ac_status=$?
17072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17073 (exit $ac_status); } &&
17074 { ac_try='test -s conftest.$ac_objext'
17075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17076 (eval $ac_try) 2>&5
17077 ac_status=$?
17078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17079 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017080 ac_cv_c_bigendian=yes
17081else
Martin v. Löwis11437992002-04-12 09:54:03 +000017082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017083sed 's/^/| /' conftest.$ac_ext >&5
17084
Martin v. Löwis11437992002-04-12 09:54:03 +000017085ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017086fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017087rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017088else
Martin v. Löwis11437992002-04-12 09:54:03 +000017089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017090sed 's/^/| /' conftest.$ac_ext >&5
17091
Martin v. Löwis11437992002-04-12 09:54:03 +000017092# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017093if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017094 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 ac_cv_c_bigendian=unknown
17096 cat >conftest.$ac_ext <<_ACEOF
17097#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017098/* confdefs.h. */
17099_ACEOF
17100cat confdefs.h >>conftest.$ac_ext
17101cat >>conftest.$ac_ext <<_ACEOF
17102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017103short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17104short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17105void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17106short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17107short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17108void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017109int
17110main ()
17111{
17112 _ascii (); _ebcdic ();
17113 ;
17114 return 0;
17115}
17116_ACEOF
17117rm -f conftest.$ac_objext
17118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17119 (eval $ac_compile) 2>&5
17120 ac_status=$?
17121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17122 (exit $ac_status); } &&
17123 { ac_try='test -s conftest.$ac_objext'
17124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17125 (eval $ac_try) 2>&5
17126 ac_status=$?
17127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17128 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017129 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017130 ac_cv_c_bigendian=yes
17131fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017132if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017133 if test "$ac_cv_c_bigendian" = unknown; then
17134 ac_cv_c_bigendian=no
17135 else
17136 # finding both strings is unlikely to happen, but who knows?
17137 ac_cv_c_bigendian=unknown
17138 fi
17139fi
17140else
17141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017142sed 's/^/| /' conftest.$ac_ext >&5
17143
Martin v. Löwis11437992002-04-12 09:54:03 +000017144fi
17145rm -f conftest.$ac_objext conftest.$ac_ext
17146else
17147 cat >conftest.$ac_ext <<_ACEOF
17148#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017149/* confdefs.h. */
17150_ACEOF
17151cat confdefs.h >>conftest.$ac_ext
17152cat >>conftest.$ac_ext <<_ACEOF
17153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017154int
17155main ()
17156{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017157 /* Are we little or big endian? From Harbison&Steele. */
17158 union
17159 {
17160 long l;
17161 char c[sizeof (long)];
17162 } u;
17163 u.l = 1;
17164 exit (u.c[sizeof (long) - 1] == 1);
17165}
Martin v. Löwis11437992002-04-12 09:54:03 +000017166_ACEOF
17167rm -f conftest$ac_exeext
17168if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17169 (eval $ac_link) 2>&5
17170 ac_status=$?
17171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17172 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17174 (eval $ac_try) 2>&5
17175 ac_status=$?
17176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17177 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017178 ac_cv_c_bigendian=no
17179else
Martin v. Löwis11437992002-04-12 09:54:03 +000017180 echo "$as_me: program exited with status $ac_status" >&5
17181echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017182sed 's/^/| /' conftest.$ac_ext >&5
17183
Martin v. Löwis11437992002-04-12 09:54:03 +000017184( exit $ac_status )
17185ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017186fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017187rm -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 +000017188fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017189fi
17190rm -f conftest.$ac_objext conftest.$ac_ext
17191fi
17192echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17193echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17194case $ac_cv_c_bigendian in
17195 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017196
Martin v. Löwis11437992002-04-12 09:54:03 +000017197cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017198#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017199_ACEOF
17200 ;;
17201 no)
17202 ;;
17203 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017204 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017205presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017206echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017207presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17208 { (exit 1); exit 1; }; } ;;
17209esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017210
Michael W. Hudson54241132001-12-07 15:38:26 +000017211
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017212# Check whether right shifting a negative integer extends the sign bit
17213# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017214echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17215echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17216if test "${ac_cv_rshift_extends_sign+set}" = set; then
17217 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017218else
Martin v. Löwis11437992002-04-12 09:54:03 +000017219
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017220if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017221 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017222else
Martin v. Löwis11437992002-04-12 09:54:03 +000017223 cat >conftest.$ac_ext <<_ACEOF
17224#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017225/* confdefs.h. */
17226_ACEOF
17227cat confdefs.h >>conftest.$ac_ext
17228cat >>conftest.$ac_ext <<_ACEOF
17229/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017230
17231int main()
17232{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017233 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017234}
17235
Martin v. Löwis11437992002-04-12 09:54:03 +000017236_ACEOF
17237rm -f conftest$ac_exeext
17238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17239 (eval $ac_link) 2>&5
17240 ac_status=$?
17241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17242 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17244 (eval $ac_try) 2>&5
17245 ac_status=$?
17246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17247 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017248 ac_cv_rshift_extends_sign=yes
17249else
Martin v. Löwis11437992002-04-12 09:54:03 +000017250 echo "$as_me: program exited with status $ac_status" >&5
17251echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017252sed 's/^/| /' conftest.$ac_ext >&5
17253
Martin v. Löwis11437992002-04-12 09:54:03 +000017254( exit $ac_status )
17255ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017256fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017257rm -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 +000017258fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017259fi
17260
Martin v. Löwis11437992002-04-12 09:54:03 +000017261echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17262echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017263if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017264then
Martin v. Löwis11437992002-04-12 09:54:03 +000017265
17266cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017267#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017268_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017269
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017270fi
17271
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017272# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017273echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17274echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17275if test "${ac_cv_have_getc_unlocked+set}" = set; then
17276 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017277else
Martin v. Löwis11437992002-04-12 09:54:03 +000017278
17279cat >conftest.$ac_ext <<_ACEOF
17280#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017281/* confdefs.h. */
17282_ACEOF
17283cat confdefs.h >>conftest.$ac_ext
17284cat >>conftest.$ac_ext <<_ACEOF
17285/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017286#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017287int
17288main ()
17289{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017290
17291 FILE *f = fopen("/dev/null", "r");
17292 flockfile(f);
17293 getc_unlocked(f);
17294 funlockfile(f);
17295
Martin v. Löwis11437992002-04-12 09:54:03 +000017296 ;
17297 return 0;
17298}
17299_ACEOF
17300rm -f conftest.$ac_objext conftest$ac_exeext
17301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17302 (eval $ac_link) 2>&5
17303 ac_status=$?
17304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17305 (exit $ac_status); } &&
17306 { ac_try='test -s conftest$ac_exeext'
17307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17308 (eval $ac_try) 2>&5
17309 ac_status=$?
17310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17311 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017312 ac_cv_have_getc_unlocked=yes
17313else
Martin v. Löwis11437992002-04-12 09:54:03 +000017314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017315sed 's/^/| /' conftest.$ac_ext >&5
17316
Martin v. Löwis11437992002-04-12 09:54:03 +000017317ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017318fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017319rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017320fi
17321
Martin v. Löwis11437992002-04-12 09:54:03 +000017322echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17323echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017324if test "$ac_cv_have_getc_unlocked" = yes
17325then
Martin v. Löwis11437992002-04-12 09:54:03 +000017326
17327cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017328#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017329_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017330
17331fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017332
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017333# check for readline 2.2
17334cat >conftest.$ac_ext <<_ACEOF
17335#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017336/* confdefs.h. */
17337_ACEOF
17338cat confdefs.h >>conftest.$ac_ext
17339cat >>conftest.$ac_ext <<_ACEOF
17340/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017341#include <readline/readline.h>
17342_ACEOF
17343if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17344 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17345 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017346 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017347 rm -f conftest.er1
17348 cat conftest.err >&5
17349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17350 (exit $ac_status); } >/dev/null; then
17351 if test -s conftest.err; then
17352 ac_cpp_err=$ac_c_preproc_warn_flag
17353 else
17354 ac_cpp_err=
17355 fi
17356else
17357 ac_cpp_err=yes
17358fi
17359if test -z "$ac_cpp_err"; then
17360 have_readline=yes
17361else
17362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017363sed 's/^/| /' conftest.$ac_ext >&5
17364
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017365 have_readline=no
17366fi
17367rm -f conftest.err conftest.$ac_ext
17368if test $have_readline = yes
17369then
17370 cat >conftest.$ac_ext <<_ACEOF
17371#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017372/* confdefs.h. */
17373_ACEOF
17374cat confdefs.h >>conftest.$ac_ext
17375cat >>conftest.$ac_ext <<_ACEOF
17376/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017377#include <readline/readline.h>
17378
17379_ACEOF
17380if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017381 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017382
17383cat >>confdefs.h <<\_ACEOF
17384#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17385_ACEOF
17386
17387fi
17388rm -f conftest*
17389
17390fi
17391
Martin v. Löwis0daad592001-09-30 21:09:59 +000017392# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017393echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17394echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17395if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17396 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017397else
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017399LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017400cat >conftest.$ac_ext <<_ACEOF
17401#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017402/* confdefs.h. */
17403_ACEOF
17404cat confdefs.h >>conftest.$ac_ext
17405cat >>conftest.$ac_ext <<_ACEOF
17406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017407
Guido van Rossum353ae582001-07-10 16:45:32 +000017408/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017409#ifdef __cplusplus
17410extern "C"
17411#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017412/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017413 builtin and then its argument prototype would still apply. */
17414char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017415int
17416main ()
17417{
17418rl_pre_input_hook ();
17419 ;
17420 return 0;
17421}
17422_ACEOF
17423rm -f conftest.$ac_objext conftest$ac_exeext
17424if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17425 (eval $ac_link) 2>&5
17426 ac_status=$?
17427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17428 (exit $ac_status); } &&
17429 { ac_try='test -s conftest$ac_exeext'
17430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17431 (eval $ac_try) 2>&5
17432 ac_status=$?
17433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17434 (exit $ac_status); }; }; then
17435 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017436else
Martin v. Löwis11437992002-04-12 09:54:03 +000017437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017438sed 's/^/| /' conftest.$ac_ext >&5
17439
Martin v. Löwis11437992002-04-12 09:54:03 +000017440ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017442rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17443LIBS=$ac_check_lib_save_LIBS
17444fi
17445echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17446echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17447if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017448
Martin v. Löwis11437992002-04-12 09:54:03 +000017449cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017450#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017451_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017452
Martin v. Löwis0daad592001-09-30 21:09:59 +000017453fi
17454
Michael W. Hudson54241132001-12-07 15:38:26 +000017455
Martin v. Löwis0daad592001-09-30 21:09:59 +000017456# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017457echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17458echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17459if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17460 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017461else
Martin v. Löwis11437992002-04-12 09:54:03 +000017462 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017463LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017464cat >conftest.$ac_ext <<_ACEOF
17465#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017466/* confdefs.h. */
17467_ACEOF
17468cat confdefs.h >>conftest.$ac_ext
17469cat >>conftest.$ac_ext <<_ACEOF
17470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017471
Martin v. Löwis0daad592001-09-30 21:09:59 +000017472/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017473#ifdef __cplusplus
17474extern "C"
17475#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017476/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 builtin and then its argument prototype would still apply. */
17478char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017479int
17480main ()
17481{
17482rl_completion_matches ();
17483 ;
17484 return 0;
17485}
17486_ACEOF
17487rm -f conftest.$ac_objext conftest$ac_exeext
17488if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17489 (eval $ac_link) 2>&5
17490 ac_status=$?
17491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17492 (exit $ac_status); } &&
17493 { ac_try='test -s conftest$ac_exeext'
17494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17495 (eval $ac_try) 2>&5
17496 ac_status=$?
17497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17498 (exit $ac_status); }; }; then
17499 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017500else
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017502sed 's/^/| /' conftest.$ac_ext >&5
17503
Martin v. Löwis11437992002-04-12 09:54:03 +000017504ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017505fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017506rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17507LIBS=$ac_check_lib_save_LIBS
17508fi
17509echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17510echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17511if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017512
Martin v. Löwis11437992002-04-12 09:54:03 +000017513cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017514#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017515_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017516
Guido van Rossum353ae582001-07-10 16:45:32 +000017517fi
17518
Jack Jansendd19cf82001-12-06 22:36:17 +000017519
Martin v. Löwis11437992002-04-12 09:54:03 +000017520echo "$as_me:$LINENO: checking for broken nice()" >&5
17521echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17522if test "${ac_cv_broken_nice+set}" = set; then
17523 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017524else
Martin v. Löwis11437992002-04-12 09:54:03 +000017525
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017526if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017527 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017528else
Martin v. Löwis11437992002-04-12 09:54:03 +000017529 cat >conftest.$ac_ext <<_ACEOF
17530#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017531/* confdefs.h. */
17532_ACEOF
17533cat confdefs.h >>conftest.$ac_ext
17534cat >>conftest.$ac_ext <<_ACEOF
17535/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017536
17537int main()
17538{
17539 int val1 = nice(1);
17540 if (val1 != -1 && val1 == nice(2))
17541 exit(0);
17542 exit(1);
17543}
17544
Martin v. Löwis11437992002-04-12 09:54:03 +000017545_ACEOF
17546rm -f conftest$ac_exeext
17547if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17548 (eval $ac_link) 2>&5
17549 ac_status=$?
17550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17551 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17553 (eval $ac_try) 2>&5
17554 ac_status=$?
17555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17556 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017557 ac_cv_broken_nice=yes
17558else
Martin v. Löwis11437992002-04-12 09:54:03 +000017559 echo "$as_me: program exited with status $ac_status" >&5
17560echo "$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 +000017563( exit $ac_status )
17564ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017565fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017566rm -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 +000017567fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017568fi
17569
Martin v. Löwis11437992002-04-12 09:54:03 +000017570echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17571echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017572if test "$ac_cv_broken_nice" = yes
17573then
Martin v. Löwis11437992002-04-12 09:54:03 +000017574
17575cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017576#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017577_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017578
17579fi
17580
Nicholas Bastine62c5c82004-03-21 23:45:42 +000017581echo "$as_me:$LINENO: checking for broken poll()" >&5
17582echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
17583if test "$cross_compiling" = yes; then
17584 ac_cv_broken_poll=no
17585else
17586 cat >conftest.$ac_ext <<_ACEOF
17587#line $LINENO "configure"
17588/* confdefs.h. */
17589_ACEOF
17590cat confdefs.h >>conftest.$ac_ext
17591cat >>conftest.$ac_ext <<_ACEOF
17592/* end confdefs.h. */
17593
17594#include <poll.h>
17595
17596int main (void)
17597 {
17598 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
17599
17600 close (42);
17601
17602 int poll_test = poll (&poll_struct, 1, 0);
17603
17604 if (poll_test < 0)
17605 {
17606 exit(0);
17607 }
17608 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
17609 {
17610 exit(0);
17611 }
17612 else
17613 {
17614 exit(1);
17615 }
17616 }
17617
17618_ACEOF
17619rm -f conftest$ac_exeext
17620if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17621 (eval $ac_link) 2>&5
17622 ac_status=$?
17623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17624 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17626 (eval $ac_try) 2>&5
17627 ac_status=$?
17628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17629 (exit $ac_status); }; }; then
17630 ac_cv_broken_poll=yes
17631else
17632 echo "$as_me: program exited with status $ac_status" >&5
17633echo "$as_me: failed program was:" >&5
17634sed 's/^/| /' conftest.$ac_ext >&5
17635
17636( exit $ac_status )
17637ac_cv_broken_poll=no
17638fi
17639rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17640fi
17641echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
17642echo "${ECHO_T}$ac_cv_broken_poll" >&6
17643if test "$ac_cv_broken_poll" = yes
17644then
17645
17646cat >>confdefs.h <<\_ACEOF
17647#define HAVE_BROKEN_POLL 1
17648_ACEOF
17649
17650fi
17651
17652
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017653# tzset(3) exists and works like we expect it to
17654echo "$as_me:$LINENO: checking for working tzset()" >&5
17655echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17656if test "${ac_cv_working_tzset+set}" = set; then
17657 echo $ECHO_N "(cached) $ECHO_C" >&6
17658else
17659
17660if test "$cross_compiling" = yes; then
17661 ac_cv_working_tzset=no
17662else
17663 cat >conftest.$ac_ext <<_ACEOF
17664#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017665/* confdefs.h. */
17666_ACEOF
17667cat confdefs.h >>conftest.$ac_ext
17668cat >>conftest.$ac_ext <<_ACEOF
17669/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017670
17671#include <stdlib.h>
17672#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017673#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017674int main()
17675{
Brett Cannon18367812003-09-19 00:59:16 +000017676 /* Note that we need to ensure that not only does tzset(3)
17677 do 'something' with localtime, but it works as documented
17678 in the library reference and as expected by the test suite.
17679
17680 Red Hat 6.2 doesn't understand the southern hemisphere
17681 after New Year's Day; it thinks swaps on that day.
17682 */
17683
17684 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17685 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17686
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017687 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017688 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017689 if (localtime(&groundhogday)->tm_hour != 0)
17690 exit(1);
17691
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017692 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017693 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017694 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017695 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017696
17697 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17698 tzset();
17699 if (localtime(&groundhogday)->tm_hour != 11)
17700 exit(1);
17701 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17702 exit(1);
17703 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17704 exit(1);
17705
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017706 exit(0);
17707}
17708
17709_ACEOF
17710rm -f conftest$ac_exeext
17711if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17712 (eval $ac_link) 2>&5
17713 ac_status=$?
17714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17715 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17717 (eval $ac_try) 2>&5
17718 ac_status=$?
17719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17720 (exit $ac_status); }; }; then
17721 ac_cv_working_tzset=yes
17722else
17723 echo "$as_me: program exited with status $ac_status" >&5
17724echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017725sed 's/^/| /' conftest.$ac_ext >&5
17726
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017727( exit $ac_status )
17728ac_cv_working_tzset=no
17729fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017730rm -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 +000017731fi
17732fi
17733
17734echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17735echo "${ECHO_T}$ac_cv_working_tzset" >&6
17736if test "$ac_cv_working_tzset" = yes
17737then
17738
17739cat >>confdefs.h <<\_ACEOF
17740#define HAVE_WORKING_TZSET 1
17741_ACEOF
17742
17743fi
17744
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017745# Look for subsecond timestamps in struct stat
17746echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17747echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17748if test "${ac_cv_stat_tv_nsec+set}" = set; then
17749 echo $ECHO_N "(cached) $ECHO_C" >&6
17750else
17751 cat >conftest.$ac_ext <<_ACEOF
17752#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017753/* confdefs.h. */
17754_ACEOF
17755cat confdefs.h >>conftest.$ac_ext
17756cat >>conftest.$ac_ext <<_ACEOF
17757/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017758#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017759int
17760main ()
17761{
17762
17763struct stat st;
17764st.st_mtim.tv_nsec = 1;
17765
17766 ;
17767 return 0;
17768}
17769_ACEOF
17770rm -f conftest.$ac_objext
17771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17772 (eval $ac_compile) 2>&5
17773 ac_status=$?
17774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17775 (exit $ac_status); } &&
17776 { ac_try='test -s conftest.$ac_objext'
17777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17778 (eval $ac_try) 2>&5
17779 ac_status=$?
17780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17781 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017782 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017783else
17784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017785sed 's/^/| /' conftest.$ac_ext >&5
17786
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017787ac_cv_stat_tv_nsec=no
17788fi
17789rm -f conftest.$ac_objext conftest.$ac_ext
17790fi
17791
17792echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17793echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17794if test "$ac_cv_stat_tv_nsec" = yes
17795then
17796
17797cat >>confdefs.h <<\_ACEOF
17798#define HAVE_STAT_TV_NSEC 1
17799_ACEOF
17800
17801fi
17802
Jack Jansen666b1e72001-10-31 12:11:48 +000017803# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017804echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17805echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17806if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17807 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017808else
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 cat >conftest.$ac_ext <<_ACEOF
17810#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017811/* confdefs.h. */
17812_ACEOF
17813cat confdefs.h >>conftest.$ac_ext
17814cat >>conftest.$ac_ext <<_ACEOF
17815/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017816#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017817int
17818main ()
17819{
Jack Jansen666b1e72001-10-31 12:11:48 +000017820
17821 int rtn;
17822 rtn = mvwdelch(0,0,0);
17823
Martin v. Löwis11437992002-04-12 09:54:03 +000017824 ;
17825 return 0;
17826}
17827_ACEOF
17828rm -f conftest.$ac_objext
17829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17830 (eval $ac_compile) 2>&5
17831 ac_status=$?
17832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17833 (exit $ac_status); } &&
17834 { ac_try='test -s conftest.$ac_objext'
17835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17836 (eval $ac_try) 2>&5
17837 ac_status=$?
17838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17839 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017840 ac_cv_mvwdelch_is_expression=yes
17841else
Martin v. Löwis11437992002-04-12 09:54:03 +000017842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017843sed 's/^/| /' conftest.$ac_ext >&5
17844
Martin v. Löwis11437992002-04-12 09:54:03 +000017845ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017847rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017848fi
17849
Martin v. Löwis11437992002-04-12 09:54:03 +000017850echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17851echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017852
17853if test "$ac_cv_mvwdelch_is_expression" = yes
17854then
Martin v. Löwis11437992002-04-12 09:54:03 +000017855
17856cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017857#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017858_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017859
17860fi
17861
Martin v. Löwis11437992002-04-12 09:54:03 +000017862echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17863echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17864if test "${ac_cv_window_has_flags+set}" = set; then
17865 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017866else
Martin v. Löwis11437992002-04-12 09:54:03 +000017867 cat >conftest.$ac_ext <<_ACEOF
17868#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017869/* confdefs.h. */
17870_ACEOF
17871cat confdefs.h >>conftest.$ac_ext
17872cat >>conftest.$ac_ext <<_ACEOF
17873/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017874#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017875int
17876main ()
17877{
Jack Jansen666b1e72001-10-31 12:11:48 +000017878
17879 WINDOW *w;
17880 w->_flags = 0;
17881
Martin v. Löwis11437992002-04-12 09:54:03 +000017882 ;
17883 return 0;
17884}
17885_ACEOF
17886rm -f conftest.$ac_objext
17887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17888 (eval $ac_compile) 2>&5
17889 ac_status=$?
17890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17891 (exit $ac_status); } &&
17892 { ac_try='test -s conftest.$ac_objext'
17893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17894 (eval $ac_try) 2>&5
17895 ac_status=$?
17896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17897 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017898 ac_cv_window_has_flags=yes
17899else
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017901sed 's/^/| /' conftest.$ac_ext >&5
17902
Martin v. Löwis11437992002-04-12 09:54:03 +000017903ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017904fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017905rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017906fi
17907
Martin v. Löwis11437992002-04-12 09:54:03 +000017908echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17909echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017910
Jack Jansen666b1e72001-10-31 12:11:48 +000017911
17912if test "$ac_cv_window_has_flags" = yes
17913then
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
17915cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017916#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017917_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017918
17919fi
17920
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017921echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17922echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17923
17924if test -e /dev/ptmx
17925then
17926 echo "$as_me:$LINENO: result: yes" >&5
17927echo "${ECHO_T}yes" >&6
17928
17929cat >>confdefs.h <<\_ACEOF
17930#define HAVE_DEV_PTMX 1
17931_ACEOF
17932
17933else
17934 echo "$as_me:$LINENO: result: no" >&5
17935echo "${ECHO_T}no" >&6
17936fi
17937
Neal Norwitz865400f2003-03-21 01:42:58 +000017938echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17939echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17940
17941if test -e /dev/ptc
17942then
17943 echo "$as_me:$LINENO: result: yes" >&5
17944echo "${ECHO_T}yes" >&6
17945
17946cat >>confdefs.h <<\_ACEOF
17947#define HAVE_DEV_PTC 1
17948_ACEOF
17949
17950else
17951 echo "$as_me:$LINENO: result: no" >&5
17952echo "${ECHO_T}no" >&6
17953fi
17954
Martin v. Löwis11437992002-04-12 09:54:03 +000017955echo "$as_me:$LINENO: checking for socklen_t" >&5
17956echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17957if test "${ac_cv_type_socklen_t+set}" = set; then
17958 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017959else
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 cat >conftest.$ac_ext <<_ACEOF
17961#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017962/* confdefs.h. */
17963_ACEOF
17964cat confdefs.h >>conftest.$ac_ext
17965cat >>conftest.$ac_ext <<_ACEOF
17966/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000017967
17968#ifdef HAVE_SYS_TYPES_H
17969#include <sys/types.h>
17970#endif
17971#ifdef HAVE_SYS_SOCKET_H
17972#include <sys/socket.h>
17973#endif
17974
17975
Martin v. Löwis11437992002-04-12 09:54:03 +000017976int
17977main ()
17978{
17979if ((socklen_t *) 0)
17980 return 0;
17981if (sizeof (socklen_t))
17982 return 0;
17983 ;
17984 return 0;
17985}
17986_ACEOF
17987rm -f conftest.$ac_objext
17988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17989 (eval $ac_compile) 2>&5
17990 ac_status=$?
17991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17992 (exit $ac_status); } &&
17993 { ac_try='test -s conftest.$ac_objext'
17994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17995 (eval $ac_try) 2>&5
17996 ac_status=$?
17997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17998 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017999 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018000else
Martin v. Löwis11437992002-04-12 09:54:03 +000018001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018002sed 's/^/| /' conftest.$ac_ext >&5
18003
Martin v. Löwis11437992002-04-12 09:54:03 +000018004ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018006rm -f conftest.$ac_objext conftest.$ac_ext
18007fi
18008echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18009echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18010if test $ac_cv_type_socklen_t = yes; then
18011 :
18012else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018013
Martin v. Löwis01c04012002-11-11 14:58:44 +000018014cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018015#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018016_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018017
18018fi
18019
Michael W. Hudson54241132001-12-07 15:38:26 +000018020
Michael W. Hudson54241132001-12-07 15:38:26 +000018021
18022
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018023for h in `(cd $srcdir;echo Python/thread_*.h)`
18024do
18025 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18026done
18027
Michael W. Hudson54241132001-12-07 15:38:26 +000018028
Jack Jansen0b06be72002-06-21 14:48:38 +000018029SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018030echo "$as_me:$LINENO: checking for build directories" >&5
18031echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018032for dir in $SRCDIRS; do
18033 if test ! -d $dir; then
18034 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018035 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018036done
Martin v. Löwis11437992002-04-12 09:54:03 +000018037echo "$as_me:$LINENO: result: done" >&5
18038echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018039
Guido van Rossum627b2d71993-12-24 10:39:16 +000018040# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018041 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018042
Martin v. Löwis11437992002-04-12 09:54:03 +000018043cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018044# This file is a shell script that caches the results of configure
18045# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018046# scripts and configure runs, see configure's option --config-cache.
18047# It is not useful on other systems. If it contains results you don't
18048# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018049#
Martin v. Löwis11437992002-04-12 09:54:03 +000018050# config.status only pays attention to the cache file if you give it
18051# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018052#
Skip Montanaro6dead952003-09-25 14:50:04 +000018053# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018054# loading this file, other *unset* `ac_cv_foo' will be assigned the
18055# following values.
18056
18057_ACEOF
18058
Guido van Rossumf78abae1997-01-21 22:02:36 +000018059# The following way of writing the cache mishandles newlines in values,
18060# but we know of no workaround that is simple, portable, and efficient.
18061# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018062# Ultrix sh set writes to stderr and can't be redirected directly,
18063# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018064{
18065 (set) 2>&1 |
18066 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18067 *ac_space=\ *)
18068 # `set' does not quote correctly, so add quotes (double-quote
18069 # substitution turns \\\\ into \\, and sed turns \\ into \).
18070 sed -n \
18071 "s/'/'\\\\''/g;
18072 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18073 ;;
18074 *)
18075 # `set' quotes correctly as required by POSIX, so do not add quotes.
18076 sed -n \
18077 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18078 ;;
18079 esac;
18080} |
18081 sed '
18082 t clear
18083 : clear
18084 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18085 t end
18086 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18087 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018088if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018089 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018090 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18091 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018092 else
18093 echo "not updating unwritable cache $cache_file"
18094 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018095fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018096rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018097
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018098test "x$prefix" = xNONE && prefix=$ac_default_prefix
18099# Let make expand exec_prefix.
18100test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018101
Martin v. Löwis11437992002-04-12 09:54:03 +000018102# VPATH may cause trouble with some makes, so we remove $(srcdir),
18103# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18104# trailing colons and then remove the whole line if VPATH becomes empty
18105# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018106if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018107 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18108s/:*\$(srcdir):*/:/;
18109s/:*\${srcdir}:*/:/;
18110s/:*@srcdir@:*/:/;
18111s/^\([^=]*=[ ]*\):*/\1/;
18112s/:*$//;
18113s/^[^=]*=[ ]*$//;
18114}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018115fi
18116
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018117DEFS=-DHAVE_CONFIG_H
18118
Skip Montanaro6dead952003-09-25 14:50:04 +000018119ac_libobjs=
18120ac_ltlibobjs=
18121for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18122 # 1. Remove the extension, and $U if already installed.
18123 ac_i=`echo "$ac_i" |
18124 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18125 # 2. Add them.
18126 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18127 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18128done
18129LIBOBJS=$ac_libobjs
18130
18131LTLIBOBJS=$ac_ltlibobjs
18132
18133
Martin v. Löwis11437992002-04-12 09:54:03 +000018134
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018135: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018136ac_clean_files_save=$ac_clean_files
18137ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18138{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18139echo "$as_me: creating $CONFIG_STATUS" >&6;}
18140cat >$CONFIG_STATUS <<_ACEOF
18141#! $SHELL
18142# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018143# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018144# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018145# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018146
Martin v. Löwis11437992002-04-12 09:54:03 +000018147debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018148ac_cs_recheck=false
18149ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018150SHELL=\${CONFIG_SHELL-$SHELL}
18151_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018152
Martin v. Löwis11437992002-04-12 09:54:03 +000018153cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018154## --------------------- ##
18155## M4sh Initialization. ##
18156## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018157
Martin v. Löwis11437992002-04-12 09:54:03 +000018158# Be Bourne compatible
18159if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18160 emulate sh
18161 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018162 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18163 # is contrary to our usage. Disable this feature.
18164 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018165elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18166 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018167fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018168
Martin v. Löwis11437992002-04-12 09:54:03 +000018169# Support unset when possible.
18170if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18171 as_unset=unset
18172else
18173 as_unset=false
18174fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018175
Skip Montanaro6dead952003-09-25 14:50:04 +000018176
18177# Work around bugs in pre-3.0 UWIN ksh.
18178$as_unset ENV MAIL MAILPATH
18179PS1='$ '
18180PS2='> '
18181PS4='+ '
18182
18183# NLS nuisances.
18184for as_var in \
18185 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18186 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18187 LC_TELEPHONE LC_TIME
18188do
18189 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18190 eval $as_var=C; export $as_var
18191 else
18192 $as_unset $as_var
18193 fi
18194done
18195
18196# Required to use basename.
18197if expr a : '\(a\)' >/dev/null 2>&1; then
18198 as_expr=expr
18199else
18200 as_expr=false
18201fi
18202
18203if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18204 as_basename=basename
18205else
18206 as_basename=false
18207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018208
18209
18210# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018211as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018212$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18213 X"$0" : 'X\(//\)$' \| \
18214 X"$0" : 'X\(/\)$' \| \
18215 . : '\(.\)' 2>/dev/null ||
18216echo X/"$0" |
18217 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18218 /^X\/\(\/\/\)$/{ s//\1/; q; }
18219 /^X\/\(\/\).*/{ s//\1/; q; }
18220 s/.*/./; q'`
18221
Skip Montanaro6dead952003-09-25 14:50:04 +000018222
Martin v. Löwis11437992002-04-12 09:54:03 +000018223# PATH needs CR, and LINENO needs CR and PATH.
18224# Avoid depending upon Character Ranges.
18225as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18226as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18227as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18228as_cr_digits='0123456789'
18229as_cr_alnum=$as_cr_Letters$as_cr_digits
18230
18231# The user is always right.
18232if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018233 echo "#! /bin/sh" >conf$$.sh
18234 echo "exit 0" >>conf$$.sh
18235 chmod +x conf$$.sh
18236 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018237 PATH_SEPARATOR=';'
18238 else
18239 PATH_SEPARATOR=:
18240 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018241 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018242fi
18243
18244
18245 as_lineno_1=$LINENO
18246 as_lineno_2=$LINENO
18247 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18248 test "x$as_lineno_1" != "x$as_lineno_2" &&
18249 test "x$as_lineno_3" = "x$as_lineno_2" || {
18250 # Find who we are. Look in the path if we contain no path at all
18251 # relative or not.
18252 case $0 in
18253 *[\\/]* ) as_myself=$0 ;;
18254 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18255for as_dir in $PATH
18256do
18257 IFS=$as_save_IFS
18258 test -z "$as_dir" && as_dir=.
18259 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18260done
18261
18262 ;;
18263 esac
18264 # We did not find ourselves, most probably we were run as `sh COMMAND'
18265 # in which case we are not to be found in the path.
18266 if test "x$as_myself" = x; then
18267 as_myself=$0
18268 fi
18269 if test ! -f "$as_myself"; then
18270 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18271echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18272 { (exit 1); exit 1; }; }
18273 fi
18274 case $CONFIG_SHELL in
18275 '')
18276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18277for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18278do
18279 IFS=$as_save_IFS
18280 test -z "$as_dir" && as_dir=.
18281 for as_base in sh bash ksh sh5; do
18282 case $as_dir in
18283 /*)
18284 if ("$as_dir/$as_base" -c '
18285 as_lineno_1=$LINENO
18286 as_lineno_2=$LINENO
18287 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18288 test "x$as_lineno_1" != "x$as_lineno_2" &&
18289 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018290 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18291 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 CONFIG_SHELL=$as_dir/$as_base
18293 export CONFIG_SHELL
18294 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18295 fi;;
18296 esac
18297 done
18298done
18299;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018300 esac
18301
Martin v. Löwis11437992002-04-12 09:54:03 +000018302 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18303 # uniformly replaced by the line number. The first 'sed' inserts a
18304 # line-number line before each line; the second 'sed' does the real
18305 # work. The second script uses 'N' to pair each line-number line
18306 # with the numbered line, and appends trailing '-' during
18307 # substitution so that $LINENO is not a special case at line end.
18308 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18309 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18310 sed '=' <$as_myself |
18311 sed '
18312 N
18313 s,$,-,
18314 : loop
18315 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18316 t loop
18317 s,-$,,
18318 s,^['$as_cr_digits']*\n,,
18319 ' >$as_me.lineno &&
18320 chmod +x $as_me.lineno ||
18321 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18322echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18323 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018324
Martin v. Löwis11437992002-04-12 09:54:03 +000018325 # Don't try to exec as it changes $[0], causing all sort of problems
18326 # (the dirname of $[0] is not the place where we might find the
18327 # original and so on. Autoconf is especially sensible to this).
18328 . ./$as_me.lineno
18329 # Exit status is that of the last command.
18330 exit
18331}
18332
18333
18334case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18335 *c*,-n*) ECHO_N= ECHO_C='
18336' ECHO_T=' ' ;;
18337 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18338 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18339esac
18340
18341if expr a : '\(a\)' >/dev/null 2>&1; then
18342 as_expr=expr
18343else
18344 as_expr=false
18345fi
18346
18347rm -f conf$$ conf$$.exe conf$$.file
18348echo >conf$$.file
18349if ln -s conf$$.file conf$$ 2>/dev/null; then
18350 # We could just check for DJGPP; but this test a) works b) is more generic
18351 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18352 if test -f conf$$.exe; then
18353 # Don't use ln at all; we don't have any links
18354 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018355 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018356 as_ln_s='ln -s'
18357 fi
18358elif ln conf$$.file conf$$ 2>/dev/null; then
18359 as_ln_s=ln
18360else
18361 as_ln_s='cp -p'
18362fi
18363rm -f conf$$ conf$$.exe conf$$.file
18364
Skip Montanaro6dead952003-09-25 14:50:04 +000018365if mkdir -p . 2>/dev/null; then
18366 as_mkdir_p=:
18367else
18368 as_mkdir_p=false
18369fi
18370
Martin v. Löwis11437992002-04-12 09:54:03 +000018371as_executable_p="test -f"
18372
18373# Sed expression to map a string onto a valid CPP name.
18374as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18375
18376# Sed expression to map a string onto a valid variable name.
18377as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18378
18379
18380# IFS
18381# We need space, tab and new line, in precisely that order.
18382as_nl='
18383'
18384IFS=" $as_nl"
18385
18386# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018387$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018388
18389exec 6>&1
18390
18391# Open the log real soon, to keep \$[0] and so on meaningful, and to
18392# report actual input values of CONFIG_FILES etc. instead of their
18393# values after options handling. Logging --version etc. is OK.
18394exec 5>>config.log
18395{
18396 echo
18397 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18398## Running $as_me. ##
18399_ASBOX
18400} >&5
18401cat >&5 <<_CSEOF
18402
Fred Drake9bd44622003-07-30 17:39:48 +000018403This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018404generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018405
18406 CONFIG_FILES = $CONFIG_FILES
18407 CONFIG_HEADERS = $CONFIG_HEADERS
18408 CONFIG_LINKS = $CONFIG_LINKS
18409 CONFIG_COMMANDS = $CONFIG_COMMANDS
18410 $ $0 $@
18411
18412_CSEOF
18413echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18414echo >&5
18415_ACEOF
18416
18417# Files that config.status was made for.
18418if test -n "$ac_config_files"; then
18419 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18420fi
18421
18422if test -n "$ac_config_headers"; then
18423 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18424fi
18425
18426if test -n "$ac_config_links"; then
18427 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18428fi
18429
18430if test -n "$ac_config_commands"; then
18431 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18432fi
18433
18434cat >>$CONFIG_STATUS <<\_ACEOF
18435
18436ac_cs_usage="\
18437\`$as_me' instantiates files from templates according to the
18438current configuration.
18439
18440Usage: $0 [OPTIONS] [FILE]...
18441
18442 -h, --help print this help, then exit
18443 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018444 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018445 -d, --debug don't remove temporary files
18446 --recheck update $as_me by reconfiguring in the same conditions
18447 --file=FILE[:TEMPLATE]
18448 instantiate the configuration file FILE
18449 --header=FILE[:TEMPLATE]
18450 instantiate the configuration header FILE
18451
18452Configuration files:
18453$config_files
18454
18455Configuration headers:
18456$config_headers
18457
18458Report bugs to <bug-autoconf@gnu.org>."
18459_ACEOF
18460
18461cat >>$CONFIG_STATUS <<_ACEOF
18462ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018463python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018464configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018465 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18466
18467Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18468Free Software Foundation, Inc.
18469This config.status script is free software; the Free Software Foundation
18470gives unlimited permission to copy, distribute and modify it."
18471srcdir=$srcdir
18472INSTALL="$INSTALL"
18473_ACEOF
18474
18475cat >>$CONFIG_STATUS <<\_ACEOF
18476# If no file are specified by the user, then we need to provide default
18477# value. By we need to know if files were specified by the user.
18478ac_need_defaults=:
18479while test $# != 0
18480do
18481 case $1 in
18482 --*=*)
18483 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18484 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018485 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018487 -*)
18488 ac_option=$1
18489 ac_optarg=$2
18490 ac_shift=shift
18491 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018492 *) # This is not an option, so the user has probably given explicit
18493 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018494 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018495 ac_need_defaults=false;;
18496 esac
18497
Skip Montanaro6dead952003-09-25 14:50:04 +000018498 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018499 # Handling of the options.
18500_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018501cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018502 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18503 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018504 --version | --vers* | -V )
18505 echo "$ac_cs_version"; exit 0 ;;
18506 --he | --h)
18507 # Conflict between --help and --header
18508 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18509Try \`$0 --help' for more information." >&5
18510echo "$as_me: error: ambiguous option: $1
18511Try \`$0 --help' for more information." >&2;}
18512 { (exit 1); exit 1; }; };;
18513 --help | --hel | -h )
18514 echo "$ac_cs_usage"; exit 0 ;;
18515 --debug | --d* | -d )
18516 debug=: ;;
18517 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018518 $ac_shift
18519 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018520 ac_need_defaults=false;;
18521 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018522 $ac_shift
18523 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018524 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18526 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18527 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018528
18529 # This is an error.
18530 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18531Try \`$0 --help' for more information." >&5
18532echo "$as_me: error: unrecognized option: $1
18533Try \`$0 --help' for more information." >&2;}
18534 { (exit 1); exit 1; }; } ;;
18535
18536 *) ac_config_targets="$ac_config_targets $1" ;;
18537
18538 esac
18539 shift
18540done
18541
Skip Montanaro6dead952003-09-25 14:50:04 +000018542ac_configure_extra_args=
18543
18544if $ac_cs_silent; then
18545 exec 6>/dev/null
18546 ac_configure_extra_args="$ac_configure_extra_args --silent"
18547fi
18548
18549_ACEOF
18550cat >>$CONFIG_STATUS <<_ACEOF
18551if \$ac_cs_recheck; then
18552 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18553 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18554fi
18555
Martin v. Löwis11437992002-04-12 09:54:03 +000018556_ACEOF
18557
18558
18559
18560
18561
18562cat >>$CONFIG_STATUS <<\_ACEOF
18563for ac_config_target in $ac_config_targets
18564do
18565 case "$ac_config_target" in
18566 # Handling of arguments.
18567 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18568 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18569 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18570 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18571echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18572 { (exit 1); exit 1; }; };;
18573 esac
18574done
18575
18576# If the user did not use the arguments to specify the items to instantiate,
18577# then the envvar interface is used. Set only those that are not.
18578# We use the long form for the default assignment because of an extremely
18579# bizarre bug on SunOS 4.1.3.
18580if $ac_need_defaults; then
18581 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18582 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18583fi
18584
Skip Montanaro6dead952003-09-25 14:50:04 +000018585# Have a temporary directory for convenience. Make it in the build tree
18586# simply because there is no reason to put it here, and in addition,
18587# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018588# Create a temporary directory, and hook for its removal unless debugging.
18589$debug ||
18590{
18591 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18592 trap '{ (exit 1); exit 1; }' 1 2 13 15
18593}
18594
18595# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018596
Martin v. Löwis11437992002-04-12 09:54:03 +000018597{
Skip Montanaro6dead952003-09-25 14:50:04 +000018598 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018599 test -n "$tmp" && test -d "$tmp"
18600} ||
18601{
Skip Montanaro6dead952003-09-25 14:50:04 +000018602 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018603 (umask 077 && mkdir $tmp)
18604} ||
18605{
Skip Montanaro6dead952003-09-25 14:50:04 +000018606 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018607 { (exit 1); exit 1; }
18608}
18609
18610_ACEOF
18611
18612cat >>$CONFIG_STATUS <<_ACEOF
18613
18614#
18615# CONFIG_FILES section.
18616#
18617
18618# No need to generate the scripts if there are no CONFIG_FILES.
18619# This happens for instance when ./config.status config.h
18620if test -n "\$CONFIG_FILES"; then
18621 # Protect against being on the right side of a sed subst in config.status.
18622 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18623 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18624s,@SHELL@,$SHELL,;t t
18625s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18626s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18627s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18628s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18629s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18630s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18631s,@exec_prefix@,$exec_prefix,;t t
18632s,@prefix@,$prefix,;t t
18633s,@program_transform_name@,$program_transform_name,;t t
18634s,@bindir@,$bindir,;t t
18635s,@sbindir@,$sbindir,;t t
18636s,@libexecdir@,$libexecdir,;t t
18637s,@datadir@,$datadir,;t t
18638s,@sysconfdir@,$sysconfdir,;t t
18639s,@sharedstatedir@,$sharedstatedir,;t t
18640s,@localstatedir@,$localstatedir,;t t
18641s,@libdir@,$libdir,;t t
18642s,@includedir@,$includedir,;t t
18643s,@oldincludedir@,$oldincludedir,;t t
18644s,@infodir@,$infodir,;t t
18645s,@mandir@,$mandir,;t t
18646s,@build_alias@,$build_alias,;t t
18647s,@host_alias@,$host_alias,;t t
18648s,@target_alias@,$target_alias,;t t
18649s,@DEFS@,$DEFS,;t t
18650s,@ECHO_C@,$ECHO_C,;t t
18651s,@ECHO_N@,$ECHO_N,;t t
18652s,@ECHO_T@,$ECHO_T,;t t
18653s,@LIBS@,$LIBS,;t t
18654s,@VERSION@,$VERSION,;t t
18655s,@SOVERSION@,$SOVERSION,;t t
18656s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18657s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18658s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18659s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18660s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18661s,@MACHDEP@,$MACHDEP,;t t
18662s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018663s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018664s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018665s,@CXX@,$CXX,;t t
18666s,@MAINOBJ@,$MAINOBJ,;t t
18667s,@EXEEXT@,$EXEEXT,;t t
18668s,@CC@,$CC,;t t
18669s,@CFLAGS@,$CFLAGS,;t t
18670s,@LDFLAGS@,$LDFLAGS,;t t
18671s,@CPPFLAGS@,$CPPFLAGS,;t t
18672s,@ac_ct_CC@,$ac_ct_CC,;t t
18673s,@OBJEXT@,$OBJEXT,;t t
18674s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018675s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018676s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18677s,@LIBRARY@,$LIBRARY,;t t
18678s,@LDLIBRARY@,$LDLIBRARY,;t t
18679s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18680s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18681s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18682s,@INSTSONAME@,$INSTSONAME,;t t
18683s,@RUNSHARED@,$RUNSHARED,;t t
18684s,@LINKCC@,$LINKCC,;t t
18685s,@RANLIB@,$RANLIB,;t t
18686s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18687s,@AR@,$AR,;t t
18688s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18689s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18690s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18691s,@LN@,$LN,;t t
18692s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018693s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018694s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18695s,@SO@,$SO,;t t
18696s,@LDSHARED@,$LDSHARED,;t t
18697s,@BLDSHARED@,$BLDSHARED,;t t
18698s,@CCSHARED@,$CCSHARED,;t t
18699s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18700s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018701s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018702s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18703s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18704s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18705s,@LDLAST@,$LDLAST,;t t
18706s,@THREADOBJ@,$THREADOBJ,;t t
18707s,@DLINCLDIR@,$DLINCLDIR,;t t
18708s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18709s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018710s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018711s,@LIBOBJS@,$LIBOBJS,;t t
18712s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18713s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18714s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18715s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18716s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18717s,@LIBM@,$LIBM,;t t
18718s,@LIBC@,$LIBC,;t t
18719s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18720s,@THREADHEADERS@,$THREADHEADERS,;t t
18721s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018722s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018723CEOF
18724
18725_ACEOF
18726
18727 cat >>$CONFIG_STATUS <<\_ACEOF
18728 # Split the substitutions into bite-sized pieces for seds with
18729 # small command number limits, like on Digital OSF/1 and HP-UX.
18730 ac_max_sed_lines=48
18731 ac_sed_frag=1 # Number of current file.
18732 ac_beg=1 # First line for current file.
18733 ac_end=$ac_max_sed_lines # Line after last line for current file.
18734 ac_more_lines=:
18735 ac_sed_cmds=
18736 while $ac_more_lines; do
18737 if test $ac_beg -gt 1; then
18738 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18739 else
18740 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18741 fi
18742 if test ! -s $tmp/subs.frag; then
18743 ac_more_lines=false
18744 else
18745 # The purpose of the label and of the branching condition is to
18746 # speed up the sed processing (if there are no `@' at all, there
18747 # is no need to browse any of the substitutions).
18748 # These are the two extra sed commands mentioned above.
18749 (echo ':t
18750 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18751 if test -z "$ac_sed_cmds"; then
18752 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18753 else
18754 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18755 fi
18756 ac_sed_frag=`expr $ac_sed_frag + 1`
18757 ac_beg=$ac_end
18758 ac_end=`expr $ac_end + $ac_max_sed_lines`
18759 fi
18760 done
18761 if test -z "$ac_sed_cmds"; then
18762 ac_sed_cmds=cat
18763 fi
18764fi # test -n "$CONFIG_FILES"
18765
18766_ACEOF
18767cat >>$CONFIG_STATUS <<\_ACEOF
18768for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18769 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18770 case $ac_file in
18771 - | *:- | *:-:* ) # input from stdin
18772 cat >$tmp/stdin
18773 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18774 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18775 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18776 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18777 * ) ac_file_in=$ac_file.in ;;
18778 esac
18779
18780 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18781 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18782$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18783 X"$ac_file" : 'X\(//\)[^/]' \| \
18784 X"$ac_file" : 'X\(//\)$' \| \
18785 X"$ac_file" : 'X\(/\)' \| \
18786 . : '\(.\)' 2>/dev/null ||
18787echo X"$ac_file" |
18788 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18789 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18790 /^X\(\/\/\)$/{ s//\1/; q; }
18791 /^X\(\/\).*/{ s//\1/; q; }
18792 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018793 { if $as_mkdir_p; then
18794 mkdir -p "$ac_dir"
18795 else
18796 as_dir="$ac_dir"
18797 as_dirs=
18798 while test ! -d "$as_dir"; do
18799 as_dirs="$as_dir $as_dirs"
18800 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18801$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18802 X"$as_dir" : 'X\(//\)[^/]' \| \
18803 X"$as_dir" : 'X\(//\)$' \| \
18804 X"$as_dir" : 'X\(/\)' \| \
18805 . : '\(.\)' 2>/dev/null ||
18806echo X"$as_dir" |
18807 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18808 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18809 /^X\(\/\/\)$/{ s//\1/; q; }
18810 /^X\(\/\).*/{ s//\1/; q; }
18811 s/.*/./; q'`
18812 done
18813 test ! -n "$as_dirs" || mkdir $as_dirs
18814 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18815echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18816 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018817
18818 ac_builddir=.
18819
18820if test "$ac_dir" != .; then
18821 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18822 # A "../" for each directory in $ac_dir_suffix.
18823 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18824else
18825 ac_dir_suffix= ac_top_builddir=
18826fi
18827
18828case $srcdir in
18829 .) # No --srcdir option. We are building in place.
18830 ac_srcdir=.
18831 if test -z "$ac_top_builddir"; then
18832 ac_top_srcdir=.
18833 else
18834 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18835 fi ;;
18836 [\\/]* | ?:[\\/]* ) # Absolute path.
18837 ac_srcdir=$srcdir$ac_dir_suffix;
18838 ac_top_srcdir=$srcdir ;;
18839 *) # Relative path.
18840 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18841 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18842esac
18843# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18844# absolute.
18845ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018846ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018847ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18848ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18849
18850
18851 case $INSTALL in
18852 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18853 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18854 esac
18855
18856 if test x"$ac_file" != x-; then
18857 { echo "$as_me:$LINENO: creating $ac_file" >&5
18858echo "$as_me: creating $ac_file" >&6;}
18859 rm -f "$ac_file"
18860 fi
18861 # Let's still pretend it is `configure' which instantiates (i.e., don't
18862 # use $as_me), people would be surprised to read:
18863 # /* config.h. Generated by config.status. */
18864 if test x"$ac_file" = x-; then
18865 configure_input=
18866 else
18867 configure_input="$ac_file. "
18868 fi
18869 configure_input=$configure_input"Generated from `echo $ac_file_in |
18870 sed 's,.*/,,'` by configure."
18871
18872 # First look for the input files in the build tree, otherwise in the
18873 # src tree.
18874 ac_file_inputs=`IFS=:
18875 for f in $ac_file_in; do
18876 case $f in
18877 -) echo $tmp/stdin ;;
18878 [\\/$]*)
18879 # Absolute (can't be DOS-style, as IFS=:)
18880 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18881echo "$as_me: error: cannot find input file: $f" >&2;}
18882 { (exit 1); exit 1; }; }
18883 echo $f;;
18884 *) # Relative
18885 if test -f "$f"; then
18886 # Build tree
18887 echo $f
18888 elif test -f "$srcdir/$f"; then
18889 # Source tree
18890 echo $srcdir/$f
18891 else
18892 # /dev/null tree
18893 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18894echo "$as_me: error: cannot find input file: $f" >&2;}
18895 { (exit 1); exit 1; }; }
18896 fi;;
18897 esac
18898 done` || { (exit 1); exit 1; }
18899_ACEOF
18900cat >>$CONFIG_STATUS <<_ACEOF
18901 sed "$ac_vpsub
18902$extrasub
18903_ACEOF
18904cat >>$CONFIG_STATUS <<\_ACEOF
18905:t
18906/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18907s,@configure_input@,$configure_input,;t t
18908s,@srcdir@,$ac_srcdir,;t t
18909s,@abs_srcdir@,$ac_abs_srcdir,;t t
18910s,@top_srcdir@,$ac_top_srcdir,;t t
18911s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18912s,@builddir@,$ac_builddir,;t t
18913s,@abs_builddir@,$ac_abs_builddir,;t t
18914s,@top_builddir@,$ac_top_builddir,;t t
18915s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18916s,@INSTALL@,$ac_INSTALL,;t t
18917" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18918 rm -f $tmp/stdin
18919 if test x"$ac_file" != x-; then
18920 mv $tmp/out $ac_file
18921 else
18922 cat $tmp/out
18923 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018924 fi
18925
Martin v. Löwis11437992002-04-12 09:54:03 +000018926done
18927_ACEOF
18928cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018929
Martin v. Löwis11437992002-04-12 09:54:03 +000018930#
18931# CONFIG_HEADER section.
18932#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018933
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018934# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18935# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018936#
18937# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018938ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18939ac_dB='[ ].*$,\1#\2'
18940ac_dC=' '
18941ac_dD=',;t'
18942# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18943ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18944ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018945ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018946ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018947
Martin v. Löwis11437992002-04-12 09:54:03 +000018948for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018949 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018950 case $ac_file in
18951 - | *:- | *:-:* ) # input from stdin
18952 cat >$tmp/stdin
18953 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18954 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18955 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18956 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18957 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018958 esac
18959
Martin v. Löwis11437992002-04-12 09:54:03 +000018960 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18961echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018962
Martin v. Löwis11437992002-04-12 09:54:03 +000018963 # First look for the input files in the build tree, otherwise in the
18964 # src tree.
18965 ac_file_inputs=`IFS=:
18966 for f in $ac_file_in; do
18967 case $f in
18968 -) echo $tmp/stdin ;;
18969 [\\/$]*)
18970 # Absolute (can't be DOS-style, as IFS=:)
18971 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18972echo "$as_me: error: cannot find input file: $f" >&2;}
18973 { (exit 1); exit 1; }; }
18974 echo $f;;
18975 *) # Relative
18976 if test -f "$f"; then
18977 # Build tree
18978 echo $f
18979 elif test -f "$srcdir/$f"; then
18980 # Source tree
18981 echo $srcdir/$f
18982 else
18983 # /dev/null tree
18984 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18985echo "$as_me: error: cannot find input file: $f" >&2;}
18986 { (exit 1); exit 1; }; }
18987 fi;;
18988 esac
18989 done` || { (exit 1); exit 1; }
18990 # Remove the trailing spaces.
18991 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018992
Martin v. Löwis11437992002-04-12 09:54:03 +000018993_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018994
Martin v. Löwis11437992002-04-12 09:54:03 +000018995# Transform confdefs.h into two sed scripts, `conftest.defines' and
18996# `conftest.undefs', that substitutes the proper values into
18997# config.h.in to produce config.h. The first handles `#define'
18998# templates, and the second `#undef' templates.
18999# And first: Protect against being on the right side of a sed subst in
19000# config.status. Protect against being in an unquoted here document
19001# in config.status.
19002rm -f conftest.defines conftest.undefs
19003# Using a here document instead of a string reduces the quoting nightmare.
19004# Putting comments in sed scripts is not portable.
19005#
19006# `end' is used to avoid that the second main sed command (meant for
19007# 0-ary CPP macros) applies to n-ary macro definitions.
19008# See the Autoconf documentation for `clear'.
19009cat >confdef2sed.sed <<\_ACEOF
19010s/[\\&,]/\\&/g
19011s,[\\$`],\\&,g
19012t clear
19013: clear
19014s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19015t end
19016s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19017: end
19018_ACEOF
19019# If some macros were called several times there might be several times
19020# the same #defines, which is useless. Nevertheless, we may not want to
19021# sort them, since we want the *last* AC-DEFINE to be honored.
19022uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19023sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19024rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019025
19026# This sed command replaces #undef with comments. This is necessary, for
19027# example, in the case of _POSIX_SOURCE, which is predefined and required
19028# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019029cat >>conftest.undefs <<\_ACEOF
19030s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19031_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019032
Martin v. Löwis11437992002-04-12 09:54:03 +000019033# Break up conftest.defines because some shells have a limit on the size
19034# of here documents, and old seds have small limits too (100 cmds).
19035echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019036echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019037echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19038echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019039rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019040while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019041do
Martin v. Löwis11437992002-04-12 09:54:03 +000019042 # Write a limited-size here document to $tmp/defines.sed.
19043 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19044 # Speed up: don't consider the non `#define' lines.
19045 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19046 # Work around the forget-to-reset-the-flag bug.
19047 echo 't clr' >>$CONFIG_STATUS
19048 echo ': clr' >>$CONFIG_STATUS
19049 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019050 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19052 rm -f $tmp/in
19053 mv $tmp/out $tmp/in
19054' >>$CONFIG_STATUS
19055 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19056 rm -f conftest.defines
19057 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019058done
Martin v. Löwis11437992002-04-12 09:54:03 +000019059rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019060echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019061echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019062
Martin v. Löwis11437992002-04-12 09:54:03 +000019063# Break up conftest.undefs because some shells have a limit on the size
19064# of here documents, and old seds have small limits too (100 cmds).
19065echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19066rm -f conftest.tail
19067while grep . conftest.undefs >/dev/null
19068do
19069 # Write a limited-size here document to $tmp/undefs.sed.
19070 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19071 # Speed up: don't consider the non `#undef'
19072 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19073 # Work around the forget-to-reset-the-flag bug.
19074 echo 't clr' >>$CONFIG_STATUS
19075 echo ': clr' >>$CONFIG_STATUS
19076 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19077 echo 'CEOF
19078 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19079 rm -f $tmp/in
19080 mv $tmp/out $tmp/in
19081' >>$CONFIG_STATUS
19082 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19083 rm -f conftest.undefs
19084 mv conftest.tail conftest.undefs
19085done
19086rm -f conftest.undefs
19087
19088cat >>$CONFIG_STATUS <<\_ACEOF
19089 # Let's still pretend it is `configure' which instantiates (i.e., don't
19090 # use $as_me), people would be surprised to read:
19091 # /* config.h. Generated by config.status. */
19092 if test x"$ac_file" = x-; then
19093 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019094 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019095 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019097 cat $tmp/in >>$tmp/config.h
19098 rm -f $tmp/in
19099 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019100 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019101 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19102echo "$as_me: $ac_file is unchanged" >&6;}
19103 else
19104 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19105$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19106 X"$ac_file" : 'X\(//\)[^/]' \| \
19107 X"$ac_file" : 'X\(//\)$' \| \
19108 X"$ac_file" : 'X\(/\)' \| \
19109 . : '\(.\)' 2>/dev/null ||
19110echo X"$ac_file" |
19111 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19112 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19113 /^X\(\/\/\)$/{ s//\1/; q; }
19114 /^X\(\/\).*/{ s//\1/; q; }
19115 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019116 { if $as_mkdir_p; then
19117 mkdir -p "$ac_dir"
19118 else
19119 as_dir="$ac_dir"
19120 as_dirs=
19121 while test ! -d "$as_dir"; do
19122 as_dirs="$as_dir $as_dirs"
19123 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19124$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19125 X"$as_dir" : 'X\(//\)[^/]' \| \
19126 X"$as_dir" : 'X\(//\)$' \| \
19127 X"$as_dir" : 'X\(/\)' \| \
19128 . : '\(.\)' 2>/dev/null ||
19129echo X"$as_dir" |
19130 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19131 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19132 /^X\(\/\/\)$/{ s//\1/; q; }
19133 /^X\(\/\).*/{ s//\1/; q; }
19134 s/.*/./; q'`
19135 done
19136 test ! -n "$as_dirs" || mkdir $as_dirs
19137 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19138echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19139 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019140
Martin v. Löwis11437992002-04-12 09:54:03 +000019141 rm -f $ac_file
19142 mv $tmp/config.h $ac_file
19143 fi
19144 else
19145 cat $tmp/config.h
19146 rm -f $tmp/config.h
19147 fi
19148done
19149_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019150
Martin v. Löwis11437992002-04-12 09:54:03 +000019151cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019152
Martin v. Löwis11437992002-04-12 09:54:03 +000019153{ (exit 0); exit 0; }
19154_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019155chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019156ac_clean_files=$ac_clean_files_save
19157
19158
19159# configure is writing to config.log, and then calls config.status.
19160# config.status does its own redirection, appending to config.log.
19161# Unfortunately, on DOS this fails, as config.log is still kept open
19162# by configure, so config.status won't be able to write to it; its
19163# output is simply discarded. So we exec the FD to /dev/null,
19164# effectively closing config.log, so it can be properly (re)opened and
19165# appended to by config.status. When coming back to configure, we
19166# need to make the FD available again.
19167if test "$no_create" != yes; then
19168 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019169 ac_config_status_args=
19170 test "$silent" = yes &&
19171 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019172 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019173 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019174 exec 5>>config.log
19175 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19176 # would make configure fail if this is the last instruction.
19177 $ac_cs_success || { (exit 1); exit 1; }
19178fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019179
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019180
19181echo "creating Setup"
19182if test ! -f Modules/Setup
19183then
19184 cp $srcdir/Modules/Setup.dist Modules/Setup
19185fi
19186
19187echo "creating Setup.local"
19188if test ! -f Modules/Setup.local
19189then
19190 echo "# Edit this file for local setup changes" >Modules/Setup.local
19191fi
19192
19193echo "creating Makefile"
19194$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19195 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019196 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019197mv config.c Modules